Changeset 162 for trunk/thune/console.c
- Timestamp:
- 05/27/06 21:22:22 (3 years ago)
- Files:
-
- 1 modified
-
trunk/thune/console.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/thune/console.c
r118 r162 92 92 UrlanEnv env; 93 93 char cmd[ 512 ]; 94 char* file= 0;94 int fileN = 0; 95 95 int ret = 0; 96 96 … … 121 121 else 122 122 { 123 file = argv[i];123 fileN = i; 124 124 break; 125 125 } … … 127 127 } 128 128 129 if( file )129 if( fileN ) 130 130 { 131 131 char* pos; 132 if( argc > 2 ) 132 133 pos = cmd; 134 135 if( (argc - fileN) > 1 ) 133 136 { 134 137 int i; 135 pos = strCopy( cmd, "do/args %" );136 pos = strCopy( pos, argv[1] );137 *pos++ = ' ';138 138 *pos++ = '['; 139 for( i = 2; i < argc; ++i )139 for( i = fileN + 1; i < argc; ++i ) 140 140 { 141 141 if( i > 2 ) … … 145 145 *pos++ = '"'; 146 146 } 147 *pos++ = ']';147 pos = strCopy( pos, "] :args " ); 148 148 } 149 149 else 150 150 { 151 /* 152 pos = strCopy( cmd, "do %" ); 153 pos = strCopy( pos, argv[1] ); 154 */ 155 156 pos = cmd; 157 *pos++ = '"'; 158 pos = strCopy( pos, argv[1] ); 159 *pos++ = '"'; 160 pos = strCopy( pos, " load do" ); 161 162 //pos = strCopy( cmd, argv[1] ); 163 } 151 pos = strCopy( pos, "none :args " ); 152 } 153 154 *pos++ = '"'; 155 pos = strCopy( pos, argv[fileN] ); 156 *pos++ = '"'; 157 pos = strCopy( pos, " load do" ); 164 158 165 159 switch( ur_evalCStr( &env.mainThread, cmd, pos - cmd ) )
