1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-11 13:01:28 +02:00

zsh-workers/8026

This commit is contained in:
Tanaka Akira 1999-09-23 13:23:33 +00:00
parent f0a1c1aafe
commit 284eb73997

View file

@ -947,7 +947,7 @@ mathevalarg(char *s, char **ss)
/**/ /**/
static void static void
checkunary(int mtokc, char *ptr) checkunary(int mtokc, char *mptr)
{ {
int errmsg = 0; int errmsg = 0;
int tp = type[mtokc]; int tp = type[mtokc];
@ -959,11 +959,11 @@ checkunary(int mtokc, char *ptr)
errmsg = 2; errmsg = 2;
} }
if (errmsg) { if (errmsg) {
char errbuf[40]; char errbuf[80];
int len, over = 0; int len, over = 0;
while (inblank(*ptr)) while (inblank(*mptr))
ptr++; mptr++;
len = strlen(ptr); len = ztrlen(mptr);
if (len > 10) { if (len > 10) {
len = 10; len = 10;
over = 1; over = 1;
@ -971,7 +971,7 @@ checkunary(int mtokc, char *ptr)
sprintf(errbuf, "bad math expression: %s expected at `%%l%s'", sprintf(errbuf, "bad math expression: %s expected at `%%l%s'",
errmsg == 2 ? "operator" : "operand", errmsg == 2 ? "operator" : "operand",
over ? "..." : ""); over ? "..." : "");
zerr(errbuf, ptr, len); zerr(errbuf, mptr, len);
} }
unary = !(tp & OP_OPF); unary = !(tp & OP_OPF);
} }