🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #13386

Re: String Processing Instruction

#13386
From: meissner
Date: Thu, 02 Apr 1987 16:11
14 lines
1412 bytes
In article <6448@watmath.UUCP> rbutterworth@watmath.UUCP writes:
> Wouldn't it have been nice if strcpy(), strcat(), sprintf(), etc.
> had been designed to return a pointer to the END of the string,
> (or a count of the number of characters in the string)?

The System V.3 (and ANSI) *{scanf printf} routines have a a format specifier
%n which stores the number of bytes {read, written} so far into the int
pointed to by the current argument.  Also in System V.xx and ANSI, sprintf
returns the total number of bytes written (not the pointer to the string
like 4.2 BSD does).
-- 
	Michael Meissner, Data General	Uucp: ...mcnc!rti-sel!dg_rtp!meissner

It is 11pm, do you know what your sendmail and uucico are doing?
Technical Details
Message-ID: <1547@dg_rtp.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mcnc!rti-sel!dg_rtp!meissner
References: <15292@amdcad.UUCP> <978@ames.UUCP> <15304@amdcad.UUCP> <15317@amdcad.UUCP> <6448@watmath.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mcnc!rti-sel!dg_rtp!meissner
From: meissner@dg_rtp.UUCP
Newsgroups: comp.arch,comp.lang.c
Subject: Re: String Processing Instruction
Message-ID: <1547@dg_rtp.UUCP>
Date: Thu, 2-Apr-87 11:11:58 EST
Article-I.D.: dg_rtp.1547
Posted: Thu Apr  2 11:11:58 1987
Date-Received: Sat, 4-Apr-87 16:35:52 EST
References: <15292@amdcad.UUCP> <978@ames.UUCP> <15304@amdcad.UUCP> <15317@amdcad.UUCP> <6448@watmath.UUCP>
Reply-To: meissner@dg_rtp.UUCP (Michael Meissner)
Distribution: na
Organization: Data General (Languages @ Research Triangle Park, NC.)
Lines: 14