Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3a9bb55684
Fetching contributors…

Cannot retrieve contributors at this time

file 61 lines (51 sloc) 1.115 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
/* need.c */
/* Copyright 1995 by Steve Kirkendall */

char id_need[] = "$Id: need.c,v 2.3 1998/03/09 22:34:43 steve Exp $";

#include "elvis.h"


#ifdef NEED_STRDUP
# if USE_PROTOTYPES
char *strdup(const char *str)
{
# else /* don't USE_PROTOTYPES */
char *strdup(str)
char *str;
{
# endif /* don't USE_PROTOTYPES */

char *ret;

ret = (char *)safealloc(strlen(str) + 1, sizeof(char));
strcpy(ret, str);
return ret;
}
#endif /* NEED_STRDUP */

#ifdef NEED_MEMMOVE
# if USE_PROTOTYPES
void *memmove(void *dest, const void *src, size_t size)
# else /* don't USE_PROTOTYPES */
void *memmove(dest, src, size)
void *dest;
void *src;
size_t size;
# endif /* don't USE_PROTOTYPES */
{
register char *d, *s;

d = (char *)dest;
s = (char *)src;
if (d <= s)
{
for (; size > 0; size--)
*d++ = *s++;
}
else
{
for (d += size, s += size; size > 0; size--)
*--d = *--s;
}
return dest;
}
#endif

#ifdef NEED_XRMCOMBINEFILEDATABASE
/* The XrmCombineFileDatabase() function is defined in guix11/xmisc.c */
#endif

#ifdef NEED_INET_ATON
/* The inet_aton() function is defined in osunix/osnet.c */
#endif
Something went wrong with that request. Please try again.