diff options
author | Povilas Kanapickas <povilas.kanapickas@gmail.com> | 2010-10-18 15:38:53 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-18 15:39:01 +0100 |
commit | 9a5e21b2080b0f4b2096d7e661346b49aeb39a66 (patch) | |
tree | ec75d11900176f337f017af4729280d3950d248a /dmake | |
parent | ed6f79269af3a2e45409522d3a0e948fa440023c (diff) |
remove non-compiled code
Diffstat (limited to 'dmake')
-rw-r--r-- | dmake/dbug/dbug/dbug.c | 39 | ||||
-rw-r--r-- | dmake/dbug/malloc/testmem.c | 28 | ||||
-rw-r--r-- | dmake/mac/environ.c | 85 | ||||
-rw-r--r-- | dmake/rulparse.c | 6 | ||||
-rw-r--r-- | dmake/win95/dchdir.c | 3 |
5 files changed, 1 insertions, 160 deletions
diff --git a/dmake/dbug/dbug/dbug.c b/dmake/dbug/dbug/dbug.c index e63a4750ed5b..c212161f6cac 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 46fba912f8c0..7da5e8ced89b 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 b9bd6d014da9..1aa7d29b4f73 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 af7915fb129b..471c83577d18 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 dab1d7163ede..6a77d45b69fe 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" |