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

Diff for /src/usr.bin/tr/tr.c between version 1.4 and 1.5

version 1.4, 1997/07/25 21:05:45 version 1.5, 1997/07/25 21:14:04
Line 53 
Line 53 
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   #include <err.h>
   
 #include "extern.h"  #include "extern.h"
   
Line 205 
Line 206 
                         *p++ = OOBCH;                          *p++ = OOBCH;
   
         if (!next(&s2))          if (!next(&s2))
                 err("empty string2");                  errx(1, "empty string2");
   
         /* If string2 runs out of characters, use the last one specified. */          /* If string2 runs out of characters, use the last one specified. */
         if (sflag)          if (sflag)
Line 264 
Line 265 
         (void)fprintf(stderr, "       tr [-c] -s string1\n");          (void)fprintf(stderr, "       tr [-c] -s string1\n");
         (void)fprintf(stderr, "       tr [-c] -ds string1 string2\n");          (void)fprintf(stderr, "       tr [-c] -ds string1 string2\n");
         exit(1);          exit(1);
 }  
   
 #ifdef __STDC__  
 #include <stdarg.h>  
 #else  
 #include <varargs.h>  
 #endif  
   
 void  
 #ifdef __STDC__  
 err(const char *fmt, ...)  
 #else  
 err(fmt, va_alist)  
         char *fmt;  
         va_dcl  
 #endif  
 {  
         va_list ap;  
 #ifdef __STDC__  
         va_start(ap, fmt);  
 #else  
         va_start(ap);  
 #endif  
         (void)fprintf(stderr, "tr: ");  
         (void)vfprintf(stderr, fmt, ap);  
         va_end(ap);  
         (void)fprintf(stderr, "\n");  
         exit(1);  
         /* NOTREACHED */  
 }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5