Clan
0.8.0
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <osl/macros.h>
#include <clan/macros.h>
#include <clan/options.h>
Go to the source code of this file.
Functions | |
void | clan_options_print (FILE *foo, clan_options_p options) |
void | clan_options_free (clan_options_p options) |
void | clan_options_help () |
void | clan_options_version () |
void | clan_options_set (int *option, int argv, char **argc, int *number) |
clan_options_p | clan_options_malloc (void) |
clan_options_p | clan_options_read (int argv, char **argc, char ***input_files, FILE **output) |
void clan_options_free | ( | clan_options_p | options | ) |
clan_options_free function: This function frees the allocated memory for a clan_options_t structure.
options | Option structure to be freed. |
Definition at line 91 of file options.c.
References clan_options::name.
Referenced by main().
void clan_options_help | ( | ) |
clan_options_help function: This function displays the quick help when the user set the option -help while calling clan. Prints are cut to respect the 509 characters limitation of the ISO C 89 compilers.
Definition at line 108 of file options.c.
Referenced by clan_options_read().
clan_options_p clan_options_malloc | ( | void | ) |
clan_options_malloc function: This functions allocate the memory space for a clan_options_t structure and fill its fields with the defaults values. It returns a pointer to the allocated clan_options_t structure.
Definition at line 207 of file options.c.
References clan_options::autoinsert, clan_options::autopragma, clan_options::autoscop, clan_options::bounded_context, clan_options::castle, CLAN_malloc, clan_options::extbody, clan_options::inputscop, clan_options::name, clan_options::noloopcontext, clan_options::nosimplify, clan_options::outscoplib, clan_options::precision, and clan_options::structure.
Referenced by clan_options_read().
void clan_options_print | ( | FILE * | foo, |
clan_options_p | options | ||
) |
clan_option_print function: This function prints the content of a clan_options_t structure (program) into a file (foo, possibly stdout).
foo | File where informations are printed. |
options | Option structure whose information have to be printed. |
Definition at line 60 of file options.c.
References clan_options::autoinsert, clan_options::autopragma, clan_options::autoscop, clan_options::bounded_context, clan_options::castle, clan_options::extbody, clan_options::inputscop, clan_options::name, clan_options::noloopcontext, clan_options::nosimplify, and clan_options::structure.
clan_options_p clan_options_read | ( | int | argv, |
char ** | argc, | ||
char *** | input_files, | ||
FILE ** | output | ||
) |
clan_options_read function: This functions reads all the options and the input/output files thanks the the user's calling line elements (in argc). It fills a clan_options_t structure, a NULL-terminated array of input file names and the FILE structure corresponding to the output files.
[in] | argv | Number of strings in command line. |
[in] | argc | Array of command line strings. |
[out] | input_files | Null-terminated array of input file names. |
[out] | output | Output file. |
Definition at line 242 of file options.c.
References clan_options::autoinsert, clan_options::autopragma, clan_options::autoscop, clan_options::bounded_context, CLAN_error, CLAN_malloc, clan_options_help(), clan_options_malloc(), clan_options_set(), clan_options_version(), CLAN_realloc, CLAN_strdup, clan_options::extbody, clan_options::inputscop, clan_options::noloopcontext, clan_options::nosimplify, clan_options::outscoplib, clan_options::precision, and clan_options::structure.
Referenced by main().
void clan_options_set | ( | int * | option, |
int | argv, | ||
char ** | argc, | ||
int * | number | ||
) |
clan_options_set function: This function sets the value of an option thanks to the user's calling line.
option | The value to set, |
argv | Number of elements in the user's calling line, |
argc | Elements of the user's calling line, |
number | Number of the element corresponding to the considered option, this function adds 1 to number to pass away the option value. |
Definition at line 184 of file options.c.
References CLAN_error.
Referenced by clan_options_read().
void clan_options_version | ( | ) |
clan_options_version function: This function displays some version informations when the user set the option -version while calling clan. Prints are cut to respect the 509 characters limitation of the ISO C 89 compilers.
Definition at line 142 of file options.c.
References CLAN_VERSION.
Referenced by clan_options_read().