Put quotes around function name when issuing "redefined" warning.

This commit is contained in:
Dianne Skoll
2025-01-14 11:30:06 -05:00
parent 17ccf5d2b4
commit a35920f28e
2 changed files with 8 additions and 8 deletions

View File

@@ -208,7 +208,7 @@ int DoFset(ParsePtr p)
return OK;
}
/* Warn about redefinition */
Wprint(tr("Function %s redefined (previously defined at %s:%d)"),
Wprint(tr("Function `%s' redefined (previously defined at %s:%d)"),
existing->name, existing->filename, existing->lineno);
}

View File

@@ -801,7 +801,7 @@ Leaving UserFN _ofunc(1991-02-28) => 0
# omitfunc ignores local/global omits
fset _ofunc(x) 0
../tests/test.rem(227): Function _ofunc redefined (previously defined at ../tests/test.rem:222)
../tests/test.rem(227): Function `_ofunc' redefined (previously defined at ../tests/test.rem:222)
OMIT 1 March
OMIT 2 March 1991
REM 1 March OMIT Sun OMITFUNC _ofunc AFTER MSG Should trigger 1 March
@@ -4050,7 +4050,7 @@ ENDIF
# Trig with a good warnfunc
FSET w(x) choose(x, 5, 3, 1, 0)
../tests/test.rem(832): Function w redefined (previously defined at ../tests/test.rem:826)
../tests/test.rem(832): Function `w' redefined (previously defined at ../tests/test.rem:826)
# Short-circuit operators
IF trig("sun warn w") || trig("thu warn w")
@@ -5182,7 +5182,7 @@ FSET f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a1
# This should give an error
FSET f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36, a37, a38, a39, a40, a41, a42, a43, a44, a45, a46, a47, a48, a49, a50, a51, a52, a53, a54, a55, a56, a57, a58, a59, a60, a61, a62, a63, a64) 3
../tests/test.rem(1023): Function f redefined (previously defined at ../tests/test.rem:1020)
../tests/test.rem(1023): Function `f' redefined (previously defined at ../tests/test.rem:1020)
../tests/test.rem(1023): Too many arguments
# Check that SATISFY expressions that don't reference trigdate are diagnosed
@@ -5665,7 +5665,7 @@ hehe
FSET gg(x,y,z) 0
../tests/test.rem(1058): Function gg redefined (previously defined at ../tests/test.rem:1053)
../tests/test.rem(1058): Function `gg' redefined (previously defined at ../tests/test.rem:1053)
REM WARN gg MSG Wookie
../tests/test.rem(1059): WARN function `gg' defined at ../tests/test.rem:1058 should take 1 argument but actually takes 3
../tests/test.rem(1059): Trig = Saturday, 16 February, 1991
@@ -5684,7 +5684,7 @@ hehe
FSET gg() 0
../tests/test.rem(1063): Function gg redefined (previously defined at ../tests/test.rem:1058)
../tests/test.rem(1063): Function `gg' redefined (previously defined at ../tests/test.rem:1058)
REM WARN gg MSG Wookie
../tests/test.rem(1064): WARN function `gg' defined at ../tests/test.rem:1063 should take 1 argument but actually takes 0
../tests/test.rem(1064): Trig = Saturday, 16 February, 1991
@@ -5703,7 +5703,7 @@ hehe
FSET gg(x) x-x
../tests/test.rem(1068): Function gg redefined (previously defined at ../tests/test.rem:1063)
../tests/test.rem(1068): Function `gg' redefined (previously defined at ../tests/test.rem:1063)
REM WARN gg MSG Wookie
../tests/test.rem(1069): Trig = Saturday, 16 February, 1991
Entering UserFN gg(1)
@@ -5973,7 +5973,7 @@ Hello
On the next line
FSET msgsuffix(x) char(8) + " on the same line"
../tests/test.rem(1184): Function msgsuffix redefined (previously defined at ../tests/test.rem:1181)
../tests/test.rem(1184): Function `msgsuffix' redefined (previously defined at ../tests/test.rem:1181)
REM MSG Hello
../tests/test.rem(1185): Trig = Saturday, 16 February, 1991
Entering UserFN msgsuffix(5000)