[BACK]Return to write.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / write

Diff for /src/usr.bin/write/write.c between version 1.27 and 1.28

version 1.27, 2013/04/16 19:24:55 version 1.28, 2015/01/16 06:40:14
Line 33 
Line 33 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #include <sys/param.h>  
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <ctype.h>  #include <ctype.h>
 #include <stdio.h>  #include <stdio.h>
Line 45 
Line 44 
 #include <paths.h>  #include <paths.h>
 #include <pwd.h>  #include <pwd.h>
 #include <unistd.h>  #include <unistd.h>
   #include <limits.h>
 #include <utmp.h>  #include <utmp.h>
 #include <err.h>  #include <err.h>
 #include <vis.h>  #include <vis.h>
Line 59 
Line 59 
 int  int
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
         char tty[MAXPATHLEN], *mytty, *cp;          char tty[PATH_MAX], *mytty, *cp;
         int msgsok, myttyfd;          int msgsok, myttyfd;
         time_t atime;          time_t atime;
         uid_t myuid;          uid_t myuid;
Line 204 
Line 204 
 term_chk(char *tty, int *msgsokP, time_t *atimeP, int showerror)  term_chk(char *tty, int *msgsokP, time_t *atimeP, int showerror)
 {  {
         struct stat s;          struct stat s;
         char path[MAXPATHLEN];          char path[PATH_MAX];
   
         (void)snprintf(path, sizeof(path), "%s%s", _PATH_DEV, tty);          (void)snprintf(path, sizeof(path), "%s%s", _PATH_DEV, tty);
         if (stat(path, &s) < 0) {          if (stat(path, &s) < 0) {
Line 226 
Line 226 
         char *login, *nows;          char *login, *nows;
         struct passwd *pwd;          struct passwd *pwd;
         time_t now;          time_t now;
         char path[MAXPATHLEN], host[MAXHOSTNAMELEN], line[512];          char path[PATH_MAX], host[HOST_NAME_MAX+1], line[512];
         gid_t gid;          gid_t gid;
   
         /* Determine our login name before the we reopen() stdout */          /* Determine our login name before the we reopen() stdout */

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28