#include <julius/julius.h>
Go to the source code of this file.
Defines | |
#define | FREE_MEMORY(p) {if (p) {free(p); p = NULL;}} |
Free memory and fill it with NULL. | |
#define | GET_TMPARG if ((tmparg = next_arg(&i, argc, argv)) == NULL) return FALSE |
Functions | |
char * | filepath (char *filename, char *dirname) |
Change relative path to full path. | |
static char * | next_arg (int *cur, int argc, char *argv[]) |
Returns next argument string. | |
static boolean | check_section (Jconf *jconf, char *optname, short sec) |
boolean | opt_parse (int argc, char *argv[], char *cwd, Jconf *jconf) |
Option parsing. | |
void | opt_release (Jconf *jconf) |
Free memories of variables allocated by option arguments. |
These functions read option strings from jconf file or command line and set values to the configuration structure.
Definition in file m_options.c.
#define FREE_MEMORY | ( | p | ) | {if (p) {free(p); p = NULL;}} |
Free memory and fill it with NULL.
p | [i/o] pointer to pointer that holds allocated address |
Definition at line 146 of file m_options.c.
Referenced by opt_parse(), and opt_release().
char* filepath | ( | char * | filename, | |
char * | dirname | |||
) |
Change relative path to full path.
If the file path is given as relative, prepend the dirname to it. If the file path is full, just copy it to new buffer and return.
filename | [in] file path name | |
dirname | [in] full path of current directory |
Definition at line 58 of file m_options.c.
Referenced by multigram_add_prefix_filelist(), multigram_add_prefix_list(), and opt_parse().
static char* next_arg | ( | int * | cur, | |
int | argc, | |||
char * | argv[] | |||
) | [static] |
Returns next argument string.
cur | [i/o] pointer to current point of the argment array | |
argc | [in] total number of argments | |
argv | [in] argment array |
Definition at line 91 of file m_options.c.
Option parsing.
argc | [in] number of elements in argv | |
argv | [in] array of argument strings | |
cwd | [in] current directory | |
jconf | [out] jconf structure to store data |
Definition at line 174 of file m_options.c.
Referenced by config_file_parse(), j_config_load_args(), and j_config_load_args_new().
Here is the caller graph for this function:
void opt_release | ( | Jconf * | jconf | ) |
Free memories of variables allocated by option arguments.
jconf | [i/o] jconf configuration data |
Definition at line 1390 of file m_options.c.
Referenced by j_jconf_free().
Here is the caller graph for this function: