Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!apple!uokmax!occrsh!S5000!gh From: gh@S5000.UUCP (Sys Admin) Newsgroups: comp.lang.c Subject: Re: Memory Fault Keywords: Summary -------- mission accomplished Message-ID: <192@S5000.UUCP> Date: 25 Jul 90 22:49:29 GMT Organization: The Quest Glen Lexington, Oklahoma Lines: 28 Thanks to all who responded here's the code that worked My system is a AT&T 3b1 System V 3.51m #include "simped.h" char *strdup(string) char *string; { /*static char *buffer;*/ char *buffer, *malloc(); int stringinx; if ((buffer = (char *) malloc(strlen(string) + 1)) == NULL) { fprintf(stderr, "malloc: in strdup, error\n"); exit(2); } return strcpy(buffer, string); } -- _____________________________________Glen_______________________________________ ______________________________Lexington__Oklahoma_______________________________ ______________________{uunet uunet.uu.net}!uokmax!S5000!gh______________________