Go to the source code of this file.
|
#define | CHECK(PARAM1, PARAM2, BODY) |
| check parameter and execute code if it matches More...
|
|
#define CHECK |
( |
|
PARAM1, |
|
|
|
PARAM2, |
|
|
|
BODY |
|
) |
| |
Value:if( strcmp(*argv,PARAM1)==0 || strcmp(*argv,PARAM2)==0 ) \
BODY;
Definition at line 80 of file options.c.
void init_options |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Dumps statistics of memory usage
Definition at line 173 of file options.c.
181 if(
stats[i].allocs )
183 PRINT(
" %10s %8d %8d %8d %8d\n",
191 PRINT(
" %39s\n",
"----------------");
192 PRINT(
" %30s %8d\n",
"Used",stats_used);
194 PRINT(
" %39s\n",
"----------------");
Dumps statistics if -Zm option was switched on
Definition at line 207 of file options.c.
211 for( j = 0; j<4; j++ )
236 stats_used +=
stats[i].allocs-
stats[i].deallocs;
void output_compiler_name |
( |
int |
show_help) | |
|
- Parameters
-
show_help | if set also output commandline options |
Outputs the name of the compiler, its language, its platform and build date. If show_help
is not zero, output a list of command-line options
Definition at line 255 of file options.c.
284 for( ; len<6; len++ )
outter(
TEXT(
" "), -1 );
297 for( ; len<30; len++ )
outter(
TEXT(
" "), -1 );
void set_compiler_filename |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
- Parameters
-
argc | argc parameter from the main function |
argv | argv parameter from the main function |
If the compiler is executed through a search in the PATH, then try to find the full name
Definition at line 321 of file options.c.
353 strcpy( filename, path );
358 err = stat( filename, &buffer );
void set_options |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
- Parameters
-
argc | argc parameter from the main function |
argv | argv parameter from the main function |
Reads options from the argv
array and sets appropriate parameters.
Definition at line 392 of file options.c.
412 for( argc--,argv++; argc--; argv++ )
420 for( argc--,argv++; argc--; argv++ )
457 if( found )
continue;
- Parameters
-
size | size of memory (in bytes) to allocate |
- Returns
- pointer to allocated memory
This function is used to allocate memory. Depending on the existence of DEBUG_HEAP symbol it either just allocates memory or allocates and dump on the screen allocation data.
Definition at line 556 of file options.c.
void* reallocate |
( |
void * |
mem, |
|
|
int |
size |
|
) |
| |
- Parameters
-
ptr | pointer to the memory to deallocate |
This function is used to deallocate memory. Depending on the existence of DEBUG_HEAP symbol it either just deallocates memory or deallocates and dumps on the screen deallocation data.
Definition at line 592 of file options.c.
char* option_source_filename |
chars_t option_source_filename_chars |
char* option_compiler_filename |
chars_t option_compiler_filename_chars |
Initial value:= {
"Integers",
"Floats",
"Lists",
"Words",
"Subwords",
"Errors",
"Var",
"Memory" }
Definition at line 98 of file options.c.