#include <julius.h>
Include dependency graph for m_options.c:
Go to the source code of this file.
Defines | |
#define | NEXTARG (++i >= argc) ? (char *)args_needed_exit(argv[i-1]) : argv[i] |
Functions | |
char * | filepath (char *filename, char *dirname) |
Change relative path to full path. | |
static char * | args_needed_exit (char *opt) |
void | opt_parse (int argc, char *argv[], char *cwd) |
void | opt_release () |
Definition in file m_options.c.
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 51 of file m_options.c.
Referenced by opt_parse().
static char* args_needed_exit | ( | char * | opt | ) | [static] |
Error exit when required argument was not specified.
opt | [in] option string |
Definition at line 85 of file m_options.c.
void opt_parse | ( | int | argc, | |
char * | argv[], | |||
char * | cwd | |||
) |
Parse options and set values.
argc | [in] number of elements in argv | |
argv | [in] array of argument strings | |
cwd | [in] current directory string |
Definition at line 109 of file m_options.c.
Referenced by config_file_parse(), and main().
void opt_release | ( | ) |
Free memories of global variables allocated by option arguments.
Definition at line 835 of file m_options.c.
Referenced by m_errexit(), m_exit(), and main().