Back to index

courier  0.68.2
Functions
strdup.c File Reference
#include "config.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

char * strdup (const char *p)

Function Documentation

char* strdup ( const char *  p)

Definition at line 13 of file strdup.c.

{
char *s;

       if ((s=malloc(strlen(p)+1)) != 0)  strcpy(s, p);
       return (s);
}