]> git.draconx.ca Git - cdecl99.git/commit
cdecl99: Don't check blank lines if no history support.
authorNick Bowler <nbowler@draconx.ca>
Wed, 5 Jul 2023 01:27:47 +0000 (21:27 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 5 Jul 2023 01:27:47 +0000 (21:27 -0400)
commit4251b4bd0087752ceddbf95a6a8c928ab2207844
tree015608a5e13afce38a6e678b7fc631cc346f795a
parent247d234f2e263700e0a7ce7f6c9219d010c182ca
cdecl99: Don't check blank lines if no history support.

Move the whole "if not blank, then add history" logic under the #ifdef,
so it can be eliminated completely if add_history is not available at
compile time.

This probably makes no major difference on GNU/Linux, since GCC knows
that strspn has no side effects and can drop the call as dead code, but
this may help with less sophisticated toolchains.
src/cdecl99.c
src/cdecl99.h