On Wed, Sep 19, 2007 at 09:29:47PM -0700, Ben Pfaff wrote:
What's LC_PAPER? This is the first I've heard of it. I can't
find anything about it in the glibc manual or SUSv3. I'm happy
to support it, though, if you've got a spec or a description.
Hmm. It seems to be an undocumented feature, but it's there in
/usr/include/langinfo.h
Using the proglet below, I get the results:
[EMAIL PROTECTED]:~$ export LC_PAPER=en_AU
[EMAIL PROTECTED]:~$ ./a.out
W: 210; H: 297
[EMAIL PROTECTED]:~$ export LC_PAPER=en_US
[EMAIL PROTECTED]:~$ ./a.out
W: 216; H: 279
So it seems to be implemented in glibc at least.
#include <langinfo.h>
#include <stdio.h>
#include <locale.h>
int
main (int argc, char **argv)
{
int w, h;
setlocale (LC_PAPER, "");
w = (int) nl_langinfo(_NL_PAPER_WIDTH);
h = (int) nl_langinfo(_NL_PAPER_HEIGHT);
printf ("W: %d; H: %d\n", w, h);
return 0;
}
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature
_______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
