ref: 2b23d05d57743af57385cd42c0fd2d223b11d8c8
dir: /fns.h/
/* array.c */ void initarrays(void); Array *allocarray(int, int, usize); void setint(Array *, usize, vlong); void setchar(Array *, usize, Rune); void setarray(Array *, usize, Array *); void setvar(Array *, usize, ConstraintVar *); void setshape(Array *, int, usize); int gettype(Array *); int getrank(Array *); usize getshape(Array *, int); vlong getint(Array *, usize); Rune getchar(Array *, usize); Array *getarray(Array *, usize); ConstraintVar *getvar(Array *, usize); Array *simplifyarray(Array *); char *printarray(Array *); char *printfunc(Function *); /* constraint.c */ Array *allocvar(char *); Array *delayedexpr(int, Array *, Array *); Array *solve(ConstraintVar *); void constrain(ConstraintVar *); /* error.c */ #define trap(num) (setjmp(setuptrap(1, num)->env)) #define trapmulti(n, nums) (setjmp(setuptrap(n, nums)->env)) ErrorTrap *setuptrap(int n, ...); void endtrap(void); char *errmsg(void); char *errdesc(void); _Noreturn void error(int, char *, ...); /* eval.c */ void *eval(Session *s, Ast *); /* fs.c */ Qid freshobjqid(void); void startfs(char *, char *); /* memory.c */ void *alloc(int); int getalloctag(void *); void setroot(void *, int); void *allocextra(void *, usize); /* module.c */ Module *addmodule(Session *, char *); Enumeration *enummodules(Session *s); /* parse.c */ Ast *parse(TokenList *, Symtab *); /* prim.c */ char *primsymb(int); int primclass(int); int primvalence(int); int primid(char *); Array *primnilad(int); Array *primmonad(int, Array *); Array *primdyad(int, Array *, Array *); /* scan.c */ TokenList *scan(char *); char *printtok(Token); /* session.c */ void initsessions(void); Session *allocsession(void); Enumeration *enumsessions(void); void appendlog(Session *s, char *data); /* symtab.c */ Symtab *allocsymtab(void); uvlong sym(Symtab *, char *); char *symname(Symtab *, uvlong); void *symval(Symtab *, uvlong); void symset(Symtab *, uvlong, void *); Symbol *symptr(Symtab *, uvlong); Enumeration *enumsymbols(Symtab *, int); /* systemcmd.c */ void systemcmd(Session *, char *, int); /* util.c */ Enumeration *allocenum(uvlong); void trim(char *); void debugast(Ast *, int); void debugbc(ByteCode *); int getuvlong(u8int *, uvlong *); char *funcname(Function *); /* value.c */ char *printval(void *); void *parseval(Session *s, char *);