Lines Matching refs:text
73 struct text { struct
82 char text[BLOCKSIZE]; argument
94 struct text code; /* code for handling event */
126 struct text defines; /* #define statements */
127 struct text decls; /* declarations */
138 void addstr(char *, struct text *);
139 void addchar(int, struct text *);
140 void writetext(struct text *, FILE *);
392 addstr(char *s, struct text *text) in addstr() argument
395 if (--text->nleft < 0) in addstr()
396 addchar(*s++, text); in addstr()
398 *text->nextc++ = *s++; in addstr()
404 addchar(int c, struct text *text) in addchar() argument
408 if (--text->nleft < 0) { in addchar()
410 if (text->start == NULL) in addchar()
411 text->start = bp; in addchar()
413 text->last->next = bp; in addchar()
414 text->last = bp; in addchar()
415 text->nextc = bp->text; in addchar()
416 text->nleft = BLOCKSIZE - 1; in addchar()
418 *text->nextc++ = c; in addchar()
425 writetext(struct text *text, FILE *fp) in writetext() argument
429 if (text->start != NULL) { in writetext()
430 for (bp = text->start ; bp != text->last ; bp = bp->next) { in writetext()
431 if ((fwrite(bp->text, sizeof (char), BLOCKSIZE, fp)) != BLOCKSIZE) in writetext()
434 if ((fwrite(bp->text, sizeof (char), BLOCKSIZE - text->nleft, fp)) != (BLOCKSIZE - text->nleft)) in writetext()