smtp.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. typedef struct Node Node;
  2. typedef struct Field Field;
  3. typedef Node *Nodeptr;
  4. #define YYSTYPE Nodeptr
  5. struct Node {
  6. Node *next;
  7. int c; /* token type */
  8. char addr; /* true if this is an address */
  9. String *s; /* string representing token */
  10. String *white; /* white space following token */
  11. char *start; /* first byte for this token */
  12. char *end; /* next byte in input */
  13. };
  14. struct Field {
  15. Field *next;
  16. Node *node;
  17. int source;
  18. };
  19. typedef struct DS DS;
  20. struct DS {
  21. /* dist string */
  22. char buf[128];
  23. char expand[128];
  24. char *netdir;
  25. char *proto;
  26. char *host;
  27. char *service;
  28. };
  29. extern Field *firstfield;
  30. extern Field *lastfield;
  31. extern Node *usender;
  32. extern Node *usys;
  33. extern Node *udate;
  34. extern int originator;
  35. extern int destination;
  36. extern int date;
  37. extern int messageid;
  38. Node* anonymous(Node*);
  39. Node* address(Node*);
  40. int badfieldname(Node*);
  41. Node* bang(Node*, Node*);
  42. Node* colon(Node*, Node*);
  43. int cistrcmp(char*, char*);
  44. Node* link2(Node*, Node*);
  45. Node* link3(Node*, Node*, Node*);
  46. void freenode(Node*);
  47. void newfield(Node*, int);
  48. void freefield(Field*);
  49. void yyinit(char*, int);
  50. int yyparse(void);
  51. int yylex(void);
  52. String* yywhite(void);
  53. Node* whiten(Node*);
  54. void yycleanup(void);
  55. int mxdial(char*, char*, char*);
  56. void dial_string_parse(char*, DS*);