Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/coreutils/cut.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 111  static void cut_file(FILE *file, char de Line 111  static void cut_file(FILE *file, char de
111   int ndelim = -1; /* zero-based / one-based problem */   int ndelim = -1; /* zero-based / one-based problem */
112   int nfields_printed = 0;   int nfields_printed = 0;
113   char *field = NULL;   char *field = NULL;
114   const char delimiter[2] = { delim, 0 };   char delimiter[2];
115    
116     delimiter[0] = delim;
117     delimiter[1] = 0;
118    
119   /* does this line contain any delimiters? */   /* does this line contain any delimiters? */
120   if (strchr(line, delim) == NULL) {   if (strchr(line, delim) == NULL) {
# Line 261  int cut_main(int argc UNUSED_PARAM, char Line 264  int cut_main(int argc UNUSED_PARAM, char
264   /* now that the lists are parsed, we need to sort them to make life   /* now that the lists are parsed, we need to sort them to make life
265   * easier on us when it comes time to print the chars / fields / lines   * easier on us when it comes time to print the chars / fields / lines
266   */   */
267   qsort(cut_lists, nlists, sizeof(struct cut_list), cmpfunc);   qsort(cut_lists, nlists, sizeof(cut_lists[0]), cmpfunc);
268   }   }
269    
270   {   {

Legend:
Removed from v.983  
changed lines
  Added in v.984