nvi-1.81.6-strlen-macro-renaming.patch 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. Created by: Karl Hakimian
  2. Added by: Jesus Rivero <neurogeek@gentoo.org>
  3. Added on: Feb 18, 2015
  4. diff -rupN nvi-1.81.6.orig/common/api.c nvi-1.81.6/common/api.c
  5. --- nvi-1.81.6.orig/common/api.c 2007-11-18 08:41:42.000000000 -0800
  6. +++ nvi-1.81.6/common/api.c 2015-02-17 11:04:50.199111784 -0800
  7. @@ -423,7 +423,7 @@ api_opts_get(SCR *sp, CHAR_T *name, char
  8. switch (op->type) {
  9. case OPT_0BOOL:
  10. case OPT_1BOOL:
  11. - MALLOC_RET(sp, *value, char *, STRLEN(op->name) + 2 + 1);
  12. + MALLOC_RET(sp, *value, char *, NVI_STRLEN(op->name) + 2 + 1);
  13. (void)sprintf(*value,
  14. "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name);
  15. if (boolvalue != NULL)
  16. diff -rupN nvi-1.81.6.orig/common/msg.c nvi-1.81.6/common/msg.c
  17. --- nvi-1.81.6.orig/common/msg.c 2007-11-18 08:41:42.000000000 -0800
  18. +++ nvi-1.81.6/common/msg.c 2015-02-17 11:04:50.203891722 -0800
  19. @@ -378,7 +378,7 @@ msgq_wstr(SCR *sp, mtype_t mtype, CHAR_T
  20. msgq(sp, mtype, fmt);
  21. return;
  22. }
  23. - INT2CHAR(sp, str, STRLEN(str) + 1, nstr, nlen);
  24. + INT2CHAR(sp, str, NVI_STRLEN(str) + 1, nstr, nlen);
  25. msgq_str(sp, mtype, nstr, fmt);
  26. }
  27. diff -rupN nvi-1.81.6.orig/common/multibyte.h nvi-1.81.6/common/multibyte.h
  28. --- nvi-1.81.6.orig/common/multibyte.h 2007-11-18 08:41:42.000000000 -0800
  29. +++ nvi-1.81.6/common/multibyte.h 2015-02-17 11:04:50.204262910 -0800
  30. @@ -12,7 +12,7 @@ typedef wchar_t CHAR_T;
  31. typedef u_int UCHAR_T;
  32. #define RCHAR_BIT 24
  33. -#define STRLEN wcslen
  34. +#define NVI_STRLEN wcslen
  35. #define STRTOL wcstol
  36. #define STRTOUL wcstoul
  37. #define SPRINTF swprintf
  38. @@ -31,7 +31,7 @@ typedef u_char CHAR_T;
  39. typedef u_char UCHAR_T;
  40. #define RCHAR_BIT CHAR_BIT
  41. -#define STRLEN strlen
  42. +#define NVI_STRLEN strlen
  43. #define STRTOL strtol
  44. #define STRTOUL strtoul
  45. #define SPRINTF snprintf
  46. diff -rupN nvi-1.81.6.orig/common/options.c nvi-1.81.6/common/options.c
  47. --- nvi-1.81.6.orig/common/options.c 2007-11-18 08:41:42.000000000 -0800
  48. +++ nvi-1.81.6/common/options.c 2015-02-17 11:04:50.195900457 -0800
  49. @@ -315,7 +315,7 @@ opts_init(SCR *sp, int *oargs)
  50. /* Set numeric and string default values. */
  51. #define OI(indx, str) { \
  52. - a.len = STRLEN(str); \
  53. + a.len = NVI_STRLEN(str); \
  54. if ((CHAR_T*)str != b2) /* GCC puts strings in text-space. */ \
  55. (void)MEMCPY(b2, str, a.len+1); \
  56. if (opts_set(sp, argv, NULL)) { \
  57. @@ -620,10 +620,10 @@ opts_set(SCR *sp, ARGS **argv, char *usa
  58. goto badnum;
  59. if ((nret =
  60. nget_uslong(sp, &value, sep, &endp, 10)) != NUM_OK) {
  61. - INT2CHAR(sp, name, STRLEN(name) + 1,
  62. + INT2CHAR(sp, name, NVI_STRLEN(name) + 1,
  63. np, nlen);
  64. p2 = msg_print(sp, np, &nf);
  65. - INT2CHAR(sp, sep, STRLEN(sep) + 1,
  66. + INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1,
  67. np, nlen);
  68. t2 = msg_print(sp, np, &nf2);
  69. switch (nret) {
  70. @@ -647,10 +647,10 @@ opts_set(SCR *sp, ARGS **argv, char *usa
  71. break;
  72. }
  73. if (*endp && !ISBLANK(*endp)) {
  74. -badnum: INT2CHAR(sp, name, STRLEN(name) + 1,
  75. +badnum: INT2CHAR(sp, name, NVI_STRLEN(name) + 1,
  76. np, nlen);
  77. p2 = msg_print(sp, np, &nf);
  78. - INT2CHAR(sp, sep, STRLEN(sep) + 1,
  79. + INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1,
  80. np, nlen);
  81. t2 = msg_print(sp, np, &nf2);
  82. msgq(sp, M_ERR,
  83. @@ -680,7 +680,7 @@ badnum: INT2CHAR(sp, name, STRLEN(nam
  84. break;
  85. /* Report to subsystems. */
  86. - INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen);
  87. + INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, np, nlen);
  88. if (op->func != NULL &&
  89. op->func(sp, spo, np, &value) ||
  90. ex_optchange(sp, offset, np, &value) ||
  91. @@ -712,7 +712,7 @@ badnum: INT2CHAR(sp, name, STRLEN(nam
  92. * Do nothing if the value is unchanged, the underlying
  93. * functions can be expensive.
  94. */
  95. - INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen);
  96. + INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, np, nlen);
  97. if (!F_ISSET(op, OPT_ALWAYS) &&
  98. O_STR(sp, offset) != NULL &&
  99. !strcmp(O_STR(sp, offset), np))
  100. @@ -879,7 +879,7 @@ opts_dump(SCR *sp, enum optdisp type)
  101. }
  102. F_CLR(&sp->opts[cnt], OPT_SELECTED);
  103. - curlen = STRLEN(op->name);
  104. + curlen = NVI_STRLEN(op->name);
  105. switch (op->type) {
  106. case OPT_0BOOL:
  107. case OPT_1BOOL:
  108. @@ -1049,7 +1049,7 @@ opts_search(CHAR_T *name)
  109. * Check to see if the name is the prefix of one (and only one)
  110. * option. If so, return the option.
  111. */
  112. - len = STRLEN(name);
  113. + len = NVI_STRLEN(name);
  114. for (found = NULL, op = optlist; op->name != NULL; ++op) {
  115. if (op->name[0] < name[0])
  116. continue;
  117. diff -rupN nvi-1.81.6.orig/dist/tags nvi-1.81.6/dist/tags
  118. --- nvi-1.81.6.orig/dist/tags 2007-11-18 08:43:55.000000000 -0800
  119. +++ nvi-1.81.6/dist/tags 2015-02-17 11:04:50.225314084 -0800
  120. @@ -1068,8 +1068,8 @@ SPRINTF ../common/multibyte.h 37;" d
  121. STANDARD_TAB ../common/key.h 213;" d
  122. STRCMP ../common/multibyte.h 19;" d
  123. STRCMP ../common/multibyte.h 38;" d
  124. -STRLEN ../common/multibyte.h 15;" d
  125. -STRLEN ../common/multibyte.h 34;" d
  126. +NVI_STRLEN ../common/multibyte.h 15;" d
  127. +NVI_STRLEN ../common/multibyte.h 34;" d
  128. STRPBRK ../common/multibyte.h 20;" d
  129. STRPBRK ../common/multibyte.h 39;" d
  130. STRSET ../common/multibyte.h 22;" d
  131. diff -rupN nvi-1.81.6.orig/ex/ex_argv.c nvi-1.81.6/ex/ex_argv.c
  132. --- nvi-1.81.6.orig/ex/ex_argv.c 2007-11-18 08:41:42.000000000 -0800
  133. +++ nvi-1.81.6/ex/ex_argv.c 2015-02-17 11:04:50.267171388 -0800
  134. @@ -217,7 +217,7 @@ argv_exp2(SCR *sp, EXCMD *excp, CHAR_T *
  135. *p = '\0';
  136. INT2CHAR(sp, bp + SHELLOFFSET,
  137. - STRLEN(bp + SHELLOFFSET) + 1, np, nlen);
  138. + NVI_STRLEN(bp + SHELLOFFSET) + 1, np, nlen);
  139. d = strdup(np);
  140. rval = argv_lexp(sp, excp, d);
  141. free (d);
  142. @@ -332,7 +332,7 @@ argv_fexp(SCR *sp, EXCMD *excp, CHAR_T *
  143. "115|No previous command to replace \"!\"");
  144. return (1);
  145. }
  146. - len += tlen = STRLEN(exp->lastbcomm);
  147. + len += tlen = NVI_STRLEN(exp->lastbcomm);
  148. off = p - bp;
  149. ADD_SPACE_RETW(sp, bp, blen, len);
  150. p = bp + off;
  151. @@ -683,7 +683,7 @@ err: if (ifp != NULL)
  152. * XXX
  153. * Assume that all shells have -c.
  154. */
  155. - INT2CHAR(sp, bp, STRLEN(bp)+1, np, nlen);
  156. + INT2CHAR(sp, bp, NVI_STRLEN(bp)+1, np, nlen);
  157. execl(sh_path, sh, "-c", np, (char *)NULL);
  158. msgq_str(sp, M_SYSERR, sh_path, "118|Error: execl: %s");
  159. _exit(127);
  160. diff -rupN nvi-1.81.6.orig/ex/ex_cscope.c nvi-1.81.6/ex/ex_cscope.c
  161. --- nvi-1.81.6.orig/ex/ex_cscope.c 2007-11-18 08:41:42.000000000 -0800
  162. +++ nvi-1.81.6/ex/ex_cscope.c 2015-02-17 11:04:50.261539058 -0800
  163. @@ -140,7 +140,7 @@ ex_cscope(SCR *sp, EXCMD *cmdp)
  164. for (; *p && isspace(*p); ++p);
  165. }
  166. - INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen);
  167. + INT2CHAR(sp, cmd, NVI_STRLEN(cmd) + 1, np, nlen);
  168. if ((ccp = lookup_ccmd(np)) == NULL) {
  169. usage: msgq(sp, M_ERR, "309|Use \"cscope help\" for help");
  170. return (1);
  171. @@ -214,7 +214,7 @@ cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T
  172. * >1 additional args: object, too many args.
  173. */
  174. cur_argc = cmdp->argc;
  175. - if (argv_exp2(sp, cmdp, dname, STRLEN(dname))) {
  176. + if (argv_exp2(sp, cmdp, dname, NVI_STRLEN(dname))) {
  177. return (1);
  178. }
  179. if (cmdp->argc == cur_argc) {
  180. @@ -228,7 +228,7 @@ cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T
  181. return (1);
  182. }
  183. - INT2CHAR(sp, dname, STRLEN(dname)+1, np, nlen);
  184. + INT2CHAR(sp, dname, NVI_STRLEN(dname)+1, np, nlen);
  185. /*
  186. * The user can specify a specific file (so they can have multiple
  187. @@ -471,7 +471,7 @@ cscope_find(SCR *sp, EXCMD *cmdp, CHAR_T
  188. }
  189. /* Create the cscope command. */
  190. - INT2CHAR(sp, pattern, STRLEN(pattern) + 1, np, nlen);
  191. + INT2CHAR(sp, pattern, NVI_STRLEN(pattern) + 1, np, nlen);
  192. np = strdup(np);
  193. if ((tqp = create_cs_cmd(sp, np, &search)) == NULL)
  194. goto err;
  195. @@ -801,7 +801,7 @@ cscope_help(SCR *sp, EXCMD *cmdp, CHAR_T
  196. char *np;
  197. size_t nlen;
  198. - INT2CHAR(sp, subcmd, STRLEN(subcmd) + 1, np, nlen);
  199. + INT2CHAR(sp, subcmd, NVI_STRLEN(subcmd) + 1, np, nlen);
  200. return (csc_help(sp, np));
  201. }
  202. @@ -842,7 +842,7 @@ cscope_kill(SCR *sp, EXCMD *cmdp, CHAR_T
  203. char *np;
  204. size_t nlen;
  205. - INT2CHAR(sp, cn, STRLEN(cn) + 1, np, nlen);
  206. + INT2CHAR(sp, cn, NVI_STRLEN(cn) + 1, np, nlen);
  207. return (terminate(sp, NULL, atoi(np)));
  208. }
  209. diff -rupN nvi-1.81.6.orig/ex/ex_filter.c nvi-1.81.6/ex/ex_filter.c
  210. --- nvi-1.81.6.orig/ex/ex_filter.c 2007-11-18 08:41:42.000000000 -0800
  211. +++ nvi-1.81.6/ex/ex_filter.c 2015-02-17 11:04:50.263257613 -0800
  212. @@ -138,7 +138,7 @@ err: if (input[0] != -1)
  213. else
  214. ++name;
  215. - INT2SYS(sp, cmd, STRLEN(cmd)+1, np, nlen);
  216. + INT2SYS(sp, cmd, NVI_STRLEN(cmd)+1, np, nlen);
  217. execl(O_STR(sp, O_SHELL), name, "-c", np, (char *)NULL);
  218. msgq_str(sp, M_SYSERR, O_STR(sp, O_SHELL), "execl: %s");
  219. _exit (127);
  220. @@ -283,7 +283,7 @@ err: if (input[0] != -1)
  221. * Ignore errors on vi file reads, to make reads prettier. It's
  222. * completely inconsistent, and historic practice.
  223. */
  224. -uwait: INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen);
  225. +uwait: INT2CHAR(sp, cmd, NVI_STRLEN(cmd) + 1, np, nlen);
  226. return (proc_wait(sp, (long)utility_pid, np,
  227. ftype == FILTER_READ && F_ISSET(sp, SC_VI) ? 1 : 0, 0) || rval);
  228. }
  229. diff -rupN nvi-1.81.6.orig/ex/ex_init.c nvi-1.81.6/ex/ex_init.c
  230. --- nvi-1.81.6.orig/ex/ex_init.c 2007-11-18 08:41:42.000000000 -0800
  231. +++ nvi-1.81.6/ex/ex_init.c 2015-02-17 11:04:50.279419412 -0800
  232. @@ -61,7 +61,7 @@ ex_screen_copy(SCR *orig, SCR *sp)
  233. if (oexp->lastbcomm != NULL &&
  234. (nexp->lastbcomm = v_wstrdup(sp, oexp->lastbcomm,
  235. - STRLEN(oexp->lastbcomm))) == NULL) {
  236. + NVI_STRLEN(oexp->lastbcomm))) == NULL) {
  237. msgq(sp, M_SYSERR, NULL);
  238. return(1);
  239. }
  240. diff -rupN nvi-1.81.6.orig/ex/ex_tag.c nvi-1.81.6/ex/ex_tag.c
  241. --- nvi-1.81.6.orig/ex/ex_tag.c 2007-11-18 08:41:42.000000000 -0800
  242. +++ nvi-1.81.6/ex/ex_tag.c 2015-02-17 11:04:50.275254557 -0800
  243. @@ -68,7 +68,7 @@ ex_tag_first(SCR *sp, CHAR_T *tagarg)
  244. /* Build an argument for the ex :tag command. */
  245. ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
  246. - argv_exp0(sp, &cmd, tagarg, STRLEN(tagarg));
  247. + argv_exp0(sp, &cmd, tagarg, NVI_STRLEN(tagarg));
  248. /*
  249. * XXX
  250. @@ -115,7 +115,7 @@ ex_tag_push(SCR *sp, EXCMD *cmdp)
  251. /* Taglength may limit the number of characters. */
  252. if ((tl =
  253. - O_VAL(sp, O_TAGLENGTH)) != 0 && STRLEN(exp->tag_last) > tl)
  254. + O_VAL(sp, O_TAGLENGTH)) != 0 && NVI_STRLEN(exp->tag_last) > tl)
  255. exp->tag_last[tl] = '\0';
  256. break;
  257. case 0:
  258. @@ -587,7 +587,7 @@ ex_tag_copy(SCR *orig, SCR *sp)
  259. /* Copy the last tag. */
  260. if (oexp->tag_last != NULL &&
  261. (nexp->tag_last = v_wstrdup(sp, oexp->tag_last,
  262. - STRLEN(oexp->tag_last))) == NULL) {
  263. + NVI_STRLEN(oexp->tag_last))) == NULL) {
  264. msgq(sp, M_SYSERR, NULL);
  265. return (1);
  266. }
  267. @@ -997,7 +997,7 @@ ctag_slist(SCR *sp, CHAR_T *tag)
  268. exp = EXP(sp);
  269. /* Allocate and initialize the tag queue structure. */
  270. - INT2CHAR(sp, tag, STRLEN(tag) + 1, np, nlen);
  271. + INT2CHAR(sp, tag, NVI_STRLEN(tag) + 1, np, nlen);
  272. len = nlen - 1;
  273. CALLOC_GOTO(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + len + 1);
  274. CIRCLEQ_INIT(&tqp->tagq);
  275. diff -rupN nvi-1.81.6.orig/ex/ex_util.c nvi-1.81.6/ex/ex_util.c
  276. --- nvi-1.81.6.orig/ex/ex_util.c 2007-11-18 08:41:42.000000000 -0800
  277. +++ nvi-1.81.6/ex/ex_util.c 2015-02-17 11:04:50.268378054 -0800
  278. @@ -153,7 +153,7 @@ ex_wemsg(SCR* sp, CHAR_T *p, exm_t which
  279. char *np;
  280. size_t nlen;
  281. - if (p) INT2CHAR(sp, p, STRLEN(p), np, nlen);
  282. + if (p) INT2CHAR(sp, p, NVI_STRLEN(p), np, nlen);
  283. else np = NULL;
  284. ex_emsg(sp, np, which);
  285. }
  286. diff -rupN nvi-1.81.6.orig/ex/ex_write.c nvi-1.81.6/ex/ex_write.c
  287. --- nvi-1.81.6.orig/ex/ex_write.c 2007-11-18 08:41:42.000000000 -0800
  288. +++ nvi-1.81.6/ex/ex_write.c 2015-02-17 11:04:50.277249383 -0800
  289. @@ -158,7 +158,7 @@ exwr(SCR *sp, EXCMD *cmdp, enum which cm
  290. ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
  291. return (1);
  292. }
  293. - if (argv_exp1(sp, cmdp, p, STRLEN(p), 1))
  294. + if (argv_exp1(sp, cmdp, p, NVI_STRLEN(p), 1))
  295. return (1);
  296. /*
  297. @@ -203,7 +203,7 @@ exwr(SCR *sp, EXCMD *cmdp, enum which cm
  298. &cmdp->addr1, &cmdp->addr2, NULL, flags));
  299. /* Build an argv so we get an argument count and file expansion. */
  300. - if (argv_exp2(sp, cmdp, p, STRLEN(p)))
  301. + if (argv_exp2(sp, cmdp, p, NVI_STRLEN(p)))
  302. return (1);
  303. /*
  304. @@ -255,7 +255,7 @@ exwr(SCR *sp, EXCMD *cmdp, enum which cm
  305. set_alt_name(sp, name);
  306. break;
  307. default:
  308. - INT2CHAR(sp, p, STRLEN(p) + 1, n, nlen);
  309. + INT2CHAR(sp, p, NVI_STRLEN(p) + 1, n, nlen);
  310. ex_emsg(sp, n, EXM_FILECOUNT);
  311. return (1);
  312. }
  313. diff -rupN nvi-1.81.6.orig/ip/ip_term.c nvi-1.81.6/ip/ip_term.c
  314. --- nvi-1.81.6.orig/ip/ip_term.c 2007-11-18 08:41:42.000000000 -0800
  315. +++ nvi-1.81.6/ip/ip_term.c 2015-02-17 11:04:50.280203225 -0800
  316. @@ -127,7 +127,7 @@ ip_optchange(SCR *sp, int offset, char *
  317. ipb.code = SI_EDITOPT;
  318. ipb.str1 = (char*)opt->name;
  319. - ipb.len1 = STRLEN(opt->name) * sizeof(CHAR_T);
  320. + ipb.len1 = NVI_STRLEN(opt->name) * sizeof(CHAR_T);
  321. (void)vi_send(ipp->o_fd, "ab1", &ipb);
  322. return (0);
  323. diff -rupN nvi-1.81.6.orig/perl_api/perl.xs nvi-1.81.6/perl_api/perl.xs
  324. --- nvi-1.81.6.orig/perl_api/perl.xs 2007-11-18 08:41:42.000000000 -0800
  325. +++ nvi-1.81.6/perl_api/perl.xs 2015-02-17 11:04:50.189684363 -0800
  326. @@ -326,7 +326,7 @@ perl_ex_perl(scrp, cmdp, cmdlen, f_lno,
  327. newVIrv(pp->svid, scrp);
  328. istat = signal(SIGINT, my_sighandler);
  329. - INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen);
  330. + INT2CHAR(scrp, cmdp, NVI_STRLEN(cmdp)+1, np, nlen);
  331. perl_eval(np);
  332. signal(SIGINT, istat);
  333. @@ -421,7 +421,7 @@ perl_ex_perldo(scrp, cmdp, cmdlen, f_lno
  334. /* Backwards compatibility. */
  335. newVIrv(pp->svid, scrp);
  336. - INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen);
  337. + INT2CHAR(scrp, cmdp, NVI_STRLEN(cmdp)+1, np, nlen);
  338. if (!(command = malloc(length = nlen - 1 + sizeof("sub {}"))))
  339. return 1;
  340. snprintf(command, length, "sub {%s}", np);
  341. diff -rupN nvi-1.81.6.orig/regex/engine.c nvi-1.81.6/regex/engine.c
  342. --- nvi-1.81.6.orig/regex/engine.c 2007-11-18 08:41:42.000000000 -0800
  343. +++ nvi-1.81.6/regex/engine.c 2015-02-17 11:04:50.181456859 -0800
  344. @@ -161,7 +161,7 @@ int eflags;
  345. stop = string + pmatch[0].rm_eo;
  346. } else {
  347. start = string;
  348. - stop = start + STRLEN(start);
  349. + stop = start + NVI_STRLEN(start);
  350. }
  351. if (stop < start)
  352. return(REG_INVARG);
  353. diff -rupN nvi-1.81.6.orig/regex/regcomp.c nvi-1.81.6/regex/regcomp.c
  354. --- nvi-1.81.6.orig/regex/regcomp.c 2007-11-18 08:41:42.000000000 -0800
  355. +++ nvi-1.81.6/regex/regcomp.c 2015-02-17 11:04:50.175705539 -0800
  356. @@ -198,7 +198,7 @@ regcomp(regex_t *preg, const RCHAR_T *pa
  357. return(REG_INVARG);
  358. len = preg->re_endp - pattern;
  359. } else
  360. - len = STRLEN(pattern);
  361. + len = NVI_STRLEN(pattern);
  362. /* do the mallocs early so failure handling is easy */
  363. g = (struct re_guts *)malloc(sizeof(struct re_guts) +
  364. @@ -818,7 +818,7 @@ p_b_cclass(register struct parse *p, reg
  365. NEXT();
  366. len = p->next - sp;
  367. for (cp = cclasses; cp->name != NULL; cp++)
  368. - if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
  369. + if (NVI_STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
  370. break;
  371. if (cp->name == NULL) {
  372. /* oops, didn't find it */
  373. @@ -889,7 +889,7 @@ p_b_coll_elem(register struct parse *p,
  374. }
  375. len = p->next - sp;
  376. for (cp = cnames; cp->name != NULL; cp++)
  377. - if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
  378. + if (NVI_STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
  379. return(cp->code); /* known name */
  380. if (len == 1)
  381. return(*sp); /* single character */
  382. diff -rupN nvi-1.81.6.orig/vi/v_event.c nvi-1.81.6/vi/v_event.c
  383. --- nvi-1.81.6.orig/vi/v_event.c 2007-11-18 08:41:42.000000000 -0800
  384. +++ nvi-1.81.6/vi/v_event.c 2015-02-17 11:04:50.242966563 -0800
  385. @@ -97,7 +97,7 @@ v_editopt(SCR *sp, VICMD *vp)
  386. size_t nlen;
  387. char *p2;
  388. - INT2CHAR(sp, vp->ev.e_str2, STRLEN(vp->ev.e_str2)+1, np, nlen);
  389. + INT2CHAR(sp, vp->ev.e_str2, NVI_STRLEN(vp->ev.e_str2)+1, np, nlen);
  390. p2 = strdup(np);
  391. rval = api_opts_set(sp, vp->ev.e_str1, p2,
  392. vp->ev.e_val1, vp->ev.e_val1);
  393. @@ -135,7 +135,7 @@ v_tag(SCR *sp, VICMD *vp)
  394. return (1);
  395. ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
  396. - argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw));
  397. + argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw));
  398. return (v_exec_ex(sp, vp, &cmd));
  399. }
  400. @@ -167,7 +167,7 @@ v_tagsplit(SCR *sp, VICMD *vp)
  401. ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
  402. F_SET(&cmd, E_NEWSCREEN);
  403. - argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw));
  404. + argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw));
  405. return (v_exec_ex(sp, vp, &cmd));
  406. }
  407. diff -rupN nvi-1.81.6.orig/vi/v_ex.c nvi-1.81.6/vi/v_ex.c
  408. --- nvi-1.81.6.orig/vi/v_ex.c 2007-11-18 08:41:42.000000000 -0800
  409. +++ nvi-1.81.6/vi/v_ex.c 2015-02-17 11:04:50.246380280 -0800
  410. @@ -210,7 +210,7 @@ v_tagpush(SCR *sp, VICMD *vp)
  411. EXCMD cmd;
  412. ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, 0, 0);
  413. - argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw) + 1);
  414. + argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw) + 1);
  415. return (v_exec_ex(sp, vp, &cmd));
  416. }
  417. diff -rupN nvi-1.81.6.orig/vi/vs_msg.c nvi-1.81.6/vi/vs_msg.c
  418. --- nvi-1.81.6.orig/vi/vs_msg.c 2007-11-18 08:41:42.000000000 -0800
  419. +++ nvi-1.81.6/vi/vs_msg.c 2015-02-17 11:04:50.251093618 -0800
  420. @@ -175,7 +175,7 @@ vs_update(SCR *sp, const char *m1, const
  421. */
  422. if (F_ISSET(sp, SC_SCR_EXWROTE)) {
  423. if (m2 != NULL)
  424. - INT2CHAR(sp, m2, STRLEN(m2) + 1, np, nlen);
  425. + INT2CHAR(sp, m2, NVI_STRLEN(m2) + 1, np, nlen);
  426. (void)ex_printf(sp,
  427. "%s\n", m1 == NULL? "" : m1, m2 == NULL ? "" : np);
  428. (void)ex_fflush(sp);
  429. @@ -203,7 +203,7 @@ vs_update(SCR *sp, const char *m1, const
  430. } else
  431. len = 0;
  432. if (m2 != NULL) {
  433. - mlen = STRLEN(m2);
  434. + mlen = NVI_STRLEN(m2);
  435. if (len + mlen > sp->cols - 2)
  436. mlen = (sp->cols - 2) - len;
  437. (void)gp->scr_waddstr(sp, m2, mlen);
  438. diff -rupN nvi-1.81.6.orig/vi/vs_split.c nvi-1.81.6/vi/vs_split.c
  439. --- nvi-1.81.6.orig/vi/vs_split.c 2007-11-18 08:41:42.000000000 -0800
  440. +++ nvi-1.81.6/vi/vs_split.c 2015-02-17 11:04:50.256136584 -0800
  441. @@ -628,7 +628,7 @@ vs_fg(SCR *sp, SCR **nspp, CHAR_T *name,
  442. wp = sp->wp;
  443. if (name)
  444. - INT2CHAR(sp, name, STRLEN(name) + 1, np, nlen);
  445. + INT2CHAR(sp, name, NVI_STRLEN(name) + 1, np, nlen);
  446. else
  447. np = NULL;
  448. if (newscreen)
  449. diff -rupN nvi-1.81.6.orig/vi/v_txt.c nvi-1.81.6/vi/v_txt.c
  450. --- nvi-1.81.6.orig/vi/v_txt.c 2007-11-18 08:41:42.000000000 -0800
  451. +++ nvi-1.81.6/vi/v_txt.c 2015-02-17 11:04:50.240596567 -0800
  452. @@ -2049,7 +2049,7 @@ retry: for (len = 0,
  453. return (0);
  454. case 1: /* One match. */
  455. /* If something changed, do the exchange. */
  456. - nlen = STRLEN(cmd.argv[0]->bp);
  457. + nlen = NVI_STRLEN(cmd.argv[0]->bp);
  458. if (len != nlen || MEMCMP(cmd.argv[0]->bp, p, len))
  459. break;