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

Diff for /src/usr.bin/sort/Attic/init.c between version 1.2 and 1.3

version 1.2, 1997/06/16 02:21:56 version 1.3, 1999/05/24 17:57:18
Line 1 
Line 1 
 /*      OpenBSD$        */  /*      $OpenBSD$       */
   
 /*-  /*-
  * Copyright (c) 1993   * Copyright (c) 1993
Line 49 
Line 49 
 #include <ctype.h>  #include <ctype.h>
 #include <string.h>  #include <string.h>
   
 extern struct coldesc clist[(ND+1)*2];  extern struct coldesc *clist;
 extern int ncols;  extern int ncols;
 u_char gweights[NBINS];  u_char gweights[NBINS];
   
Line 153 
Line 153 
         struct field *cur_fld;          struct field *cur_fld;
         int gflag;          int gflag;
 {  {
         static int nfields = 0;  
         int tmp;          int tmp;
         char *setcolumn();          char *setcolumn();
         if (++nfields == ND)  
                 errx(2, "too many sort keys. (Limit is %d)", ND-1);  
         cur_fld->weights = ascii;          cur_fld->weights = ascii;
         cur_fld->mask = alltable;          cur_fld->mask = alltable;
         pos = setcolumn(pos, cur_fld, gflag);          pos = setcolumn(pos, cur_fld, gflag);
Line 223 
Line 220 
         char **argv;          char **argv;
 {  {
         int i, j, v, w, x;          int i, j, v, w, x;
         static char vbuf[ND*20], *vpos, *tpos;          static char *vbuf, *vpos, *tpos;
         vpos = vbuf;  
           if ((vpos = vbuf = calloc(ND*20, sizeof(char))) == NULL)
                   errx(2, "cannot allocate memory");
   
         for (i = 1; i < *argc; i++) {          for (i = 1; i < *argc; i++) {
                 if (argv[i][0] == '+') {                  if (argv[i][0] == '+') {

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