Plan 9 from Bell Labs’s /usr/web/sources/contrib/ericvh/warren/faces.h

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


enum	/* face strings */
{
	Suser,
	Sdomain,
	Sshow,
	Nstring
};

enum
{
	Facesize = 48,
};

typedef struct Face		Face;
typedef struct Facefile	Facefile;

struct Face
{
	Image	*bit;		/* unless there's an error, this is file->image */
	Image	*mask;	/* unless there's an error, this is file->mask */
	char		*str[Nstring];
	int		recent;
	ulong	time;
	Tm		tm;
	int		unknown;
	Facefile	*file;
};

/*
 * Loading the files is slow enough on a dial-up line to be worth this trouble
 */
struct Facefile
{
	Image	*image;
	Image	*mask;
	ulong	mtime;
	ulong	rdtime;
	int		ref;
	char		*file;
	Facefile	*next;
};

extern char	date[];

void	findbit(Face*);
void	freeface(Face*);
void	initplumb(void);
void	killall(char*);
void	showmail(Face*);

void	freefacefile(Facefile*);
Face*	dirface(char*, ulong);
void	resized(void);
int	alreadyseen(char*);
ulong	dirlen(char*);

void	*emalloc(ulong);
void	*erealloc(void*, ulong);
char	*estrdup(char*);
char	*findfile(Face*, char*, char*);

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].