rsc/source/rscpp/cpp.h    |   41 -------------
 rsc/source/rscpp/cpp1.c   |   46 ---------------
 rsc/source/rscpp/cpp2.c   |  122 ----------------------------------------
 rsc/source/rscpp/cpp3.c   |  131 -------------------------------------------
 rsc/source/rscpp/cpp4.c   |   53 -----------------
 rsc/source/rscpp/cpp5.c   |    9 --
 rsc/source/rscpp/cpp6.c   |   25 --------
 rsc/source/rscpp/cppdef.h |  139 ----------------------------------------------
 8 files changed, 7 insertions(+), 559 deletions(-)

New commits:
commit 77f994bd9c780bf3ad951f92f3ff35f294fe8026
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 10:39:44 2014 +0200

    cid#983095 Resource leak
    
    Change-Id: I2792afbfedbb256e0b79236505176f932ab25ce7

diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index e6b8402..9f18dc4 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -233,7 +233,7 @@ void InitCpp1()
 int MAIN(int argc, char** argv)
 {
     int    i;
-    char** useargv;
+    char** useargv = 0;
     char** pfargv;
 
     if( nRunde == 0 )
@@ -351,6 +351,8 @@ int MAIN(int argc, char** argv)
         if (!eflag)
             exit(IO_ERROR);
     }
+    if( pfargv )
+        free(pfargv);
     return( IO_NORMAL );
 
 }
commit 60bb3e9d34a36faf438737992af468da83f6551b
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 10:26:33 2014 +0200

    rsc: remove more DEC remnants
    
    Change-Id: I6b084d6b08ff2e7bd9adfba4c9eda7c8c650305c

diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index 6c52de3..e6b8402 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -314,11 +314,7 @@ int MAIN(int argc, char** argv)
         }                           /* Else, just get stdin         */
     case 0:                         /* No args?                     */
     case 1:                         /* No files, stdin -> stdout    */
-#if (HOST == SYS_UNIX) || (HOST == SYS_UNKNOWN)
         work[0] = EOS;              /* Unix can't find stdin name   */
-#else
-        fgetname(stdin, work);      /* Vax-11C, Decus C know name   */
-#endif
         break;
 
     default:
commit be403dcf9d1134f004cb7af9ec7482d89e1db581
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 10:23:46 2014 +0200

    rsc: NOMAIN is always true
    
    Change-Id: Ib219ab2e85f6fff3ece93b95d4c61bad48e719ac

diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index a5bdd2b..6c52de3 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -355,11 +355,7 @@ int MAIN(int argc, char** argv)
         if (!eflag)
             exit(IO_ERROR);
     }
-#ifdef NOMAIN                  /* BP */ /* kein exit im der LIB-Version */
     return( IO_NORMAL );
-#else
-    exit(IO_NORMAL);                /* No errors or -E option set   */
-#endif
 
 }
 
commit b4b2b434362d5854cddef1e576c4a6a7c51b45ef
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 10:14:23 2014 +0200

    rsc: remove support for DECUS
    
    and consequently unused define "nomacargs"
    
    Change-Id: Ica5da9cf03ad63bf07b3385995ebf420ffb28089

diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h
index 250b0dc..7f45375 100644
--- a/rsc/source/rscpp/cpp.h
+++ b/rsc/source/rscpp/cpp.h
@@ -38,12 +38,7 @@ extern FILE *pDefOut;                                   /* 
ER */
 /* limit for reading commandfiles */
 #define PARALIMIT       100
 
-#ifndef EOS
-/*
- * This is predefined in Decus C
- */
 #define EOS             '\0'            /* End of string                */
-#endif
 #define EOF_CHAR        0               /* Returned by get() on eof     */
 #define NULLST          ((char *) NULL) /* Pointer to nowhere (linted)  */
 #define DEF_NOARGS      (-1)            /* #define foo vs #define foo() */
@@ -202,35 +197,15 @@ typedef struct sizes {
     int         size;                   /* this is the datum size value */
     int         psize;                  /* this is the pointer size     */
 } SIZES;
-/*
- * nomacarg is a built-in #define on Decus C.
- */
 
-#ifdef  nomacarg
-#define cput            output          /* cput concatenates tokens     */
-#else
 #define cput(c)         { if (c != TOK_SEP) PUTCHAR(c); }
-#endif
-
-#ifndef nomacarg
 #define streq(s1, s2)   (strcmp(s1, s2) == 0)
-#endif
 
 /*
  * Error codes.
- * Decus C codes are defined in stdio.h.
- * Others are cooked to order.
  */
-
-/*
- * Note: IO_NORMAL and IO_ERROR are defined in the Decus C stdio.h file
- */
-#ifndef IO_NORMAL
 #define IO_NORMAL       0
-#endif
-#ifndef IO_ERROR
 #define IO_ERROR        1
-#endif
 
 /*
  * Externs
diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c
index 7d26842..62d8f4b 100644
--- a/rsc/source/rscpp/cpp5.c
+++ b/rsc/source/rscpp/cpp5.c
@@ -87,16 +87,7 @@ typedef struct optab {
 } OPTAB;
 static int  evalue;         /* Current value from evallex() */
 
-#ifdef  nomacargs
-FILE_LOCAL int
-isbinary(op)
-int    op;
-{
-    return (op >= FIRST_BINOP && op <= LAST_BINOP);
-}
-#else
 #define isbinary(op)    (op >= FIRST_BINOP && op <= LAST_BINOP)
-#endif
 
 /*
  * The following definitions are used to specify basic variable sizes.
diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 274d60c..25359da 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -181,12 +181,8 @@
 
 
 #ifndef FILE_LOCAL
-#ifdef  decus
-#define FILE_LOCAL              static
-#else
 #define FILE_LOCAL                              /* Others are global    */
 #endif
-#endif
 
 #endif // INCLUDED_RSC_SOURCE_RSCPP_CPPDEF_H
 
commit 2b97ae3221f9759f6253540214e9ff2a52a76efb
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 10:09:43 2014 +0200

    rsc: remove unused OLD_PREPROCESSOR
    
    and consequently unused
       OK_DOLLAR
       OK_CONCAT
       COMMENT_INVISIBLE
       STRING_FORMAL
    
    Change-Id: I801b98be8a2fc04b7568fabff9aad486356a69c9

diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h
index b9fde72..250b0dc 100644
--- a/rsc/source/rscpp/cpp.h
+++ b/rsc/source/rscpp/cpp.h
@@ -209,12 +209,8 @@ typedef struct sizes {
 #ifdef  nomacarg
 #define cput            output          /* cput concatenates tokens     */
 #else
-#if COMMENT_INVISIBLE
-#define cput(c)         { if (c != TOK_SEP && c != COM_SEP) PUTCHAR(c); }
-#else
 #define cput(c)         { if (c != TOK_SEP) PUTCHAR(c); }
 #endif
-#endif
 
 #ifndef nomacarg
 #define streq(s1, s2)   (strcmp(s1, s2) == 0)
@@ -340,11 +336,7 @@ void checkparm( int c, DEFBUF *dp );
 int expcollect(void);
 void expstuff( DEFBUF *dp );
 
-#if STRING_FORMAL
-void stparmscan( int delim, DEFBUF *dp);
-#else
 void stparmscan( int delim);
-#endif
 #if OSL_DEBUG_LEVEL > 1
 void dumpparm( char *why );
 #endif
diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index 6265d59..a5bdd2b 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -338,11 +338,7 @@ int MAIN(int argc, char** argv)
 
     if ((i = (ifptr - &ifstack[0])) != 0)
     {
-#if OLD_PREPROCESSOR
-        ciwarn("Inside #ifdef block at end of input, depth = %d", i);
-#else
         cierror("Inside #ifdef block at end of input, depth = %d", i);
-#endif
     }
 #if OSL_DEBUG_LEVEL > 1
     if( pDefOut != stdout && pDefOut != stderr )
@@ -458,9 +454,6 @@ void cppmain()
             {                            /* Token concat. loop   */
                 for (counter = 0; type[(c = get())] == SPA;)
                 {
-#if COMMENT_INVISIBLE
-                    if (c != COM_SEP)
-#endif
                     counter++;              /* Skip over blanks     */
 
                 }
@@ -538,11 +531,7 @@ void cppmain()
  */
 void output(int c)
 {
-#if COMMENT_INVISIBLE
-    if (c != TOK_SEP && c != COM_SEP)
-#else
     if (c != TOK_SEP)
-#endif
         PUTCHAR(c);
 }
 
@@ -553,11 +542,7 @@ void output(int c)
  */
 int outputEval(int c)
 {
-#if COMMENT_INVISIBLE
-    if (c != TOK_SEP && c != COM_SEP)
-#else
     if (c != TOK_SEP)
-#endif
     {
         PUTCHAR(c);
         if ( bIsInEval && nEvalOff < NEVALBUF )
diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index 7ff7cf2..71db0c3 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -280,19 +280,10 @@ nest_err:       cerror("#%s must be in an #if", token);
             break;
         }
         if (hash != L_include) {
-#if OLD_PREPROCESSOR
-            /*
-             * Ignore the rest of the #control line so you can write
-             *          #if     foo
-             *          #endif  foo
-             */
-            goto dump_line;                     /* Take common exit     */
-#else
             if (skipws() != '\n') {
                 cwarn("Unexpected text in #control line ignored", NULLST);
                 skipnl();
             }
-#endif
         }
         return (counter + 1);
 }
@@ -335,10 +326,8 @@ void doif(int hash)
         return;
 
 badif:  cerror("#if, #ifdef, or #ifndef without an argument", NULLST);
-#if !OLD_PREPROCESSOR
         skipnl();                               /* Prevent an extra     */
         unget();                                /* Error message        */
-#endif
         return;
 }
 
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c
index 087f15f..0925caf 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -127,18 +127,11 @@ void dodefine()
         workp = work;                           /* Replacement put here */
         inmacro = TRUE;                         /* Keep \<newline> now  */
         while (c != EOF_CHAR && c != '\n') {    /* Compile macro body   */
-#if OK_CONCAT
-#if COMMENT_INVISIBLE
-            if (c == COM_SEP) {                 /* Token concatenation? */
-                save(TOK_SEP);                  /* Stuff a delimiter    */
-                c = get();
-#else
             if (c == '#') {                     /* Token concatenation? */
                 while (workp > work && type[(int)workp[-1]] == SPA)
                     --workp;                    /* Erase leading spaces */
                 save(TOK_SEP);                  /* Stuff a delimiter    */
                 c = skipws();                   /* Eat whitespace       */
-#endif
                 if (type[c] == LET)             /* Another token here?  */
                     ;                           /* Stuff it normally    */
                 else if (type[c] == DIG) {      /* Digit string after?  */
@@ -149,13 +142,10 @@ void dodefine()
                     save(TOK_SEP);              /* Delimit 2nd token    */
                 }
                 else {
-#if ! COMMENT_INVISIBLE
                     ciwarn("Strange character after # (%d.)", c);
-#endif
                 }
                 continue;
             }
-#endif
             switch (type[c]) {
             case LET:
                 checkparm(c, dp);               /* Might be a formal    */
@@ -167,11 +157,7 @@ void dodefine()
                 break;
 
             case QUO:                           /* String in mac. body  */
-#if STRING_FORMAL
-                stparmscan(c, dp);              /* Do string magic      */
-#else
                 stparmscan(c);
-#endif
                 break;
 
             case BSH:                           /* Backslash            */
@@ -258,44 +244,6 @@ void checkparm(int c, DEFBUF* dp)
             save(*cp++);                        /* The token itself     */
 }
 
-#if STRING_FORMAL
-void stparmscan(delim, dp)
-int             delim;
-DEFBUF          *dp;
-/*
- * Scan the string (starting with the given delimiter).
- * The token is replaced if it is the only text in this string or
- * character constant.  The algorithm follows checkparm() above.
- * Note that scanstring() has approved of the string.
- */
-{
-        int            c;
-
-        /*
-         * Warning -- this code hasn't been tested for a while.
-         * It exists only to preserve compatibility with earlier
-         * implementations of cpp.  It is not part of the Draft
-         * ANSI Standard C language.
-         */
-        save(delim);
-        instring = TRUE;
-        while ((c = get()) != delim
-             && c != '\n'
-             && c != EOF_CHAR) {
-            if (type[c] == LET)                 /* Maybe formal parm    */
-                checkparm(c, dp);
-            else {
-                save(c);
-                if (c == '\\')
-                    save(get());
-            }
-        }
-        instring = FALSE;
-        if (c != delim)
-            cerror("Unterminated string in macro body", NULLST);
-        save(c);
-}
-#else
 void stparmscan(int delim)
 /*
  * Normal string parameter scan.
@@ -328,7 +276,6 @@ void stparmscan(int delim)
         }
         workp[-1] = wp[-1];             /* Nope, reset end quote.       */
 }
-#endif
 
 void doundef()
 /*
diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c
index 963676d..45297a2 100644
--- a/rsc/source/rscpp/cpp6.c
+++ b/rsc/source/rscpp/cpp6.c
@@ -87,11 +87,7 @@
         << error type table is not correct >>
 #endif
 
-#if OK_DOLLAR
 #define DOL     LET
-#else
-#define DOL     000
-#endif
 
 #ifdef EBCDIC
 
@@ -211,11 +207,7 @@ skipws()
 
         do {                            /* Skip whitespace      */
             c = get();
-#if COMMENT_INVISIBLE
-        } while (type[c] == SPA || c == COM_SEP);
-#else
         } while (type[c] == SPA);
-#endif
         return (c);
 }
 
@@ -273,7 +265,6 @@ catenate()
         int            c;
         char           *token1;
 
-#if OK_CONCAT
         if (get() != TOK_SEP) {                 /* Token concatenation  */
             unget();
             return (FALSE);
@@ -301,12 +292,10 @@ catenate()
                 break;
 
             default:                            /* An error, ...        */
-#if ! COMMENT_INVISIBLE
                 if (isprint(c))
                     cierror("Strange character '%c' after #", c);
                 else
                     cierror("Strange character (%d.) after #", c);
-#endif
                 strcpy(work, token1);
                 unget();
                 break;
@@ -321,9 +310,6 @@ catenate()
             ungetstring(work);                  /* Unget the new thing, */
             return (TRUE);
         }
-#else
-        return (FALSE);                         /* Not supported        */
-#endif
 }
 
 int
@@ -927,14 +913,7 @@ newline:
                         if (*file->bptr == '\n'
                          || type[*file->bptr & 0xFF] == SPA)
                             goto newline;
-#if COMMENT_INVISIBLE
-                        /*
-                         * Return magic (old-fashioned) syntactic space.
-                         */
-                        return ((file->bptr[-1] = COM_SEP));
-#else
                         return ((file->bptr[-1] = ' '));
-#endif
 
                     case '\n':                      /* we'll need a #line   */
                         if (!keepcomments)
@@ -1036,11 +1015,7 @@ cget()
 
         do {
             c = get();
-#if COMMENT_INVISIBLE
-        } while (c == TOK_SEP || c == COM_SEP);
-#else
         } while (c == TOK_SEP);
-#endif
         return (c);
 }
 
diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 887502d..274d60c 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -74,15 +74,6 @@
  *              to be marked "static" even though they are referenced
  *              by "extern" statements elsewhere.
  *
- * OK_DOLLAR    Should be set TRUE if $ is a valid alphabetic character
- *              in identifiers (default), or zero if $ is invalid.
- *              Default is TRUE.
- *
- * OK_CONCAT    Should be set TRUE if # may be used to concatenate
- *              tokens in macros (per the Ansi Draft Standard) or
- *              FALSE for old-style # processing (needed if cpp is
- *              to process assembler source code).
- *
  * OK_DATE      Predefines the compilation date if set TRUE.
  *              Not permitted by the Nov. 12, 1984 Draft Standard.
  *
@@ -116,24 +107,6 @@
 #endif
 
 /*
- * OLD_PREPROCESSOR forces the definition of OK_DOLLAR, OK_CONCAT,
- * COMMENT_INVISIBLE, and STRING_FORMAL to values appropriate for
- * an old-style preprocessor.
- */
-
-#ifndef OLD_PREPROCESSOR
-#define OLD_PREPROCESSOR        FALSE
-#endif
-
-#if     OLD_PREPROCESSOR
-#define OK_DOLLAR               FALSE
-#define OK_CONCAT               TRUE
-#define COMMENT_INVISIBLE       TRUE
-#define STRING_FORMAL           TRUE
-#define IDMAX                   63      /* actually, seems to be unlimited */
-#endif
-
-/*
  * RECURSION_LIMIT may be set to -1 to disable the macro recursion test.
  */
 #ifndef RECURSION_LIMIT
@@ -149,45 +122,6 @@
 #endif
 
 /*
- * COMMENT_INVISIBLE may be defined to allow "old-style" comment
- * processing, whereby the comment becomes a zero-length token
- * delimiter.  This permitted tokens to be concatenated in macro
- * expansions.  This was removed from the Draft Ansi Standard.
- */
-#ifndef COMMENT_INVISIBLE
-#define COMMENT_INVISIBLE       FALSE
-#endif
-
-/*
- * STRING_FORMAL may be defined to allow recognition of macro parameters
- * anywhere in replacement strings.  This was removed from the Draft Ansi
- * Standard and a limited recognition capability added.
- */
-#ifndef STRING_FORMAL
-#define STRING_FORMAL           FALSE
-#endif
-
-/*
- * OK_DOLLAR enables use of $ as a valid "letter" in identifiers.
- * This is a permitted extension to the Ansi Standard and is required
- * for e.g., RSX-11M, etc.   It should be set FALSE if cpp is
- * used to preprocess assembler source on Unix systems.  OLD_PREPROCESSOR
- * sets OK_DOLLAR FALSE for that reason.
- */
-#ifndef OK_DOLLAR
-#define OK_DOLLAR               TRUE
-#endif
-
-/*
- * OK_CONCAT enables (one possible implementation of) token concatenation.
- * If cpp is used to preprocess Unix assembler source, this should be
- * set FALSE as the concatenation character, #, is used by the assembler.
- */
-#ifndef OK_CONCAT
-#define OK_CONCAT               TRUE
-#endif
-
-/*
  * OK_DATE may be enabled to predefine today's date as a string
  * at the start of each compilation.  This is apparently not permitted
  * by the Draft Ansi Standard.
commit 80bdaac0a6d26fc249c9e79ae1c1eacc770cd783
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:28:54 2014 +0200

    rsc: remove VAX support
    
    Change-Id: Ib3928c5f26d191d5ba184599edaa2e08668b16f5

diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 8d05568..887502d 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -101,9 +101,6 @@
 
 #if     TARGET == SYS_UNIX
 #define SYSTEM                  "unix"
-#ifdef  vax
-#define MACHINE                 "vax"
-#endif
 #endif
 
 /*
@@ -253,13 +250,9 @@
 #ifdef  decus
 #define FILE_LOCAL              static
 #else
-#ifdef  vax11c
-#define FILE_LOCAL              static
-#else
 #define FILE_LOCAL                              /* Others are global    */
 #endif
 #endif
-#endif
 
 #endif // INCLUDED_RSC_SOURCE_RSCPP_CPPDEF_H
 
commit a077da7ce6686f238592ea42de7c35e234bd9546
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:27:54 2014 +0200

    rsc: remove PDP support
    
    Change-Id: I06ad5702aed280bc1e19743246167e1d6fd1af95

diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 965075b..8d05568 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -101,9 +101,6 @@
 
 #if     TARGET == SYS_UNIX
 #define SYSTEM                  "unix"
-#ifdef  pdp11
-#define MACHINE                 "pdp11"
-#endif
 #ifdef  vax
 #define MACHINE                 "vax"
 #endif
commit b17e7627433fa811f6f9dab6a260c10c062f9c85
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:27:21 2014 +0200

    rsc: remove 68000 support
    
    Change-Id: Ib72dc8800bbc91905445d838657e50dfcc021b40

diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index aacb6e5..965075b 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -35,7 +35,6 @@
  */
 #define SYS_UNKNOWN             0
 #define SYS_UNIX                1
-#define SYS_68000               7
 
 #ifndef HOST
 #ifdef  unix
@@ -100,16 +99,6 @@
  *              specific directories.
  */
 
-#if TARGET == SYS_68000 || defined(M68000) || defined(m68000) || defined(m68k)
-/*
- * All three machine designators have been seen in various systems.
- * Warning -- compilers differ as to sizeof (int).  cpp3 assumes that
- * sizeof (int) == 2
- */
-#define MACHINE                 "M68000", "m68000", "m68k"
-#define SYSTEM                  "unix"
-#endif
-
 #if     TARGET == SYS_UNIX
 #define SYSTEM                  "unix"
 #ifdef  pdp11
commit b2737a655bda2b306a8c14045dac762941888c8c
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:26:33 2014 +0200

    rsc: remove ONYX support
    
    Change-Id: Ia6707ec17bf46b582dc344541857324976408833

diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 38a5f1b..aacb6e5 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -35,7 +35,6 @@
  */
 #define SYS_UNKNOWN             0
 #define SYS_UNIX                1
-#define SYS_ONYX                6
 #define SYS_68000               7
 
 #ifndef HOST
@@ -101,11 +100,6 @@
  *              specific directories.
  */
 
-#if TARGET == SYS_ONYX
-#define MACHINE                 "z8000"
-#define SYSTEM                  "unix"
-#endif
-
 #if TARGET == SYS_68000 || defined(M68000) || defined(m68000) || defined(m68k)
 /*
  * All three machine designators have been seen in various systems.
commit 727dc227a5c4c313d5fa1c493120b3a63bb120c5
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:25:46 2014 +0200

    rsc: remove LATTICE support
    
    Change-Id: I904a6ec522ae4a97eefebf1f1ec6554e8e66747d

diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 528a8df..38a5f1b 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -35,7 +35,6 @@
  */
 #define SYS_UNKNOWN             0
 #define SYS_UNIX                1
-#define SYS_LATTICE             5
 #define SYS_ONYX                6
 #define SYS_68000               7
 
@@ -102,15 +101,6 @@
  *              specific directories.
  */
 
-#if TARGET == SYS_LATTICE
-/*
- * We assume the operating system is pcdos for the IBM-PC.
- * We also assume the small model (just like the PDP-11)
- */
-#define MACHINE                 "i8086"
-#define SYSTEM                  "pcdos"
-#endif
-
 #if TARGET == SYS_ONYX
 #define MACHINE                 "z8000"
 #define SYSTEM                  "unix"
commit a51e882fd3d33968ead33e84f240b622fb30023f
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:25:09 2014 +0200

    rsc: remove RT11 support
    
    Change-Id: I9e9899c330868eb51b717d49ea901f15005692db

diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index 689780a..7ff7cf2 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -488,7 +488,7 @@ hasdirectory(char* source, char* result)
         }
 #else
         /*
-         * Random DEC operating system (RT11, RSTS/E)
+         * Random DEC operating system (RSTS/E)
          */
         char           *tp;
 
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index 2dec260..124215d 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -98,16 +98,6 @@ void setincdirs()
 #endif
 
 
-#if HOST == SYS_RT11
-        extern int      $$rsts;                 /* RSTS/E emulation?    */
-
-        if ($$rsts)
-            *incend++ = "SY:@";                 /* User-defined account */
-        *incend++ = "C:";                       /* Decus-C library disk */
-        *incend++ = "SY:";                      /* System (boot) disk   */
-#define MAXINCLUDE      (NINCLUDE - 3 - IS_INCLUDE)
-#endif
-
 #if HOST == SYS_UNKNOWN
 /*
  * Kontext: GenMake
diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 71ff0b8..528a8df 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -35,7 +35,6 @@
  */
 #define SYS_UNKNOWN             0
 #define SYS_UNIX                1
-#define SYS_RT11                4
 #define SYS_LATTICE             5
 #define SYS_ONYX                6
 #define SYS_68000               7
@@ -44,9 +43,6 @@
 #ifdef  unix
 #define HOST                    SYS_UNIX
 #else
-#ifdef  rt11
-#define HOST                    SYS_RT11
-#endif
 #endif
 #endif
 
@@ -120,12 +116,6 @@
 #define SYSTEM                  "unix"
 #endif
 
-#if TARGET == SYS_RT11
-#define MACHINE                 "pdp11"
-#define SYSTEM                  "rt11"
-#define COMPILER                "decus"
-#endif
-
 #if TARGET == SYS_68000 || defined(M68000) || defined(m68000) || defined(m68k)
 /*
  * All three machine designators have been seen in various systems.
commit 04dbdcd2de85551d5ec516a2a7043950ea5f6fe6
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:23:40 2014 +0200

    rsc: remove RSX support
    
    Change-Id: I8b4e33ef6dd0c8e3af17fc358feab655e263de0f

diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index 64272e3..689780a 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -488,7 +488,7 @@ hasdirectory(char* source, char* result)
         }
 #else
         /*
-         * Random DEC operating system (RSX, RT11, RSTS/E)
+         * Random DEC operating system (RT11, RSTS/E)
          */
         char           *tp;
 
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index c2601ae..2dec260 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -98,29 +98,6 @@ void setincdirs()
 #endif
 
 
-#if HOST == SYS_RSX
-        extern int      $$rsts;                 /* TRUE on RSTS/E       */
-        extern int      $$pos;                  /* TRUE on PRO-350 P/OS */
-        extern int      $$vms;                  /* TRUE on VMS compat.  */
-
-        if ($$pos) {                            /* P/OS?                */
-            *incend++ = "SY:[ZZDECUSC]";        /* C #includes          */
-            *incend++ = "LB:[1,5]";             /* RSX library          */
-        }
-        else if ($$rsts) {                      /* RSTS/E?              */
-            *incend++ = "SY:@";                 /* User-defined account */
-            *incend++ = "C:";                   /* Decus-C library      */
-            *incend++ = "LB:[1,1]";             /* RSX library          */
-        }
-        else if ($$vms) {                       /* VMS compatibility?   */
-            *incend++ = "C:";
-        }
-        else {                                  /* Plain old RSX/IAS    */
-            *incend++ = "LB:[1,1]";
-        }
-#define MAXINCLUDE      (NINCLUDE - 3 - IS_INCLUDE)
-#endif
-
 #if HOST == SYS_RT11
         extern int      $$rsts;                 /* RSTS/E emulation?    */
 
diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index 468cec0..71ff0b8 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -35,7 +35,6 @@
  */
 #define SYS_UNKNOWN             0
 #define SYS_UNIX                1
-#define SYS_RSX                 3
 #define SYS_RT11                4
 #define SYS_LATTICE             5
 #define SYS_ONYX                6
@@ -45,15 +44,11 @@
 #ifdef  unix
 #define HOST                    SYS_UNIX
 #else
-#ifdef  rsx
-#define HOST                    SYS_RSX
-#else
 #ifdef  rt11
 #define HOST                    SYS_RT11
 #endif
 #endif
 #endif
-#endif
 
 #ifndef HOST
 #define HOST                    SYS_UNKNOWN
@@ -125,12 +120,6 @@
 #define SYSTEM                  "unix"
 #endif
 
-#if TARGET == SYS_RSX
-#define MACHINE                 "pdp11"
-#define SYSTEM                  "rsx"
-#define COMPILER                "decus"
-#endif
-
 #if TARGET == SYS_RT11
 #define MACHINE                 "pdp11"
 #define SYSTEM                  "rt11"
commit 8fcd4b640fc041a97ed982ad1f3831cb2eade061
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Sep 18 09:21:39 2014 +0200

    rsc: remove VMS support
    
    Change-Id: I20e8cc7014c140b6e7996ac51fc2d4c8030e2264

diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h
index 2a42f89..b9fde72 100644
--- a/rsc/source/rscpp/cpp.h
+++ b/rsc/source/rscpp/cpp.h
@@ -221,17 +221,11 @@ typedef struct sizes {
 #endif
 
 /*
- * Error codes.  VMS uses system definitions.
+ * Error codes.
  * Decus C codes are defined in stdio.h.
  * Others are cooked to order.
  */
 
-#if HOST == SYS_VMS
-#include <ssdef.h>
-#include <stsdef.h>
-#define IO_NORMAL       (SS$_NORMAL | STS$M_INHIB_MSG)
-#define IO_ERROR        SS$_ABORT
-#endif
 /*
  * Note: IO_NORMAL and IO_ERROR are defined in the Decus C stdio.h file
  */
diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c
index d5445b8..6265d59 100644
--- a/rsc/source/rscpp/cpp1.c
+++ b/rsc/source/rscpp/cpp1.c
@@ -250,9 +250,6 @@ int MAIN(int argc, char** argv)
     InitCpp5();
     InitCpp6();
 
-#if HOST == SYS_VMS
-    argc = getredirection(argc, argv);      /* vms >file and <file  */
-#endif
     initdefines();                          /* O.S. specific def's  */
     if ( argv[argc-1][0] == '@' )
     {
@@ -275,16 +272,8 @@ int MAIN(int argc, char** argv)
              */
             if (!streq(useargv[3], "-"))
             {
-#if HOST == SYS_VMS
-                /*
-                 * On vms, reopen stdout with "vanilla rms" attributes.
-                 */
-                if ((i = creat(useargv[3], 0, "rat=cr", "rfm=var")) == -1
-                    || dup2(i, fileno(stdout)) == -1)
-#else
                 pDefOut = fopen( useargv[3], "w" );
                 if( pDefOut == NULL )
-#endif
                 {
                     perror(useargv[3]);
                     cerror("Can't open output file \"%s\"", useargv[3]);
@@ -299,16 +288,8 @@ int MAIN(int argc, char** argv)
          */
         if (!streq(useargv[2], "-"))
         {
-#if HOST == SYS_VMS
-            /*
-             * On vms, reopen stdout with "vanilla rms" attributes.
-             */
-            if ((i = creat(useargv[2], 0, "rat=cr", "rfm=var")) == -1
-                || dup2(i, fileno(stdout)) == -1)
-#else
             pCppOut = fopen( useargv[2], "w" );
             if( pCppOut == NULL )
-#endif
             {
                 perror(useargv[2]);
                 cerror("Can't open output file \"%s\"", useargv[2]);
diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c
index 810d823..64272e3 100644
--- a/rsc/source/rscpp/cpp2.c
+++ b/rsc/source/rscpp/cpp2.c
@@ -21,17 +21,6 @@
 #include <ctype.h>
 #include "cppdef.h"
 #include "cpp.h"
-#if HOST == SYS_VMS
-/*
- * Include the rms stuff.  (We can't just include rms.h as it uses the
- * VaxC-specific library include syntax that Decus CPP doesn't support.
- * By including things by hand, we can CPP ourself.)
- */
-#include <nam.h>
-#include <fab.h>
-#include <rab.h>
-#include <rmsdef.h>
-#endif
 
 /*
  * Generate (by hand-inspection) a set of unique values for each control
@@ -372,9 +361,6 @@ void doinclude()
 {
         int            c;
         int            delim;
-#if HOST == SYS_VMS
-        char                    def_filename[NAM$C_MAXRSS + 1];
-#endif
 
         delim = macroid(skipws());
         if (delim != '<' && delim != '"')
@@ -400,20 +386,8 @@ void doinclude()
 #endif
         *workp = EOS;                   /* Terminate filename           */
         instring = FALSE;
-#if HOST == SYS_VMS
-        /*
-         * Assume the default .h filetype.
-         */
-        if (!vmsparse(work, ".H", def_filename)) {
-            perror(work);               /* Oops.                        */
-            goto incerr;
-        }
-        else if (openinclude(def_filename, (delim == '"')))
-            return;
-#else
         if (openinclude(work, (delim == '"')))
             return;
-#endif
         /*
          * No sense continuing if #include file isn't there.
          */
@@ -435,11 +409,6 @@ openinclude(char* filename, int searchlocal)
  */
 {
         char           **incptr;
-#if HOST == SYS_VMS
-#if NFWORK < (NAM$C_MAXRSS + 1)
-    << error, NFWORK is not greater than NAM$C_MAXRSS >>
-#endif
-#endif
         char                    tmpname[NFWORK]; /* Filename work area   */
 
         if (searchlocal) {
@@ -518,14 +487,6 @@ hasdirectory(char* source, char* result)
             return (TRUE);
         }
 #else
-#if HOST == SYS_VMS
-        if (vmsparse(source, NULLST, result)
-         && result[0] != EOS)
-            return (TRUE);
-        else {
-            return (FALSE);
-        }
-#else
         /*
          * Random DEC operating system (RSX, RT11, RSTS/E)
          */
@@ -540,78 +501,8 @@ hasdirectory(char* source, char* result)
             return (TRUE);
         }
 #endif
-#endif
 }
 
-#if HOST == SYS_VMS
 
-/*
- * EXP_DEV is set if a device was specified, EXP_DIR if a directory
- * is specified.  (Both set indicate a file-logical, but EXP_DEV
- * would be set by itself if you are reading, say, SYS$INPUT:)
- */
-#define DEVDIR (NAM$M_EXP_DEV | NAM$M_EXP_DIR)
-
-FILE_LOCAL int
-vmsparse(source, defstring, result)
-char            *source;
-char            *defstring;     /* non-NULL -> default string.          */
-char            *result;        /* Size is at least NAM$C_MAXRSS + 1    */
-/*
- * Parse the source string, applying the default (properly, using
- * the system parse routine), storing it in result.
- * TRUE if it parsed, FALSE on error.
- *
- * If defstring is NULL, there are no defaults and result gets
- * (just) the node::[directory] part of the string (possibly "")
- */
-{
-        struct FAB      fab = cc$rms_fab;       /* File access block    */
-        struct NAM      nam = cc$rms_nam;       /* File name block      */
-        char            fullname[NAM$C_MAXRSS + 1];
-        char            *rp;                    /* Result pointer       */
-
-        fab.fab$l_nam = &nam;                   /* fab -> nam           */
-        fab.fab$l_fna = source;                 /* Source filename      */
-        fab.fab$b_fns = strlen(source);         /* Size of source       */
-        fab.fab$l_dna = defstring;              /* Default string       */
-        if (defstring != NULLST)
-            fab.fab$b_dns = strlen(defstring);  /* Size of default      */
-        nam.nam$l_esa = fullname;               /* Expanded filename    */
-        nam.nam$b_ess = NAM$C_MAXRSS;           /* Expanded name size   */
-        if (sys$parse(&fab) == RMS$_NORMAL) {   /* Parse away           */
-            fullname[nam.nam$b_esl] = EOS;      /* Terminate string     */
-            result[0] = EOS;                    /* Just in case         */
-            rp = &result[0];
-            /*
-             * Remove stuff added implicitly, accepting node names and
-             * dev:[directory] strings (but not process-permanent files).
-             */
-            if ((nam.nam$l_fnb & NAM$M_PPF) == 0) {
-                if ((nam.nam$l_fnb & NAM$M_NODE) != 0) {
-                    strncpy(result, nam.nam$l_node, nam.nam$b_node);
-                    rp += nam.nam$b_node;
-                    *rp = EOS;
-                }
-                if ((nam.nam$l_fnb & DEVDIR) == DEVDIR) {
-                    strncpy(rp, nam.nam$l_dev, nam.nam$b_dev + nam.nam$b_dir);
-                    rp += nam.nam$b_dev + nam.nam$b_dir;
-                    *rp = EOS;
-                }
-            }
-            if (defstring != NULLST) {
-                strncpy(rp, nam.nam$l_name, nam.nam$b_name + nam.nam$b_type);
-                rp += nam.nam$b_name + nam.nam$b_type;
-                *rp = EOS;
-                if ((nam.nam$l_fnb & NAM$M_EXP_VER) != 0) {
-                    strncpy(rp, nam.nam$l_ver, nam.nam$b_ver);
-                    rp[nam.nam$b_ver] = EOS;
-                }
-            }
-            return (TRUE);
-        }
-        return (FALSE);
-}
-#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c
index b7cf288..c2601ae 100644
--- a/rsc/source/rscpp/cpp3.c
+++ b/rsc/source/rscpp/cpp3.c
@@ -28,7 +28,7 @@
 
 #include <string.h>
 
-#if (OSL_DEBUG_LEVEL > 1) && (HOST == SYS_VMS || HOST == SYS_UNIX)
+#if (OSL_DEBUG_LEVEL > 1) && (HOST == SYS_UNIX)
 #include <signal.h>
 #endif
 
@@ -97,14 +97,6 @@ void setincdirs()
 #define MAXINCLUDE      (NINCLUDE - 1 - IS_INCLUDE)
 #endif
 
-#if HOST == SYS_VMS
-        extern char     *getenv();
-
-        if (getenv("C$LIBRARY") != NULL)
-            *incend++ = "C$LIBRARY:";
-        *incend++ = "SYS$LIBRARY:";
-#define MAXINCLUDE      (NINCLUDE - 2 - IS_INCLUDE)
-#endif
 
 #if HOST == SYS_RSX
         extern int      $$rsts;                 /* TRUE on RSTS/E       */
@@ -294,7 +286,7 @@ dooptions(int argc, char** argv)
 #if OSL_DEBUG_LEVEL > 1
                 case 'X':                       /* Debug                */
                     debug = (isdigit(*ap)) ? atoi(ap) : 1;
-#if (HOST == SYS_VMS || HOST == SYS_UNIX)
+#if (HOST == SYS_UNIX)
                     signal(SIGINT, (void (*)(int)) abort); /* Trap "interrupt" 
*/
 #endif
                     fprintf(stderr, "Debug set to %d\n", debug);
@@ -475,92 +467,6 @@ void initdefines()
         }
 }
 
-#if HOST == SYS_VMS
-/*
- * getredirection() is intended to aid in porting C programs
- * to VMS (Vax-11 C) which does not support '>' and '<'
- * I/O redirection.  With suitable modification, it may
- * useful for other portability problems as well.
- */
 
-int
-getredirection(argc, argv)
-int             argc;
-char            **argv;
-/*
- * Process vms redirection arg's.  Exit if any error is seen.
- * If getredirection() processes an argument, it is erased
- * from the vector.  getredirection() returns a new argc value.
- *
- * Warning: do not try to simplify the code for vms.  The code
- * presupposes that getredirection() is called before any data is
- * read from stdin or written to stdout.
- *
- * Normal usage is as follows:
- *
- *      main(argc, argv)
- *      int             argc;
- *      char            *argv[];
- *      {
- *              argc = getredirection(argc, argv);
- *      }
- */
-{
-        char                    *ap;    /* Argument pointer     */
-        int                     i;      /* argv[] index         */
-        int                     j;      /* Output index         */
-        int                     file;   /* File_descriptor      */
-        extern int              errno;  /* Last vms i/o error   */
-
-        for (j = i = 1; i < argc; i++) {   /* Do all arguments  */
-            switch (*(ap = argv[i])) {
-            case '<':                   /* <file                */
-                if (freopen(++ap, "r", stdin) == NULL) {
-                    perror(ap);         /* Can't find file      */
-                    exit(errno);        /* Is a fatal error     */
-                }
-                break;
-
-            case '>':                   /* >file or >>file      */
-                if (*++ap == '>') {     /* >>file               */
-                    /*
-                     * If the file exists, and is writable by us,
-                     * call freopen to append to the file (using the
-                     * file's current attributes).  Otherwise, create
-                     * a new file with "vanilla" attributes as if the
-                     * argument was given as ">filename".
-                     * access(name, 2) returns zero if we can write on
-                     * the specified file.
-                     */
-                    if (access(++ap, 2) == 0) {
-                        if (freopen(ap, "a", stdout) != NULL)
-                            break;      /* Exit case statement  */
-                        perror(ap);     /* Error, can't append  */
-                        exit(errno);    /* After access test    */
-                    }                   /* If file accessible   */
-                }
-                /*
-                 * On vms, we want to create the file using "standard"
-                 * record attributes.  creat(...) creates the file
-                 * using the caller's default protection mask and
-                 * "variable length, implied carriage return"
-                 * attributes. dup2() associates the file with stdout.
-                 */
-                if ((file = creat(ap, 0, "rat=cr", "rfm=var")) == -1
-                 || dup2(file, fileno(stdout)) == -1) {
-                    perror(ap);         /* Can't create file    */
-                    exit(errno);        /* is a fatal error     */
-                }                       /* If '>' creation      */
-                break;                  /* Exit case test       */
-
-            default:
-                argv[j++] = ap;         /* Not a redirector     */
-                break;                  /* Exit case test       */
-            }
-        }                               /* For all arguments    */
-        argv[j] = NULL;                 /* Terminate argv[]     */
-        return (j);                     /* Return new argc      */
-}
-#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/rsc/source/rscpp/cppdef.h b/rsc/source/rscpp/cppdef.h
index bd46bad..468cec0 100644
--- a/rsc/source/rscpp/cppdef.h
+++ b/rsc/source/rscpp/cppdef.h
@@ -35,7 +35,6 @@
  */
 #define SYS_UNKNOWN             0
 #define SYS_UNIX                1
-#define SYS_VMS                 2
 #define SYS_RSX                 3
 #define SYS_RT11                4
 #define SYS_LATTICE             5
@@ -46,9 +45,6 @@
 #ifdef  unix
 #define HOST                    SYS_UNIX
 #else
-#ifdef  vms
-#define HOST                    SYS_VMS
-#else
 #ifdef  rsx
 #define HOST                    SYS_RSX
 #else
@@ -58,7 +54,6 @@
 #endif
 #endif
 #endif
-#endif
 
 #ifndef HOST
 #define HOST                    SYS_UNKNOWN
@@ -130,12 +125,6 @@
 #define SYSTEM                  "unix"
 #endif
 
-#if TARGET == SYS_VMS
-#define MACHINE                 "vax"
-#define SYSTEM                  "vms"
-#define COMPILER                "vax11c"
-#endif
-
 #if TARGET == SYS_RSX
 #define MACHINE                 "pdp11"
 #define SYSTEM                  "rsx"
@@ -235,7 +224,7 @@
 /*
  * OK_DOLLAR enables use of $ as a valid "letter" in identifiers.
  * This is a permitted extension to the Ansi Standard and is required
- * for e.g., VMS, RSX-11M, etc.   It should be set FALSE if cpp is
+ * for e.g., RSX-11M, etc.   It should be set FALSE if cpp is
  * used to preprocess assembler source on Unix systems.  OLD_PREPROCESSOR
  * sets OK_DOLLAR FALSE for that reason.
  */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to