Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 523820
Collapse All | Expand All

(-)nvi-1.81.6.orig/common/api.c (-1 / +1 lines)
Lines 423-429 api_opts_get(SCR *sp, CHAR_T *name, char Link Here
423
	switch (op->type) {
423
	switch (op->type) {
424
	case OPT_0BOOL:
424
	case OPT_0BOOL:
425
	case OPT_1BOOL:
425
	case OPT_1BOOL:
426
		MALLOC_RET(sp, *value, char *, STRLEN(op->name) + 2 + 1);
426
		MALLOC_RET(sp, *value, char *, NVI_STRLEN(op->name) + 2 + 1);
427
		(void)sprintf(*value,
427
		(void)sprintf(*value,
428
		    "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name);
428
		    "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name);
429
		if (boolvalue != NULL)
429
		if (boolvalue != NULL)
(-)nvi-1.81.6.orig/common/msg.c (-1 / +1 lines)
Lines 378-384 msgq_wstr(SCR *sp, mtype_t mtype, CHAR_T Link Here
378
		msgq(sp, mtype, fmt);
378
		msgq(sp, mtype, fmt);
379
		return;
379
		return;
380
	}
380
	}
381
	INT2CHAR(sp, str, STRLEN(str) + 1, nstr, nlen);
381
	INT2CHAR(sp, str, NVI_STRLEN(str) + 1, nstr, nlen);
382
	msgq_str(sp, mtype, nstr, fmt);
382
	msgq_str(sp, mtype, nstr, fmt);
383
}
383
}
384
384
(-)nvi-1.81.6.orig/common/multibyte.h (-2 / +2 lines)
Lines 12-18 typedef wchar_t CHAR_T; Link Here
12
typedef	u_int		UCHAR_T;
12
typedef	u_int		UCHAR_T;
13
#define RCHAR_BIT	24
13
#define RCHAR_BIT	24
14
14
15
#define STRLEN		wcslen
15
#define NVI_STRLEN		wcslen
16
#define STRTOL		wcstol
16
#define STRTOL		wcstol
17
#define STRTOUL		wcstoul
17
#define STRTOUL		wcstoul
18
#define SPRINTF		swprintf
18
#define SPRINTF		swprintf
Lines 31-37 typedef u_char CHAR_T; Link Here
31
typedef	u_char		UCHAR_T;
31
typedef	u_char		UCHAR_T;
32
#define RCHAR_BIT	CHAR_BIT
32
#define RCHAR_BIT	CHAR_BIT
33
33
34
#define STRLEN		strlen
34
#define NVI_STRLEN		strlen
35
#define STRTOL		strtol
35
#define STRTOL		strtol
36
#define STRTOUL		strtoul
36
#define STRTOUL		strtoul
37
#define SPRINTF		snprintf
37
#define SPRINTF		snprintf
(-)nvi-1.81.6.orig/common/options.c (-9 / +9 lines)
Lines 315-321 opts_init(SCR *sp, int *oargs) Link Here
315
315
316
	/* Set numeric and string default values. */
316
	/* Set numeric and string default values. */
317
#define	OI(indx, str) {							\
317
#define	OI(indx, str) {							\
318
	a.len = STRLEN(str);						\
318
	a.len = NVI_STRLEN(str);						\
319
	if ((CHAR_T*)str != b2)	  /* GCC puts strings in text-space. */	\
319
	if ((CHAR_T*)str != b2)	  /* GCC puts strings in text-space. */	\
320
		(void)MEMCPY(b2, str, a.len+1);				\
320
		(void)MEMCPY(b2, str, a.len+1);				\
321
	if (opts_set(sp, argv, NULL)) {					\
321
	if (opts_set(sp, argv, NULL)) {					\
Lines 620-629 opts_set(SCR *sp, ARGS **argv, char *usa Link Here
620
				goto badnum;
620
				goto badnum;
621
			if ((nret =
621
			if ((nret =
622
			    nget_uslong(sp, &value, sep, &endp, 10)) != NUM_OK) {
622
			    nget_uslong(sp, &value, sep, &endp, 10)) != NUM_OK) {
623
				INT2CHAR(sp, name, STRLEN(name) + 1, 
623
				INT2CHAR(sp, name, NVI_STRLEN(name) + 1, 
624
					     np, nlen);
624
					     np, nlen);
625
				p2 = msg_print(sp, np, &nf);
625
				p2 = msg_print(sp, np, &nf);
626
				INT2CHAR(sp, sep, STRLEN(sep) + 1, 
626
				INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, 
627
					     np, nlen);
627
					     np, nlen);
628
				t2 = msg_print(sp, np, &nf2);
628
				t2 = msg_print(sp, np, &nf2);
629
				switch (nret) {
629
				switch (nret) {
Lines 647-656 opts_set(SCR *sp, ARGS **argv, char *usa Link Here
647
				break;
647
				break;
648
			}
648
			}
649
			if (*endp && !ISBLANK(*endp)) {
649
			if (*endp && !ISBLANK(*endp)) {
650
badnum:				INT2CHAR(sp, name, STRLEN(name) + 1, 
650
badnum:				INT2CHAR(sp, name, NVI_STRLEN(name) + 1, 
651
					     np, nlen);
651
					     np, nlen);
652
				p2 = msg_print(sp, np, &nf);
652
				p2 = msg_print(sp, np, &nf);
653
				INT2CHAR(sp, sep, STRLEN(sep) + 1, 
653
				INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, 
654
					     np, nlen);
654
					     np, nlen);
655
				t2 = msg_print(sp, np, &nf2);
655
				t2 = msg_print(sp, np, &nf2);
656
				msgq(sp, M_ERR,
656
				msgq(sp, M_ERR,
Lines 680-686 badnum: INT2CHAR(sp, name, STRLEN(nam Link Here
680
				break;
680
				break;
681
681
682
			/* Report to subsystems. */
682
			/* Report to subsystems. */
683
			INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen);
683
			INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, np, nlen);
684
			if (op->func != NULL &&
684
			if (op->func != NULL &&
685
			    op->func(sp, spo, np, &value) ||
685
			    op->func(sp, spo, np, &value) ||
686
			    ex_optchange(sp, offset, np, &value) ||
686
			    ex_optchange(sp, offset, np, &value) ||
Lines 712-718 badnum: INT2CHAR(sp, name, STRLEN(nam Link Here
712
			 * Do nothing if the value is unchanged, the underlying
712
			 * Do nothing if the value is unchanged, the underlying
713
			 * functions can be expensive.
713
			 * functions can be expensive.
714
			 */
714
			 */
715
			INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen);
715
			INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, np, nlen);
716
			if (!F_ISSET(op, OPT_ALWAYS) &&
716
			if (!F_ISSET(op, OPT_ALWAYS) &&
717
			    O_STR(sp, offset) != NULL &&
717
			    O_STR(sp, offset) != NULL &&
718
			    !strcmp(O_STR(sp, offset), np))
718
			    !strcmp(O_STR(sp, offset), np))
Lines 879-885 opts_dump(SCR *sp, enum optdisp type) Link Here
879
		}
879
		}
880
		F_CLR(&sp->opts[cnt], OPT_SELECTED);
880
		F_CLR(&sp->opts[cnt], OPT_SELECTED);
881
881
882
		curlen = STRLEN(op->name);
882
		curlen = NVI_STRLEN(op->name);
883
		switch (op->type) {
883
		switch (op->type) {
884
		case OPT_0BOOL:
884
		case OPT_0BOOL:
885
		case OPT_1BOOL:
885
		case OPT_1BOOL:
Lines 1049-1055 opts_search(CHAR_T *name) Link Here
1049
	 * Check to see if the name is the prefix of one (and only one)
1049
	 * Check to see if the name is the prefix of one (and only one)
1050
	 * option.  If so, return the option.
1050
	 * option.  If so, return the option.
1051
	 */
1051
	 */
1052
	len = STRLEN(name);
1052
	len = NVI_STRLEN(name);
1053
	for (found = NULL, op = optlist; op->name != NULL; ++op) {
1053
	for (found = NULL, op = optlist; op->name != NULL; ++op) {
1054
		if (op->name[0] < name[0])
1054
		if (op->name[0] < name[0])
1055
			continue;
1055
			continue;
(-)nvi-1.81.6.orig/dist/tags (-2 / +2 lines)
Lines 1068-1075 SPRINTF ../common/multibyte.h 37;" d Link Here
1068
STANDARD_TAB	../common/key.h	213;"	d
1068
STANDARD_TAB	../common/key.h	213;"	d
1069
STRCMP	../common/multibyte.h	19;"	d
1069
STRCMP	../common/multibyte.h	19;"	d
1070
STRCMP	../common/multibyte.h	38;"	d
1070
STRCMP	../common/multibyte.h	38;"	d
1071
STRLEN	../common/multibyte.h	15;"	d
1071
NVI_STRLEN	../common/multibyte.h	15;"	d
1072
STRLEN	../common/multibyte.h	34;"	d
1072
NVI_STRLEN	../common/multibyte.h	34;"	d
1073
STRPBRK	../common/multibyte.h	20;"	d
1073
STRPBRK	../common/multibyte.h	20;"	d
1074
STRPBRK	../common/multibyte.h	39;"	d
1074
STRPBRK	../common/multibyte.h	39;"	d
1075
STRSET	../common/multibyte.h	22;"	d
1075
STRSET	../common/multibyte.h	22;"	d
(-)nvi-1.81.6.orig/ex/ex_argv.c (-3 / +3 lines)
Lines 217-223 argv_exp2(SCR *sp, EXCMD *excp, CHAR_T * Link Here
217
217
218
			*p = '\0';
218
			*p = '\0';
219
			INT2CHAR(sp, bp + SHELLOFFSET, 
219
			INT2CHAR(sp, bp + SHELLOFFSET, 
220
				 STRLEN(bp + SHELLOFFSET) + 1, np, nlen);
220
				 NVI_STRLEN(bp + SHELLOFFSET) + 1, np, nlen);
221
			d = strdup(np);
221
			d = strdup(np);
222
			rval = argv_lexp(sp, excp, d);
222
			rval = argv_lexp(sp, excp, d);
223
			free (d);
223
			free (d);
Lines 332-338 argv_fexp(SCR *sp, EXCMD *excp, CHAR_T * Link Here
332
				    "115|No previous command to replace \"!\"");
332
				    "115|No previous command to replace \"!\"");
333
				return (1);
333
				return (1);
334
			}
334
			}
335
			len += tlen = STRLEN(exp->lastbcomm);
335
			len += tlen = NVI_STRLEN(exp->lastbcomm);
336
			off = p - bp;
336
			off = p - bp;
337
			ADD_SPACE_RETW(sp, bp, blen, len);
337
			ADD_SPACE_RETW(sp, bp, blen, len);
338
			p = bp + off;
338
			p = bp + off;
Lines 683-689 err: if (ifp != NULL) Link Here
683
		 * XXX
683
		 * XXX
684
		 * Assume that all shells have -c.
684
		 * Assume that all shells have -c.
685
		 */
685
		 */
686
		INT2CHAR(sp, bp, STRLEN(bp)+1, np, nlen);
686
		INT2CHAR(sp, bp, NVI_STRLEN(bp)+1, np, nlen);
687
		execl(sh_path, sh, "-c", np, (char *)NULL);
687
		execl(sh_path, sh, "-c", np, (char *)NULL);
688
		msgq_str(sp, M_SYSERR, sh_path, "118|Error: execl: %s");
688
		msgq_str(sp, M_SYSERR, sh_path, "118|Error: execl: %s");
689
		_exit(127);
689
		_exit(127);
(-)nvi-1.81.6.orig/ex/ex_cscope.c (-6 / +6 lines)
Lines 140-146 ex_cscope(SCR *sp, EXCMD *cmdp) Link Here
140
		for (; *p && isspace(*p); ++p);
140
		for (; *p && isspace(*p); ++p);
141
	}
141
	}
142
142
143
	INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen);
143
	INT2CHAR(sp, cmd, NVI_STRLEN(cmd) + 1, np, nlen);
144
	if ((ccp = lookup_ccmd(np)) == NULL) {
144
	if ((ccp = lookup_ccmd(np)) == NULL) {
145
usage:		msgq(sp, M_ERR, "309|Use \"cscope help\" for help");
145
usage:		msgq(sp, M_ERR, "309|Use \"cscope help\" for help");
146
		return (1);
146
		return (1);
Lines 214-220 cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T Link Here
214
	 * >1 additional args: object, too many args.
214
	 * >1 additional args: object, too many args.
215
	 */
215
	 */
216
	cur_argc = cmdp->argc;
216
	cur_argc = cmdp->argc;
217
	if (argv_exp2(sp, cmdp, dname, STRLEN(dname))) {
217
	if (argv_exp2(sp, cmdp, dname, NVI_STRLEN(dname))) {
218
		return (1);
218
		return (1);
219
	}
219
	}
220
	if (cmdp->argc == cur_argc) {
220
	if (cmdp->argc == cur_argc) {
Lines 228-234 cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T Link Here
228
		return (1);
228
		return (1);
229
	}
229
	}
230
230
231
	INT2CHAR(sp, dname, STRLEN(dname)+1, np, nlen);
231
	INT2CHAR(sp, dname, NVI_STRLEN(dname)+1, np, nlen);
232
232
233
	/*
233
	/*
234
	 * The user can specify a specific file (so they can have multiple
234
	 * The user can specify a specific file (so they can have multiple
Lines 471-477 cscope_find(SCR *sp, EXCMD *cmdp, CHAR_T Link Here
471
	}
471
	}
472
472
473
	/* Create the cscope command. */
473
	/* Create the cscope command. */
474
	INT2CHAR(sp, pattern, STRLEN(pattern) + 1, np, nlen);
474
	INT2CHAR(sp, pattern, NVI_STRLEN(pattern) + 1, np, nlen);
475
	np = strdup(np);
475
	np = strdup(np);
476
	if ((tqp = create_cs_cmd(sp, np, &search)) == NULL)
476
	if ((tqp = create_cs_cmd(sp, np, &search)) == NULL)
477
		goto err;
477
		goto err;
Lines 801-807 cscope_help(SCR *sp, EXCMD *cmdp, CHAR_T Link Here
801
	char *np;
801
	char *np;
802
	size_t nlen;
802
	size_t nlen;
803
803
804
	INT2CHAR(sp, subcmd, STRLEN(subcmd) + 1, np, nlen);
804
	INT2CHAR(sp, subcmd, NVI_STRLEN(subcmd) + 1, np, nlen);
805
	return (csc_help(sp, np));
805
	return (csc_help(sp, np));
806
}
806
}
807
807
Lines 842-848 cscope_kill(SCR *sp, EXCMD *cmdp, CHAR_T Link Here
842
	char *np;
842
	char *np;
843
	size_t nlen;
843
	size_t nlen;
844
844
845
	INT2CHAR(sp, cn, STRLEN(cn) + 1, np, nlen);
845
	INT2CHAR(sp, cn, NVI_STRLEN(cn) + 1, np, nlen);
846
	return (terminate(sp, NULL, atoi(np)));
846
	return (terminate(sp, NULL, atoi(np)));
847
}
847
}
848
848
(-)nvi-1.81.6.orig/ex/ex_filter.c (-2 / +2 lines)
Lines 138-144 err: if (input[0] != -1) Link Here
138
		else
138
		else
139
			++name;
139
			++name;
140
140
141
		INT2SYS(sp, cmd, STRLEN(cmd)+1, np, nlen);
141
		INT2SYS(sp, cmd, NVI_STRLEN(cmd)+1, np, nlen);
142
		execl(O_STR(sp, O_SHELL), name, "-c", np, (char *)NULL);
142
		execl(O_STR(sp, O_SHELL), name, "-c", np, (char *)NULL);
143
		msgq_str(sp, M_SYSERR, O_STR(sp, O_SHELL), "execl: %s");
143
		msgq_str(sp, M_SYSERR, O_STR(sp, O_SHELL), "execl: %s");
144
		_exit (127);
144
		_exit (127);
Lines 283-289 err: if (input[0] != -1) Link Here
283
	 * Ignore errors on vi file reads, to make reads prettier.  It's
283
	 * Ignore errors on vi file reads, to make reads prettier.  It's
284
	 * completely inconsistent, and historic practice.
284
	 * completely inconsistent, and historic practice.
285
	 */
285
	 */
286
uwait:	INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen);
286
uwait:	INT2CHAR(sp, cmd, NVI_STRLEN(cmd) + 1, np, nlen);
287
	return (proc_wait(sp, (long)utility_pid, np,
287
	return (proc_wait(sp, (long)utility_pid, np,
288
	    ftype == FILTER_READ && F_ISSET(sp, SC_VI) ? 1 : 0, 0) || rval);
288
	    ftype == FILTER_READ && F_ISSET(sp, SC_VI) ? 1 : 0, 0) || rval);
289
}
289
}
(-)nvi-1.81.6.orig/ex/ex_init.c (-1 / +1 lines)
Lines 61-67 ex_screen_copy(SCR *orig, SCR *sp) Link Here
61
61
62
		if (oexp->lastbcomm != NULL &&
62
		if (oexp->lastbcomm != NULL &&
63
		    (nexp->lastbcomm = v_wstrdup(sp, oexp->lastbcomm, 
63
		    (nexp->lastbcomm = v_wstrdup(sp, oexp->lastbcomm, 
64
				     STRLEN(oexp->lastbcomm))) == NULL) {
64
				     NVI_STRLEN(oexp->lastbcomm))) == NULL) {
65
			msgq(sp, M_SYSERR, NULL);
65
			msgq(sp, M_SYSERR, NULL);
66
			return(1);
66
			return(1);
67
		}
67
		}
(-)nvi-1.81.6.orig/ex/ex_tag.c (-4 / +4 lines)
Lines 68-74 ex_tag_first(SCR *sp, CHAR_T *tagarg) Link Here
68
68
69
	/* Build an argument for the ex :tag command. */
69
	/* Build an argument for the ex :tag command. */
70
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
70
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
71
	argv_exp0(sp, &cmd, tagarg, STRLEN(tagarg));
71
	argv_exp0(sp, &cmd, tagarg, NVI_STRLEN(tagarg));
72
72
73
	/*
73
	/*
74
	 * XXX
74
	 * XXX
Lines 115-121 ex_tag_push(SCR *sp, EXCMD *cmdp) Link Here
115
115
116
		/* Taglength may limit the number of characters. */
116
		/* Taglength may limit the number of characters. */
117
		if ((tl =
117
		if ((tl =
118
		    O_VAL(sp, O_TAGLENGTH)) != 0 && STRLEN(exp->tag_last) > tl)
118
		    O_VAL(sp, O_TAGLENGTH)) != 0 && NVI_STRLEN(exp->tag_last) > tl)
119
			exp->tag_last[tl] = '\0';
119
			exp->tag_last[tl] = '\0';
120
		break;
120
		break;
121
	case 0:
121
	case 0:
Lines 587-593 ex_tag_copy(SCR *orig, SCR *sp) Link Here
587
	/* Copy the last tag. */
587
	/* Copy the last tag. */
588
	if (oexp->tag_last != NULL &&
588
	if (oexp->tag_last != NULL &&
589
	    (nexp->tag_last = v_wstrdup(sp, oexp->tag_last, 
589
	    (nexp->tag_last = v_wstrdup(sp, oexp->tag_last, 
590
					STRLEN(oexp->tag_last))) == NULL) {
590
					NVI_STRLEN(oexp->tag_last))) == NULL) {
591
		msgq(sp, M_SYSERR, NULL);
591
		msgq(sp, M_SYSERR, NULL);
592
		return (1);
592
		return (1);
593
	}
593
	}
Lines 997-1003 ctag_slist(SCR *sp, CHAR_T *tag) Link Here
997
	exp = EXP(sp);
997
	exp = EXP(sp);
998
998
999
	/* Allocate and initialize the tag queue structure. */
999
	/* Allocate and initialize the tag queue structure. */
1000
	INT2CHAR(sp, tag, STRLEN(tag) + 1, np, nlen);
1000
	INT2CHAR(sp, tag, NVI_STRLEN(tag) + 1, np, nlen);
1001
	len = nlen - 1;
1001
	len = nlen - 1;
1002
	CALLOC_GOTO(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + len + 1);
1002
	CALLOC_GOTO(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + len + 1);
1003
	CIRCLEQ_INIT(&tqp->tagq);
1003
	CIRCLEQ_INIT(&tqp->tagq);
(-)nvi-1.81.6.orig/ex/ex_util.c (-1 / +1 lines)
Lines 153-159 ex_wemsg(SCR* sp, CHAR_T *p, exm_t which Link Here
153
	char *np;
153
	char *np;
154
	size_t nlen;
154
	size_t nlen;
155
155
156
	if (p) INT2CHAR(sp, p, STRLEN(p), np, nlen);
156
	if (p) INT2CHAR(sp, p, NVI_STRLEN(p), np, nlen);
157
	else np = NULL;
157
	else np = NULL;
158
	ex_emsg(sp, np, which);
158
	ex_emsg(sp, np, which);
159
}
159
}
(-)nvi-1.81.6.orig/ex/ex_write.c (-3 / +3 lines)
Lines 158-164 exwr(SCR *sp, EXCMD *cmdp, enum which cm Link Here
158
			ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
158
			ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
159
			return (1);
159
			return (1);
160
		}
160
		}
161
		if (argv_exp1(sp, cmdp, p, STRLEN(p), 1))
161
		if (argv_exp1(sp, cmdp, p, NVI_STRLEN(p), 1))
162
			return (1);
162
			return (1);
163
163
164
		/*
164
		/*
Lines 203-209 exwr(SCR *sp, EXCMD *cmdp, enum which cm Link Here
203
		    &cmdp->addr1, &cmdp->addr2, NULL, flags));
203
		    &cmdp->addr1, &cmdp->addr2, NULL, flags));
204
204
205
	/* Build an argv so we get an argument count and file expansion. */
205
	/* Build an argv so we get an argument count and file expansion. */
206
	if (argv_exp2(sp, cmdp, p, STRLEN(p)))
206
	if (argv_exp2(sp, cmdp, p, NVI_STRLEN(p)))
207
		return (1);
207
		return (1);
208
208
209
	/*
209
	/*
Lines 255-261 exwr(SCR *sp, EXCMD *cmdp, enum which cm Link Here
255
			set_alt_name(sp, name);
255
			set_alt_name(sp, name);
256
		break;
256
		break;
257
	default:
257
	default:
258
		INT2CHAR(sp, p, STRLEN(p) + 1, n, nlen);
258
		INT2CHAR(sp, p, NVI_STRLEN(p) + 1, n, nlen);
259
		ex_emsg(sp, n, EXM_FILECOUNT);
259
		ex_emsg(sp, n, EXM_FILECOUNT);
260
		return (1);
260
		return (1);
261
	}
261
	}
(-)nvi-1.81.6.orig/ip/ip_term.c (-1 / +1 lines)
Lines 127-133 ip_optchange(SCR *sp, int offset, char * Link Here
127
127
128
	ipb.code = SI_EDITOPT;
128
	ipb.code = SI_EDITOPT;
129
	ipb.str1 = (char*)opt->name;
129
	ipb.str1 = (char*)opt->name;
130
	ipb.len1 = STRLEN(opt->name) * sizeof(CHAR_T);
130
	ipb.len1 = NVI_STRLEN(opt->name) * sizeof(CHAR_T);
131
131
132
	(void)vi_send(ipp->o_fd, "ab1", &ipb);
132
	(void)vi_send(ipp->o_fd, "ab1", &ipb);
133
	return (0);
133
	return (0);
(-)nvi-1.81.6.orig/perl_api/perl.xs (-2 / +2 lines)
Lines 326-332 perl_ex_perl(scrp, cmdp, cmdlen, f_lno, Link Here
326
	newVIrv(pp->svid, scrp);
326
	newVIrv(pp->svid, scrp);
327
327
328
	istat = signal(SIGINT, my_sighandler);
328
	istat = signal(SIGINT, my_sighandler);
329
	INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen);
329
	INT2CHAR(scrp, cmdp, NVI_STRLEN(cmdp)+1, np, nlen);
330
	perl_eval(np);
330
	perl_eval(np);
331
	signal(SIGINT, istat);
331
	signal(SIGINT, istat);
332
332
Lines 421-427 perl_ex_perldo(scrp, cmdp, cmdlen, f_lno Link Here
421
	/* Backwards compatibility. */
421
	/* Backwards compatibility. */
422
	newVIrv(pp->svid, scrp);
422
	newVIrv(pp->svid, scrp);
423
423
424
	INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen);
424
	INT2CHAR(scrp, cmdp, NVI_STRLEN(cmdp)+1, np, nlen);
425
	if (!(command = malloc(length = nlen - 1 + sizeof("sub {}"))))
425
	if (!(command = malloc(length = nlen - 1 + sizeof("sub {}"))))
426
		return 1;
426
		return 1;
427
	snprintf(command, length, "sub {%s}", np);
427
	snprintf(command, length, "sub {%s}", np);
(-)nvi-1.81.6.orig/regex/engine.c (-1 / +1 lines)
Lines 161-167 int eflags; Link Here
161
		stop = string + pmatch[0].rm_eo;
161
		stop = string + pmatch[0].rm_eo;
162
	} else {
162
	} else {
163
		start = string;
163
		start = string;
164
		stop = start + STRLEN(start);
164
		stop = start + NVI_STRLEN(start);
165
	}
165
	}
166
	if (stop < start)
166
	if (stop < start)
167
		return(REG_INVARG);
167
		return(REG_INVARG);
(-)nvi-1.81.6.orig/regex/regcomp.c (-3 / +3 lines)
Lines 198-204 regcomp(regex_t *preg, const RCHAR_T *pa Link Here
198
			return(REG_INVARG);
198
			return(REG_INVARG);
199
		len = preg->re_endp - pattern;
199
		len = preg->re_endp - pattern;
200
	} else
200
	} else
201
		len = STRLEN(pattern);
201
		len = NVI_STRLEN(pattern);
202
202
203
	/* do the mallocs early so failure handling is easy */
203
	/* do the mallocs early so failure handling is easy */
204
	g = (struct re_guts *)malloc(sizeof(struct re_guts) +
204
	g = (struct re_guts *)malloc(sizeof(struct re_guts) +
Lines 818-824 p_b_cclass(register struct parse *p, reg Link Here
818
		NEXT();
818
		NEXT();
819
	len = p->next - sp;
819
	len = p->next - sp;
820
	for (cp = cclasses; cp->name != NULL; cp++)
820
	for (cp = cclasses; cp->name != NULL; cp++)
821
		if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
821
		if (NVI_STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
822
			break;
822
			break;
823
	if (cp->name == NULL) {
823
	if (cp->name == NULL) {
824
		/* oops, didn't find it */
824
		/* oops, didn't find it */
Lines 889-895 p_b_coll_elem(register struct parse *p, Link Here
889
	}
889
	}
890
	len = p->next - sp;
890
	len = p->next - sp;
891
	for (cp = cnames; cp->name != NULL; cp++)
891
	for (cp = cnames; cp->name != NULL; cp++)
892
		if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
892
		if (NVI_STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len))
893
			return(cp->code);	/* known name */
893
			return(cp->code);	/* known name */
894
	if (len == 1)
894
	if (len == 1)
895
		return(*sp);	/* single character */
895
		return(*sp);	/* single character */
(-)nvi-1.81.6.orig/vi/v_event.c (-3 / +3 lines)
Lines 97-103 v_editopt(SCR *sp, VICMD *vp) Link Here
97
	size_t nlen;
97
	size_t nlen;
98
	char *p2;
98
	char *p2;
99
99
100
	INT2CHAR(sp, vp->ev.e_str2, STRLEN(vp->ev.e_str2)+1, np, nlen);
100
	INT2CHAR(sp, vp->ev.e_str2, NVI_STRLEN(vp->ev.e_str2)+1, np, nlen);
101
	p2 = strdup(np);
101
	p2 = strdup(np);
102
	rval = api_opts_set(sp, vp->ev.e_str1, p2, 
102
	rval = api_opts_set(sp, vp->ev.e_str1, p2, 
103
			    vp->ev.e_val1, vp->ev.e_val1);
103
			    vp->ev.e_val1, vp->ev.e_val1);
Lines 135-141 v_tag(SCR *sp, VICMD *vp) Link Here
135
		return (1);
135
		return (1);
136
136
137
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
137
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
138
	argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw));
138
	argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw));
139
	return (v_exec_ex(sp, vp, &cmd));
139
	return (v_exec_ex(sp, vp, &cmd));
140
}
140
}
141
141
Lines 167-173 v_tagsplit(SCR *sp, VICMD *vp) Link Here
167
167
168
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
168
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0);
169
	F_SET(&cmd, E_NEWSCREEN);
169
	F_SET(&cmd, E_NEWSCREEN);
170
	argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw));
170
	argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw));
171
	return (v_exec_ex(sp, vp, &cmd));
171
	return (v_exec_ex(sp, vp, &cmd));
172
}
172
}
173
173
(-)nvi-1.81.6.orig/vi/v_ex.c (-1 / +1 lines)
Lines 210-216 v_tagpush(SCR *sp, VICMD *vp) Link Here
210
	EXCMD cmd;
210
	EXCMD cmd;
211
211
212
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, 0, 0);
212
	ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, 0, 0);
213
	argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw) + 1);
213
	argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw) + 1);
214
	return (v_exec_ex(sp, vp, &cmd));
214
	return (v_exec_ex(sp, vp, &cmd));
215
}
215
}
216
216
(-)nvi-1.81.6.orig/vi/vs_msg.c (-2 / +2 lines)
Lines 175-181 vs_update(SCR *sp, const char *m1, const Link Here
175
	 */
175
	 */
176
	if (F_ISSET(sp, SC_SCR_EXWROTE)) {
176
	if (F_ISSET(sp, SC_SCR_EXWROTE)) {
177
		if (m2 != NULL)
177
		if (m2 != NULL)
178
			INT2CHAR(sp, m2, STRLEN(m2) + 1, np, nlen);
178
			INT2CHAR(sp, m2, NVI_STRLEN(m2) + 1, np, nlen);
179
		(void)ex_printf(sp,
179
		(void)ex_printf(sp,
180
		    "%s\n", m1 == NULL? "" : m1, m2 == NULL ? "" : np);
180
		    "%s\n", m1 == NULL? "" : m1, m2 == NULL ? "" : np);
181
		(void)ex_fflush(sp);
181
		(void)ex_fflush(sp);
Lines 203-209 vs_update(SCR *sp, const char *m1, const Link Here
203
	} else
203
	} else
204
		len = 0;
204
		len = 0;
205
	if (m2 != NULL) {
205
	if (m2 != NULL) {
206
		mlen = STRLEN(m2);
206
		mlen = NVI_STRLEN(m2);
207
		if (len + mlen > sp->cols - 2)
207
		if (len + mlen > sp->cols - 2)
208
			mlen = (sp->cols - 2) - len;
208
			mlen = (sp->cols - 2) - len;
209
		(void)gp->scr_waddstr(sp, m2, mlen);
209
		(void)gp->scr_waddstr(sp, m2, mlen);
(-)nvi-1.81.6.orig/vi/vs_split.c (-1 / +1 lines)
Lines 628-634 vs_fg(SCR *sp, SCR **nspp, CHAR_T *name, Link Here
628
	wp = sp->wp;
628
	wp = sp->wp;
629
629
630
	if (name)
630
	if (name)
631
	    INT2CHAR(sp, name, STRLEN(name) + 1, np, nlen);
631
	    INT2CHAR(sp, name, NVI_STRLEN(name) + 1, np, nlen);
632
	else
632
	else
633
	    np = NULL;
633
	    np = NULL;
634
	if (newscreen)
634
	if (newscreen)
(-)nvi-1.81.6.orig/vi/v_txt.c (-1 / +1 lines)
Lines 2049-2055 retry: for (len = 0, Link Here
2049
		return (0);
2049
		return (0);
2050
	case 1:				/* One match. */
2050
	case 1:				/* One match. */
2051
		/* If something changed, do the exchange. */
2051
		/* If something changed, do the exchange. */
2052
		nlen = STRLEN(cmd.argv[0]->bp);
2052
		nlen = NVI_STRLEN(cmd.argv[0]->bp);
2053
		if (len != nlen || MEMCMP(cmd.argv[0]->bp, p, len))
2053
		if (len != nlen || MEMCMP(cmd.argv[0]->bp, p, len))
2054
			break;
2054
			break;
2055
2055

Return to bug 523820