1
*** imapd.c Sun Jul 18 21:48:29 1993
2
--- imapd.c.new Sun Jul 18 21:47:53 1993
6
extern DRIVER bezerkdriver,tenexdriver,imapdriver,newsdriver,nntpdriver,
10
+ extern DRIVER carmeldriver, carmel2driver;
14
/* Function prototypes */
24
+ char *glyph2richtext();
27
extern char *crypt ();
33
char *s,*t = "OK",*u,*v;
37
+ mail_link (&carmeldriver);
38
+ mail_link (&carmel2driver);
40
mail_link (&tenexdriver); /* install the Tenex mail driver */
41
mail_link (&bezerkdriver); /* install the Berkeley mail driver */
42
mail_link (&imapdriver); /* install the IMAP driver */
46
state = SELECT; /* enter select state */
47
t = "PREAUTH"; /* pre-authorized */
50
+ printf ("* %s %s IMAP2bis Service %sBWC at %s\015\012",t,host,version,cmdbuf);
52
printf ("* %s %s IMAP2bis Service %s at %s\015\012",t,host,version,cmdbuf);
54
fflush (stdout); /* dump output buffer */
55
signal (SIGALRM,clkint); /* prepare for clock interrupt */
56
signal (SIGUSR2,kodint); /* prepare for Kiss Of Death */
60
if (body && (s = mail_fetchbody (stream,i,s,&j))) {
61
/* and literal string */
62
printf ("{%d}\015\012",j);
63
+ #ifdef BWC_NOT_WORKING_YET
67
+ s = glyph2richtext(s);
69
+ ss = rfc822_8bit(s, j, &j);
70
+ fs_give((void **)&s);
71
+ while (j -= k) k = fwrite (ss += k,1,j,stdout);
72
+ fs_give((void **)&ss);
75
while (j -= k) k = fwrite (s += k,1,j,stdout);
77
changed_flags (i,f); /* output changed flags */
79
else fputs ("NIL",stdout); /* can't output anything at all */
83
else { /* non-multipart body type */
84
pstring ((char *) body_types[body->type]);
87
+ if(body->type == TYPETEXT && strcmp(lcase(body->subtype), "x-bwc-glyph") == 0)
88
+ pstring("plain"); /* Make it plain now, richtext later when fixed */
90
+ pstring (body->subtype);
92
pstring (body->subtype);
94
if (param = body->parameter) {
97
pstring (param->attribute);
99
+ #ifdef BWC_NOT_WORKING_YET
100
+ if(strucmp2(param->attribute, "charset") == 0) {
101
+ pstring("ISO-8859-1");
103
+ pstring (param->value);
106
pstring (param->value);
108
if (param = param->next) putchar (' ');