OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Functions
commander.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "commander.h"
Include dependency graph for commander.c:

Go to the source code of this file.

Functions

static void error (char *msg)
 
static void command_version (command_t *self)
 
void command_help (command_t *self)
 
void command_init (command_t *self, const char *name, const char *version)
 
void command_free (command_t *self)
 
static void parse_argname (const char *str, char *flag, char *arg)
 
static char ** normalize_args (int *argc, char **argv)
 
void command_option (command_t *self, const char *small, const char *large, const char *desc, command_callback_t cb)
 
static void command_parse_args (command_t *self, int argc, char **argv)
 
void command_parse (command_t *self, int argc, char **argv)
 

Function Documentation

static void error ( char *  msg)
static

Definition at line 19 of file commander.c.

static void command_version ( command_t self)
static

Definition at line 29 of file commander.c.

void command_help ( command_t self)

Definition at line 40 of file commander.c.

void command_init ( command_t self,
const char *  name,
const char *  version 
)

Definition at line 66 of file commander.c.

void command_free ( command_t self)

Definition at line 82 of file commander.c.

static void parse_argname ( const char *  str,
char *  flag,
char *  arg 
)
static

Definition at line 106 of file commander.c.

static char** normalize_args ( int *  argc,
char **  argv 
)
static

Definition at line 134 of file commander.c.

void command_option ( command_t self,
const char *  small,
const char *  large,
const char *  desc,
command_callback_t  cb 
)

Definition at line 173 of file commander.c.

static void command_parse_args ( command_t self,
int  argc,
char **  argv 
)
static

Definition at line 201 of file commander.c.

void command_parse ( command_t self,
int  argc,
char **  argv 
)

Definition at line 266 of file commander.c.