Path: utzoo!attcan!uunet!husc6!think!ames!amdahl!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.unix.wizards Subject: Re: #defines with variable # arguments Message-ID: <973@cresswell.quintus.UUCP> Date: 14 May 88 09:04:16 GMT References: <2855@phoenix.Princeton.EDU> Distribution: na Organization: Quintus Computer Systems, Mountain View, CA Lines: 11 In article <2855@phoenix.Princeton.EDU>, lgy@pupthy2.PRINCETON.EDU (Larry Yaffe) writes: > Does anyone know why the folks at Berkeley chose to have their > sprintf return its first argument, instead of the number of characters > printed? I can't think of any good reason for this choice, since it > throws away valuable information (the # of characters printed) which > is painful to reacquire. Berkeley left sprintf() as they found it; that's what it did in V7. There is an argument in favour of it: it makes it more like strcpy(). [Not that I think much of it, I've never found the return value of strcpy() useful.] What's so painful about calling strlen()?