patch-vi_c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. $OpenBSD: patch-vi_c,v 1.2 2017/05/12 20:27:25 naddy Exp $
  2. Index: vi.c
  3. --- vi.c.orig
  4. +++ vi.c
  5. @@ -13,10 +13,13 @@
  6. #endif
  7. #endif
  8. +#include <sys/wait.h>
  9. #include <signal.h>
  10. #include <curses.h>
  11. #include <ctype.h>
  12. +#include <unistd.h>
  13. #include <stdlib.h>
  14. +#include <stdbool.h>
  15. #include "sc.h"
  16. #if defined(REGCOMP)
  17. @@ -40,10 +43,6 @@ void gotobottom();
  18. #define istext(a) (isalnum(a) || ((a) == '_'))
  19. -#define bool int
  20. -#define true 1
  21. -#define false 0
  22. -
  23. static void append_line();
  24. static void back_hist();
  25. static int back_line(int arg);
  26. @@ -667,7 +666,7 @@ dotab()
  27. static struct range *nextmatch;
  28. int len;
  29. - if (linelim > 0 && isalnum(line[linelim-1]) || line[linelim-1] == '_' ||
  30. + if ((linelim > 0 && isalnum(line[linelim-1])) || line[linelim-1] == '_' ||
  31. (completethis && line[linelim-1] == ' ')) {
  32. if (!completethis) {
  33. for (completethis = line + linelim - 1; isalnum(*completethis) ||
  34. @@ -1573,7 +1572,7 @@ search_again(bool reverse)
  35. #endif
  36. #ifdef REGCOMP
  37. - if ((last_search == NULL))
  38. + if (last_search == NULL)
  39. return;
  40. #else
  41. #ifndef RE_COMP