[hackers] [scc] Remove _AT_ statements || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 20 Jul 2015 19:28:02 +0200 (CEST)

commit 677232c01056366ed709373ebe020f2add080136
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jul 19 22:17:04 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jul 19 22:17:04 2015 +0200

    Remove _AT_ statements
    
    This was a hack that allowed me to use cc1 as frontend for a
    C interpreter. This is not needed anymore?

diff --git a/cc1/cc1.h b/cc1/cc1.h
index 988ad4a..f60053f 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
_AT_@ -254,7 +254,6 @@ enum {
         OESTRUCT,
         OELOOP,
         OBLOOP,
- OPRINT,
         OFUN,
         ORET,
         ODECL,
diff --git a/cc1/code.c b/cc1/code.c
index 48dd490..c4e946b 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -120,7 +120,6 @@ void (*opcode[])(unsigned, void *) = {
         [OESTRUCT] = emittext,
         [OELOOP] = emittext,
         [OBLOOP] = emittext,
- [OPRINT] = emitprint,
         [OFUN] = emitfun,
         [ORET] = emitret,
         [ODECL] = emitdcl,
_AT_@ -253,17 +252,6 @@ emitexp(unsigned op, void *arg)
 }
 
 static void
-emitprint(unsigned op, void *arg)
-{
- Node *np = arg;
-
- emitnode(np);
- printf("\tk%c\n", np->type->letter);
- fflush(stdout);
- freetree(np);
-}
-
-static void
 emitfun(unsigned op, void *arg)
 {
         Symbol *sym = arg;
diff --git a/cc1/stmt.c b/cc1/stmt.c
index a2bf282..072686e 100644
--- a/cc1/stmt.c
+++ b/cc1/stmt.c
_AT_@ -353,11 +353,6 @@ stmt(Symbol *lbreak, Symbol *lcont, Caselist *lswitch)
         case IDEN:
                 fun = (ahead() == ':') ? Label : stmtexp;
                 break;
- case '_AT_':
- next();
- np = expr();
- emit(OPRINT, np);
- return;
         }
         (*fun)(lbreak, lcont, lswitch);
 }
Received on Mon Jul 20 2015 - 19:28:02 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 20 2015 - 19:36:12 CEST