Plan 9 from Bell Labs’s /usr/web/sources/contrib/axel/rushhour/src/trafficfs.h

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


typedef struct {
	uchar row[3];
	uchar col[3];
} Level;

typedef struct {
	int moves;	/* nr of moves needed */
	Level *base;	/* 0th level of group */
	Level *beyond;	/* past last level of group */
	int count;		/* beyond - base */
} Group;

typedef struct {
	int base;		/* nr of moves needed for group[0] */
	int beyond;	/* past last nr-of-moves */
	int ngroup;	/* beyond - base */
	Group *group;	/* each next group needs one more move */
	int nlevel;
	Level *level;	/* all levels; group contains pointers into this */
} Directory;

enum {
	ORow = 0,
	OCol
};

typedef struct {
	char *name;
	struct {
		int min;
		int max;
		int count;
	} req;
	int min;
	int max;
	int count;
	int avail;
	int total;
	int seen;
	char *data;
	int ndata;
	ulong mtime;
} Generated;

typedef struct {
	int nseen;
} GrpSeen;

typedef struct {
	int ngroup;
	GrpSeen *group;
	uchar *seen;
} Seen;

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.