Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9125da08
Commit
9125da08
authored
Mar 06, 1994
by
Richard M. Stallman
Browse files
(error): Use doprnt. Make buffer larger as necessary.
parent
288f95bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
src/eval.c
src/eval.c
+28
-2
No files found.
src/eval.c
View file @
9125da08
...
...
@@ -1302,12 +1302,38 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
void
error
(
m
,
a1
,
a2
,
a3
)
char
*
m
;
char
*
a1
,
*
a2
,
*
a3
;
{
char
buf
[
200
];
sprintf
(
buf
,
m
,
a1
,
a2
,
a3
);
int
size
=
200
;
int
mlen
;
char
*
buffer
=
buf
;
char
*
args
[
3
];
int
allocated
=
0
;
Lisp_Object
string
;
args
[
0
]
=
a1
;
args
[
1
]
=
a2
;
args
[
2
]
=
a3
;
mlen
=
strlen
(
m
);
while
(
1
)
Fsignal
(
Qerror
,
Fcons
(
build_string
(
buf
),
Qnil
));
{
int
used
=
doprnt
(
buf
,
size
,
m
,
m
+
mlen
,
3
,
args
);
if
(
used
<
size
)
break
;
size
*=
2
;
if
(
allocated
)
buffer
=
(
char
*
)
xrealloc
(
buffer
,
size
);
buffer
=
(
char
*
)
xmalloc
(
size
);
}
string
=
build_string
(
buf
);
if
(
allocated
)
free
(
buffer
);
Fsignal
(
Qerror
,
Fcons
(
string
,
Qnil
));
}
DEFUN
(
"commandp"
,
Fcommandp
,
Scommandp
,
1
,
1
,
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment