Changeset 2290 for trunk/src/kash/input.c
- Timestamp:
- Feb 27, 2009, 5:08:07 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/input.c
r2288 r2290 343 343 /*dprintf("*** calling pushstring: %s, %d\n", s, len);*/ 344 344 if (psh->parsefile->strpush) { 345 sp = ckmalloc( sizeof (struct strpush));345 sp = ckmalloc(psh, sizeof (struct strpush)); 346 346 sp->prev = psh->parsefile->strpush; 347 347 psh->parsefile->strpush = sp; … … 373 373 psh->parsefile->strpush = sp->prev; 374 374 if (sp != &(psh->parsefile->basestrpush)) 375 ckfree( sp);375 ckfree(psh, sp); 376 376 INTON; 377 377 } … … 415 415 if (push) { 416 416 pushfile(psh); 417 psh->parsefile->buf = ckmalloc( BUFSIZ);417 psh->parsefile->buf = ckmalloc(psh, BUFSIZ); 418 418 } 419 419 if (psh->parsefile->fd > 0) … … 421 421 psh->parsefile->fd = fd; 422 422 if (psh->parsefile->buf == NULL) 423 psh->parsefile->buf = ckmalloc( BUFSIZ);423 psh->parsefile->buf = ckmalloc(psh, BUFSIZ); 424 424 psh->parselleft = psh->parsenleft = 0; 425 425 psh->plinno = 1; … … 460 460 psh->parsefile->nextc = psh->parsenextc; 461 461 psh->parsefile->linno = psh->plinno; 462 pf = (struct parsefile *)ckmalloc( sizeof (struct parsefile));462 pf = (struct parsefile *)ckmalloc(psh, sizeof (struct parsefile)); 463 463 pf->prev = psh->parsefile; 464 464 pf->fd = -1; … … 478 478 shfile_close(&psh->fdtab, pf->fd); 479 479 if (pf->buf) 480 ckfree(p f->buf);480 ckfree(psh, pf->buf); 481 481 while (pf->strpush) 482 482 popstring(psh); 483 483 psh->parsefile = pf->prev; 484 ckfree(p f);484 ckfree(psh, pf); 485 485 psh->parsenleft = psh->parsefile->nleft; 486 486 psh->parselleft = psh->parsefile->lleft;
Note:
See TracChangeset
for help on using the changeset viewer.