main.c (3ffd35307077b69e8e71772d0e2603f8ffbc4804) | main.c (3e794565fce4e0901d6596368adacc38558278c7) |
---|---|
1/* $Id: main.c,v 1.57 2016/12/02 18:44:44 tom Exp $ */ | 1/* $Id: main.c,v 1.59 2017/02/02 00:44:38 tom Exp $ */ |
2 3#include <signal.h> 4#ifndef _WIN32 5#include <unistd.h> /* for _exit() */ 6#else 7#include <stdlib.h> /* for _exit() */ 8#endif 9 --- 33 unchanged lines hidden (view full) --- 43char vflag; 44 45const char *symbol_prefix; 46const char *myname = "yacc"; 47 48int lineno; 49int outline; 50 | 2 3#include <signal.h> 4#ifndef _WIN32 5#include <unistd.h> /* for _exit() */ 6#else 7#include <stdlib.h> /* for _exit() */ 8#endif 9 --- 33 unchanged lines hidden (view full) --- 43char vflag; 44 45const char *symbol_prefix; 46const char *myname = "yacc"; 47 48int lineno; 49int outline; 50 |
51static char empty_string[] = ""; | |
52static char default_file_prefix[] = "y"; 53 54static char *file_prefix = default_file_prefix; 55 56char *code_file_name; | 51static char default_file_prefix[] = "y"; 52 53static char *file_prefix = default_file_prefix; 54 55char *code_file_name; |
57char *input_file_name = empty_string; | 56char *input_file_name; 57size_t input_file_name_len = 0; |
58char *defines_file_name; 59char *externs_file_name; 60 61static char *graph_file_name; 62static char *output_file_name; 63static char *verbose_file_name; 64 65FILE *action_file; /* a temp file, used to save actions associated */ --- 310 unchanged lines hidden (view full) --- 376 } 377 } 378 end_of_option:; 379 } 380 381 no_more_options:; 382 if (i + 1 != argc) 383 usage(); | 58char *defines_file_name; 59char *externs_file_name; 60 61static char *graph_file_name; 62static char *output_file_name; 63static char *verbose_file_name; 64 65FILE *action_file; /* a temp file, used to save actions associated */ --- 310 unchanged lines hidden (view full) --- 376 } 377 } 378 end_of_option:; 379 } 380 381 no_more_options:; 382 if (i + 1 != argc) 383 usage(); |
384 input_file_name = argv[i]; | 384 input_file_name_len = strlen(argv[i]); 385 input_file_name = TMALLOC(char, input_file_name_len + 1); 386 NO_SPACE(input_file_name); 387 strcpy(input_file_name, argv[i]); |
385} 386 387void * 388allocate(size_t n) 389{ 390 void *p; 391 392 p = NULL; --- 335 unchanged lines hidden --- | 388} 389 390void * 391allocate(size_t n) 392{ 393 void *p; 394 395 p = NULL; --- 335 unchanged lines hidden --- |