From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Fri, 30 Jun 2000 13:02:36 +0000 From: Boyd Roberts Message-ID: <8ji3qr$3q2$1@nnrp1.deja.com> Subject: [9fans] fd2path Topicbox-Message-UUID: cff2a1b6-eac8-11e9-9e20-41e7f4b1d025 I think fd2path's return value should be: -1 - error 0 - pathname returned >0 - pathname returned, missing n bytes In the last case you could loop on calling malloc until you got the whole thing. I think all static n byte buffer writing functions should act like this and all return values should be nul terminated. Can't be hard to do and it'd make life easier; a generic fd2path that uses a dynamically malloc'd chunk of memory that grows as needs be, returning NULL or a pointer to the (nul terminated) malloc'd area. -- Boyd Roberts boyd@psycho-basket-case.org ``I come over here to kill them cocksuckers, not work for 'em'' -- Moon Dog, _Pettibone's Law_, John Keene Sent via Deja.com http://www.deja.com/ Before you buy.