int main( int argc, char **argv, char **envp ) { int dictsize = DEF_DICTSIZE; /* pass alternate dict size as an arg */ init_support(); /* FIX - change to loop around evaluate - this also means move below init_dictionary */ /* debug is a define for user area */ /* if ( (argc > 1) && strcmp( *(argv+1), "-d" ) == 0 ) debug = 1; */ init_dictionary( dictsize ); StartVM( "cold", argc, argv ); }
int main(int argc, char **argv) { extern void init_dictionary(cell *up); u_char *origin; if (argc != 3) { fprintf(stderr, "usage: meta input-file-name output-file-name\n"); exit(1); } infile = argv[1]; outfile = argv[2]; origin = aln_alloc(MAXDICT, variables); *(token_t *)origin = 0; init_compiler(origin, origin+MAXDICT, 0xfffe, origin, origin+MAXDICT, variables); init_dictionary(variables); return 0; }
Bool pdf_create_dictionary( PDFCONTEXT *pdfc , int32 len , OBJECT *thedict ) { OBJECT *dict ; PDFXCONTEXT *pdfxc ; PDF_CHECK_MC( pdfc ) ; PDF_GET_XC( pdfxc ) ; HQASSERT( thedict , "thedict NULL in pdf_create_dictionary." ) ; if ( len < 0 ) return error_handler( RANGECHECK ) ; if ( len > MAXPSDICT ) return error_handler( LIMITCHECK ) ; dict = PDF_ALLOCOBJECT( pdfxc, (int32)NDICTOBJECTS(len) ); if ( !dict ) return error_handler( VMERROR ) ; init_dictionary(thedict, len, UNLIMITED, dict, ISNOTVMDICTMARK(pdfxc->savelevel)) ; return TRUE ; }
static void readsetup(scope v){ init_dictionary(v); read_setup(); }
int main(int argc, char **argv) { int c; const char *optstring = "vhanof:?"; int linenumbers = 0; bool add_vfcodes = FALSE; char *vfc_filnam = NULL; while (1) { #ifdef __GLIBC__ int option_index = 0; static struct option long_options[] = { {"verbose", 0, 0, 'v'}, {"help", 0, 0, 'h'}, {"all", 0, 0, 'a'}, {"linenumbers", 0, 0, 'n'}, {"offsets", 0, 0, 'o'}, {"fcodes", 1, 0, 'f'}, {0, 0, 0, 0} }; c = getopt_long(argc, argv, optstring, long_options, &option_index); #else c = getopt(argc, argv, optstring); #endif if (c == -1) break; switch (c) { case 'v': verbose = TRUE; break; case 'a': decode_all = TRUE; break; case 'n': linenumbers |= 1; show_linenumbers = TRUE; break; case 'o': linenumbers |= 2; show_linenumbers = TRUE; show_offsets = TRUE; break; case 'f': add_vfcodes = TRUE; vfc_filnam = optarg; break; case 'h': case '?': print_copyright(TRUE); usage(argv[0]); return 0; default: print_copyright(TRUE); printf("%s: unknown option.\n", argv[0]); usage(argv[0]); return 1; } } if (verbose) print_copyright(FALSE); if (linenumbers > 2) printremark ("Line numbers will be disabled in favour of offsets.\n"); if (optind >= argc) { print_copyright(TRUE); printf("%s: filename missing.\n", argv[0]); usage(argv[0]); return 1; } init_dictionary(); if (add_vfcodes) { if (add_fcodes_from_list(vfc_filnam)) { freeze_dictionary(); } } while (optind < argc) { if (init_stream(argv[optind])) { printf("Could not open file \"%s\".\n", argv[optind]); optind++; continue; } detokenize(); close_stream(); optind++; reset_dictionary(); } printf("\n"); return 0; }