// command.cpp: implements the parsing and execution of a tiny script language which
// is largely backwards compatible with the quake console language.
// XXX Emscripten: changed all sizeof to ES_SIZEOF
// XXX Emscripten
#define STANDALONE
#include "limits.h"
#include "stdarg.h"
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "ctype.h"
#include "math.h"
#include "time.h"
#include <new>
#include "tools.h"
#include "command.h"
// console
enum
{
CON_INFO = 1<<0,
CON_WARN = 1<<1,
CON_ERROR = 1<<2,
CON_DEBUG = 1<<3,
CON_INIT = 1<<4,
CON_ECHO = 1<<5
};
extern void conoutf(const char *s, ...);
extern void conoutf(int type, const char *s, ...);
// command
extern int variable(const char *name, int min, int cur, int max, int *storage, void (*fun)(), int flags);
extern float fvariable(const char *name, float min, float cur, float max, float *storage, void (*fun)(), int flags);
extern char *svariable(const char *name, const char *cur, char **