|
[ source navigation ] [ diff markup ] [ identifier search ] [ general search ] |
|||
|
001 /* Copyright (C) 2004 David Decotigny (with INSA Rennes for vsnprintf) 002 Copyright (C) 2003 The KOS Team 003 Copyright (C) 1999 Free Software Foundation 004 005 This program is free software; you can redistribute it and/or 006 modify it under the terms of the GNU General Public License 007 as published by the Free Software Foundation; either version 2 008 of the License, or (at your option) any later version. 009 010 This program is distributed in the hope that it will be useful, 011 but WITHOUT ANY WARRANTY; without even the implied warranty of 012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 GNU General Public License for more details. 014 015 You should have received a copy of the GNU General Public License 016 along with this program; if not, write to the Free Software 017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 018 USA. 019 */ 020 #include <crt.h> 021 #include <stdarg.h> 022 023 #include "debug.h" 024 025 int bochs_printf(const char *format, /* args */...) 026 { 027 char buff[4096]; 028 int len; 029 va_list ap; 030 031 va_start(ap, format); 032 len = vsnprintf(buff, sizeof(buff), format, ap); 033 va_end(ap); 034 035 if (len < 0) 036 return len; 037 038 return _sos_bochs_write(buff, len); 039 }
[ source navigation ] | [ diff markup ] | [ identifier search ] | [ general search ] |