#include "bytecode.h"
#include "opaque.h"
#include "syntax.h"
+#include "ent/ent.h"
EXFUN(Ffetch_bytecode, 1);
{
Lisp_Object obj;
va_list args;
- char *buf = alloca_array(char, strlen(error_message) + 128);
+ int maxsz = strlen(error_message) + 128;
+ char *buf = alloca_array(char, maxsz);
- sprintf(buf, "%s", error_message);
+ int sz=snprintf(buf, maxsz, "%s", error_message);
+ assert(sz>=0 && sz<maxsz);
va_start(args, error_message);
obj = emacs_doprnt_string_va((const Bufbyte *)GETTEXT(buf), Qnil, -1,
args);
int docp = f->flags.documentationp;
int intp = f->flags.interactivep;
struct gcpro gcpro1, gcpro2;
- char buf[100];
GCPRO2(obj, printcharfun);
write_c_string(print_readably ? "#[" : "#<compiled-function ",
NGCPRO1(instructions);
if (STRINGP(instructions) && !print_readably) {
/* We don't usually want to see that junk in the bytecode. */
- sprintf(buf, "\"...(%ld)\"",
- (long)XSTRING_CHAR_LENGTH(instructions));
- write_c_string(buf, printcharfun);
+ write_fmt_str(printcharfun, "\"...(%ld)\"",
+ (long)XSTRING_CHAR_LENGTH(instructions));
} else
print_internal(instructions, printcharfun, escapeflag);
NUNGCPRO;
escapeflag);
/* COMPILED_STACK_DEPTH = 3 */
- sprintf(buf, " %d", compiled_function_stack_depth(f));
- write_c_string(buf, printcharfun);
+ write_fmt_str(printcharfun, " %d", compiled_function_stack_depth(f));
/* COMPILED_DOC_STRING = 4 */
if (docp || intp) {