* do typedef the visit struct, remove all those 'struct' statements from all over...
[citadel.git] / citadel / msgbase.c
index f1aa9da9234e40e4be441a89dfa3132efd1dfd09..5178f2c5157c38e33750f95f50693dbbd27eec0f 100644 (file)
@@ -356,7 +356,7 @@ int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template) {
  * Retrieve the "seen" message list for the current room.
  */
 void CtdlGetSeen(char *buf, int which_set) {
-       struct visit vbuf;
+       visit vbuf;
 
        /* Learn about the user and room in question */
        CtdlGetRelationship(&vbuf, &CC->user, &CC->room);
@@ -381,7 +381,7 @@ void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
        int was_seen = 0;
        long lo = (-1L);
        long hi = (-1L);
-       struct visit vbuf;
+       visit vbuf;
        long *msglist;
        int num_msgs = 0;
        StrBuf *vset;
@@ -607,7 +607,7 @@ int CtdlForEachMessage(int mode, long ref, char *search_string,
 {
 
        int a, i, j;
-       struct visit vbuf;
+       visit vbuf;
        struct cdbdata *cdbfr;
        long *msglist = NULL;
        int num_msgs = 0;
@@ -933,14 +933,14 @@ void memfmout(
        const char *nl          /* string to terminate lines with */
 ) {
        int column = 0;
-       char ch = 0;
+       unsigned char ch = 0;
        char outbuf[1024];
        int len = 0;
        int nllen = 0;
 
        if (!mptr) return;
        nllen = strlen(nl);
-       while (ch=*(mptr++), ch > 0) {
+       while (ch=*(mptr++), ch != 0) {
 
                if (ch == '\n') {
                        client_write(outbuf, len);