argv 116 lib/lua/lua.c static int getargs (lua_State *L, char **argv, int n) { argv 120 lib/lua/lua.c while (argv[argc]) argc++; /* count total number of arguments */ argv 124 lib/lua/lua.c lua_pushstring(L, argv[i]); argv 127 lib/lua/lua.c lua_pushstring(L, argv[i]); argv 239 lib/lua/lua.c static int handle_script (lua_State *L, char **argv, int n) { argv 242 lib/lua/lua.c int narg = getargs(L, argv, n); /* collect arguments */ argv 244 lib/lua/lua.c fname = argv[n]; argv 245 lib/lua/lua.c if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) argv 261 lib/lua/lua.c static int collectargs (char **argv, int *pi, int *pv, int *pe) { argv 263 lib/lua/lua.c for (i = 1; argv[i] != NULL; i++) { argv 264 lib/lua/lua.c if (argv[i][0] != '-') /* not an option? */ argv 266 lib/lua/lua.c switch (argv[i][1]) { /* option */ argv 268 lib/lua/lua.c notail(argv[i]); argv 269 lib/lua/lua.c return (argv[i+1] != NULL ? i+1 : 0); argv 273 lib/lua/lua.c notail(argv[i]); argv 276 lib/lua/lua.c notail(argv[i]); argv 282 lib/lua/lua.c if (argv[i][2] == '\0') { argv 284 lib/lua/lua.c if (argv[i] == NULL) return -1; argv 294 lib/lua/lua.c static int runargs (lua_State *L, char **argv, int n) { argv 297 lib/lua/lua.c if (argv[i] == NULL) continue; argv 298 lib/lua/lua.c lua_assert(argv[i][0] == '-'); argv 299 lib/lua/lua.c switch (argv[i][1]) { /* option */ argv 301 lib/lua/lua.c const char *chunk = argv[i] + 2; argv 302 lib/lua/lua.c if (*chunk == '\0') chunk = argv[++i]; argv 309 lib/lua/lua.c const char *filename = argv[i] + 2; argv 310 lib/lua/lua.c if (*filename == '\0') filename = argv[++i]; argv 335 lib/lua/lua.c char **argv; argv 342 lib/lua/lua.c char **argv = s->argv; argv 346 lib/lua/lua.c if (argv[0] && argv[0][0]) progname = argv[0]; argv 352 lib/lua/lua.c script = collectargs(argv, &has_i, &has_v, &has_e); argv 359 lib/lua/lua.c s->status = runargs(L, argv, (script > 0) ? script : s->argc); argv 362 lib/lua/lua.c s->status = handle_script(L, argv, script); argv 377 lib/lua/lua.c int main (int argc, char **argv) { argv 382 lib/lua/lua.c l_message(argv[0], "cannot create state: not enough memory"); argv 386 lib/lua/lua.c s.argv = argv; argv 68 lib/lua/luac.c #define IS(s) (strcmp(argv[i],s)==0) argv 70 lib/lua/luac.c static int doargs(int argc, char* argv[]) argv 74 lib/lua/luac.c if (argv[0]!=NULL && *argv[0]!=0) progname=argv[0]; argv 77 lib/lua/luac.c if (*argv[i]!='-') /* end of options; keep it */ argv 91 lib/lua/luac.c output=argv[++i]; argv 102 lib/lua/luac.c usage(argv[i]); argv 107 lib/lua/luac.c argv[--i]=Output; argv 155 lib/lua/luac.c char** argv; argv 162 lib/lua/luac.c char** argv=s->argv; argv 168 lib/lua/luac.c const char* filename=IS("-") ? NULL : argv[i]; argv 186 lib/lua/luac.c int main(int argc, char* argv[]) argv 190 lib/lua/luac.c int i=doargs(argc,argv); argv 191 lib/lua/luac.c argc-=i; argv+=i; argv 196 lib/lua/luac.c s.argv=argv; argv 1000 tools/capdis.c int main(int argc, char** argv) argv 1021 tools/capdis.c if ( strncmp(argv[i],"-c=",3) == 0 ) { argv 1022 tools/capdis.c dis_count=strtoul(argv[i]+3,NULL,0); argv 1024 tools/capdis.c else if ( strncmp(argv[i],"-o=",3) == 0 ) { argv 1025 tools/capdis.c offset=strtoul(argv[i]+3,NULL,0); argv 1027 tools/capdis.c else if ( strncmp(argv[i],"-s=",3) == 0 ) { argv 1028 tools/capdis.c if(!isdigit(argv[i][3])) { argv 1029 tools/capdis.c dis_start_fn = argv[i]+3; argv 1031 tools/capdis.c dis_start=strtoul(argv[i]+3,NULL,0); argv 1034 tools/capdis.c else if ( strncmp(argv[i],"-e=",3) == 0 ) { argv 1035 tools/capdis.c dis_end=strtoul(argv[i]+3,NULL,0); argv 1037 tools/capdis.c else if ( strncmp(argv[i],"-f=",3) == 0 ) { argv 1038 tools/capdis.c if ( strcmp(argv[i]+3,"chdk") == 0 ) { argv 1041 tools/capdis.c } else if ( strcmp(argv[i]+3,"objdump") == 0 ) { argv 1044 tools/capdis.c fprintf(stderr,"unknown output format %s\n",argv[i]+3); argv 1048 tools/capdis.c else if ( strcmp(argv[i],"-armv5") == 0 ) { argv 1051 tools/capdis.c else if ( strcmp(argv[i],"-stubs") == 0 ) { argv 1054 tools/capdis.c else if ( strncmp(argv[i],"-stubs=",7) == 0 ) { argv 1055 tools/capdis.c strcpy(stubs_dir,argv[i]+7); argv 1057 tools/capdis.c else if ( strncmp(argv[i],"-props=",7) == 0 ) { argv 1058 tools/capdis.c do_propset=strtoul(argv[i]+7,NULL,0); argv 1060 tools/capdis.c else if ( strcmp(argv[i],"-v") == 0 ) { argv 1063 tools/capdis.c else if ( strcmp(argv[i],"-d") == 0 ) { argv 1066 tools/capdis.c else if ( strcmp(argv[i],"-noloc") == 0 ) { argv 1069 tools/capdis.c else if ( strcmp(argv[i],"-nosub") == 0 ) { argv 1072 tools/capdis.c else if ( strcmp(argv[i],"-noconst") == 0 ) { argv 1075 tools/capdis.c else if ( strcmp(argv[i],"-nostr") == 0 ) { argv 1078 tools/capdis.c else if ( strcmp(argv[i],"-noadrldr") == 0 ) { argv 1081 tools/capdis.c else if ( strcmp(argv[i],"-nofwdata") == 0 ) { argv 1084 tools/capdis.c else if ( strcmp(argv[i],"-nosimplefunc") == 0 ) { argv 1087 tools/capdis.c else if ( strcmp(argv[i],"-adrldr") == 0 ) { argv 1090 tools/capdis.c else if ( strcmp(argv[i],"-jfw") == 0 ) { argv 1093 tools/capdis.c else if ( strcmp(argv[i],"-eret") == 0 ) { argv 1096 tools/capdis.c else if ( strncmp(argv[i],"-eret=",6) == 0 ) { argv 1098 tools/capdis.c dis_end_ret_count=strtoul(argv[i]+6,NULL,0); argv 1100 tools/capdis.c else if ( strcmp(argv[i],"-d-const") == 0 ) { argv 1103 tools/capdis.c else if ( strcmp(argv[i],"-d-group") == 0 ) { argv 1106 tools/capdis.c else if ( strcmp(argv[i],"-d-op") == 0 ) { argv 1109 tools/capdis.c else if ( strcmp(argv[i],"-d-addr") == 0 ) { argv 1112 tools/capdis.c else if ( strcmp(argv[i],"-d-bin") == 0 ) { argv 1115 tools/capdis.c else if ( argv[i][0]=='-' ) { argv 1116 tools/capdis.c fprintf(stderr,"unknown option %s\n",argv[i]); argv 1120 tools/capdis.c dumpname=argv[i]; argv 1122 tools/capdis.c load_addr=strtoul(argv[i],NULL,0); argv 1124 tools/capdis.c fprintf(stderr,"unexpected %s\n",argv[i]); argv 51 tools/dumpchk.c int main(int argc, char **argv) { argv 60 tools/dumpchk.c if ( strcmp(argv[i],"-vxworks") == 0 ) { argv 63 tools/dumpchk.c else if (strcmp(argv[i],"-dryos") == 0 ) { argv 66 tools/dumpchk.c else if (strcmp(argv[i],"-fix") == 0 ) { argv 69 tools/dumpchk.c else if (strcmp(argv[i],"-quiet") == 0 ) { argv 72 tools/dumpchk.c else if ( argv[i][0] == '-' ) { argv 73 tools/dumpchk.c fprintf(stderr,"%s unknown option %s\n",argv[0],argv[i]); argv 78 tools/dumpchk.c dumpname=argv[i]; argv 80 tools/dumpchk.c fprintf(stderr,"%s unexpected %s\n",argv[0],argv[i]); argv 90 tools/dumpchk.c fprintf(stderr,"%s unable to open %s\n",argv[0],dumpname); argv 107 tools/dumpchk.c fprintf(stderr,"%s out of memory\n",argv[0]); argv 143 tools/dumpchk.c fprintf(stderr,"\n%s unable to open %s for write\n",argv[0],dumpname); argv 164 tools/dumpchk.c fprintf(stderr,"%s out of memory\n",argv[0]); argv 73 tools/elf2flt/fltdump.c int main(int argc, char **argv) argv 82 tools/elf2flt/fltdump.c if ( argc > 2 && argv[2][0]=='-' && argv[2][1]=='f' ) argv 85 tools/elf2flt/fltdump.c char* filename_flt = argv[1]; argv 20 tools/elf2flt/main.c int main(int argc, char **argv) argv 32 tools/elf2flt/main.c filename_elf = argv[1]; argv 33 tools/elf2flt/main.c filename_flt = argv[2]; argv 41 tools/elf2flt/main.c if (argv[i][0]!='-') continue; argv 42 tools/elf2flt/main.c switch ( argv[i][1] ) argv 51 tools/elf2flt/main.c case 'i': filename_import = argv[i]+2; break; argv 52 tools/elf2flt/main.c case '!': filename_stoplist = argv[i]+2; break; argv 90 tools/extract_error_table.c int main(int argc, char **argv) argv 100 tools/extract_error_table.c if ( strcmp(argv[i],"-vxworks") == 0 ) { argv 102 tools/extract_error_table.c } else if ( argv[i][0] == '-' ) { argv 103 tools/extract_error_table.c fprintf(stderr,"%s unknown option %s\n",argv[0],argv[i]); argv 108 tools/extract_error_table.c dumpname=argv[i]; argv 110 tools/extract_error_table.c base=argv[i]; argv 112 tools/extract_error_table.c fprintf(stderr,"%s unexpected %s\n",argv[0],argv[i]); argv 58 tools/extract_event_procedures.c int main(int argc, char**argv){ argv 67 tools/extract_event_procedures.c sscanf(argv[2], "%x", &baseaddr); argv 69 tools/extract_event_procedures.c FILE *fd = fopen(argv[1], "r"); argv 50 tools/find_eventproc.c int main(int argc, char **argv) argv 60 tools/find_eventproc.c if ( argv[i][0] == '-' ) { argv 61 tools/find_eventproc.c fprintf(stderr,"%s unknown option %s\n",argv[0],argv[i]); argv 66 tools/find_eventproc.c dumpname=argv[i]; argv 68 tools/find_eventproc.c base=argv[i]; argv 81 tools/find_eventproc.c if(!process_dump(&dump,argv+3,num_procs)) argv 71 tools/find_levent.c int main(int argc, char **argv) argv 80 tools/find_levent.c if ( strcmp(argv[i],"-def") == 0 ) { argv 83 tools/find_levent.c else if (strcmp(argv[i],"-full") == 0 ) { argv 86 tools/find_levent.c else if ( argv[i][0] == '-' ) { argv 87 tools/find_levent.c fprintf(stderr,"%s unknown option %s\n",argv[0],argv[i]); argv 92 tools/find_levent.c dumpname=argv[i]; argv 94 tools/find_levent.c base=argv[i]; argv 96 tools/find_levent.c fprintf(stderr,"%s unexpected %s\n",argv[0],argv[i]); argv 8352 tools/finsig_dryos.c int main(int argc, char **argv) argv 8364 tools/finsig_dryos.c out_fp = fopen(argv[3],"w"); argv 8380 tools/finsig_dryos.c load_firmware(&fw,argv[1],argv[2],(argc==5)?argv[4]:0, OS_DRYOS); argv 7301 tools/finsig_thumb2.c int main(int argc, char **argv) argv 7324 tools/finsig_thumb2.c firmware_load(&fw,argv[1],strtoul(argv[2], NULL, 0),FW_ARCH_ARMv7); argv 7330 tools/finsig_thumb2.c out_fp = fopen(argv[3],"w"); argv 7332 tools/finsig_thumb2.c fprintf(stderr,"Error opening output file %s\n",argv[3]); argv 6357 tools/finsig_vxworks.c int main(int argc, char **argv) argv 6369 tools/finsig_vxworks.c out_fp = fopen(argv[3],"w"); argv 6385 tools/finsig_vxworks.c load_firmware(&fw,argv[1],argv[2],(argc==5)?argv[4]:0, OS_VXWORKS); argv 60 tools/gen_conf_lua.c int main(int argc, char **argv) argv 65 tools/gen_conf_lua.c int start = strtoul(argv[3], NULL, 0); argv 67 tools/gen_conf_lua.c FILE *f = fopen(argv[1], "rb"); argv 72 tools/gen_conf_lua.c sprintf(conf_name, " %s[]", argv[2]); argv 82 tools/gen_conf_lua.c printf("--[[\nGENERATED %s TABLE\n--]]\nreturn {\n _config_id=%d,\n", argv[2], start); argv 325 tools/gensig_dryos.c int main(int argc, char **argv) argv 340 tools/gensig_dryos.c f = fopen(argv[1], "r+b"); argv 345 tools/gensig_dryos.c base = strtoul(argv[2], NULL, 0); argv 346 tools/gensig_dryos.c proc_name = argv[3]; argv 347 tools/gensig_dryos.c pos = strtoul(argv[4], NULL, 0) - base; argv 348 tools/gensig_dryos.c size = strtoul(argv[5], NULL, 0); argv 349 tools/gensig_dryos.c lnk_pos = strtoul(argv[6], NULL, 0); argv 351 tools/gensig_dryos.c lnk_size = strtoul(argv[7], NULL, 0); argv 272 tools/gensig_vxworks.c int main(int argc, char **argv) argv 288 tools/gensig_vxworks.c f = fopen(argv[1], "r+b"); argv 293 tools/gensig_vxworks.c base = strtoul(argv[2], NULL, 0); argv 294 tools/gensig_vxworks.c proc_name = argv[3]; argv 295 tools/gensig_vxworks.c pos = strtoul(argv[4], NULL, 0) - base; argv 296 tools/gensig_vxworks.c size = strtoul(argv[5], NULL, 0); argv 143 tools/makeexport.c int main( int argc, char **argv ) argv 151 tools/makeexport.c FILE* out_h = fopen(argv[1],"wb"); argv 152 tools/makeexport.c FILE* out_txt = fopen(argv[2],"wb"); argv 153 tools/makeexport.c FILE* out_hash = fopen(argv[3],"wb"); argv 186 tools/makeexport.c if (!process_file(argv[4], out_txt)) exit(-1); // CHDK exports argv 187 tools/makeexport.c if (!process_file(argv[5], out_txt)) exit(-1); // GCC library exports argv 29 tools/makelang.c int main( int argc, char **argv ) argv 41 tools/makelang.c load_conditions(argv[1]); argv 43 tools/makelang.c char* file1 = load_from_file(argv[2]); argv 46 tools/makelang.c file2 = load_from_file(argv[3]); argv 68 tools/makelang.c char* lng_filename = (argc>2 && file2) ? argv[2] : argv[1]; argv 241 tools/packfi2/fi2enc.c int main( int argc, char **argv ) argv 256 tools/packfi2/fi2enc.c if( argv[i][0] == '/' || argv[i][0] == '-' ){ // ---- arg is option argv 258 tools/packfi2/fi2enc.c if( !strcmp( "key", _strlwr(argv[i]+1) ) ){ // opt: key argv 259 tools/packfi2/fi2enc.c if ( get_hexstring( key_buf, argv[++i], sizeof key_buf ) ) return -1; argv 262 tools/packfi2/fi2enc.c else if( !strcmp( "iv", _strlwr(argv[i]+1) ) ){ // opt: iv argv 263 tools/packfi2/fi2enc.c if ( get_hexstring( iv_buf, argv[++i], sizeof iv_buf ) ) return -1; argv 266 tools/packfi2/fi2enc.c else if( !strcmp( "p", _strlwr(argv[i]+1) ) ){ // opt: pid argv 268 tools/packfi2/fi2enc.c pid = strtoul(argv[++i], &err, 0); argv 271 tools/packfi2/fi2enc.c else if( !strcmp( "pv", _strlwr(argv[i]+1) ) ){ // opt: dryos_ver argv 273 tools/packfi2/fi2enc.c dryos_ver = strtoul(argv[++i], &err, 0); argv 276 tools/packfi2/fi2enc.c else if( !strcmp( "x", _strlwr(argv[i]+1) ) ){ // extra flags, single string without spaces argv 277 tools/packfi2/fi2enc.c flags = argv[++i]; argv 280 tools/packfi2/fi2enc.c printf("Unexpected option: %s\n", argv[i]); argv 284 tools/packfi2/fi2enc.c if( !fni ) fni = argv[i]; // 1st non-option is input file name argv 285 tools/packfi2/fi2enc.c else if( !fno ) fno = argv[i]; // 2nd non-option is output file name argv 287 tools/packfi2/fi2enc.c printf("Unexpected parameter: %s\n", argv[i]); argv 403 tools/pakwif.c int main(int argc, char **argv) argv 416 tools/pakwif.c fir_fn = argv[1]; argv 417 tools/pakwif.c wif_fn = argv[2]; argv 418 tools/pakwif.c camid = strtoul(argv[3], NULL, 0); argv 421 tools/pakwif.c ver = strtoul(argv[4], NULL, 0); argv 217 tools/rawconvert.c int main(int argc, char**argv) argv 243 tools/rawconvert.c if ( strncmp(argv[i],"-h=",3) == 0 ) { argv 244 tools/rawconvert.c height=atoi(argv[i]+3); argv 246 tools/rawconvert.c else if ( strncmp(argv[i],"-w=",3) == 0 ) { argv 247 tools/rawconvert.c width=atoi(argv[i]+3); argv 249 tools/rawconvert.c else if ( strcmp(argv[i],"-noshift") == 0 ) { argv 252 tools/rawconvert.c else if( strcmp(argv[i],"-pgm") == 0 ) { argv 255 tools/rawconvert.c else if ( argv[i][0]=='-' ) { argv 256 tools/rawconvert.c if( !(op = find_op(argv[i]+1))) { argv 257 tools/rawconvert.c fprintf(stderr,"%s: unknown option %s\n",argv[0],argv[i]); argv 263 tools/rawconvert.c iname=argv[i]; argv 266 tools/rawconvert.c oname=argv[i]; argv 269 tools/rawconvert.c fprintf(stderr,"%s: unknown option %s\n",argv[0],argv[i]); argv 275 tools/rawconvert.c fprintf(stderr,"%s: missing input file\n",argv[0]); argv 279 tools/rawconvert.c fprintf(stderr,"%s: missing output file\n",argv[0]); argv 283 tools/rawconvert.c fprintf(stderr,"%s: no op given\n",argv[0]); argv 287 tools/rawconvert.c fprintf(stderr,"%s: invalid dimensions\n",argv[0]); argv 292 tools/rawconvert.c fprintf(stderr,"%s: bad input file %s\n",argv[0],iname); argv 321 tools/rawconvert.c argv[0], iname, width, height, op->ibpp, (npixels*op->ibpp) >> 3, (unsigned)st.st_size); argv 63 tools/ubasic_test/run-ubasic.c main(int argc, char * argv[]) argv 71 tools/ubasic_test/run-ubasic.c FILE * f = fopen(argv[1], "rb"); argv 48 tools/yuvconvert.c int main(int argc, char**argv) argv 77 tools/yuvconvert.c if ( strncmp(argv[i],"-h=",3) == 0 ) { argv 78 tools/yuvconvert.c height=atoi(argv[i]+3); argv 80 tools/yuvconvert.c else if ( strncmp(argv[i],"-w=",3) == 0 ) { argv 81 tools/yuvconvert.c width=atoi(argv[i]+3); argv 83 tools/yuvconvert.c else if( strcmp(argv[i],"-split") == 0 ) { argv 86 tools/yuvconvert.c else if( strcmp(argv[i],"-skipy") == 0 ) { argv 89 tools/yuvconvert.c else if( strcmp(argv[i],"-rgb") == 0 ) { argv 94 tools/yuvconvert.c iname=argv[i]; argv 97 tools/yuvconvert.c oname=argv[i]; argv 100 tools/yuvconvert.c fprintf(stderr,"%s: unknown option %s\n",argv[0],argv[i]); argv 106 tools/yuvconvert.c fprintf(stderr,"%s: missing input file\n",argv[0]); argv 110 tools/yuvconvert.c fprintf(stderr,"%s: missing output file\n",argv[0]); argv 114 tools/yuvconvert.c fprintf(stderr,"%s: invalid dimensions\n",argv[0]); argv 119 tools/yuvconvert.c fprintf(stderr,"%s: bad input file %s\n",argv[0],iname); argv 132 tools/yuvconvert.c argv[0],width,height,isize,(unsigned long)st.st_size); argv 136 tools/yuvconvert.c argv[0],width,height,isize,(unsigned long)st.st_size);