Small bug in 'Custom' paper size at foo2zjs-wrapper
Posted by: MaurĂ­cio CA ()
Date: July 28, 2011 06:50PM

Script foo2zjs-wrapper contains, twice, these lines:

  XDIM=`dc -e "$XDIM 1200* 72/p"`
  YDIM=`dc -e "$YDIM 600* 72/p"`

That '-e' option seems not to exist in my dc man page, and
it seems to try to open its argument as a file (i.e., "dc -e bla"
says "can't open file bla").

Just changing these lines to lines below solves the problem,
and custom size paper printing (with -p Custom=XxY) works well.

  XDIM=`echo "$XDIM 1200* 72/p" | dc`
  YDIM=`echo "$YDIM 600* 72/p" | dc`

Re: Small bug in 'Custom' paper size at foo2zjs-wrapper
Posted by: rickrich ()
Date: July 28, 2011 07:18PM

dc(1)                                                                    dc(1)

NAME
       dc - an arbitrary precision calculator

SYNOPSIS
       dc [-V] [--version] [-h] [--help]
          [-e scriptexpression] [--expression=scriptexpression]
          [-f scriptfile] [--file=scriptfile]
          [file ...]

...snip...

BUGS
       Email bug reports to bug-dc@gnu.org.

GNU Project                       2006-06-11                             dc(1)



Edited 2 time(s). Last edit at 07/29/2011 02:01AM by rickrich.

Re: Small bug in 'Custom' paper size at foo2zjs-wrapper
Posted by: MaurĂ­cio CA ()
Date: July 29, 2011 12:49PM

Sorry, I had a non-GNU version of dc in my computer.

You could use bc instead, which is defined by posix, but relying on gnu
is okay, I think.

  XDIM=$(echo "$XDIM * 1200 / 72" | bc)

Re: Small bug in 'Custom' paper size at foo2zjs-wrapper
Posted by: rickrich ()
Date: July 29, 2011 01:20PM

Use gnu dc, NOT some knock off app.

Re: Small bug in 'Custom' paper size at foo2zjs-wrapper
Posted by: Poemandass ()
Date: June 06, 2012 03:52AM

You could use bc instead, which is defined by posix, but relying on gnu

ergo baby canada ergo baby carrier ergo baby carrier canada

Sorry, only registered users may post in this forum.
This forum powered by Phorum.