faces.h 1.1 KB

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