comparison src/accept.c @ 111:43798acdfbc9

simplified a bit-operation based condition
author meillo@marmaro.de
date Tue, 29 Jun 2010 11:42:51 +0200
parents c678d0342451
children 5ec5e6637049
comparison
equal deleted inserted replaced
110:c678d0342451 111:43798acdfbc9
90 } 90 }
91 line1++; 91 line1++;
92 } 92 }
93 93
94 if (len <= 0) { 94 if (len <= 0) {
95 if ((len == -1) && ((flags & ACC_DOT_IGNORE) || (flags & ACC_NODOT_RELAX))) { 95 if ((len == -1) && (flags & (ACC_DOT_IGNORE | ACC_NODOT_RELAX))) {
96 /* we got an EOF, and the last line was not terminated by a CR */ 96 /* we got an EOF, and the last line was not terminated by a CR */
97 gint len1 = strlen(line1); 97 gint len1 = strlen(line1);
98 if (len1 > 0) { /* == 0 is 'normal' (EOF after a CR) */ 98 if (len1 > 0) { /* == 0 is 'normal' (EOF after a CR) */
99 if (line1[len1 - 1] != '\n') { /* some mail clients allow unterminated lines */ 99 if (line1[len1 - 1] != '\n') { /* some mail clients allow unterminated lines */
100 line1[len1] = '\n'; 100 line1[len1] = '\n';