Newer
Older
ubixos / src / sys / kernel / kprintf.c
@reddawg reddawg on 28 May 2002 693 bytes Its Been lots of work
/**************************************************************************************
 Copyright (c) 2002
      The UbixOS Project

 $Id$
**************************************************************************************/

#include <drivers/video.h>
#include <stdarg.h>

int vsprintf(char *buf, const char *fmt, vaList args);

int kprintf(const char *fmt, ...) {
  vaList args;
  int i;
  char buf[1024];
  va_start(args, fmt);
  i=vsprintf(buf,fmt,args);
  va_end(args);
  kprint(buf);
  printColor = defaultColor;
  return(i);
  }

int sprintf(char *buf,const char *fmt, ...) {
  vaList args;
  int i;
  va_start(args, fmt);
  i=vsprintf(buf,fmt,args);
  va_end(args);
  return(i);
  }