You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
747 B

  1. #define clear(p) do { void **_p = (void **)(p); free(*_p); *_p = NULL; } while (0);
  2. typedef struct item Item;
  3. typedef struct dir Dir;
  4. struct item {
  5. char type;
  6. char *username;
  7. char *selector;
  8. char *host;
  9. char *port;
  10. char *raw;
  11. char *tag;
  12. void *dat;
  13. Item *entry;
  14. };
  15. struct dir {
  16. Item *items;
  17. size_t nitems;
  18. size_t printoff;
  19. size_t curline;
  20. };
  21. #ifndef asprintf
  22. int asprintf(char **s, const char *fmt, ...);
  23. #endif /* asprintf */
  24. void die(const char *fmt, ...);
  25. size_t mbsprint(const char *s, size_t len);
  26. const char *typedisplay(char t);
  27. void uidisplay(Item *item);
  28. Item *uiselectitem(Item *entry);
  29. void uistatus(char *fmt, ...);
  30. void uicleanup(void);
  31. char *uiprompt(char *fmt, ...);
  32. void uisetup(void);
  33. void uisigwinch(int signal);