[hackers] [scc] [libc] Remove -o option || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 17 Feb 2017 10:52:56 +0100 (CET)

commit 547ebe46cda4213bc8ab71406096c9d415bbffe7
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Wed Feb 15 18:15:25 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Feb 17 10:51:22 2017 +0100

    [libc] Remove -o option
    
    It's not necessary, the user can use shell redirection if needed.

diff --git a/cc1/cc1.h b/cc1/cc1.h
index 704c37e..a5ad280 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -478,7 +478,7 @@ extern int lexmode, namespace;
 extern int onlycpp, onlyheader;
 extern unsigned curctx;
 extern Symbol *curfun, *zero, *one;
-extern char *infile, *outfile;
+extern char *infile;
 extern unsigned lineno;
 extern char filenam[FILENAME_MAX];
 
diff --git a/cc1/main.c b/cc1/main.c
index e901ce0..d84f682 100644
--- a/cc1/main.c
+++ b/cc1/main.c
_AT_@ -10,7 +10,7 @@ static char sccsid[] = "@(#) ./cc1/main.c";
 #include "../inc/cc.h"
 #include "cc1.h"
 
-char *argv0, *infile, *outfile;
+char *argv0, *infile;
 
 int warnings;
 jmp_buf recover;
_AT_@ -22,13 +22,6 @@ int onlycpp, onlyheader;
 extern int failure;
 
 static void
-clean(void)
-{
- if (failure && outfile)
- remove(outfile);
-}
-
-static void
 defmacro(char *macro)
 {
         char *p = strchr(macro, '=');
_AT_@ -54,7 +47,6 @@ main(int argc, char *argv[])
         char *cp;
         int i;
 
- atexit(clean);
         ilex();
         icpp();
         icode();
_AT_@ -79,9 +71,6 @@ main(int argc, char *argv[])
         case 'd':
                 DBGON();
                 break;
- case 'o':
- outfile = EARGF(usage());
- break;
         case 'w':
                 warnings = 1;
                 break;
_AT_@ -92,9 +81,6 @@ main(int argc, char *argv[])
         if (argc > 1)
                 usage();
 
- if (outfile && !freopen(outfile, "w", stdout))
- die("error opening output: %s", strerror(errno));
-
         for (i = 0; i < uflags.n; ++i)
                 undefmacro(uflags.s[i]);
 
Received on Fri Feb 17 2017 - 10:52:56 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 17 2017 - 11:00:30 CET