- #include <stdlib.h>
- #include <stdio.h>
- #include <sys/types.h>
- #include <time.h>
- #include <string.h>
- #define HELO 0
- #define GET 1
- #define POST 2
- #define BLST 3
- #define BLTHR 4
- #define GREET "Hey, how's it going?\n"
- #define GRTSIZ 21
- #define POLITE "Polite people first say hello.\n"
- #define PLTSIZ 31
- #define PRTERR "You're talking rubbish, honey.\n"
- #define PRTSIZ 31
- #define REPLY "Nice to meet you.\n"
- #define RPLSIZ 18
- #define REPEAT "I'm not deaf, ya know.\n"
- #define RPTSIZ 23
- #define BYE "BCNU\n"
- #define BYESIZ 5
- #define SERV_TCP_PORT 12755
- #define SPOOLPATH "/users/04/info/ramanana/dbforum"
- #define PQCONN "host='clipper' dbname='ramanana'"
- #define LMXSIZ 1024 /* max line size */
- struct msg {
- int nngrp;
- char **newsgrps;
- char *subject;
- char *from;
- char *sender;
- int nrefs;
- char **refs;
- time_t date;
- char *body;
- };
- int parse (char *str, char **t, int p, int n);
Raw Paste