Lines Matching refs:dp
256 register DEFBUF *dp; in macroid() local
260 while (type[c] == LET && (dp = lookid(c)) != NULL) { in macroid()
261 expand(dp); in macroid()
572 register DEFBUF *dp; in lookid() local
593 dp = symtab[nhash & SBMASK]; /* Starting bucket */ in lookid()
594 while (dp != (DEFBUF *) NULL) { /* Search symbol table */ in lookid()
595 if (dp->hash == nhash /* Fast precheck */ in lookid()
596 && (temp = strcmp(dp->name, token)) >= 0) in lookid()
598 dp = dp->link; /* Nope, try next one */ in lookid()
600 return ((temp == 0) ? dp : NULL); in lookid()
612 register DEFBUF *dp; in defendel() local
624 while ((dp = *prevp) != (DEFBUF *) NULL) { in defendel()
625 if (dp->hash == nhash in defendel()
626 && (temp = strcmp(dp->name, name)) >= 0) { in defendel()
628 dp = NULL; /* Not found */ in defendel()
630 *prevp = dp->link; /* Found, unlink and */ in defendel()
631 if (dp->repl != NULL) /* Free the replacement */ in defendel()
632 free(dp->repl); /* if any, and then */ in defendel()
633 free((char *) dp); /* Free the symbol */ in defendel()
637 prevp = &dp->link; in defendel()
640 dp = (DEFBUF *) getmem(sizeof (DEFBUF) + size); in defendel()
641 dp->link = *prevp; in defendel()
642 *prevp = dp; in defendel()
643 dp->hash = nhash; in defendel()
644 dp->repl = NULL; in defendel()
645 dp->nargs = 0; in defendel()
646 strcpy(dp->name, name); in defendel()
648 return (dp); in defendel()
655 register DEFBUF *dp; in dumpdef() local
666 if ((dp = *syp) != (DEFBUF *) NULL) { in dumpdef()
669 dumpadef((char *) NULL, dp); in dumpdef()
670 } while ((dp = dp->link) != (DEFBUF *) NULL); in dumpdef()
680 void dumpadef(char *why, register DEFBUF *dp) in dumpadef() argument
692 fprintf( pCppOut, " \"%s\" [%d]", dp->name, dp->nargs); in dumpadef()
695 if (dp->repl != NULL) { in dumpadef()
697 for (cp = dp->repl; (c = *cp++ & 0xFF) != EOS;) { in dumpadef()
717 if ( bDumpDefs && !bIsInEval && dp->nargs <= 0 ) in dumpadef()
735 file = getfile( strlen( dp->repl ), dp->name ); in dumpadef()
736 strcpy( file->buffer, dp->repl ); in dumpadef()