_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include <stdlib.h>#include <stdio.h>#include <string.h>#include "SDL.h"#include "stratagus.h"#include "util.h"#include "netdriver.h"#include "cmd.h"#include "db.h"#include <unistd.h>#include <errno.h>main.cpp - Primary functionality. | |
| bool | EnableDebugPrint |
| bool | EnableAssert |
| if enabled, print the debug messages More... | |
| bool | EnableUnitDebug |
| if enabled, halt on assertion failures More... | |
| int | opterr = 1 |
| int | optind = 1 |
| int | optopt |
| char * | optarg |
| void | PrintLocation (const char *file, int line, const char *funcName) |
| if enabled, a unit info dump will be created More... | |
| void | AbortAt (const char *file, int line, const char *funcName, const char *conditionStr) |
| void | PrintOnStdOut (const char *format,...) |
| static void | getopt_err (const char *argv0, const char *str, char opt) |
| int | getopt (int argc, char *const *argv, const char *opts) |
| static void | MainLoop (void) |
| int | main (int argc, char **argv) |
| void AbortAt | ( | const char * | file, |
| int | line, | ||
| const char * | funcName, | ||
| const char * | conditionStr | ||
| ) |
| int getopt | ( | int | argc, |
| char *const * | argv, | ||
| const char * | opts | ||
| ) |
|
static |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
The main program: initialize, parse options and arguments.
|
static |
Main loop
| void PrintLocation | ( | const char * | file, |
| int | line, | ||
| const char * | funcName | ||
| ) |
if enabled, a unit info dump will be created
| void PrintOnStdOut | ( | const char * | format, |
| ... | |||
| ) |
| bool EnableAssert |
if enabled, print the debug messages
| bool EnableDebugPrint |
Needs code cleanup.
Needs compatibility checks.
Needs error message unification.
| bool EnableUnitDebug |
if enabled, halt on assertion failures
| char* optarg |
| int opterr = 1 |
Standard implementation of getopt(3).
One extension: If the first character of the optionsstring is a ':' the error return for 'argument required' is a ':' not a '?'. This makes it easier to differentiate between an 'illegal option' and an 'argument required' error.
| int optind = 1 |
| int optopt |
1.8.9.1
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.