julius/m_options.c File Reference

Process options and configurations from jconf or command argument. More...

#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 ()


Detailed Description

Process options and configurations from jconf or command argument.

Author:
Akinobu Lee
Date:
Thu May 12 18:52:07 2005
Revision
1.13

Definition in file m_options.c.


Function Documentation

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.

Parameters:
filename [in] file path name
dirname [in] full path of current directory
Returns:
newly malloced buffer holding the full path name.

Definition at line 51 of file m_options.c.

Referenced by multigram_add_prefix_filelist(), multigram_add_prefix_list(), and opt_parse().

static char* args_needed_exit ( char *  opt  )  [static]

Error exit when required argument was not specified.

Parameters:
opt [in] option string
Returns:
NULL.

Definition at line 85 of file m_options.c.

void opt_parse ( int  argc,
char *  argv[],
char *  cwd 
)

Parse options and set values.

Parameters:
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().


Generated on Tue Dec 26 12:53:37 2006 for Julian by  doxygen 1.5.0