summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-03-24 17:34:42 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-03-24 19:52:15 -0700
commita6a8afb0a82a175822077442f44865c75ab70ff1 (patch)
tree690bf877af6a4d19de0f028214d6c73573b43128
parent3e8c1a2a8e7db49b06f602c2fc5a8108d74dd384 (diff)
Remove #ifdef'ed code that's never used
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--cppsetup.c95
-rw-r--r--def.h7
2 files changed, 0 insertions, 102 deletions
diff --git a/cppsetup.c b/cppsetup.c
index c7ac256..b598670 100644
--- a/cppsetup.c
+++ b/cppsetup.c
@@ -28,100 +28,6 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
-#ifdef CPP
-/*
- * This file is strictly for the sake of cpy.y and yylex.c (if
- * you indeed have the source for cpp).
- */
-#define IB 1
-#define SB 2
-#define NB 4
-#define CB 8
-#define QB 16
-#define WB 32
-#define SALT '#'
-#if defined(pdp11) || defined(vax) || defined(ns16000) || defined(mc68000) || defined(ibm032)
-#define COFF 128
-#else
-#define COFF 0
-#endif
-/*
- * These variables used by cpy.y and yylex.c
- */
-extern char *outp, *inp, *newp, *pend;
-extern char *ptrtab;
-extern char fastab[];
-extern char slotab[];
-
-/*
- * cppsetup
- */
-struct filepointer *currentfile;
-struct inclist *currentinc;
-
-int
-cppsetup(char *line, struct filepointer *filep, struct inclist *inc)
-{
- char *p, savec;
- static boolean setupdone = FALSE;
- boolean value;
-
- if (!setupdone) {
- cpp_varsetup();
- setupdone = TRUE;
- }
-
- currentfile = filep;
- currentinc = inc;
- inp = newp = line;
- for (p=newp; *p; p++)
- ;
-
- /*
- * put a newline back on the end, and set up pend, etc.
- */
- *p++ = '\n';
- savec = *p;
- *p = '\0';
- pend = p;
-
- ptrtab = slotab+COFF;
- *--inp = SALT;
- outp=inp;
- value = yyparse();
- *p = savec;
- return(value);
-}
-
-struct symtab **lookup(symbol)
- char *symbol;
-{
- static struct symtab *undefined;
- struct symtab **sp;
-
- sp = isdefined(symbol, currentinc, NULL);
- if (sp == NULL) {
- sp = &undefined;
- (*sp)->s_value = NULL;
- }
- return (sp);
-}
-
-pperror(tag, x0,x1,x2,x3,x4)
- int tag,x0,x1,x2,x3,x4;
-{
- warning("\"%s\", line %d: ", currentinc->i_file, currentfile->f_line);
- warning(x0,x1,x2,x3,x4);
-}
-
-
-yyerror(s)
- register char *s;
-{
- fatalerr("Fatal error: %s\n", s);
-}
-#else /* not CPP */
-
#include "ifparser.h"
struct _parse_data {
struct filepointer *filep;
@@ -229,5 +135,4 @@ cppsetup(char *filename,
else
return IFFALSE;
}
-#endif /* CPP */
diff --git a/def.h b/def.h
index 3b3ee60..2b60651 100644
--- a/def.h
+++ b/def.h
@@ -38,13 +38,6 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <string.h>
#include <ctype.h>
-#if 0
-#ifndef X_NOT_POSIX
-#ifndef _POSIX_SOURCE
-#define _POSIX_SOURCE
-#endif
-#endif
-#endif
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>