Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/shell/bbsh.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 54  struct command { Line 54  struct command {
54   int flags; // exit, suspend, && ||   int flags; // exit, suspend, && ||
55   int pid; // pid (or exit code)   int pid; // pid (or exit code)
56   int argc;   int argc;
57   char *argv[0];   char *argv[];
58  };  };
59    
60  // A collection of processes piped into/waiting on each other.  // A collection of processes piped into/waiting on each other.
# Line 199  static void handle(char *command) Line 199  static void handle(char *command)
199  }  }
200    
201  int bbsh_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;  int bbsh_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
202  int bbsh_main(int argc, char **argv)  int bbsh_main(int argc UNUSED_PARAM, char **argv)
203  {  {
204   char *command=NULL;   char *command=NULL;
205   FILE *f;   FILE *f;
# Line 212  int bbsh_main(int argc, char **argv) Line 212  int bbsh_main(int argc, char **argv)
212   unsigned cmdlen=0;   unsigned cmdlen=0;
213   for (;;) {   for (;;) {
214   if (!f) putchar('$');   if (!f) putchar('$');
215   if (1 > getline(&command, &cmdlen,f ? : stdin)) break;   if (1 > getline(&command, &cmdlen, f ? f : stdin)) break;
216    
217   handle(command);   handle(command);
218   }   }

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