[Libreoffice-commits] .: dmake/dbug dmake/mac dmake/rulparse.c dmake/win95 solenv/src soltools/giparser

Michael Meeks mmeeks at kemper.freedesktop.org
Mon Oct 18 07:39:43 PDT 2010


 dmake/dbug/dbug/dbug.c         |   39 ------------------
 dmake/dbug/malloc/testmem.c    |   28 -------------
 dmake/mac/environ.c            |   85 -----------------------------------------
 dmake/rulparse.c               |    6 --
 dmake/win95/dchdir.c           |    3 -
 solenv/src/version.c           |   14 ------
 soltools/giparser/st_gilrw.cxx |   72 ----------------------------------
 7 files changed, 1 insertion(+), 246 deletions(-)

New commits:
commit 5d6343e7740bf0670ba04d6fcf12a7de2d97baa5
Author: Povilas Kanapickas <povilas.kanapickas at gmail.com>
Date:   Mon Oct 18 15:38:53 2010 +0100

    remove non-compiled code

diff --git a/dmake/dbug/dbug/dbug.c b/dmake/dbug/dbug/dbug.c
index bbd283a..eb2c5bc 100644
--- a/dmake/dbug/dbug/dbug.c
+++ b/dmake/dbug/dbug/dbug.c
@@ -164,45 +164,6 @@ EXPORT BOOLEAN _db_pon_ = FALSE;	/* TRUE if debugging currently on */
  *	Externally supplied functions.
  */
 
-/* Disable the manual definitions, if something is missing use #include's! */
-#if 0
-
-#ifdef unix			/* Only needed for unix */
-IMPORT VOID perror ();		/* Print system/library error */
-IMPORT int chown ();		/* Change owner of a file */
-IMPORT int getgid ();		/* Get real group id */
-IMPORT int getuid ();		/* Get real user id */
-IMPORT int access ();		/* Test file for access */
-#else
-#if !(AMIGA || LATTICE || __TURBOC__)
-LOCAL VOID perror ();		/* Fake system/library error print routine */
-#endif
-#endif
-
-# if BSD4_3 || sun
-IMPORT int getrusage ();
-#endif
-
-IMPORT int atoi ();		/* Convert ascii to integer */
-IMPORT VOID exit ();		/* Terminate execution */
-IMPORT int fclose ();		/* Close a stream */
-IMPORT FILE *fopen ();		/* Open a stream */
-#if !defined(__BORLANDC__)
-IMPORT int fprintf ();		/* Formatted print on file */
-#endif
-IMPORT VOID free ();
-IMPORT char *malloc ();		/* Allocate memory */
-IMPORT int strcmp ();		/* Compare strings */
-IMPORT char *strcpy ();		/* Copy strings around */
-IMPORT int strlen ();		/* Find length of string */
-
-#ifndef fflush			/* This is sometimes a macro */
-IMPORT int fflush ();		/* Flush output for stream */
-#endif
-
-#endif
-
-
 /*
  *	The user may specify a list of functions to trace or 
  *	debug.  These lists are kept in a linear linked list,
diff --git a/dmake/dbug/malloc/testmem.c b/dmake/dbug/malloc/testmem.c
index 33c5b36..de54924 100644
--- a/dmake/dbug/malloc/testmem.c
+++ b/dmake/dbug/malloc/testmem.c
@@ -354,34 +354,6 @@ second()
     check(strpbrk(one, "bc") == NULL, 10);	/* Empty string. */
     check(strpbrk(one, "") == NULL, 11);	/* Both strings empty. */
 
-#if 0
-    /*
-     * strstr - somewhat like strchr
-     */
-    it = "strstr";
-    check(strstr("abcd", "z") == NULL, 1);	/* Not found. */
-    check(strstr("abcd", "abx") == NULL, 2);	/* Dead end. */
-    (void) strcpy(one, "abcd");
-    check(strstr(one, "c") == one+2, 3);	/* Basic test. */
-    check(strstr(one, "bc") == one+1, 4);	/* Multichar. */
-    check(strstr(one, "d") == one+3, 5);	/* End of string. */
-    check(strstr(one, "cd") == one+2, 6);	/* Tail of string. */
-    check(strstr(one, "abc") == one, 7);	/* Beginning. */
-    check(strstr(one, "abcd") == one, 8);	/* Exact match. */
-    check(strstr(one, "abcde") == NULL, 9);	/* Too long. */
-    check(strstr(one, "de") == NULL, 10);	/* Past end. */
-    check(strstr(one, "") == one+4, 11);	/* Finding empty. */
-    (void) strcpy(one, "ababa");
-    check(strstr(one, "ba") == one+1, 12);	/* Finding first. */
-    (void) strcpy(one, "");
-    check(strstr(one, "b") == NULL, 13);	/* Empty string. */
-    check(strstr(one, "") == one, 14);	/* Empty in empty string. */
-    (void) strcpy(one, "bcbca");
-    check(strstr(one, "bca") == one+2, 15);	/* False start. */
-    (void) strcpy(one, "bbbcabbca");
-    check(strstr(one, "bbca") == one+1, 16);	/* With overlap. */
-#endif
-
     /*
      * strspn
      */
diff --git a/dmake/mac/environ.c b/dmake/mac/environ.c
index e338564..1993d08 100644
--- a/dmake/mac/environ.c
+++ b/dmake/mac/environ.c
@@ -70,67 +70,6 @@ make_env()
 {
     char **ppCurEnv;
     char *pCurPos;
-#if 0
-    char **ppMacEnv;
-    char *pMacPos;
-
-    if (!gMECalled) {
-        gMECalled = TRUE;
-
-environ = MALLOC (1, char *);
-*environ = NULL;
-#endif
-#if 0
-{
-    int numenv;
-    int len;
-    int firstnil;
-
-    numenv = 1;
-    ppMacEnv = environ;
-    while (*(ppMacEnv++) != NULL) {
-        ++numenv;
-    } /* while */
-
-    ppMacEnv = environ;
-    if ((environ = MALLOC (numenv, char *)) == NULL) {
-        No_ram ();
-    } /* if */
-
-numenv = 80;
-    for (ppCurEnv = environ; (numenv-- > 0) && (*ppMacEnv != NULL); ++ppCurEnv, ++ppMacEnv) {
-        pMacPos = *ppMacEnv;
-        len = strlen (pMacPos) + 1;
-        len += strlen (pMacPos + len) + 1;
-#define MAXLEN 4098
-if (len > MAXLEN) len = MAXLEN;
-        if ((*ppCurEnv = MALLOC (len, char)) == NULL) {
-            No_ram ();
-        } /* if */
-
-        firstnil = TRUE;
-        for (pCurPos = *ppCurEnv; ((pCurPos - *ppCurEnv) < MAXLEN - 1); ++pCurPos, ++pMacPos) {
-            if (*pMacPos == '=') {
-                *pCurPos = gEqualReplace;
-
-            } else if (*pMacPos == '\0') {
-                if (firstnil) {
-                    *pCurPos = '=';
-                    firstnil = FALSE;
-                } else {
-                    *pCurPos = *pMacPos;
-                    break;
-                } /* if ... else */
-
-            } else {
-                *pCurPos = *pMacPos;
-            } /* if ... elses */
-        } /* for */
-firstnil = FALSE;
-    } /* for */
-    *ppCurEnv = NULL;
-}
-#endif
 {
         int firstnil;
 
@@ -165,9 +104,7 @@ firstnil = FALSE;
             } /* if */
         } /* for */
 }
-#if 0
-    } /* if */
-#endif
+
 } /* PUBLIC void make_env () */
 
 
@@ -208,24 +145,4 @@ free_env()
         FREE (pReplaceChar);
     } /* while */
 
-#if 0
-    char **ppCurEnv;
-    char *pCurPos;
-
-    if (!gFECalled) {
-        gFECalled = TRUE;
-
-//FREE (environ);
-environ = NULL;
-#endif
-#if 0
-        /* Restore the environment list to what it was before we
-           read it in. */
-        for (ppCurEnv = environ; *ppCurEnv != NULL; ++ppCurEnv) {
-            for (pCurPos = *ppCurEnv; *pCurPos != '='; ++pCurPos)
-                ;
-            *pCurPos = '\0';
-        } /* for */
-    } /* if */
-#endif
 } /* PUBLIC void free_env () */
diff --git a/dmake/rulparse.c b/dmake/rulparse.c
index c028607..4d1bc0b 100644
--- a/dmake/rulparse.c
+++ b/dmake/rulparse.c
@@ -451,12 +451,6 @@ int flag;
       DB_PRINT( "par", ("Binding to %s, %04x", tg->CE_NAME, tg->ce_flag) );
       magic = tg->ce_flag & F_PERCENT;
 
-#if 0
-      /* Check to see if we had a rule of the form '%.o : a.h b.h ; xxx'
-       * In which case we must build a NULL prq node to hold the recipe */
-      if( _sv_globprq_only && (_sv_rules != NIL(STRING)) )
-     _build_graph( _sv_op, tg, NIL(CELL) );
-#endif
 
       /* NOTE:  For targets that are magic or special we ignore any
        * previously defined rules, ie. We throw away the old definition
diff --git a/dmake/win95/dchdir.c b/dmake/win95/dchdir.c
index 53432ce..7398b0f 100644
--- a/dmake/win95/dchdir.c
+++ b/dmake/win95/dchdir.c
@@ -23,9 +23,6 @@
 --      Use cvs log to obtain detailed change logs.
 */
 
-#if 0
-#include <dir.h>
-#endif
 #include <direct.h>
 #include "extern.h"
 
diff --git a/solenv/src/version.c b/solenv/src/version.c
index 9615dbf..599fa3d 100644
--- a/solenv/src/version.c
+++ b/solenv/src/version.c
@@ -63,17 +63,3 @@ const struct VersionInfo *GetVersionInfo(void)
     return &g_aVersionInfo;
 }
 
-#if 0
-#include <stdio.h>
-
-int main( int argc, char **argv )
-{
-    const VersionInfo *pInfo = GetVersionInfo();
-    fprintf( stderr, "Date : %s\n", pInfo->pDate);
-    fprintf( stderr, "Time : %s\n", pInfo->pTime);
-    fprintf( stderr, "UPD : %s\n", pInfo->pUpd);
-    delete pInfo;
-    return 0;
-}
-#endif
-
diff --git a/soltools/giparser/st_gilrw.cxx b/soltools/giparser/st_gilrw.cxx
index 2e9dd65..bd00bae 100644
--- a/soltools/giparser/st_gilrw.cxx
+++ b/soltools/giparser/st_gilrw.cxx
@@ -107,76 +107,4 @@ ST_InfoListReader::CloseList()
     aListStack.pop_back();
 }
 
-
-#if 0
-ST_InfoListWriter::ST_InfoListWriter()
-{
-
-}
-
-ST_InfoListWriter::~ST_InfoListWriter()
-
-bool
-ST_InfoListWriter::SaveList( const Simstr &      i_sFileName,
-                             List_GenericInfo &  io_rList )
-{
-
-}
-
-E_Error
-ST_InfoListWriter::GetLastError() const
-{
-    return dpParser->GetLastError(o_pErrorLine);
-}
-
-bool
-ST_InfoListWriter::Start_CurList()
-{
-
-}
-
-bool
-ST_InfoListWriter::NextOf_CurList()
-{
-
-}
-
-void
-ST_InfoListWriter::Get_CurKey( char * o_rKey ) const
-{
-
-}
-
-void
-ST_InfoListWriter::Get_CurValue( char * o_rValue ) const
-{
-
-}
-
-void
-ST_InfoListWriter::Get_CurComment( char * o_rComment ) const
-{
-
-}
-
-bool
-ST_InfoListWriter::HasSubList_CurKey() const
-{
-
-}
-
-void
-ST_InfoListWriter::Push_CurList()
-{
-
-}
-
-void
-ST_InfoListWriter::Pop_CurList()
-{
-     
-}
-#endif
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list