Plan 9 from Bell Labs’s /usr/web/sources/contrib/pdt/sky/cmd/skywatch/dat.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


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;

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.