=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/strings.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/mail/strings.c 1997/07/13 23:54:02 1.4 --- src/usr.bin/mail/strings.c 1997/07/14 00:24:30 1.5 *************** *** 1,4 **** ! /* $OpenBSD: strings.c,v 1.4 1997/07/13 23:54:02 millert Exp $ */ /* $NetBSD: strings.c,v 1.5 1996/06/08 19:48:40 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: strings.c,v 1.5 1997/07/14 00:24:30 millert Exp $ */ /* $NetBSD: strings.c,v 1.5 1996/06/08 19:48:40 christos Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)strings.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: strings.c,v 1.4 1997/07/13 23:54:02 millert Exp $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "@(#)strings.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: strings.c,v 1.5 1997/07/14 00:24:30 millert Exp $"; #endif #endif /* not lint */ *************** *** 75,81 **** s &= ~(sizeof(char *) - 1); index = 0; for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { ! if (sp->s_topFree == NOSTR && (STRINGSIZE << index) >= s) break; if (sp->s_nleft >= s) break; --- 75,81 ---- s &= ~(sizeof(char *) - 1); index = 0; for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { ! if (sp->s_topFree == NULL && (STRINGSIZE << index) >= s) break; if (sp->s_nleft >= s) break; *************** *** 83,92 **** } if (sp >= &stringdope[NSPACE]) panic("String too large"); ! if (sp->s_topFree == NOSTR) { index = sp - &stringdope[0]; sp->s_topFree = (char *)malloc(STRINGSIZE << index); ! if (sp->s_topFree == NOSTR) { fprintf(stderr, "No room for space %d\n", index); panic("Internal error"); } --- 83,92 ---- } if (sp >= &stringdope[NSPACE]) panic("String too large"); ! if (sp->s_topFree == NULL) { index = sp - &stringdope[0]; sp->s_topFree = (char *)malloc(STRINGSIZE << index); ! if (sp->s_topFree == NULL) { fprintf(stderr, "No room for space %d\n", index); panic("Internal error"); } *************** *** 114,120 **** return; index = 0; for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { ! if (sp->s_topFree == NOSTR) continue; sp->s_nextFree = sp->s_topFree; sp->s_nleft = STRINGSIZE << index; --- 114,120 ---- return; index = 0; for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { ! if (sp->s_topFree == NULL) continue; sp->s_nextFree = sp->s_topFree; sp->s_nleft = STRINGSIZE << index; *************** *** 132,136 **** register struct strings *sp; for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) ! sp->s_topFree = NOSTR; } --- 132,136 ---- register struct strings *sp; for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) ! sp->s_topFree = NULL; }