readline81-001 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. READLINE PATCH REPORT
  2. =====================
  3. Readline-Release: 8.1
  4. Patch-ID: readline81-001
  5. Bug-Reported-by: Tom Tromey <tom@tromey.com>
  6. Bug-Reference-ID: <875z3u9fd0.fsf@tromey.com>
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2021-01/msg00009.html
  8. Bug-Description:
  9. The code to check readline versions in an inputrc file had the sense of the
  10. comparisons reversed.
  11. Patch (apply with `patch -p0'):
  12. *** ../readline-8.1-patched/bind.c 2020-10-26 10:03:14.000000000 -0400
  13. --- bind.c 2021-01-18 16:38:48.000000000 -0500
  14. ***************
  15. *** 1235,1239 ****
  16. else if (_rl_strnicmp (args, "version", 7) == 0)
  17. {
  18. ! int rlversion, versionarg, op, previ, major, minor;
  19. _rl_parsing_conditionalized_out = 1;
  20. --- 1235,1239 ----
  21. else if (_rl_strnicmp (args, "version", 7) == 0)
  22. {
  23. ! int rlversion, versionarg, op, previ, major, minor, opresult;
  24. _rl_parsing_conditionalized_out = 1;
  25. ***************
  26. *** 1295,1316 ****
  27. {
  28. case OP_EQ:
  29. ! _rl_parsing_conditionalized_out = rlversion == versionarg;
  30. break;
  31. case OP_NE:
  32. ! _rl_parsing_conditionalized_out = rlversion != versionarg;
  33. break;
  34. case OP_GT:
  35. ! _rl_parsing_conditionalized_out = rlversion > versionarg;
  36. break;
  37. case OP_GE:
  38. ! _rl_parsing_conditionalized_out = rlversion >= versionarg;
  39. break;
  40. case OP_LT:
  41. ! _rl_parsing_conditionalized_out = rlversion < versionarg;
  42. break;
  43. case OP_LE:
  44. ! _rl_parsing_conditionalized_out = rlversion <= versionarg;
  45. break;
  46. }
  47. }
  48. /* Check to see if the first word in ARGS is the same as the
  49. --- 1295,1317 ----
  50. {
  51. case OP_EQ:
  52. ! opresult = rlversion == versionarg;
  53. break;
  54. case OP_NE:
  55. ! opresult = rlversion != versionarg;
  56. break;
  57. case OP_GT:
  58. ! opresult = rlversion > versionarg;
  59. break;
  60. case OP_GE:
  61. ! opresult = rlversion >= versionarg;
  62. break;
  63. case OP_LT:
  64. ! opresult = rlversion < versionarg;
  65. break;
  66. case OP_LE:
  67. ! opresult = rlversion <= versionarg;
  68. break;
  69. }
  70. + _rl_parsing_conditionalized_out = 1 - opresult;
  71. }
  72. /* Check to see if the first word in ARGS is the same as the
  73. *** ../readline-8.1/patchlevel 2013-11-15 08:11:11.000000000 -0500
  74. --- patchlevel 2014-03-21 08:28:40.000000000 -0400
  75. ***************
  76. *** 1,3 ****
  77. # Do not edit -- exists only for use by patch
  78. ! 0
  79. --- 1,3 ----
  80. # Do not edit -- exists only for use by patch
  81. ! 1