Searched defs:sym (Results 1 - 25 of 28) sorted by relevance

12

/ast/src/lib/libexpr/
H A Dexexpr.c31 * return the expression for name or sym coerced to type
35 exexpr(Expr_t* ex, const char* name, Exid_t* sym, int type) argument
39 if (!sym)
40 sym = name ? (Exid_t*)dtmatch(ex->symbols, name) : &ex->main;
41 if (sym && sym->lex == PROCEDURE && sym->value)
44 return excast(ex, sym->value->data.procedure.body, type, NiL, 0);
45 exfreenode(ex, sym->value);
46 sym
[all...]
H A Dexopen.c38 register Exid_t* sym; local
64 for (sym = exbuiltin; *sym->name; sym++)
65 dtinsert(program->symbols, sym);
66 if (sym = disc->symbols)
67 for (; *sym->name; sym++)
68 dtinsert(program->symbols, sym);
H A Dexcc.c544 register Exid_t* sym = (Exid_t*)object; local
546 if (sym->lex == DYNAMIC)
547 sfprintf(cc->ccdisc->text, "static %s %s;\n", extype(sym->type), sym->name);
607 * generate the program for name or sym coerced to type
611 excc(Excc_t* cc, const char* name, Exid_t* sym, int type) argument
617 if (!sym)
618 sym = name ? (Exid_t*)dtmatch(cc->expr->symbols, name) : &cc->expr->main;
619 if (sym && sym
642 Exid_t* sym; local
[all...]
H A Dexgram.h308 * force ref . sym qualification
312 qualify(register Exref_t* ref, register Exid_t* sym) argument
319 sfprintf(expr.program->tmp, "%s.%s", ref->symbol->name, sym->name);
325 memcpy(x, sym, sizeof(Exid_t) - EX_NAMELEN);
332 x = sym;
/ast/src/lib/libpp/
H A Dppmacref.c31 ppmacref(struct ppsymbol* sym, char* file, int line, int type, unsigned long sum) argument
39 p += sfsprintf(p, MAXTOKEN, "\n#%s %s:%s %s %d", dirname(PRAGMA), pp.pass, keyname(X_MACREF), sym->name, type);
42 if (sym->macro && sym->macro->value)
43 sum = strsum(sym->macro->value, (long)sym->macro->arity);
H A Dppbuiltin.c52 struct ppsymbol* sym; local
119 if ((c = pplex()) != T_ID || !(sym = ppsymref(pp.symtab, pp.token)) || !sym->macro || sym->macro->arity != 1 || (c = pplex()) != ',')
139 STRCOPY(pp.token, sym->name, a);
246 p = (sym = pprefmac(a, REF_NORMAL)) ? sym->macro->value : "";
H A Dppmisc.c37 register struct ppsymbol* sym; local
39 if (!(sym = ppsymget(pp.symtab, name)) && (ref <= REF_NORMAL && pp.macref || ref == REF_CREATE || ref == REF_DELETE && (pp.mode & (INIT|READONLY))))
43 sym = ppsymset(pp.symtab, NiL);
45 if (sym && ref <= REF_NORMAL)
47 if (pp.macref) (*pp.macref)(sym, error_info.file, error_info.line, ref == REF_NORMAL && (pp.state & CONDITIONAL) ? REF_IF : ref, 0L);
48 if (!sym->macro) sym = 0;
53 if (ref == REF_IF && sym && (sym->flags & SYM_PREDEFINED) && *name != '_' && !(pp.mode & (HOSTED|INACTIVE)))
62 return(sym);
74 register struct ppsymbol* sym; local
[all...]
H A Dppcall.c36 * 0 returned if tok==0 and sym->mac->value to be copied to output by caller
41 ppcall(register struct ppsymbol* sym, int tok) argument
62 sym->flags |= SYM_NOTICED;
63 if (mac = sym->macro)
66 if ((sym->flags & SYM_PREDICATE) && (pp.state & (CONDITIONAL|WARN)) == (CONDITIONAL|WARN))
67 error(1, "%s: macro definition overrides assertion: use #%s ...", sym->name, sym->name);
68 if (sym->flags & SYM_DISABLED)
76 error(1, "%s: macro recursion inhibited", sym->name);
80 if ((sym
[all...]
H A Dppexpr.c157 register struct ppsymbol* sym; local
221 else if ((sym = pprefmac(args, REF_IF)) && sym->macro) return 1;
240 else if (((sym = pprefmac(args, REF_IF)) || (sym = ppsymref(pp.symtab, args))) && (sym->flags & SYM_NOTICED)) return 1;
248 if (warn && !(pp.mode & HOSTED) && (sym = ppsymref(pp.symtab, pred)) && (sym->flags & SYM_PREDICATE))
H A Dppinput.c352 register struct ppsymbol* sym = (struct ppsymbol*)v; local
357 if ((mac = sym->macro) && !(sym->flags & (SYM_BUILTIN|SYM_PREDEFINED)))
359 ppprintf("%s", sym->name);
362 if (sym->flags & SYM_FUNCTION) flags |= LOAD_FUNCTION;
363 if (sym->flags & SYM_MULTILINE) flags |= LOAD_MULTILINE;
364 if (sym->flags & SYM_NOEXPAND) flags |= LOAD_NOEXPAND;
365 if (sym->flags & SYM_PREDICATE) flags |= LOAD_PREDICATE;
366 if (sym->flags & SYM_READONLY) flags |= LOAD_READONLY;
367 if (sym
473 struct ppsymbol* sym; local
[all...]
H A Dpplex.c191 struct ppsymbol* sym; local
1342 if (sym = ppsymref(pp.symtab, tp))
1345 n = ppcall(sym, 0);
1356 ip = sym->macro->value;
1357 c = sym->macro->size;
1369 else if ((sym->flags & SYM_MULTILINE) && pp.linesync)
1400 sym = (pp.option & NOHASH) ? ppsymref(pp.symtab, tp) : ppsymset(pp.symtab, tp);
1402 if (pp.symbol = sym)
1404 if ((sym->flags & SYM_KEYWORD) && (!pp.truncate || (op - tp) <= pp.truncate || (tp[pp.truncate] = '_', tp[pp.truncate + 1] = 0, pp.symbol = sym
[all...]
H A Dppcontrol.c60 register struct ppsymbol* sym; local
95 if (sym = ppsymref(pp.symtab, pred))
96 sym->flags &= ~SYM_PREDICATE;
108 if (sym = ppsymset(pp.symtab, pred))
109 sym->flags |= SYM_PREDICATE;
162 register struct ppsymbol* sym; local
169 sym = pprefmac(pp.token, REF_CREATE);
170 if ((sym->flags & SYM_FINAL) && (pp.mode & HOSTED)) return 0;
171 if (sym->flags & (SYM_ACTIVE|SYM_READONLY))
174 error(2, "%s: macro is %s", sym
261 register struct ppsymbol* sym; local
[all...]
H A Dpplib.h730 struct ppsymbol sym; /* symbol as usual */ member in struct:ppsymkey
/ast/src/lib/libdll/
H A Ddll_lib.c116 char sym[64]; local
151 sfsprintf(sym, sizeof(sym), "%s_lib", names->id);
152 if (!(libf = (Dll_lib_f)dlllook(dll, sym)))
155 (*dllerrorf)(NiL, disc, 2, "%s: %s: initialization function not found in library", names->path, sym);
157 errorf("dll", NiL, -1, "dll_lib: %s version %lu initialization function %s not found in library", names->name, version, sym);
H A Ddlfcn.c348 static NSModule multiple(NSSymbol sym, NSModule om, NSModule nm) argument
/ast/src/cmd/builtin/
H A Ddlls.c84 void* sym; local
201 if (sym = dlllook(dll, *syms))
202 sfprintf(sfstdout, "%p\n", sym);
216 if (sym = dlllook(dll, *syms))
234 sfprintf(sfstdout, " %14s %p\n", *syms, sym);
/ast/src/lib/libjcl/
H A Drun.c126 register Jclsym_t* sym; local
439 for (sym = (Jclsym_t*)dtfirst(step->syms); sym; sym = (Jclsym_t*)dtnext(step->syms, sym))
440 sfprintf(jcl->tp, " %s=%s", fmtquote(sym->name, "'", "'", strlen(sym->name), FMT_SHELL), fmtquote(sym->value, "$'", "'", strlen(sym->value), 0));
/ast/src/lib/libz/
H A Dinfback.c83 unsigned sym, bits; local
87 sym = 0;
88 while (sym < 144) state->lens[sym++] = 8;
89 while (sym < 256) state->lens[sym++] = 9;
90 while (sym < 280) state->lens[sym++] = 7;
91 while (sym < 288) state->lens[sym
[all...]
H A Dinftrees.c47 unsigned sym; /* index of code symbols */ local
115 for (sym = 0; sym < codes; sym++)
116 count[lens[sym]]++;
152 for (sym = 0; sym < codes; sym++)
153 if (lens[sym] != 0) work[offs[lens[sym]]
[all...]
H A Dinflate.c215 unsigned sym, bits; local
219 sym = 0;
220 while (sym < 144) state->lens[sym++] = 8;
221 while (sym < 256) state->lens[sym++] = 9;
222 while (sym < 280) state->lens[sym++] = 7;
223 while (sym < 288) state->lens[sym
[all...]
/ast/src/cmd/tw/
H A Dexpr.c117 deref(register Ftw_t* ftw, Exid_t* sym, register Exref_t* ref) argument
126 if (ftw && !ref->next && MEMINDEX(sym->index)) break;
127 error(3, "%s: invalid %s.%s reference", path, ref->symbol->name, sym->name);
197 * return value for symbol sym
201 getval(Expr_t* pgm, Exnode_t* node, Exid_t* sym, Exref_t* ref, void* env, int elt, Exdisc_t* disc) argument
220 if (ref && !(ftw = deref(ftw, sym, ref)))
227 switch (sym->index)
274 error(3, "%s: reference invalid when members declared", sym->name);
359 error(3, "%s: reference invalid when members declared", sym->name);
383 switch (MEMINDEX(sym
411 initvisit(Exid_t* sym) argument
431 refval(Expr_t* pgm, Exnode_t* node, Exid_t* sym, Exref_t* ref, char* str, int elt, Exdisc_t* disc) argument
594 setval(Expr_t* pgm, Exnode_t* node, Exid_t* sym, Exref_t* ref, void* env, int elt, Extype_t val, Exdisc_t* disc) argument
840 getnum(Exid_t* sym, Ftw_t* ftw) argument
856 Exid_t* sym; local
[all...]
/ast/src/cmd/ksh93/bltins/
H A Dtypeset.c937 Shbltin_f sh_getlib(Shell_t* shp, char* sym, Pathcomp_t* pp) argument
943 return (Shbltin_f)dlllook(liblist[n].dll, sym);
/ast/src/cmd/3d/
H A Dinit.c513 static const char sym[] = "_3d_init"; local
531 if (!(init = (Init_f)dlsym(dll, sym)))
533 error(2, "%s: %s: initialization function not found", arg, sym);
/ast/src/cmd/ksh93/sh/
H A Dlex.c2049 static char *fmttoken(Lex_t *lp, register int sym, char *tok) argument
2052 if(sym < 0)
2054 if(sym==0)
2058 if(sym&SYMRES)
2061 while(tp->sh_number && tp->sh_number!=sym)
2065 if(sym==EOFSYM)
2067 if(sym==NL)
2069 tok[0] = sym;
2070 if(sym&SYMREP)
2071 tok[n++] = sym;
[all...]
H A Dparse.c491 static Shnode_t *sh_cmd(Lex_t *lexp, register int sym, int flag) argument
495 if(sym==NL)
522 if(right=sh_cmd(lexp,sym,flag|SH_EMPTY))
526 if(sym==NL)
529 if(sym && sym!=lexp->token)
531 if(sym!=ELSESYM || (lexp->token!=ELIFSYM && lexp->token!=FISYM))
1877 static Shnode_t *test_expr(Lex_t *lp,int sym) argument
1880 if(lp->token!=sym)

Completed in 52 milliseconds

12