Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker.mit.edu!bloom-picayune.mit.edu!news From: scs@adam.mit.edu (Steve Summit) Newsgroups: comp.unix.programmer Subject: Re: What does index() and rindex() do ?? Keywords: index rindex Message-ID: <1991Mar31.215415.5616@athena.mit.edu> Date: 31 Mar 91 21:54:15 GMT References: <375@bibsyst.UUCP> <1311@appli.se> Sender: news@athena.mit.edu (News system) Reply-To: scs@adam.mit.edu Organization: Thermal Technologies, Cambridge, MA Lines: 19 In article <1311@appli.se> niklas@appli.se (Niklas Hallqvist) writes: >Is there something like a porting guide for C-programs under Unix? >This guide would present the differences between all the main variants >of Unix. Specifically differences in library functions and ioctl commands >are interesting. Portable C Software, by Mark R. Horton, published in 1990 by Prentice Hall, ISBN 0-13-868050-7, has much of what you're looking for. I have a historical question: can someone tell me when and why strchr and strrchr were first introduced, replacing the V7 index and rindex? I presume it was in PWB or System III or something. (I'm also curious about the other "new" str routines such as strcspn, strpbrk, strspn, and strtok; I suspect they appeared at about the same time.) Please reply by mail. Steve Summit scs@adam.mit.edu