Changeset 2433 for neercs/trunk/src
- Timestamp:
- Jun 15, 2008, 8:09:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
neercs/trunk/src/main.c
r2431 r2433 43 43 struct screen_list *screen_list = NULL; 44 44 char *default_shell = NULL; 45 int i, w, h ;45 int i, w, h, args; 46 46 int eof = 0, refresh = 1, command = 0; 47 47 48 48 default_shell = getenv("SHELL"); 49 49 50 if(default_shell == NULL && argc < 2) 50 args = argc -1; 51 if(default_shell == NULL && args <= 0) 51 52 { 52 53 fprintf(stderr, "Environment variable SHELL not set and no arguments given. kthxbye.\n"); 53 54 return -1; 54 55 } 56 57 if(args==0) 58 args = 1; 55 59 56 60 /* Create main canvas and associated caca window */ … … 90 94 screen_list->pty = screen_list->prevpty = 0; 91 95 92 for(i = 0; i < arg c-1; i++)96 for(i = 0; i < args; i++) 93 97 { 94 98 struct screen *tmp;
Note: See TracChangeset
for help on using the changeset viewer.