typedef struct Cmd Cmd;
typedef struct Cmdreg Cmdreg;
typedef struct Cfg Cfg;
enum
{
Teof = Leof,
Terror = -10,
Tempty = 0,
Tcomment,
Tpopen,
Tpclose,
Tcmd,
Tidentifier,
Tdecimal,
Tstr,
};
enum
{
Cmaxargs = 32,
Cmaxdepth = 16,
};
enum
{
Einvalid = -20,
Ememory = -10,
Efailed = -1,
};
struct Cmd
{
Rune str[Ltoksize+1];
int argc, argtyp[Cmaxargs];
Tok (*fun)(Tok*, int);
};
struct Cmdnode
{
Cmd *c;
struct Cmdnode *next;
};
struct Cmdreg
{
struct Cmdnode *head;
Lexer l;
};
struct Skynode
{
Rune id[Ltoksize+1];
Rune str[Ltoksize+1];
Eqloc eq;
double bv;
double vmag;
int size;
struct Skynode *next;
};
struct Cfg
{
Obs obs;
Camera camera;
int samplerate;
double jd;
int atm;
int nobj;
struct Skynode *head;
};
extern Cfg* cfg;
extern Cmdreg* cmdreg;
|