iraf icon indicating copy to clipboard operation
iraf copied to clipboard

Replace libreadline with libedit on all platforms

Open olebole opened this issue 1 year ago • 0 comments

Triggered by usngo/iraf/iraf-v218!1, this PR consistently uses libedit instead of readline on all platforms. While this does not cause a change for the end user, it has a few advantages:

  • libedit has a much more stable ABI; on Debian libedit2 is used since at least Debian Lenny (2009!). This makes it more probably to run the binary on a distribution it was not built for.
  • libedit has a permissive license (BSD), while readline is GPL,
  • removing the number of possible dependencies eases maintenance; it also cleans up the mkpkg file

libedit and readline are (for the functionality we need in IRAF) API compatible. We use libedit already since ~2018 for macOS; see iraf-community/iraf#57.

One visible difference is that libedit silently ignores non-ASCII characters, i.e. they cannot be inserted. Reason is that libedit is explicitly unicode aware, and the its "readline" interface removes all non-ASCII characters. As IRAF cannot handle Unicode properly anyway, this may be OK.

olebole avatar Feb 23 '24 20:02 olebole