static loadtext(line_prefix) char *line_prefix; { int i; register char col; char c,buff[80],end_header; col= 0; end_header= 0; /* haven't yet */ for ( ; textptr - mem < memsize - 2; ) { /* load text */ if (! read(msgfile,textptr,1)) break; /* EOF */ switch (*textptr) { case LF: /* ignore LFs after CR */ if (col == 0) break; /* FALL THROUGH */ case CR: /* EOL markers */ case CR+128: force_end: *textptr++= CR; *textptr++= LF; ++message_lines; col= 0; break; case '\001': /* IFNA kludge */ if (!end_header && (col == 0)) *textptr++= ';'; *textptr++= '\001'; ++col; break; /* This ugly thing detects the end-of-header state, and appends the edit marker. */ default: if ((col == 0) && !end_header) { /* if haven't yet */ c= *textptr; /* save the char! */ *textptr= SUB; /* so stradd() works! */ stradd(">----------------------- Do not change this line -----------------------------<\r\n"); *textptr= c; /* write the orig. char */ end_header= 1; /* flag completion */ } ++textptr; /* all others */ if (++col > 78) goto force_end; break; } } *textptr= SUB; /* mark EOF */ /* If the message body was null, make sure there's the searator line. */ if (! end_header) stradd(">----------------------- Do not change this line -----------------------------<\r\n"); }