Fixed nulldup issues: Jira # NCF-94

This commit is contained in:
Dennis Heimbigner 2011-07-14 22:43:43 +00:00
parent 4f30d3694c
commit a7fdbb176d
7 changed files with 6 additions and 44 deletions

2
cf
View File

@ -14,7 +14,7 @@ DAP=1
#cmds="all"
#cmds="all check"
#cmds="all dist"
#cmds="all distcheck"
cmds="all distcheck"
PREFIX="/tmp/install/${HOST}"
stddir="/share/ed/local/${HOST}"

View File

@ -29,6 +29,9 @@ extern char* strdup(const char*);
#ifndef nulllen
#define nulllen(s) ((s)==NULL?0:strlen(s))
#endif
#ifndef nullfree
#define nullfree(s) {if((s)!=NULL) {free(s);} else {}}
#endif
#ifndef HAVE_UCHAR
typedef unsigned char uchar;

View File

@ -9,13 +9,6 @@
#undef DEBUG
#ifndef nulldup
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
#endif
#ifndef nullfree
#define nullfree(s) if((s)!=NULL) {free(s);} else {}
#endif
static void ceallnodesr(CCEnode* node, NClist* allnodes, CEsort which);

View File

@ -24,13 +24,6 @@
#define DEBUG
#ifndef nulldup
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
#endif
#ifndef nullfree
#define nullfree(s) {if((s)!=NULL) {free(s);} else {}}
#endif
static char* opstrings[] = OPSTRINGS ;
static int mergeprojection(DCEprojection* dst, DCEprojection* src);

View File

@ -20,13 +20,6 @@
#include "dceconstraints.h"
#include "dceparselex.h"
#ifndef nulldup
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
#endif
#ifndef nullfree
#define nullfree(s) if((s)!=NULL) {free(s);} else {}
#endif
static Object collectlist(Object list0, Object decl);
void

View File

@ -27,22 +27,6 @@
#define NILLEN(s) ((s)==NULL?0:strlen(s))
#endif
#ifndef nulldup
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
#endif
#ifndef HAVE_STRDUP
static char* nulldup(char* s)
{
char* dup = NULL;
if(s != NULL) {
dup = (char*)malloc(strlen(s)+1);
if(dup != NULL)
strcpy(dup,s);
}
return dup;
}
#endif
static char* legalprotocols[] = {
"file:",

View File

@ -10,7 +10,9 @@
#ifndef NCGEN_INCLUDES_H
#define NCGEN_INCLUDES_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <stdio.h>
@ -46,12 +48,6 @@
#include "util.h"
#include "debug.h"
#ifdef HAVE_STRDUP
#define nulldup(s) ((s)==NULL?NULL:strdup(s))
#else
extern char* nulldup(const char*);
#endif
extern int specialconstants;
#endif /* NCGEN_INCLUDES_H */