Lines Matching refs:sp
70 register struct strings *sp; in salloc() local
84 for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { in salloc()
85 if (sp->s_topFree == NOSTR && (STRINGSIZE << index) >= s) in salloc()
87 if (sp->s_nleft >= s) in salloc()
91 if (sp >= &stringdope[NSPACE]) in salloc()
93 if (sp->s_topFree == NOSTR) { in salloc()
94 index = sp - &stringdope[0]; in salloc()
95 sp->s_topFree = (char *) calloc(STRINGSIZE << index, in salloc()
97 if (sp->s_topFree == NOSTR) { in salloc()
102 sp->s_nextFree = sp->s_topFree; in salloc()
103 sp->s_nleft = STRINGSIZE << index; in salloc()
105 sp->s_nleft -= s; in salloc()
106 t = sp->s_nextFree; in salloc()
107 sp->s_nextFree += s; in salloc()
109 lastsp = sp; in salloc()
126 register struct strings *sp = lastsp; in srealloc() local
138 delta = s - (sp->s_nextFree - (char *)optr); in srealloc()
139 if (delta <= sp->s_nleft) { in srealloc()
140 sp->s_nextFree += delta; in srealloc()
141 sp->s_nleft -= delta; in srealloc()
159 register struct strings *sp; in sreset() local
166 for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) { in sreset()
167 if (sp->s_topFree == NOSTR) in sreset()
169 sp->s_nextFree = sp->s_topFree; in sreset()
170 sp->s_nleft = STRINGSIZE << index; in sreset()