🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #1864

Re: Coding Standards are ignorant

#1864
From: Stan Ryckman
Date: Sun, 17 Mar 1996 01:32
28 lines
1359 bytes
(Added comp.std.c; those folks may skip to my question at the end)

In article <MIB.96Mar16174948@gnu.ai.mit.edu>,
Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> wrote:

[snip]

[re Posix.2]
>You can't use printf to print any manifest integer type of unknown
>size, except for size_t.  (And that one only because ANSI went and
>added a special format code for size_t.)

Can't you safely do this with casting to the (possibly unsigned) long
type?  e.g.,
	pid_t whatever;
	...
	printf( "%lu\n", (unsigned long) whatever);
A pain, but hardly a "can't".

Oh, and what's that special ANSI format code for size_t?  I can't find
it in 4.9.6.1; was it added after printing or am I just blind?

Cheers,
Stan.
--
Stan Ryckman  (stanr@tiac.net)
  (Apologies for non-responses or late responses to some posts;
  .newsrc was trashed and I'm trying to get it back to where it was.)
Technical Details
Message-ID: <4ifq40$i87@sundog.tiac.net>
Path: arc1-ca.pugleaf.net!sundog.tiac.net!stanr
References: <4gum82$14v4@info4.rus.uni-stuttgart.de> <MIB.96Mar15170902@gnu.ai.mit.edu> <wyraut5fqq.fsf@dns.bluesky.net> <MIB.96Mar16174948@gnu.ai.mit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sundog.tiac.net!stanr
From: stanr@tiac.net (Stan Ryckman)
Newsgroups: gnu.misc.discuss,comp.std.c
Subject: Re: Coding Standards are ignorant
Date: 17 Mar 1996 01:32:48 GMT
Organization: Amber & Sneakers Fan Club
Message-ID: <4ifq40$i87@sundog.tiac.net>
References: <4gum82$14v4@info4.rus.uni-stuttgart.de> <MIB.96Mar15170902@gnu.ai.mit.edu> <wyraut5fqq.fsf@dns.bluesky.net> <MIB.96Mar16174948@gnu.ai.mit.edu>
NNTP-Posting-Host: sunspot.tiac.net