Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 26 lines (19 sloc) 0.449 kb
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
1 /* need.c */
2 /* Copyright 1995 by Steve Kirkendall */
3
4 char id_need[] = "$Id: need.c,v 2.1 1996/07/02 19:34:50 steve Exp $";
5
6 #include "elvis.h"
7
8
9 #ifdef NEED_STRDUP
10 # if USE_PROTOTYPES
11 char *strdup(const char *str)
12 {
13 # else /* don't USE_PROTOTYPES */
14 char *strdup(str)
15 char *str;
16 {
17 # endif /* don't USE_PROTOTYPES */
18
19 char *ret;
20
21 ret = (char *)safealloc(strlen(str) + 1, sizeof(char));
22 strcpy(ret, str);
23 return ret;
24 }
25 #endif /* NEED_STRDUP */
Something went wrong with that request. Please try again.