# HG changeset patch # User meillo@marmaro.de # Date 1203688624 -3600 # Node ID 4e60d96265f00eaa0fd75a0a6057564bc9f6b264 # Parent cd979b979610c3e78a7b4f3e73caaf61ef42f364 removed -c option completely; updated man page; new error code 5 diff -r cd979b979610 -r 4e60d96265f0 README --- a/README Fri Feb 22 14:47:47 2008 +0100 +++ b/README Fri Feb 22 14:57:04 2008 +0100 @@ -17,11 +17,7 @@ See man page or the examples that are shipped with the program to learn how to program in the baum language. -To check you sources run - - baum -c sourcefile.baum - -If it exited successful, run the program with +Run a program with baum sourcefile.baum diff -r cd979b979610 -r 4e60d96265f0 actions.c --- a/actions.c Fri Feb 22 14:47:47 2008 +0100 +++ b/actions.c Fri Feb 22 14:57:04 2008 +0100 @@ -40,7 +40,7 @@ return action_blackhole(node); } else { - fprintf(stderr, "unknown kind of node"); + fprintf(stderr, "unknown kind of node\n"); exit(4); } } diff -r cd979b979610 -r 4e60d96265f0 baum.1 --- a/baum.1 Fri Feb 22 14:47:47 2008 +0100 +++ b/baum.1 Fri Feb 22 14:57:04 2008 +0100 @@ -1,4 +1,4 @@ -.TH baum 1 "2008-02-13" "baum 0.1" +.TH baum 1 "2008-02-22" "baum 0.2" .SH NAME baum \- an esoteric programming language @@ -6,7 +6,7 @@ .SH SYNOPSIS .B baum -[\-v]\ [\-c]\ +[\-v]\ @@ -28,10 +28,6 @@ Verbose output .TP -.BI \-c -Check source file for validity. Return 0 if source code is valid and something else otherwise. - -.TP .BI \-\-help Print usage information @@ -90,6 +86,10 @@ invalid node .TP +.BI 5 +indention over more than one level + +.TP .BI 127 invalid command line options diff -r cd979b979610 -r 4e60d96265f0 baum.c --- a/baum.c Fri Feb 22 14:47:47 2008 +0100 +++ b/baum.c Fri Feb 22 14:57:04 2008 +0100 @@ -17,7 +17,6 @@ #define VERSION "0.2" -int option_check = 0; int option_verbose = 0; struct Node* root = 0; @@ -178,7 +177,7 @@ /* if it goes more than one level down -> error */ if (indent - last_indent > 1) { fprintf(stderr, "error: Indention over more than one level. Only indent by one!\n"); - exit(50); + exit(5); } last_node->down = node; push(last_node); @@ -246,12 +245,9 @@ printf("\ baum --version print version information and exit\n\ baum --help print this output\n\ -baum [-v] -c (verbosly) check file and return 1 if invalid\n\ baum [-v] (verbosly) run file\n\ "); exit(0); - } else if (strcmp(argv[0], "-c") == 0) { - option_check = 1; } else if (strcmp(argv[0], "-v") == 0) { option_verbose = 1; /*