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
|
/**************************************************************************
* LPRng IFHP Filter
* Copyright 1994-1997 Patrick Powell, San Diego, CA <papowell@sdsu.edu>
*
* Based on the CTI printer filters.
* See COPYRIGHT for details.
*
* $Id: strdup.c,v 2.1 1997/01/05 18:41:46 papowell Exp $
*/
#include "portable.h"
#include "common.h"
#include "hp4.h"
char *
strdup(const char *s)
{
char *copy;
copy = (char *)malloc(strlen(s) + 1);
if (copy != NULL) {
strcpy(copy, s);
}
return copy;
}
/**************************************************************************
* LPRng IFHP Filter
* Copyright 1994-1997 Patrick Powell, San Diego, CA <papowell@sdsu.edu>
*
* Based on the CTI printer filters.
* See COPYRIGHT for details.
*
* $Id: strdup.c,v 2.1 1997/01/05 18:41:46 papowell Exp $
*/
#include "portable.h"
#include "common.h"
#include "hp4.h"
char *
strdup(const char *s)
{
char *copy;
copy = (char *)malloc(strlen(s) + 1);
if (copy != NULL) {
strcpy(copy, s);
}
return copy;
}
|