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

Diff for /src/usr.bin/uuencode/uuencode.c between version 1.14 and 1.15

version 1.14, 2018/12/31 09:23:08 version 1.15, 2019/03/10 20:49:24
Line 39 
Line 39 
 #include <netinet/in.h>  #include <netinet/in.h>
   
 #include <err.h>  #include <err.h>
 #include <locale.h>  
 #include <resolv.h>  #include <resolv.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 48 
Line 47 
   
 void encode(void);  void encode(void);
 void base64_encode(void);  void base64_encode(void);
 static void usage(void);  static void __dead usage(void);
   
 FILE *output;  FILE *output;
 int mode;  int mode;
Line 80 
Line 79 
                 pmode = MODE_B64ENCODE;                  pmode = MODE_B64ENCODE;
         }          }
   
         setlocale(LC_ALL, "");  
         while ((ch = getopt(argc, argv, optstr[pmode])) != -1) {          while ((ch = getopt(argc, argv, optstr[pmode])) != -1) {
                 switch (ch) {                  switch (ch) {
                 case 'm':                  case 'm':
Line 89 
Line 87 
                 case 'o':                  case 'o':
                         outfile = optarg;                          outfile = optarg;
                         break;                          break;
                 case '?':  
                 default:                  default:
                         usage();                          usage();
                 }                  }
Line 117 
Line 114 
 #define RW      (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)  #define RW      (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
                 mode = RW & ~umask(RW);                  mode = RW & ~umask(RW);
                 break;                  break;
         case 0:  
         default:          default:
                 usage();                  usage();
         }          }
Line 136 
Line 132 
                 encode();                  encode();
         if (ferror(output))          if (ferror(output))
                 errx(1, "write error");                  errx(1, "write error");
         exit(0);          return 0;
 }  }
   
 /* ENC is the basic 1 character encoding function to make a char printing */  /* ENC is the basic 1 character encoding function to make a char printing */
Line 219 
Line 215 
         (void)fprintf(output, "%c\nend\n", ENC('\0'));          (void)fprintf(output, "%c\nend\n", ENC('\0'));
 }  }
   
 static void  static void __dead
 usage(void)  usage(void)
 {  {
         switch (pmode) {          switch (pmode) {

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15