Also takes args differently: pass one pointer to an array of strings
in addition to the format string which is separate.
Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GNU Emacs.
another macro. */
#include "character.h"
-static int doprnt1 ();
-
/* Generate output from a format-spec FORMAT,
terminated at position FORMAT_END.
Output goes in BUFFER, which has room for BUFSIZE chars.
Integers are passed as C integers. */
int
-doprnt (buffer, bufsize, format, format_end, nargs, args)
- char *buffer;
- register int bufsize;
- char *format;
- char *format_end;
- int nargs;
- char **args;
+doprnt (char *buffer, register int bufsize, char *format, char *format_end, int nargs, char **args)
{
int cnt = 0; /* Number of arg to gobble next */
register char *fmt = format; /* Pointer into format string */
/* Truncate the string at character boundary. */
tem = bufsize;
while (!CHAR_HEAD_P (string[tem - 1])) tem--;
- bcopy (string, bufptr, tem);
+ memcpy (bufptr, string, tem);
/* We must calculate WIDTH again. */
width = strwidth (bufptr, tem);
}
else
- bcopy (string, bufptr, tem);
+ memcpy (bufptr, string, tem);
bufptr += tem;
bufsize -= tem;
if (minlen < 0)