faces.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. char date[];
  40. char *maildir;
  41. Face* nextface(void);
  42. void findbit(Face*);
  43. void freeface(Face*);
  44. void initplumb(void);
  45. void killall(char*);
  46. void showmail(Face*);
  47. void delete(char*, char*);
  48. void freefacefile(Facefile*);
  49. Face* dirface(char*, char*);
  50. void resized(void);
  51. int alreadyseen(char*);
  52. ulong dirlen(char*);
  53. void *emalloc(ulong);
  54. void *erealloc(void*, ulong);
  55. char *estrdup(char*);
  56. char *findfile(Face*, char*, char*);