|
|
1.1 ! root 1: /* @(#) _line_free.c: 1.1 10/15/83 (1.9 10/27/82) */ ! 2: ! 3: #include "curses.ext" ! 4: ! 5: /* '_line_free' returns a line object to the free list */ ! 6: _line_free (p) ! 7: register struct line *p; ! 8: { ! 9: register int i, sl, n=0; ! 10: register struct line **q; ! 11: ! 12: if (p == NULL) ! 13: return; ! 14: #ifdef DEBUG ! 15: if(outf) fprintf(outf, "mem: Releaseline (%x), prev SP->freelist %x", p, SP->freelist); ! 16: #endif ! 17: sl = lines; ! 18: for (i=sl,q = &SP->cur_body[sl]; i>0; i--,q--) ! 19: if (p == *q) ! 20: n++; ! 21: for (i=sl,q = &SP->std_body[sl]; i>0; i--,q--) ! 22: if (p == *q) ! 23: n++; ! 24: #ifdef DEBUG ! 25: if(outf) fprintf(outf, ", count %d\n", n); ! 26: #endif ! 27: if (n > 1) ! 28: return; ! 29: p -> next = SP->freelist; ! 30: p -> hash = -888; ! 31: SP->freelist = p; ! 32: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.