home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!umn.edu!csus.edu!netcom.com!netcomsv!dms!lipson
- From: lipson@dms.agames.com (Pete Lipson)
- Subject: Re: definition of strNcpy
- Message-ID: <1992Dec18.180358.24428@dms.agames.com>
- Organization: Atari Games Corporation
- X-Newsreader: TIN [version 1.1 PL6]
- References: <1992Dec18.015228.6094@dms.agames.com>
- Date: Fri, 18 Dec 1992 18:03:58 GMT
- Lines: 26
-
- Pete Lipson (lipson@dms.agames.com) wrote:
- : i was just badly bitten by my interpretation of how strncpy works.
- ... of course i meant strnCAT ^^^
-
- : The MAN page for it IMPLIES that it works this way; is the standard this
- : ambiguous too?
- :
- : if you say: strnCAT(dst,"abcdef",4)
- :
- : does the standard really say you get five characters appended to the
- : dst (the chars 'a' 'b' 'c' 'd' AND the '\0') ???
- : the man-page says it moves AT MOST the count (4 in this case) characters
- : but it ALSO says it returns a pointer to a NULL-TERMINATED result.
- :
- : I would have assumed in that case that you would have to move at most
- : 3 non-null characters!
- : --
- : /V\
- : -/@-*\- Peter Lipson <-- lipson@agames.com or netcom!dms!lipson
- : \_o_/ Milpitas, CA <-- Atari Games
- : U
- --
- /V\
- -/@-*\- Peter Lipson <-- lipson@agames.com or netcom!dms!lipson
- \_o_/ Milpitas, CA <-- Atari Games
- U
-