changeset 31:4e60d96265f0

removed -c option completely; updated man page; new error code 5
author meillo@marmaro.de
date Fri, 22 Feb 2008 14:57:04 +0100
parents cd979b979610
children 3903effae5ef
files README actions.c baum.1 baum.c
diffstat 4 files changed, 9 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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
 
--- 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);
 	}
 }
--- 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]\ <file>
+[\-v]\ <file>
 
 
 
@@ -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
 
--- 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 <file>   (verbosly) check file and return 1 if invalid\n\
 baum [-v] <file>      (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;
 			/*