Back to index

cell-binutils  2.17cvs20070401
strdup.c File Reference
#include <ansidecl.h>
#include <stddef.h>

Go to the source code of this file.


size_t strlen (const char *)
PTR malloc (size_t)
PTR memcpy (PTR, const PTR, size_t)
char * strdup (const char *s)

Function Documentation

PTR malloc ( size_t  )
PTR memcpy ( PTR  ,
const PTR  ,

Definition at line 21 of file memcpy.c.

    bcopy(in, out, length);
    return out;
char* strdup ( const char *  s)

Definition at line 20 of file strdup.c.

  size_t len = strlen (s) + 1;
  char *result = (char*) malloc (len);
  if (result == (char*) 0)
    return (char*) 0;
  return (char*) memcpy (result, s, len);

Here is the call graph for this function:

Here is the caller graph for this function:

size_t strlen ( const char *  )