~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to contrib/carmel/imapd/imapd.c.patch.old

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*** imapd.c     Sun Jul 18 21:48:29 1993
 
2
--- imapd.c.new Sun Jul 18 21:47:53 1993
 
3
***************
 
4
*** 109,115 ****
 
5
--- 109,119 ----
 
6
  extern DRIVER bezerkdriver,tenexdriver,imapdriver,newsdriver,nntpdriver,
 
7
    dummydriver;
 
8
  
 
9
+ #ifdef BWC
 
10
+ extern DRIVER carmeldriver, carmel2driver;
 
11
+ #endif
 
12
  
 
13
 
14
  /* Function prototypes */
 
15
  
 
16
  void main  ();
 
17
***************
 
18
*** 135,140 ****
 
19
--- 139,148 ----
 
20
  long cstring  ();
 
21
  long caddr  ();
 
22
  
 
23
+ #ifdef BWC
 
24
+ char *glyph2richtext();
 
25
+ #endif
 
26
 
27
  extern char *crypt  ();
 
28
  
 
29
  /* Main program */
 
30
***************
 
31
*** 147,152 ****
 
32
--- 155,164 ----
 
33
    char *s,*t = "OK",*u,*v;
 
34
    struct hostent *hst;
 
35
    void (*f) () = NIL;
 
36
+ #ifdef BWC
 
37
+   mail_link (&carmeldriver);
 
38
+   mail_link (&carmel2driver);
 
39
+ #endif  
 
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 */
 
43
***************
 
44
*** 164,170 ****
 
45
--- 176,186 ----
 
46
      state = SELECT;           /* enter select state */
 
47
      t = "PREAUTH";            /* pre-authorized */
 
48
    }
 
49
+ #ifdef BWC
 
50
+   printf ("* %s %s IMAP2bis Service %sBWC at %s\015\012",t,host,version,cmdbuf);
 
51
+ #else
 
52
    printf ("* %s %s IMAP2bis Service %s at %s\015\012",t,host,version,cmdbuf);
 
53
+ #endif
 
54
    fflush (stdout);            /* dump output buffer */
 
55
    signal (SIGALRM,clkint);    /* prepare for clock interrupt */
 
56
    signal (SIGUSR2,kodint);    /* prepare for Kiss Of Death */
 
57
***************
 
58
*** 782,788 ****
 
59
--- 798,817 ----
 
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
 
64
+     {
 
65
+         char *ss;
 
66
+         s[j] = '\0';
 
67
+         s = glyph2richtext(s);
 
68
+         j = strlen(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);
 
73
+     }
 
74
+ #else    
 
75
      while (j -= k) k = fwrite (s += k,1,j,stdout);
 
76
+ #endif
 
77
      changed_flags (i,f);      /* output changed flags */
 
78
    }
 
79
    else fputs ("NIL",stdout);  /* can't output anything at all */
 
80
***************
 
81
*** 983,995 ****
 
82
--- 1012,1039 ----
 
83
      else {                    /* non-multipart body type */
 
84
        pstring ((char *) body_types[body->type]);
 
85
        putchar (' ');
 
86
+ #ifdef BWC
 
87
+       if(body->type == TYPETEXT && strcmp(lcase(body->subtype), "x-bwc-glyph") == 0)
 
88
+         pstring("plain"); /* Make it plain now, richtext later when fixed */
 
89
+       else
 
90
+         pstring (body->subtype);
 
91
+ #else
 
92
        pstring (body->subtype);
 
93
+ #endif
 
94
        if (param = body->parameter) {
 
95
        fputs (" (",stdout);
 
96
        do {
 
97
          pstring (param->attribute);
 
98
          putchar (' ');
 
99
+ #ifdef BWC_NOT_WORKING_YET
 
100
+           if(strucmp2(param->attribute, "charset") == 0) {
 
101
+               pstring("ISO-8859-1");
 
102
+           } else {
 
103
+             pstring (param->value);
 
104
+           }
 
105
+ #else
 
106
          pstring (param->value);
 
107
+ #endif
 
108
          if (param = param->next) putchar (' ');
 
109
        } while (param);
 
110
        fputs (") ",stdout);