*BSD News Article 31754


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!agate!library.ucla.edu!csulb.edu!csus.edu!netcom.com!jconklin
From: jconklin@netcom.com (J.T. Conklin)
Subject: Re: Making the BSD spooler even more POSIX ...
Message-ID: <jconklinCrKp58.n18@netcom.com>
Organization: Winning Strategies, Inc.
References: <rcpt.771860340@rwa.urc.tue.nl> <rcpt.771884870@rwa.urc.tue.nl>
Date: Sat, 18 Jun 1994 03:17:32 GMT
Lines: 14

>>In the lpd/printjob.c program there is a very funny line:
>>   (void) sprintf(buf, "%c%qd %s\n", type, stb.st_size, file);
>>                          ^^^                      hidden BSD feature??
>
>>I wonder how this can work on a BSD system?
>
>I have traced the `%qd' as a typo introduced somewhere between bsd-net-2
>and NetBSD-current (of today).

Not a typo, but a BSD extension.  The `q' printf qualifier indicates 
that stb.st_size is a quad (64 bit) integer.  I understand that some
other UN*X systems use `%lld' and `long long' for the same thing.

	--jtc