/ast/src/lib/libjcl/ |
H A D | sym.c | 23 * jcl symbol support 35 jclsym(Jcl_t* jcl, const char* name, const char* value, int flags) argument 56 imported = (flags & JCL_SYM_SET) && (jcl->flags & JCL_IMPORT); 60 if (!(v = vmnewof(jcl->vs, 0, Jclsym_t, 1, n + strlen(value) + 2))) 62 nospace(jcl, NiL); 68 if (o = (Jclsym_t*)dtsearch(jcl->step->syms, v)) 72 vmfree(jcl->vs, v); 76 dtdelete(jcl->step->syms, o); 77 vmfree(jcl->vs, o); 81 vmfree(jcl [all...] |
H A D | open.c | 23 * jcl handle open/close 35 * open a handle to the jcl deck 41 register Jcl_t* jcl; local 55 if (!(jcl = vmnewof(vm, 0, Jcl_t, 1, 0))) 62 jcl->id = "jcl"; 63 jcl->vs = jcl->vm = vm; 64 jcl->vx = vs; 65 jcl 133 jclclose(Jcl_t* jcl) argument 172 jclpush(register Jcl_t* jcl, Sfio_t* sp, const char* file, long line) argument 203 jclpop(Jcl_t* jcl) argument [all...] |
H A D | lib.c | 23 * jcl private library support 31 internal(register Jcl_t* jcl, const char* name) argument 39 return jcl->name; 61 lookup(register Jcl_t* jcl, const char* name, const char* value, int flags, int set) argument 73 if (jcl->step->syms && (v = (Jclsym_t*)dtmatch(jcl->step->syms, name))) 75 for (scope = jcl; scope; scope = scope->scope) 83 else if (!jcl->syms) 85 else if ((v = (Jclsym_t*)dtmatch(jcl->syms, name)) && (!(flags & (JCL_SYM_EXPORT|JCL_SYM_SET)) || (v->flags & (JCL_SYM_EXPORT|JCL_SYM_SET)))) 88 v->value = stash(jcl, jc 229 stash(Jcl_t* jcl, Vmalloc_t* vm, const char* str, int path) argument 259 nospace(Jcl_t* jcl, Jcldisc_t* disc) argument [all...] |
H A D | find.c | 23 * jcl file search 44 regular(Jcl_t* jcl, char* path, struct stat* st) argument 79 for (ip = jcl->include; ip; ip = ip->prev) 82 } while (jcl = jcl->scope); 88 * return expanded value returned in jcl->vp 89 * jcl->tp may be clobbered 93 expand(Jcl_t* jcl, const char* name, int flags) argument 104 if (jcl) 108 p = sfstrtell(jcl 170 jclinclude(Jcl_t* jcl, const char* dir, unsigned long flags, Jcldisc_t* disc) argument 203 search(Jcl_t* jcl, const char* dir, const char* name, unsigned long flags, struct stat* st) argument 253 jclfind(Jcl_t* jcl, const char* name, unsigned long flags, int level, Sfio_t** spp) argument [all...] |
H A D | run.c | 23 * jcl program exec and script loop 75 dsn(Jcl_t* jcl, Jcldd_t* dd, const char* path, int mark) argument 80 sfprintf(jcl->vp, "+"); 85 sfprintf(jcl->vp, jcl->tmp); 87 sfprintf(jcl->vp, "%s", fmtquote(path, "\"", "\"", strlen(path), FMT_SHELL|FMT_PARAM)); 88 if (!(s = sfstruse(jcl->vp))) 89 nospace(jcl, NiL); 98 checkdir(Jcl_t* jcl, Jcldd_t* dd) argument 103 if (!dtmatch(jcl 122 register Jcl_t* jcl; local [all...] |
H A D | path.c | 23 * jcl path map 80 optset(Jcl_t* jcl, int c, Jcldisc_t* disc) argument 111 if ((jcl->roflags & (JCL_MAPPED|f)) != (JCL_MAPPED|f)) 113 if (!(jcl->roflags & JCL_MAPPED)) 114 jcl->roflags |= f; 116 jcl->flags |= f; 118 jcl->flags &= ~f; 368 jclmap(Jcl_t* jcl, const char* file, Jcldisc_t* disc) argument 388 jcl->flags |= JCL_MAPPED; 403 sfsprintf(tmp, sizeof(tmp), "lib/jcl/ 631 jclpath(Jcl_t* jcl, const char* name) argument [all...] |
H A D | parse.c | 26 * jcl step parser from the description in 59 syntax(Jcl_t* jcl, int level, char* token, char* expected, char* type) argument 61 if (jcl->disc->errorf && (level > 1 || (jcl->flags & JCL_WARN))) 64 (*jcl->disc->errorf)(NiL, jcl->disc, level, "%s: %s expected", token ? token : "EOF", expected); 66 (*jcl->disc->errorf)(NiL, jcl->disc, level, "%s: unknown %s", token, type ? type : "keyword"); 68 (*jcl->disc->errorf)(NiL, jcl 77 push(Jcl_t* jcl, char* s) argument 96 xel(register Jcl_t* jcl, register char* tok) argument 116 card(register Jcl_t* jcl) argument 155 autoexpand(register Jcl_t* jcl, register char* s, Sfio_t* sp) argument 227 autotoken(register Jcl_t* jcl, register char* s, char** r, int set) argument 273 autonumber(register Jcl_t* jcl, char* s, long* r) argument 316 autoeval(register Jcl_t* jcl, register char* s, char** r) argument 502 lex(register Jcl_t* jcl) argument 920 eat(Jcl_t* jcl) argument 933 cond(register Jcl_t* jcl, char* b, char** p) argument 1067 arg(Jcl_t* jcl, char** p) argument 1155 DD(register Jcl_t* jcl, register Jclstep_t* step, char* name) argument 1561 OUTPUT(register Jcl_t* jcl, register Jclstep_t* step, char* name) argument 1613 operand(Jcl_t* jcl, register char* s, char** e) argument 1748 eval(register Jcl_t* jcl, register char* s, char** e, int prec) argument 1904 IF(register Jcl_t* jcl) argument 1941 parse(register Jcl_t* jcl, register Jclstep_t* step) argument 2163 jclstep(register Jcl_t* jcl) argument 2247 jcleval(Jcl_t* jcl, register Jclcond_t* cond, int code) argument 2295 jclrc(register Jcl_t* jcl, register Jclstep_t* step, int rc) argument [all...] |
/ast/src/cmd/jcl/ |
H A D | jcl.c | 23 * jcl deck interpreter 29 #include "jcl.h" 34 "[-?\n@(#)$Id: jcl (AT&T Research) 2006-11-11 $\n]" 36 "[+NAME?jcl - jcl deck interpreter]" 72 " \b../lib/jcl/\b\afile\a is searched for on \b$PATH\b. If no \b--map\b" 115 " [+../lib/jcl/prefix?Default \b--map\b file, found on \b$PATH\b.]" 140 optset(Jcl_t* jcl, int c, Jcldisc_t* disc) argument 181 jcl->flags |= JCL_LISTAUTOEDITS; 184 jcl 274 Jcl_t* jcl; local [all...] |