Subject: Bug#4058: /etc/papersize doesn't allow spaces

From: [email-masked] (Erick Branderhorst)
Date: Tue, 6 Aug 1996 15:26:25 +0100

Package: libpaper, gs
Version: 0.2-1, 3.53-4

Oef what do I hate these errors. The "<" char indicates the EOL char.

# cat /etc/papersize
A4 <
# gs -h
Warning: unknown papersize in /etc/papersize
Aladdin Ghostscript 3.53 (1996-1-10)
[deleted]

# cat /etc/papersize
A4<
# gs -h
Aladdin Ghostscript 3.53 (1996-1-10)
[deleted]

Only one tiny little ugly space f*cked up printing on my system.  Please 
correct this ASAP.

Erick

---

From: [email-masked] (joost witteveen)
Date: Tue, 6 Aug 1996 18:02:01 +0200 (MET DST)

> Only one tiny little ugly space f*cked up printing on my system.  Please 

ASAP?
#time echo "A4" > /etc/papersize
0.01user 0.00system 0:00.06elapsed 14%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (65major+17minor)pagefaults 0swaps

There you go, in 0.06 second. If that isn't fast, then what is?

Oh, BTW, this has nothing to do with libpaper (I don't know why you
think it does, gs doesn't depend on libpaper, and has been reading
/etc/papersize before the existance of libpaper.)

I do wonder if libpaper does a better job, and I do wonder if
gs really should read "A4 ". Some people were really glad I
added a wrapper to allow gs to read /etc/papersize. Some are
angry it didn't read "A4 ". Well, you never please them all!

-- 
joost witteveen
            [email-masked]
          [email-masked]
--
Use Debian/GNU Linux!

---

From: Yves Arrouye <[email-masked]>
Date: Tue, 6 Aug 1996 23:35:33 +0200

> I do wonder if libpaper does a better job,

Yes it does ;-) That's its big advantage: centralize such bugs in one
place so that we're sure all packages get fixed at once (who said I wanted
to share features too? ;-))

 > and I do wonder if gs really should read "A4 ". Some people were really
 > glad I added a wrapper to allow gs to read /etc/papersize. Some are

Can you try my gsfrontend.c in libpaper 0.3? It would be nice if you
used it for these reasons:

  - people will benefit from new paper sizes immediately;

  - I think if something else than me provides a working package using
    libpaper, other package maintainers will start adopting it;

  - I won't have to overwrite your gs with my wrapper each time you
    make a new package ;-).

If you use my wrapper (please, please...), I suggest installing the real
gs as 'ghostscript' (a meaningfull name, no?) and the wrapper as 'gs'
of course. Apparently people were confused by your gs-papersize being
the gs that does not handle papersize despite its name.

Yves.

P.S.: I run this wrapper for some weeks now without problems.

---

From: Yves Arrouye <[email-masked]>
Date: Tue, 6 Aug 1996 22:23:40 +0200

> Aladdin Ghostscript 3.53 (1996-1-10)

What is the gs you use? Is it the shell script included with libpaper 0.2
or is it the gs from the gs package, which in turn calls gs-papersize (or
whatever if the name changed)? I think it may be the later but don't have
libpaper 0.2 handy (Joost, sorry if it's my fault...). Please tell me if
the gs you use depends on libpaper.

In any case, with the gs frontend included with libpaper 0.3
(in /usr/doc/examples/libpaper/gsfrontend.c), I have no problems:

marin21# cat /etc/papersize | sed 's/\(.*\)/>\1</'
>A4 <
marin22# gs -sDEVICE=bjc600
Aladdin Ghostscript 4.01 (1996-7-10)
Copyright (C) 1996 Aladdin Enterprises, Menlo Park, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>currentpagedevice /PageSize get ==
[595.0 842.0]
GS>quit
marin23# 

If you want to use this frontend with the gs in 3.53, you must either
compile it as in

	gcc -O2 -DGS="gs-papersize" -o gs gsfrontend.c

or have the GS environment variable set to gs-papersize because the
default is ghostscript.

So I'd like to close this bug report for libpaper (either it's not
its fault or the latest version has no problem).

Because the bug report number is shared between gs and libpaper, is
it okay to close it for me?

Yves.

---

From: [email-masked] (joost witteveen)
Date: Wed, 7 Aug 1996 09:36:40 +0200 (MET DST)

>   - people will benefit from new paper sizes immediately;

That's not true, the gs wrapper I have reads _all_ papersizes
gs understands. (it gets them at compile time from ps_init.ps or something)

> the gs that does not handle papersize despite its name.

So, that's not the case any more (the real gs is gs.real, the wrapper
is gs).

What is causing me not to upgrade gs at the moment is this SVGA stuff:
someone (svga maintainer) wanted a patch in that would make a
setuid root gs "safe", but I'm still having problems with this.