System: Redhat 8.0, intel arch
Problem: #define refuses to define 'or' and 'and' so M_LOGICAL_OP_NAMES
doesn't do its job anymore.
Disgustingly-ugly-solution: hack c-client, change 'or' and 'and' to
'cc_or' and 'cc_and' manually.
Dumb patch attached.
--
Ron Alford, KB0NUV
http://volus.net/~ronwalf
Index: extra/src/c-client/imap4r1.c
===================================================================
RCS file: /cvsroot/mahogany/M/extra/src/c-client/imap4r1.c,v
retrieving revision 1.8
diff -r1.8 imap4r1.c
1519,1520c1519,1520
< (charset || LOCAL->uidsearch || pgm->msgno || pgm->uid || pgm->or ||
< pgm->not || pgm->header || pgm->larger || pgm->smaller ||
---
> (charset || LOCAL->uidsearch || pgm->msgno || pgm->uid || pgm->cc_or ||
> pgm->cc_not || pgm->header || pgm->larger || pgm->smaller ||
2581c2581
< for (pgo = pgm->or; pgo; pgo = pgo->next) {
---
> for (pgo = pgm->cc_or; pgo; pgo = pgo->next) {
2588c2588
< for (pgl = pgm->not; pgl; pgl = pgl->next) {
---
> for (pgl = pgm->cc_not; pgl; pgl = pgl->next) {
Index: extra/src/c-client/mail.c
===================================================================
RCS file: /cvsroot/mahogany/M/extra/src/c-client/mail.c,v
retrieving revision 1.8
diff -r1.8 mail.c
2857,2858c2857,2858
< SEARCHOR *or;
< SEARCHPGMLIST *not;
---
> SEARCHOR *cc_or;
> SEARCHPGMLIST *cc_not;
3015,3019c3015,3019
< for (or = pgm->or; or; or = or->next)
< if (!(mail_search_msg (stream,msgno,section,or->first) ||
< mail_search_msg (stream,msgno,section,or->second))) return NIL;
< for (not = pgm->not; not; not = not->next)
< if (mail_search_msg (stream,msgno,section,not->pgm)) return NIL;
---
> for (cc_or = pgm->cc_or; cc_or; cc_or = cc_or->next)
> if (!(mail_search_msg (stream,msgno,section,cc_or->first) ||
> mail_search_msg (stream,msgno,section,cc_or->second))) return NIL;
> for (cc_not = pgm->cc_not; cc_not; cc_not = cc_not->next)
> if (mail_search_msg (stream,msgno,section,cc_not->pgm)) return NIL;
4986c4986
< SEARCHOR *or = (SEARCHOR *) memset (fs_get (sizeof (SEARCHOR)),0,
---
> SEARCHOR *cc_or = (SEARCHOR *) memset (fs_get (sizeof (SEARCHOR)),0,
4988,4990c4988,4990
< or->first = mail_newsearchpgm ();
< or->second = mail_newsearchpgm ();
< return or;
---
> cc_or->first = mail_newsearchpgm ();
> cc_or->second = mail_newsearchpgm ();
> return cc_or;
5230,5231c5230,5231
< mail_free_searchor (&(*pgm)->or);
< mail_free_searchpgmlist (&(*pgm)->not);
---
> mail_free_searchor (&(*pgm)->cc_or);
> mail_free_searchpgmlist (&(*pgm)->cc_not);
Index: extra/src/c-client/mail.h
===================================================================
RCS file: /cvsroot/mahogany/M/extra/src/c-client/mail.h,v
retrieving revision 1.6
diff -r1.6 mail.h
737,738c737,738
< SEARCHOR *or; /* or'ed in programs */
< SEARCHPGMLIST *not; /* and'ed not program */
---
> SEARCHOR *cc_or; /* or'ed in programs */
> SEARCHPGMLIST *cc_not; /* and'ed not program */
Index: extra/src/c-client/nntp.c
===================================================================
RCS file: /cvsroot/mahogany/M/extra/src/c-client/nntp.c,v
retrieving revision 1.7
diff -r1.7 nntp.c
947,948c947,948
< SEARCHOR *or;
< SEARCHPGMLIST *not;
---
> SEARCHOR *cc_or;
> SEARCHPGMLIST *cc_not;
1085,1089c1085,1089
< for (or = pgm->or; or; or = or->next)
< if (!(nntp_search_msg (stream,msgno,or->first,ov) ||
< nntp_search_msg (stream,msgno,or->second,ov))) return NIL;
< for (not = pgm->not; not; not = not->next)
< if (nntp_search_msg (stream,msgno,not->pgm,ov)) return NIL;
---
> for (cc_or = pgm->cc_or; cc_or; cc_or = cc_or->next)
> if (!(nntp_search_msg (stream,msgno,cc_or->first,ov) ||
> nntp_search_msg (stream,msgno,cc_or->second,ov))) return NIL;
> for (cc_not = pgm->cc_not; cc_not; cc_not = cc_not->next)
> if (nntp_search_msg (stream,msgno,cc_not->pgm,ov)) return NIL;
Index: extra/src/c-client/utf8.c
===================================================================
RCS file: /cvsroot/mahogany/M/extra/src/c-client/utf8.c,v
retrieving revision 1.5
diff -r1.5 utf8.c
868c868
< for (ol = pgm->or; ol; ol = ol->next) {
---
> for (ol = pgm->cc_or; ol; ol = ol->next) {
872c872
< for (pl = pgm->not; pl; pl = pl->next) utf8_searchpgm (pl->pgm,charset);
---
> for (pl = pgm->cc_not; pl; pl = pl->next) utf8_searchpgm (pl->pgm,charset);
Index: include/Mcclient.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/Mcclient.h,v
retrieving revision 1.11
diff -r1.11 Mcclient.h
16,21c16,21
< # ifdef M_LOGICAL_OP_NAMES
< # define or cc_or
< # define not cc_not
< # else // !M_LOGICAL_OP_NAMES
< # define cc_not not
< # endif //M_LOGICAL_OP_NAMES
---
> //# ifdef M_LOGICAL_OP_NAMES
> //# define or cc_or
> //# define not cc_not
> //# else // !M_LOGICAL_OP_NAMES
> //# define cc_not not
> //# endif //M_LOGICAL_OP_NAMES
32,35c32,35
< # ifdef M_LOGICAL_OP_NAMES
< # undef or
< # undef not
< # endif //M_LOGICAL_OP_NAMES
---
> //# ifdef M_LOGICAL_OP_NAMES
> //# undef or
> //# undef not
> //# endif //M_LOGICAL_OP_NAMES