From 43461d267f6f9925bac60064d682790c9bcb9ad5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 22 Dec 1997 16:05:23 -0200 Subject: help message --- lua.c | 69 +++++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/lua.c b/lua.c index 275abe75..bb4730af 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.9 1997/12/11 17:00:21 roberto Exp roberto $ +** $Id: lua.c,v 1.10 1997/12/19 18:34:23 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -25,16 +25,20 @@ #define isatty(x) (x==0) /* assume stdin is a tty */ #endif -/* command line options: -** -v print version information (banner). -** -d debug on -** -e dostring on next arg -** a=b sets global 'a' with string 'b' -** -q interactive mode without prompt -** -i interactive mode with prompt -** - executes stdin as a file -** name dofile "name" -*/ + +static void print_message (void) +{ + fprintf(stderr, +"Lua: command line options:\n" +" -v print version information\n" +" -d turn debug on\n" +" -e stat dostring `stat'\n" +" -q interactive mode without prompt\n" +" -i interactive mode with prompt\n" +" - executes stdin as a file\n" +" a=b sets global `a' with string `b'\n" +" name dofile `name'\n\n"); +} static void assign (char *arg) @@ -104,22 +108,33 @@ int main (int argc, char *argv[]) lua_dofile(NULL); /* executes stdin as a file */ } else for (i=1; i