/[ascend]/trunk/base/generic/utilities/ascMalloc.c
ViewVC logotype

Diff of /trunk/base/generic/utilities/ascMalloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 15 by aw0a, Sat Nov 13 16:45:56 2004 UTC revision 16 by ben.allan, Thu Nov 25 22:52:42 2004 UTC
# Line 46  Line 46 
46  static CONST char AscendMemoryAllocRCSid[]="$Id: ascMalloc.c,v 1.1 1997/07/18 11:44:49 mthomas Exp $";  static CONST char AscendMemoryAllocRCSid[]="$Id: ascMalloc.c,v 1.1 1997/07/18 11:44:49 mthomas Exp $";
47  #endif  #endif
48    
49    char *ascstrdup(char *s) {
50        char *result;
51        if (!s) { return 0; }
52        result = (char *)malloc(strlen(s) + 1);
53        strcpy(result, s);
54        return result;
55    }
56    
57  char *asc_memcpy(char *to, char *from, unsigned size)  char *asc_memcpy(char *to, char *from, unsigned size)
58  {  {
59  /* We really should be moving stuff a long at a time, but that mean  /* We really should be moving stuff a long at a time, but that mean

Legend:
Removed from v.15  
changed lines
  Added in v.16

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22