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

Diff for /src/usr.bin/sort/sort.c between version 1.1 and 1.2

version 1.1, 1997/01/20 19:39:55 version 1.2, 1997/01/22 06:53:16
Line 199 
Line 199 
                                 argv[i] = devstdin;                                  argv[i] = devstdin;
                         }                          }
                 } else if ((ch = access(argv[i], R_OK)))                  } else if ((ch = access(argv[i], R_OK)))
                         err(2, "%s", argv[i]);                          err(2, argv[i]);
         }          }
         if (!(fldtab->flags & (I|D) || fldtab[1].icol.num)) {          if (!(fldtab->flags & (I|D) || fldtab[1].icol.num)) {
                 SINGL_FLD = 1;                  SINGL_FLD = 1;
Line 240 
Line 240 
                 int outfd;                  int outfd;
                 errno = 0;                  errno = 0;
                 if (access(outpath, W_OK))                  if (access(outpath, W_OK))
                         err(2, "%s", outpath);                          err(2, outpath);
                 act.sa_handler = onsig;                  act.sa_handler = onsig;
                 (void)snprintf(toutpath, sizeof(toutpath), "%sXXXX", outpath);                  (void)snprintf(toutpath, sizeof(toutpath), "%sXXXX", outpath);
                 if ((outfd = mkstemp(toutpath)) < 0 ||                  if ((outfd = mkstemp(toutpath)) < 0 ||
Line 260 
Line 260 
                 fsort(-1, 0, filelist, argc-optind, outfp, fldtab);                  fsort(-1, 0, filelist, argc-optind, outfp, fldtab);
         if (outfile != outpath) {          if (outfile != outpath) {
                 if (access(outfile, 0))                  if (access(outfile, 0))
                         err(2, "%s", outfile);                          err(2, outfile);
                 (void)unlink(outpath);                  (void)unlink(outpath);
                 if (link(outfile, outpath))                  if (link(outfile, outpath))
                         err(2, "cannot link %s: output left in %s",                          err(2, "cannot link %s: output left in %s",
Line 291 
Line 291 
 {  {
         if (msg)          if (msg)
                 (void)fprintf(stderr, "sort: %s\n", msg);                  (void)fprintf(stderr, "sort: %s\n", msg);
         (void)fprintf(stderr, "usage: [-o output] [-cmubdfinr] [-t char] ");          (void)fprintf(stderr, "usage: [-T dir] [-o output] [-cmubdfinr] ");
         (void)fprintf(stderr, "[-T char] [-k keydef] ... [files]\n");          (void)fprintf(stderr, "[-t char] [-R char] [-k keydef] ... [files]\n");
         exit(2);          exit(2);
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2