Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/findutils/xargs.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 279  static int xargs_ask_confirmation(void) Line 279  static int xargs_ask_confirmation(void)
279    
280   tty_stream = xfopen_for_read(CURRENT_TTY);   tty_stream = xfopen_for_read(CURRENT_TTY);
281   fputs(" ?...", stderr);   fputs(" ?...", stderr);
282   fflush(stderr);   fflush_all();
283   c = savec = getc(tty_stream);   c = savec = getc(tty_stream);
284   while (c != EOF && c != '\n')   while (c != EOF && c != '\n')
285   c = getc(tty_stream);   c = getc(tty_stream);
# Line 356  enum { Line 356  enum {
356   OPTBIT_UPTO_SIZE,   OPTBIT_UPTO_SIZE,
357   OPTBIT_EOF_STRING,   OPTBIT_EOF_STRING,
358   OPTBIT_EOF_STRING1,   OPTBIT_EOF_STRING1,
359   USE_FEATURE_XARGS_SUPPORT_CONFIRMATION(OPTBIT_INTERACTIVE,)   IF_FEATURE_XARGS_SUPPORT_CONFIRMATION(OPTBIT_INTERACTIVE,)
360   USE_FEATURE_XARGS_SUPPORT_TERMOPT(     OPTBIT_TERMINATE  ,)   IF_FEATURE_XARGS_SUPPORT_TERMOPT(     OPTBIT_TERMINATE  ,)
361   USE_FEATURE_XARGS_SUPPORT_ZERO_TERM(   OPTBIT_ZEROTERM   ,)   IF_FEATURE_XARGS_SUPPORT_ZERO_TERM(   OPTBIT_ZEROTERM   ,)
362    
363   OPT_VERBOSE     = 1 << OPTBIT_VERBOSE    ,   OPT_VERBOSE     = 1 << OPTBIT_VERBOSE    ,
364   OPT_NO_EMPTY    = 1 << OPTBIT_NO_EMPTY   ,   OPT_NO_EMPTY    = 1 << OPTBIT_NO_EMPTY   ,
# Line 366  enum { Line 366  enum {
366   OPT_UPTO_SIZE   = 1 << OPTBIT_UPTO_SIZE  ,   OPT_UPTO_SIZE   = 1 << OPTBIT_UPTO_SIZE  ,
367   OPT_EOF_STRING  = 1 << OPTBIT_EOF_STRING , /* GNU: -e[<param>] */   OPT_EOF_STRING  = 1 << OPTBIT_EOF_STRING , /* GNU: -e[<param>] */
368   OPT_EOF_STRING1 = 1 << OPTBIT_EOF_STRING1, /* SUS: -E<param> */   OPT_EOF_STRING1 = 1 << OPTBIT_EOF_STRING1, /* SUS: -E<param> */
369   OPT_INTERACTIVE = USE_FEATURE_XARGS_SUPPORT_CONFIRMATION((1 << OPTBIT_INTERACTIVE)) + 0,   OPT_INTERACTIVE = IF_FEATURE_XARGS_SUPPORT_CONFIRMATION((1 << OPTBIT_INTERACTIVE)) + 0,
370   OPT_TERMINATE   = USE_FEATURE_XARGS_SUPPORT_TERMOPT(     (1 << OPTBIT_TERMINATE  )) + 0,   OPT_TERMINATE   = IF_FEATURE_XARGS_SUPPORT_TERMOPT(     (1 << OPTBIT_TERMINATE  )) + 0,
371   OPT_ZEROTERM    = USE_FEATURE_XARGS_SUPPORT_ZERO_TERM(   (1 << OPTBIT_ZEROTERM   )) + 0,   OPT_ZEROTERM    = IF_FEATURE_XARGS_SUPPORT_ZERO_TERM(   (1 << OPTBIT_ZEROTERM   )) + 0,
372  };  };
373  #define OPTION_STR "+trn:s:e::E:" \  #define OPTION_STR "+trn:s:e::E:" \
374   USE_FEATURE_XARGS_SUPPORT_CONFIRMATION("p") \   IF_FEATURE_XARGS_SUPPORT_CONFIRMATION("p") \
375   USE_FEATURE_XARGS_SUPPORT_TERMOPT(     "x") \   IF_FEATURE_XARGS_SUPPORT_TERMOPT(     "x") \
376   USE_FEATURE_XARGS_SUPPORT_ZERO_TERM(   "0")   IF_FEATURE_XARGS_SUPPORT_ZERO_TERM(   "0")
377    
378  int xargs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;  int xargs_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
379  int xargs_main(int argc, char **argv)  int xargs_main(int argc, char **argv)
# Line 405  int xargs_main(int argc, char **argv) Line 405  int xargs_main(int argc, char **argv)
405   eof_str = NULL;   eof_str = NULL;
406    
407   if (opt & OPT_ZEROTERM)   if (opt & OPT_ZEROTERM)
408   USE_FEATURE_XARGS_SUPPORT_ZERO_TERM(read_args = process0_stdin);   IF_FEATURE_XARGS_SUPPORT_ZERO_TERM(read_args = process0_stdin);
409    
410   argv += optind;   argv += optind;
411   argc -= optind;   argc -= optind;
# Line 426  int xargs_main(int argc, char **argv) Line 426  int xargs_main(int argc, char **argv)
426   n_chars += strlen(*argv) + 1;   n_chars += strlen(*argv) + 1;
427   }   }
428   if (n_max_chars < n_chars) {   if (n_max_chars < n_chars) {
429   bb_error_msg_and_die("cannot fit single argument within argument list size limit");   bb_error_msg_and_die("can't fit single argument within argument list size limit");
430   }   }
431   n_max_chars -= n_chars;   n_max_chars -= n_chars;
432   } else {   } else {

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