[hackers] [scc] minor fixes (whitespace and such) || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Thu, 16 Jul 2015 07:33:24 +0200 (CEST)

commit 937a1686e98b70e427e12de8b9b635d245d7e05c
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Wed Jul 15 22:22:02 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Jul 16 07:31:34 2015 +0200

    minor fixes (whitespace and such)
    
    Hi,
    
    Just some minor fixes (whitespace and such).
    
    Kind regards,
    Hiltjo
    
    From c79b4339fc477e2d0212d442f38c50326e430f2a Mon Sep 17 00:00:00 2001
    From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
    Date: Wed, 15 Jul 2015 21:37:32 +0200
    Subject: [PATCH] whitespace + typo fixes
    
    change exit(-1) to exit(1), just use 1 instead of EXIT_FAILURE

diff --git a/README b/README
index a4c9337..a99676a 100644
--- a/README
+++ b/README
_AT_@ -23,8 +23,8 @@ friends).
 This is the reason why I begin to develop this compiler, and I hope
 it will be useful for you.
 
-Changes from standar C
-======================
+Changes from standard C
+=======================
 This compiler is near of being full compatible with C99 standard, but
 it has some differences:
 
diff --git a/cc1/cpp.c b/cc1/cpp.c
index 13ec31b..8552f80 100644
--- a/cc1/cpp.c
+++ b/cc1/cpp.c
_AT_@ -534,7 +534,7 @@ usererr(char *s)
         if (cppoff)
                 return;
         printerr("#error %s", s);
- exit(-1);
+ exit(1);
 }
 
 static void
diff --git a/cc1/error.c b/cc1/error.c
index 2160c3a..68880d1 100644
--- a/cc1/error.c
+++ b/cc1/error.c
_AT_@ -25,7 +25,7 @@ warn_helper(int flag, char *fmt, va_list va)
         putc('\n', stderr);
         if (flag < 0 && nerrors++ == MAXERRNUM) {
                 fputs("too many errors\n", stderr);
- exit(-1);
+ exit(1);
         }
 }
 
_AT_@ -62,6 +62,6 @@ printerr(char *fmt, ...)
 
 void
 unexpected(void)
-{
+{
         error("unexpected '%s'", yytext);
 }
diff --git a/cc1/lex.c b/cc1/lex.c
index 26d9b14..c35e401 100644
--- a/cc1/lex.c
+++ b/cc1/lex.c
_AT_@ -651,7 +651,7 @@ discard(void)
                         break;
                 }
                 if (c == '\0' && !moreinput())
- exit(-1);
+ exit(1);
         }
 jump:
         yytoken = c;
diff --git a/cc2/main.c b/cc2/main.c
index 846f81e..3aec235 100644
--- a/cc2/main.c
+++ b/cc2/main.c
_AT_@ -22,7 +22,7 @@ error(unsigned nerror, ...)
                 vfprintf(stderr, errlist[nerror], va);
         va_end(va);
         putc('\n', stderr);
- exit(EXIT_FAILURE);
+ exit(1);
 }
 
 bool
diff --git a/cc2/optm.c b/cc2/optm.c
index f755023..83a634a 100644
--- a/cc2/optm.c
+++ b/cc2/optm.c
_AT_@ -34,7 +34,7 @@ repeat:
 
         np->left = optcasts(np->left, tp);
         np->right = optcasts(np->right, tp);
- return np;
+ return np;
 }
 
 static Node *
diff --git a/cc2/parser.c b/cc2/parser.c
index cfdff4b..99f9d8d 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
_AT_@ -464,7 +464,7 @@ oreturn(char *token)
         if (token = strtok(NULL, "\t")) {
                 expr(token);
                 lp = pop();
- np ->left = lp;
+ np->left = lp;
                 np->type = lp->type;
         } else {
                 np->left = NULL;
diff --git a/lib/die.c b/lib/die.c
index 6752848..974dd2c 100644
--- a/lib/die.c
+++ b/lib/die.c
_AT_@ -16,5 +16,5 @@ die(const char *fmt, ...)
         va_start(va, fmt);
         fprintf(stderr, fmt, va);
         va_end(va);
- exit(EXIT_FAILURE);
+ exit(1);
 }
Received on Thu Jul 16 2015 - 07:33:24 CEST

This archive was generated by hypermail 2.3.0 : Thu Jul 16 2015 - 07:36:13 CEST