/* FORMATTED PUT TO INTERNAL BUFFER
 * "C Letter", V2 No 2 pp7-10 (April 1981), and V2 No 3 pp8-11 (August 1981)
 */
#include <std.h>

/* sprintf put routine
 */
VOID _cache(sp, s, n)
  FAST TEXT **sp, *s;
  FAST COUNT n;
  {

  while (0 < n--)
    {
    **sp = *s++;
    ++(*sp);
    }
    **sp = '0';
  }

/* put to internal buffer
 */
TEXT *sprintf(s, f, args)
  TEXT *s, *f, *args;
  {
  TEXT *pad;

  pad = s;
  cprint(&_cache, &pad, f, &args);
  return (pad);
  }
