But I have been wrong before and probably will be again....

In man 5 terminfo for the documentation for the "+-%*/" format specifiers
your documentation says these are all push(pop op pop).
This implies something like the following...
pop A,
pop B,
push (A op B)

which I believe to be wrong.  I say this because I am writing my own curses
library (not a replacement for ncurses) and my code for parsing the %/
specifier for example is as follows...
    n2 = fs_pop();
    n1 = fs_pop();

    (n1 != 0)
        ? fs_push(n1 / n2)
        : fs_push(0);

Which works in every terminal I use it in.   Reverse the order of the
operation and it does not work anywhere.  The same happens when I reverse
the order of operations with the other specifiers documented here..

Pop B
Pop A
Push(A op B)

works push (B op A) messes things up greatly


“When something can be read without effort,
great effort has gone into its writing.”

― Enrique Jardiel Poncela ―

Reply via email to