iraf-community / x11iraf

X11/GUI utilities and applications for IRAF (xgterm, ximtool, xtapemon)
https://iraf-community.github.io/x11iraf
21 stars 8 forks source link

Xgterm/ecl command history bug #29

Closed mcordiner closed 3 years ago

mcordiner commented 3 years ago

Hi all. I was able to get iraf and xgterm to compile on OSX 10.15 (Catalina) (yay) but something is not right with the command history in ecl. It works fine up until the point where I use epar, then after that, whenever I hit the up-arrow multiple times, each successive history item gets appended to the previous one on the line, which makes for a near-impossible history-browsing experience. Any ideas what's wrong?

olebole commented 3 years ago

I just tried it on the newest Catalina (10.15.6), but could not reproduce it. My steps were (to make it minimal):

  1. start xgterm
  2. in xgterm, start ecl
  3. in ecl, do imhead dev$pix
  4. and then epar imhead
  5. do :q to exit epar
  6. :arrow_up: gives epar imhead
  7. next :arrow_up: gives imhead dev$pix

exactly as expected, without any distortions. Can you verify this order, or show the one that reproducibly does not work for you?

The major difference between Linux and macOS here is that in Linux readline is used as command line editor in ecl, while on macOS libedit is used. There may be subtle differences in the use -- then it would be a problem with IRAF.

mcordiner commented 3 years ago

Thanks for testing. I am also on Catalina 10.15.6. I followed your above steps; step 6 works fine, but step 7 gives:

ecl> epar imhead dev$pix

Could some of our libraries be different? To be honest, I was surprised that the only additional library/header I needed for compiling x11iraf was f2c.h

olebole commented 3 years ago

f2c is not used in x11iraf, so I am wondering whether you took the right one? Can you please try the same test not on xgterm, but on the normal terminal? This should work as well as long as you don't do graphics. If it has the same problem there, it is probably an iraf/ecl problem.

mcordiner commented 3 years ago

I tried in a regular mac Terminal and the ecl command history works fine there.

On the f2c issue, running make in x11iraf-2.0-2020.06.15/ bailed out with:

t_wcspix.c:13:10: fatal error: 'f2c.h' file not found

Compilation proceeded apparently OK after installation of f2c. I just wonder if it skipped over some other errors/warnings due to other missing libraries, resulting in a faulty xgterm compilation.

olebole commented 3 years ago

Did you also run make install? If not, you should do a

tic xgterm/xgterm.terminfo

do ensure that all properties of xgterm are known to the system.

t_wcspix.c:13:10: fatal error: 'f2c.h' file not found

This may only come from IRAF itself (which converts *.x files to C files with f2c and then compiles them with the C compiler); however IRAF comes with f2c.h and should use that one automatically. This seems that an environment var is not correctly set up. It does however not matter, as long as you use ds9 instead of ximtool.

mcordiner commented 3 years ago

The tic command worked! Thanks so much for your help.

I had not run make install since I wanted to copy the executables myself - did not realize this crucial step was missing.

olebole commented 3 years ago

OK, so I am closing this.