Package: apcalc
Version: 2.12.5.0-1
Severity: normal

Hello and thanks for maintaining my favorite calculator in Debian!

I have recently noticed a really annoying regression.
Please consider the following minimal script:

  $ cat calc_script.cal 
  #!/usr/bin/calc -q -f

  n = eval(prompt("Enter a number: ")) ;
  printf("%r\n", n+1) ;

After setting the appropriate execution permissions:

  $ chmod u+x calc_script.cal

I try to run it with

  $ ./calc_script.cal 
  Enter a number: Error 10141

but I have no chance to enter the input and the script immediately
exits without printing the incremented number.

I remember that this used to work correctly a few years ago (I think
it was with apcalc/2.12.3.3-1), but now it no longer does.
That's why I say this is a regression.

Also, please note that the same commands work fine, when issued on
the interactive prompt:

  $ calc
  C-style arbitrary precision calculator (version 2.12.5.0)
  Calc is open software. For license details type:  help copyright
  [Type "exit" to exit, or "help" for help.]

  ; n = eval(prompt("Enter a number: ")) ;
  Enter a number: 2.5
  ; printf("%r\n", n+1) ;
  7/2
  ; 


Please investigate and fix this bug and/or forward my bug report
upstream.
In the meanwhile, a suggestion for a workaround would be highly
appreciated!

Thanks for your time.
Bye.


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.1.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages apcalc depends on:
ii  apcalc-common  2.12.5.0-1
ii  libc6          2.19-19
ii  libreadline6   6.3-8+b3

apcalc recommends no packages.

apcalc suggests no packages.

-- debconf-show failed

Reply via email to