util.c (18532) | util.c (27643) |
---|---|
1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 165 unchanged lines hidden (view full) --- 174 ibuf = setinput(mp); 175 if ((lc = mp->m_lines - 1) < 0) 176 return NOSTR; 177 if (readline(ibuf, linebuf, LINESIZE) < 0) 178 return NOSTR; 179 while (lc > 0) { 180 if ((lc = gethfield(ibuf, linebuf, lc, &colon)) < 0) 181 return oldhfield; | 1/* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 165 unchanged lines hidden (view full) --- 174 ibuf = setinput(mp); 175 if ((lc = mp->m_lines - 1) < 0) 176 return NOSTR; 177 if (readline(ibuf, linebuf, LINESIZE) < 0) 178 return NOSTR; 179 while (lc > 0) { 180 if ((lc = gethfield(ibuf, linebuf, lc, &colon)) < 0) 181 return oldhfield; |
182 if (hfield = ishfield(linebuf, colon, field)) | 182 if ((hfield = ishfield(linebuf, colon, field)) != NULL) |
183 oldhfield = save2str(hfield, oldhfield); 184 } 185 return oldhfield; 186} 187 188/* 189 * Return the next header field found in the given message. 190 * Return >= 0 if something found, < 0 elsewise. --- 376 unchanged lines hidden (view full) --- 567 register FILE *ibuf; 568 int first = 1; 569 570 if ((cp = hfield("from", mp)) != NOSTR) 571 return cp; 572 if (reptype == 0 && (cp = hfield("sender", mp)) != NOSTR) 573 return cp; 574 ibuf = setinput(mp); | 183 oldhfield = save2str(hfield, oldhfield); 184 } 185 return oldhfield; 186} 187 188/* 189 * Return the next header field found in the given message. 190 * Return >= 0 if something found, < 0 elsewise. --- 376 unchanged lines hidden (view full) --- 567 register FILE *ibuf; 568 int first = 1; 569 570 if ((cp = hfield("from", mp)) != NOSTR) 571 return cp; 572 if (reptype == 0 && (cp = hfield("sender", mp)) != NOSTR) 573 return cp; 574 ibuf = setinput(mp); |
575 namebuf[0] = 0; | 575 namebuf[0] = '\0'; |
576 if (readline(ibuf, linebuf, LINESIZE) < 0) 577 return(savestr(namebuf)); 578newname: 579 for (cp = linebuf; *cp && *cp != ' '; cp++) 580 ; 581 for (; *cp == ' ' || *cp == '\t'; cp++) 582 ; 583 for (cp2 = &namebuf[strlen(namebuf)]; --- 124 unchanged lines hidden --- | 576 if (readline(ibuf, linebuf, LINESIZE) < 0) 577 return(savestr(namebuf)); 578newname: 579 for (cp = linebuf; *cp && *cp != ' '; cp++) 580 ; 581 for (; *cp == ' ' || *cp == '\t'; cp++) 582 ; 583 for (cp2 = &namebuf[strlen(namebuf)]; --- 124 unchanged lines hidden --- |