]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/faces/faces.h
webfs(4): document -d and -D flags
[plan9front.git] / sys / src / cmd / faces / faces.h
1 enum    /* face strings */
2 {
3         Suser,
4         Sdomain,
5         Sshow,
6         Sdigest,
7         Nstring
8 };
9
10 enum
11 {
12         Facesize = 48,
13 };
14
15 typedef struct Face             Face;
16 typedef struct Facefile Facefile;
17
18 struct Face
19 {
20         Image   *bit;           /* unless there's an error, this is file->image */
21         Image   *mask;  /* unless there's an error, this is file->mask */
22         char            *str[Nstring];
23         int             recent;
24         ulong   time;
25         Tm              tm;
26         int             unknown;
27         Facefile        *file;
28 };
29
30 /*
31  * Loading the files is slow enough on a dial-up line to be worth this trouble
32  */
33 struct Facefile
34 {
35         Image   *image;
36         Image   *mask;
37         ulong   mtime;
38         ulong   rdtime;
39         int             ref;
40         char            *file;
41         Facefile        *next;
42 };
43
44 extern char     date[];
45 extern char     *maildir;
46 extern char     **maildirs;
47 extern int      nmaildirs;
48
49 Face*   nextface(void);
50 void    findbit(Face*);
51 void    freeface(Face*);
52 void    initplumb(void);
53 void    killall(char*);
54 void    showmail(Face*);
55 void    delete(char*, char*);
56 void    freefacefile(Facefile*);
57 Face*   dirface(char*, char*);
58 void    resized(void);
59 int     alreadyseen(char*);
60 ulong   dirlen(char*);
61
62 void    *emalloc(ulong);
63 void    *erealloc(void*, ulong);
64 char    *estrdup(char*);
65 char    *findfile(Face*, char*, char*);
66 void    addmaildir(char*);