acd.c File Reference

#include <sys/types.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <ctype.h>
#include <assert.h>
#include <sys/stat.h>
#include <sys/wait.h>

Include dependency graph for acd.c:

Go to the source code of this file.

Data Structures

struct  cell
struct  program
struct  rule

Defines

#define nil   0
#define _POSIX_SOURCE   1
#define LIB   "/usr/lib"
#define arraysize(a)   (sizeof(a) / sizeof((a)[0]))
#define arraylimit(a)   ((a) + arraysize(a))
#define value   car
#define base   cdr
#define suffix   cdr
#define flags   letter
#define subst   car
#define is_unique(type)   ((type) >= LETTER)
#define W_SET   0x01
#define W_RDONLY   0x02
#define W_LOCAL   0x04
#define W_TEMP   0x08
#define W_SUFF   0x10
#define N_CHARS   (1 + (unsigned char) -1)
#define HASHDENSE   0x400
#define E_BASH   0x01
#define E_QUOTE   0x02
#define E_SIMPLE   0x04
#define match   from
#define R_PREFER   0x01
#define NO_PATH   2000000000

Typedefs

typedef cell cell_t
typedef enum type type_t
typedef program program_t
typedef enum how how_t
typedef enum phase phase_t
typedef rule rule_t
typedef enum ruletype ruletype_t
typedef enum exec exec_t

Enumerations

enum  type {
  CELL, STRING, SUBST, LETTER,
  WORD, EQUALS, OPEN, CLOSE,
  PLUS, MINUS, STAR, INPUT,
  OUTPUT, WHITE, COMMENT, SEMI,
  EOLN, N_TYPES
}
enum  how {
  SUPERFICIAL, PARTIAL, FULL, EXPLODE,
  IMPLODE
}
enum  phase { INIT, SCAN, COMPILE }
enum  ruletype { ARG, PREFER, TRANSFORM, COMBINE }
enum  exec { DOIT, DONT }

Functions

void report (char *label)
void quit (int exit_code)
void fatal (char *label)
void * allocate (void *mem, size_t size)
void deallocate (void *mem)
char * copystr (const char *s)
void princhar (int c)
void prinstr (char *s)
void prin2 (cell_t *p)
void prin1 (cell_t *p)
void prin1n (cell_t *p)
void prin2n (cell_t *p)
cell_tnewcell (void)
unsigned hashfun (cell_t *p)
cell_tsearch (cell_t *p, cell_t ***hook)
void dec (cell_t *p)
cell_tinc (cell_t *p)
cell_tgo (cell_t *p, cell_t *field)
cell_tcons (type_t type, cell_t *p)
cell_tappend (type_t type, cell_t *p)
cell_tfindnword (char *name, size_t n)
cell_tfindword (char *name)
void interrupt (int sig)
int extalnum (int c)
void getdesc (void)
cell_tget_token (void)
cell_texplode (cell_t *p, how_t how)
cell_tget_string (cell_t **pp)
cell_tget_list (cell_t **pp, type_t stop)
program_tget_line (cell_t *file)
program_tget_prog (void)
void makenames (cell_t ***ppr, cell_t *s, char **name, size_t i, size_t *n)
int constant (cell_t *p)
cell_tevaluate (cell_t *p, how_t how)
void modify (cell_t **pp, cell_t *p, type_t mode)
int tainted (cell_t *p)
void newrule (ruletype_t type, cell_t *from, cell_t *to)
int talk (void)
void unix_exec (cell_t *c)
void execute (exec_t how, unsigned indent)
int equal (cell_t *p, cell_t *q)
int wordlist (cell_t **pw, int atom)
char * maketemp (void)
void inittemp (char *tmpdir)
void deltemp (void)
cell_tsplitenv (char *env)
void key_usage (char *how)
void inappropriate (void)
int readonly (cell_t *v)
void complain (cell_t *err)
int keyword (char *name)
cell_tgetvar (cell_t *v)
void argscan (void)
void compile (void)
void transform (rule_t *)
void exec_one (void)
int argmatch (int shift, cell_t *match, cell_t *match1, char *arg1)
int member (cell_t *p, cell_t *l)
long basefind (cell_t *f, cell_t *l)
rule_tfindpath (long depth, int seek, cell_t *file, rule_t *start)
cell_tpredef (char *var, char *val)
void usage (void)
int main (int argc, char **argv)

Variables

char version [] = "1.9"
char * program
int verbose = 0
int action = 2
size_t heap_chunks = 0
program_tpc
program_tnextpc
cell_toldcells
cell_toblist [HASHDENSE+N_CHARS+N_TYPES]
char * descr
FILEdfp
int dch
unsigned lineno
unsigned indent
phase_t phase
rule_trules = nil
cell_tV_star
cell_t ** pV_star
cell_tL_files
cell_t ** pL_files = &L_files
cell_tV_in
cell_tV_out
cell_tV_stop
cell_tL_args
cell_tL_predef
char * template
static char * tp
long shortest


Define Documentation

#define _POSIX_SOURCE   1
 

Definition at line 8 of file acd.c.

#define arraylimit a   )     ((a) + arraysize(a))
 

Definition at line 28 of file acd.c.

#define arraysize a   )     (sizeof(a) / sizeof((a)[0]))
 

Definition at line 27 of file acd.c.

#define base   cdr
 

Definition at line 110 of file acd.c.

Referenced by _doscan(), _format(), ack_get_operand(), add(), bas_get_operand(), basefind(), basename(), complete_bars(), decomp(), delay(), distribute(), do_vm_map(), do_x86_vm(), doformat(), gzfilebuf::fillbuf(), gen_bitlen(), get_mem_chunks(), getpipe(), gnu_get_operand(), inet_aton(), inet_network(), inflate_table(), inflate_table9(), init(), mail(), main(), new_mem(), num(), o_collect(), o_print(), out_num(), outea(), output_base(), gzfilebuf::overflow(), pack_table(), partition(), process(), record_bars_bridge(), record_bars_cardbus(), seg2phys(), split(), test39d(), transform(), traverse(), ttyname(), uInt64_to_double(), and gzfilebuf::underflow().

#define E_BASH   0x01
 

Definition at line 496 of file acd.c.

#define E_QUOTE   0x02
 

Definition at line 497 of file acd.c.

Referenced by get_token().

#define E_SIMPLE   0x04
 

Definition at line 498 of file acd.c.

Referenced by get_token().

#define flags   letter
 

Definition at line 112 of file acd.c.

Referenced by _doprnt(), _doscan(), arp_ioctl(), check_header(), compute_rec_conf(), decode_ioctl(), do1(), do_comm(), do_rec_conf(), dumpopts(), eth_checkopt(), eth_restart(), evalcase(), evalcommand(), evalsubshell(), evaltree(), evalvar(), exec_one(), execute(), fdopen(), fopen(), freopen(), get_ipconf(), getifaddrs(), getpipe(), gunpipe(), gzhead(), gzheader(), initopts(), ip_checkopt(), lunpipe(), main(), opentab(), opentrace(), parse(), preadbuffer(), present(), print_conn(), print_one(), putpipe(), reg(), regatom(), regbranch(), regcomp(), regpiece(), restart_write_fd(), saveopts(), sbe_psd(), scsi_cmd(), setflags(), startprocess(), sys_call(), tcp_setconf(), test24a(), test8a(), udp_ip_arrived(), udp_setopt(), w_init(), waitproc(), and zlibCompileFlags().

#define HASHDENSE   0x400
 

Definition at line 278 of file acd.c.

Referenced by hashfun().

#define is_unique type   )     ((type) >= LETTER)
 

Definition at line 141 of file acd.c.

Referenced by dec(), and inc().

#define LIB   "/usr/lib"
 

Definition at line 24 of file acd.c.

Referenced by get_prog().

#define match   from
 

Definition at line 1212 of file acd.c.

Referenced by amatch(), argmatch(), Cond(), do_line(), execute(), gooddefine(), main(), match(), option(), re_match(), regexec(), ret_to_continue(), search(), selected(), servxcheck(), set_control(), Split(), Strfun(), and substitute().

#define N_CHARS   (1 + (unsigned char) -1)
 

Definition at line 277 of file acd.c.

Referenced by hashfun().

#define nil   0
 

Definition at line 7 of file acd.c.

#define NO_PATH   2000000000
 

Definition at line 2316 of file acd.c.

Referenced by compile().

#define R_PREFER   0x01
 

Definition at line 1222 of file acd.c.

Referenced by newrule().

#define subst   car
 

Definition at line 115 of file acd.c.

Referenced by cmd_substitute(), and docmd().

#define suffix   cdr
 

Definition at line 111 of file acd.c.

Referenced by dyndep(), implmacros(), main(), newfile(), newname(), and process().

#define value   car
 

Definition at line 109 of file acd.c.

Referenced by getexp().

#define W_LOCAL   0x04
 

Definition at line 146 of file acd.c.

Referenced by argmatch(), exec_one(), predef(), tainted(), and transform().

#define W_RDONLY   0x02
 

Definition at line 145 of file acd.c.

Referenced by argmatch(), exec_one(), predef(), readonly(), and transform().

#define W_SET   0x01
 

Definition at line 144 of file acd.c.

Referenced by argmatch(), exec_one(), predef(), and transform().

#define W_SUFF   0x10
 

Definition at line 148 of file acd.c.

Referenced by basefind(), exec_one(), and transform().

#define W_TEMP   0x08
 

Definition at line 147 of file acd.c.

Referenced by dec(), exec_one(), and transform().


Typedef Documentation

typedef struct cell cell_t
 

typedef enum exec exec_t
 

typedef enum how how_t
 

typedef enum phase phase_t
 

typedef struct program program_t
 

typedef struct rule rule_t
 

typedef enum ruletype ruletype_t
 

typedef enum type type_t
 


Enumeration Type Documentation

enum exec
 

Enumerator:
DOIT 
DONT 

Definition at line 1364 of file acd.c.

enum how
 

Enumerator:
SUPERFICIAL 
PARTIAL 
FULL 
EXPLODE 
IMPLODE 

Definition at line 681 of file acd.c.

enum phase
 

Enumerator:
INIT 
SCAN 
COMPILE 

Definition at line 1203 of file acd.c.

enum ruletype
 

Enumerator:
ARG 
PREFER 
TRANSFORM 
COMBINE 

Definition at line 1220 of file acd.c.

enum type
 

Enumerator:
CELL 
STRING 
SUBST 
LETTER 
WORD 
EQUALS 
OPEN 
CLOSE 
PLUS 
MINUS 
STAR 
INPUT 
OUTPUT 
WHITE 
COMMENT 
SEMI 
EOLN 
N_TYPES 

Definition at line 119 of file acd.c.


Function Documentation

void* allocate void *  mem,
size_t  size
 

Definition at line 65 of file acd.c.

cell_t* append type_t  type,
cell_t p
 

Definition at line 401 of file acd.c.

References cons(), nil, and p.

Referenced by callld(), cmd_write(), docmd(), evaluate(), explode(), main(), mkvec(), modify(), parse_old_device_line(), parse_one(), process(), wordlist(), and zipOpen2().

int argmatch int  shift,
cell_t match,
cell_t match1,
char *  arg1
 

Definition at line 2099 of file acd.c.

References cell::car, cell::cdr, cons(), dec(), DOIT, execute(), findnword(), i, inc(), L_args, LETTER, m, match, match1(), cell::name, nil, pc, pL_files, prin2(), prin2n(), printf, pV_star, strcmp, STRING, strlen(), SUBST, V_out, V_star, verbose, W_LOCAL, W_RDONLY, W_SET, and WORD.

Referenced by argscan().

void argscan void   ) 
 

Definition at line 2235 of file acd.c.

References ARG, argmatch(), cell::cdr, dec(), L_args, m, rule::next, nil, pc, pL_files, rule::prog, pV_star, rules, SCAN, rule::type, and V_star.

long basefind cell_t f,
cell_t l
 

Definition at line 2281 of file acd.c.

References base, cell::car, cell::cdr, dec(), f, findnword(), L, cell::name, nil, strcmp, strlen(), strrchr(), cell::type, and W_SUFF.

Referenced by findpath().

void compile void   ) 
 

Definition at line 2464 of file acd.c.

References cell::car, cell::cdr, COMBINE, COMPILE, evaluate(), file, findpath(), fprintf(), go(), IMPLODE, inc(), L, L_files, newcell(), rule::next, nil, NO_PATH, rule::path, rules, shortest, t, transform(), rule::type, rule::wait, and wordlist.

Referenced by get_expression(), initkeys(), and main().

void complain cell_t err  ) 
 

Definition at line 1522 of file acd.c.

References err, fprintf(), cell::name, and nil.

Referenced by exec_one(), and flush().

cell_t* cons type_t  type,
cell_t p
 

Definition at line 391 of file acd.c.

References cell::car, newcell(), p, cell::refc, and cell::type.

Referenced by append(), argmatch(), cons_echo(), cons_org0(), cons_write(), evaluate(), explode(), get_list(), get_string(), makenames(), modify(), scr_init(), and splitenv().

int constant cell_t p  ) 
 

Definition at line 952 of file acd.c.

References nil, p, STRING, and SUBST.

Referenced by explode(), and factor().

char* copystr const char *  s  ) 
 

Definition at line 91 of file acd.c.

void deallocate void *  mem  ) 
 

Definition at line 83 of file acd.c.

References free, heap_chunks, and nil.

void dec cell_t p  ) 
 

Definition at line 322 of file acd.c.

References deallocate, ENOENT, errno, fputc(), heap_chunks, is_unique, nil, oldcells, p, prinstr(), printf, report(), search, stdout, unlink, verbose, W_TEMP, and WORD.

Referenced by argmatch(), argscan(), basefind(), equal(), evaluate(), exec_one(), explode(), get_line(), get_list(), get_prog(), get_string(), go(), inc(), inflate_fast(), modify(), newrule(), predef(), and transform().

void deltemp void   ) 
 

Definition at line 1463 of file acd.c.

References deallocate, ENOENT, errno, printf, report(), rmdir, and verbose.

int equal cell_t p,
cell_t q
 

Definition at line 1368 of file acd.c.

References dec(), evaluate(), IMPLODE, inc(), m1, m2, MINUS, newcell(), nil, p, and t.

cell_t * evaluate cell_t p,
how_t  how
 

Definition at line 1087 of file acd.c.

References append(), assert, cons(), dec(), EQUALS, explode(), fprintf(), FULL, go(), IMPLODE, inc(), INPUT, LETTER, MINUS, modify(), nil, OUTPUT, p, pc, PLUS, pr(), r, STAR, stderr, STRING, SUBST, t, tainted(), and WORD.

Referenced by compile(), equal(), exec_one(), explode(), and transform().

void exec_one void   ) 
 

Definition at line 1562 of file acd.c.

References allocate(), cell::car, cell::cdr, close, COMPILE, complain(), dec(), doit(), DOIT, DONT, equal, EQUALS, err, evaluate(), execute(), file, flags, fprintf(), fputc(), rule::from, getenv(), getvar(), hash(), IMPLODE, inappropriate(), inc(), key_usage(), keyword(), maketemp(), n, cell::name, newcell(), rule::next, nil, num(), O_RDONLY, open, p, PARTIAL, pc, prin1(), prin1n(), prin2n(), printf, r, read, readonly, rules, SCAN, splitenv(), strcat(), strcpy(), strlen(), strtoul(), t, talk(), tmp, rule::to, TRANSFORM, rule::type, cell::type, V_star, V_stop, W_LOCAL, W_RDONLY, W_SET, W_SUFF, W_TEMP, WORD, and wordlist.

Referenced by execute().

void execute exec_t  how,
unsigned  indent
 

Definition at line 2050 of file acd.c.

References DOIT, DONT, exec_one(), firstline, fprintf(), nextpc, nil, pc, and work().

cell_t * explode cell_t p,
how_t  how
 

Definition at line 975 of file acd.c.

References allocate(), append(), assert, cons(), constant(), deallocate, dec(), evaluate(), EXPLODE, go(), i, IMPLODE, inc(), makenames(), n, nil, PARTIAL, pr(), r, s, st, stat, STRING, t, and WORD.

Referenced by evaluate().

int extalnum int  c  ) 
 

Definition at line 470 of file acd.c.

References isalnum.

void fatal char *  label  ) 
 

Definition at line 57 of file acd.c.

References quit, and report().

cell_t* findnword char *  name,
size_t  n
 

Definition at line 407 of file acd.c.

References allocate(), inc(), memcpy(), cell::name, newcell(), nil, cell::type, and WORD.

Referenced by argmatch(), basefind(), findword(), makenames(), and splitenv().

rule_t* findpath long  depth,
int  seek,
cell_t file,
rule_t start
 

Definition at line 2320 of file acd.c.

References basefind(), file, rule::from, if(), rule::next, nil, rules, start, TRANSFORM, and rule::type.

Referenced by compile().

cell_t* findword char *  name  ) 
 

Definition at line 418 of file acd.c.

References findnword(), and strlen().

Referenced by get_prog(), predef(), and splitenv().

program_t* get_line cell_t file  ) 
 

Definition at line 817 of file acd.c.

References allocate(), dec(), EOLN, file, fputc(), get_list(), get_token(), inc(), indent, lineno, nil, p, pc, prin2n(), printf, SEMI, stdout, verbose, and WHITE.

cell_t* get_list cell_t **  pp,
type_t  stop
 

Definition at line 754 of file acd.c.

References assert, CLOSE, COMMENT, cons(), dec(), EOLN, EQUALS, fprintf(), get_string, get_token(), INPUT, LETTER, lineno, MINUS, nil, OPEN, OUTPUT, p, pc, PLUS, SEMI, STAR, stderr, STRING, SUBST, and WHITE.

Referenced by get_line().

program_t* get_prog void   ) 
 

Definition at line 859 of file acd.c.

References allocate(), copystr(), d, deallocate, dec(), dfp, fatal(), fclose(), file, findword(), fopen(), get_line(), getdesc(), indent, LIB, lineno, program::next, nil, prog, sprintf(), stdin, and strlen().

cell_t* get_string cell_t **  pp  ) 
 

Definition at line 685 of file acd.c.

References c, cons(), dec(), EQUALS, get_token(), go(), LETTER, MINUS, nil, p, PLUS, ps, s, STAR, STRING, and SUBST.

cell_t* get_token void   ) 
 

Definition at line 500 of file acd.c.

References E_QUOTE, E_SIMPLE, EOF, escape(), getdesc(), i, inc(), isalnum, isspace, cell::letter, LETTER, n, newcell(), and cell::type.

void getdesc void   ) 
 

Definition at line 482 of file acd.c.

References dfp, EOF, fatal(), ferror, fprintf(), getc, quit, and stderr.

Referenced by get_prog(), and get_token().

cell_t* getvar cell_t v  ) 
 

Definition at line 1550 of file acd.c.

References nil, SUBST, cell::type, and WORD.

cell_t* go cell_t p,
cell_t field
 

Definition at line 383 of file acd.c.

References dec(), field, inc(), and p.

Referenced by compile(), evaluate(), explode(), get_string(), modify(), and wordlist().

unsigned hashfun cell_t p  ) 
 

Definition at line 282 of file acd.c.

References HASHDENSE, LETTER, N_CHARS, p, and WORD.

Referenced by search().

void inappropriate void   ) 
 

Definition at line 1504 of file acd.c.

References fprintf(), and pc.

Referenced by exec_one().

cell_t* inc cell_t p  ) 
 

Definition at line 358 of file acd.c.

References dec(), is_unique, nil, p, cell::refc, and search.

Referenced by argmatch(), cmdline(), compile(), equal(), evaluate(), exec_one(), explode(), findnword(), get_line(), get_token(), go(), inflate_fast(), predef(), tempname(), and transform().

void inittemp char *  tmpdir  ) 
 

Definition at line 1441 of file acd.c.

References allocate(), EEXIST, errno, getpid, maketemp(), mkdir, nil, printf, report(), sprintf(), strlen(), and verbose.

void interrupt int  sig  ) 
 

Definition at line 463 of file acd.c.

References interrupt, signal(), verbose, and write.

void key_usage char *  how  ) 
 

Definition at line 1497 of file acd.c.

References fprintf(), and pc.

Referenced by exec_one().

int keyword char *  name  ) 
 

Definition at line 1540 of file acd.c.

References nil, pc, strcmp, t, and WORD.

int main int  argc,
char **  argv
 

Definition at line 2591 of file acd.c.

References a, getenv(), i, L_args, nil, prog, strrchr(), and tmpdir.

void makenames cell_t ***  ppr,
cell_t s,
char **  name,
size_t  i,
size_t n
 

Definition at line 905 of file acd.c.

References allocate(), assert, cell::cdr, cons(), findnword(), LETTER, memcpy(), cell::name, nil, p, s, strlen(), cell::type, and WORD.

Referenced by explode().

char* maketemp void   ) 
 

Definition at line 1418 of file acd.c.

References allocate(), getpid, i, nil, sprintf(), and strlen().

Referenced by exec_one(), inittemp(), and transform().

int member cell_t p,
cell_t l
 

Definition at line 2271 of file acd.c.

References cell::car, cell::cdr, nil, p, and cell::type.

void modify cell_t **  pp,
cell_t p,
type_t  mode
 

Definition at line 1048 of file acd.c.

References append(), cell::cdr, cons(), dec(), go(), nil, p, and PLUS.

Referenced by command(), evaluate(), and main().

cell_t* newcell void   ) 
 

Definition at line 255 of file acd.c.

References allocate(), heap_chunks, nil, oldcells, and p.

Referenced by compile(), cons(), equal(), exec_one(), findnword(), get_token(), predef(), and transform().

void newrule ruletype_t  type,
cell_t from,
cell_t to
 

Definition at line 1226 of file acd.c.

References allocate(), dec(), rule::from, nil, pc, pr(), PREFER, r, R_PREFER, rules, rule::to, and TRANSFORM.

cell_t* predef char *  var,
char *  val
 

Definition at line 2557 of file acd.c.

References dec(), findword(), inc(), L_predef, newcell(), nil, p, prin1(), prin2n(), printf, t, verbose, W_LOCAL, W_RDONLY, and W_SET.

Referenced by inittagdef().

void prin1 cell_t p  ) 
 

Definition at line 173 of file acd.c.

References assert, EQUALS, INPUT, LETTER, MINUS, nil, OUTPUT, p, PLUS, prin2(), princhar(), prinstr(), printf, STAR, STRING, SUBST, verbose, and WORD.

Referenced by exec_one(), predef(), prin1n(), and prin2().

void prin1n cell_t p  ) 
 

Definition at line 237 of file acd.c.

References fputc(), p, prin1(), and stdout.

Referenced by exec_one().

void prin2 cell_t p  ) 
 

Definition at line 224 of file acd.c.

References fputc(), nil, p, prin1(), stdout, and STRING.

Referenced by argmatch(), prin1(), prin2n(), and transform().

void prin2n cell_t p  ) 
 

Definition at line 239 of file acd.c.

References fputc(), p, prin2(), and stdout.

Referenced by argmatch(), exec_one(), get_line(), predef(), and unix_exec().

void princhar int  c  ) 
 

Definition at line 150 of file acd.c.

References fputc(), nil, putchar, stdout, and strchr.

Referenced by prin1(), and prinstr().

void prinstr char *  s  ) 
 

Definition at line 157 of file acd.c.

References fputc(), nil, princhar(), stdout, and strchr.

Referenced by dec(), and prin1().

void quit int  exit_code  ) 
 

Definition at line 47 of file passwd.c.

int readonly cell_t v  ) 
 

Definition at line 1511 of file acd.c.

References fprintf(), cell::name, pc, and W_RDONLY.

void report char *  label  ) 
 

Definition at line 44 of file acd.c.

References errno, fprintf(), nil, stderr, and strerror().

cell_t* search cell_t p,
cell_t ***  hook
 

Definition at line 301 of file acd.c.

References cmp, hashfun(), nil, oblist, p, sp, strcmp, and WORD.

cell_t* splitenv char *  env  ) 
 

Definition at line 1473 of file acd.c.

References cons(), env, findnword(), findword(), isspace, nil, p, pr(), and r.

Referenced by exec_one().

int tainted cell_t p  ) 
 

Definition at line 1069 of file acd.c.

References nil, p, STRING, SUBST, and W_LOCAL.

Referenced by evaluate().

int talk void   ) 
 

Definition at line 1256 of file acd.c.

References pc, printf, and verbose.

Referenced by exec_one(), main(), and unix_exec().

void transform rule_t  ) 
 

Definition at line 2391 of file acd.c.

References allocate(), base, dec(), DOIT, evaluate(), execute(), file, fprintf(), IMPLODE, in, inc(), program::lineno, maketemp(), cell::name, newcell(), nil, out, rule::path, pc, prin2(), printf, rule::prog, strcat(), strchr, strcpy(), strlen(), rule::to, TRANSFORM, rule::type, V_in, V_out, V_star, verbose, W_LOCAL, W_RDONLY, W_SET, W_SUFF, W_TEMP, rule::wait, WORD, and wordlist.

Referenced by compile().

void unix_exec cell_t c  ) 
 

Definition at line 1264 of file acd.c.

References a, allocate(), argv, c, cell::car, cell::cdr, i, if(), INPUT, n, nil, OUTPUT, pid, prin2n(), r, status, talk(), and verbose.

void usage void   ) 
 

Definition at line 2583 of file acd.c.

References exit(), and fprintf().

int wordlist cell_t **  pw,
int  atom
 

Definition at line 1396 of file acd.c.

References append(), cell::car, cell::cdr, go(), n, nil, p, and WORD.


Variable Documentation

int action = 2
 

Definition at line 39 of file acd.c.

int dch
 

Definition at line 478 of file acd.c.

Referenced by map().

char* descr
 

Definition at line 476 of file acd.c.

FILE* dfp
 

Definition at line 477 of file acd.c.

Referenced by get_prog(), and getdesc().

size_t heap_chunks = 0
 

Definition at line 63 of file acd.c.

Referenced by allocate(), deallocate(), dec(), and newcell().

unsigned indent
 

Definition at line 480 of file acd.c.

cell_t * L_args
 

Definition at line 1362 of file acd.c.

Referenced by argmatch(), argscan(), and main().

cell_t* L_files
 

Definition at line 1361 of file acd.c.

Referenced by compile().

cell_t * L_predef
 

Definition at line 1362 of file acd.c.

Referenced by predef().

unsigned lineno
 

Definition at line 479 of file acd.c.

program_t* nextpc
 

Definition at line 251 of file acd.c.

Referenced by execute().

cell_t* oblist[HASHDENSE+N_CHARS+N_TYPES]
 

Definition at line 280 of file acd.c.

Referenced by search().

cell_t* oldcells
 

Definition at line 253 of file acd.c.

Referenced by dec(), and newcell().

program_t* pc
 

Definition at line 250 of file acd.c.

phase_t phase
 

Definition at line 1205 of file acd.c.

cell_t ** pL_files = &L_files
 

Definition at line 1361 of file acd.c.

Referenced by argmatch(), and argscan().

char* program
 

Definition at line 30 of file acd.c.

cell_t ** pV_star
 

Definition at line 1360 of file acd.c.

Referenced by argmatch(), and argscan().

rule_t* rules = nil
 

Definition at line 1224 of file acd.c.

Referenced by argscan(), compile(), exec_one(), findpath(), make(), newrule(), set_derives(), and setoption().

long shortest
 

Definition at line 2318 of file acd.c.

Referenced by compile().

char* template
 

Definition at line 1415 of file acd.c.

char* tp [static]
 

Definition at line 1416 of file acd.c.

cell_t* V_in
 

Definition at line 1362 of file acd.c.

Referenced by transform().

cell_t * V_out
 

Definition at line 1362 of file acd.c.

Referenced by argmatch(), and transform().

cell_t* V_star
 

Definition at line 1360 of file acd.c.

Referenced by argmatch(), argscan(), exec_one(), and transform().

cell_t * V_stop
 

Definition at line 1362 of file acd.c.

Referenced by exec_one().

int verbose = 0
 

Definition at line 32 of file acd.c.

char version[] = "1.9"
 

Definition at line 5 of file acd.c.


Generated on Fri Apr 14 23:03:41 2006 for minix by  doxygen 1.4.6