48 static void siod_lisp_vars(
void);
49 static void siod_load_default_files(
void);
51 int main(
int argc,
char **argv)
56 int stdin_input,interactive;
62 "Summary: Scheme in one Defun interpreter, file arguments are loaded\n"+
63 "-b Run in batch mode (no interaction)\n"+
64 "--batch Run in batch mode (no interaction)\n"+
65 "-i Run in interactive mode (default)\n"+
67 " Run in interactive mode (default)\n"+
68 "--pipe Run in pipe mode, reading commands from\n"+
69 " stdin, but no prompt or return values\n"+
70 " are printed (default if stdin not a tty)\n"+
71 "-heap <int> {512000}\n"+
72 " Initial size of heap\n",
76 heap_size = al.
ival(
"-heap");
84 else if ((al.
present(
"--pipe")))
115 siod_load_default_files();
117 for (p=files.
head(); p != 0; p=p->
next())
121 else if (files(p).matches(
make_regex(
"^(.*")))
141 static void siod_load_default_files(
void)
151 initfile +=
"init.scm";
153 if (access((
const char *)initfile,R_OK) == 0)
156 cerr <<
"Initialization file " << initfile <<
" not found" << endl;
159 static void siod_lisp_vars(
void)
162 int major=0,minor=0,subminor=0;
181 major = bits[0].Int();
183 minor = bits[1].Int();
185 subminor = bits[2].Int();
193 etcdircommon +=
"etc";
206 putenv(
wstrdup(
"PATH=" + path));
char * wstrdup(const char *s)
LISP siod_set_lval(const char *name, LISP val)
int ival(const EST_String &rkey, int m=1) const
A Regular expression class to go with the CSTR EST_String class.
#define DEFAULT_HEAP_SIZE
LISP strintern(const char *data)
LISP strcons(long length, const char *data)
const char * siod_prog_name
static EST_String cat(const EST_String s1, const EST_String s2=Empty, const EST_String s3=Empty, const EST_String s4=Empty, const EST_String s5=Empty, const EST_String s6=Empty, const EST_String s7=Empty, const EST_String s8=Empty, const EST_String s9=Empty)
LISP vload(const char *fname, long cflag)
EST_Regex & make_regex(const char *r)
LISP cons(LISP x, LISP y)
int siod_repl(int interactive)
LISP read_from_string(const char *)
void siod_print_welcome(EST_String extra_info)
const char *const est_tools_version
LISP rintern(const char *name)
LISP leval(LISP x, LISP env)
const char *const est_name
int present(const K &rkey) const
Returns true if key is present.
const char *const est_ostype
int main(int argc, char **argv)
int siod_init(int heap_size=DEFAULT_HEAP_SIZE)
EST_Pathname as_directory(void) const
int parse_command_line(int argc, char *argv[], const EST_String &usage, EST_StrList &files, EST_Option &al, int make_stdio=1)
const char *const est_libdir