Xref: utzoo comp.sources.wanted:15304 alt.sources.wanted:931 Path: utzoo!utgpu!cs.utexas.edu!wuarchive!udel!sbcs!eeserv1.ic.sunysb.edu!cbrown From: cbrown@eeserv1.ic.sunysb.edu (Charles T Brown) Newsgroups: comp.sources.wanted,alt.sources.wanted Subject: Re: What is strdup() supposed to do? Does anyone have a copy? Message-ID: <1991Feb17.045913.17126@sbcs.sunysb.edu> Date: 17 Feb 91 04:59:13 GMT References: <1991Feb14.050716.9501@shibaya.lonestar.org> Sender: usenet@sbcs.sunysb.edu (Usenet poster) Organization: State University of New York at Stony Brook Lines: 40 In article <1991Feb14.050716.9501@shibaya.lonestar.org> afc@shibaya.lonestar.org (Augustine Cano) writes: >While attempting to compile the recently posted procmail package, I could >not fine strdup() in any library, on any of the machines I have access to. > >If anybody has a copy they can send, I'd really appreciate it. Failing >that, a man page or description would certainly help. > >Thanks. Well, having learned C with Microsoft C, I looked it up. Basically: char * strdup (s) char * s; { char * rets; rets=malloc (sizeof (char) * strlen (s)); strcpy (rets, s); return rets; } In other words, it just duplicates the string. > >-- >Augustine Cano INTERNET: afc@shibaya.lonestar.org > UUCP: ...!{ernest,egsner}!shibaya!afc --Titus -- "Never put off until tomorrow, that which can be done the day after tomorrow" -- C. Titus Brown, anonymous student, brown@max.physics.sunysb.edu UNIX is good, you say? Which UNIX, say I!