tester.c

changeset 62
aae5facf9fc5
parent 53
f8f9366b359c
child 70
e866dc825481
--- a/tester.c	Mon Feb 16 18:09:03 2004 +0100
+++ b/tester.c	Mon Feb 16 18:50:28 2004 +0100
@@ -15,40 +15,40 @@
 
 int main(int argc, char *argv[])
 {
-	Tokenizer*tokz;
-	Token tok=TOK_INIT;
-	
-	libtu_init(argv[0]);
-	
-	if(!(tokz=tokz_open_file(stdin, "stdin")))
-		return EXIT_FAILURE;
+    Tokenizer*tokz;
+    Token tok=TOK_INIT;
+    
+    libtu_init(argv[0]);
+    
+    if(!(tokz=tokz_open_file(stdin, "stdin")))
+        return EXIT_FAILURE;
 
-	while(tokz_get_token(tokz, &tok)){
-		switch(tok.type){
-		case TOK_LONG:
-			printf("long - %ld\n", TOK_LONG_VAL(&tok));
-			break;
-		case TOK_DOUBLE:
-			printf("double - %g\n", TOK_DOUBLE_VAL(&tok));
-			break;
-		case TOK_CHAR:
-			printf("char - '%c'\n", TOK_CHAR_VAL(&tok));
-			break;
-		case TOK_STRING:
-			printf("string - \"%s\"\n", TOK_STRING_VAL(&tok));
-			break;
-		case TOK_IDENT:
-			printf("ident - %s\n", TOK_IDENT_VAL(&tok));
-			break;
-		case TOK_COMMENT:
-			printf("comment - %s\n", TOK_COMMENT_VAL(&tok));
-			break;
-		case TOK_OP:
-			printf("operator - %03x\n", TOK_OP_VAL(&tok));
-			break;
-		}
-	}
-	   
-	return EXIT_SUCCESS;
+    while(tokz_get_token(tokz, &tok)){
+        switch(tok.type){
+        case TOK_LONG:
+            printf("long - %ld\n", TOK_LONG_VAL(&tok));
+            break;
+        case TOK_DOUBLE:
+            printf("double - %g\n", TOK_DOUBLE_VAL(&tok));
+            break;
+        case TOK_CHAR:
+            printf("char - '%c'\n", TOK_CHAR_VAL(&tok));
+            break;
+        case TOK_STRING:
+            printf("string - \"%s\"\n", TOK_STRING_VAL(&tok));
+            break;
+        case TOK_IDENT:
+            printf("ident - %s\n", TOK_IDENT_VAL(&tok));
+            break;
+        case TOK_COMMENT:
+            printf("comment - %s\n", TOK_COMMENT_VAL(&tok));
+            break;
+        case TOK_OP:
+            printf("operator - %03x\n", TOK_OP_VAL(&tok));
+            break;
+        }
+    }
+       
+    return EXIT_SUCCESS;
 }
 

mercurial