/**************************************************************************** * Simplified Wrapper and Interface Generator (SWIG) * * Author : David Beazley * * Department of Computer Science * University of Chicago * 1100 E 58th Street * Chicago, IL 60637 * beazley@cs.uchicago.edu * * Please read the file LICENSE for the copyright and terms by which SWIG * can be used and distributed. ****************************************************************************/ static char cvsroot[] = "$Header$"; #include "swigcore.h" /* ----------------------------------------------------------------------------- * $Header$ * * misc.c * ----------------------------------------------------------------------------- */ char *copy_string(const char *s) { char *c = 0; if (s) { c = (char *) malloc(strlen(s)+1); strcpy(c,s); } return c; }