Subversion Repositories shark

Rev

Rev 1618 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
44 pj 1
/* Project:     OSLib
2
 * Description: The OS Construction Kit
3
 * Date:                1.6.2000
4
 * Idea by:             Luca Abeni & Gerardo Lamastra
5
 *
6
 * OSLib is an SO project aimed at developing a common, easy-to-use
7
 * low-level infrastructure for developing OS kernels and Embedded
8
 * Applications; it partially derives from the HARTIK project but it
9
 * currently is independently developed.
10
 *
11
 * OSLib is distributed under GPL License, and some of its code has
12
 * been derived from the Linux kernel source; also some important
13
 * ideas come from studying the DJGPP go32 extender.
14
 *
15
 * We acknowledge the Linux Community, Free Software Foundation,
16
 * D.J. Delorie and all the other developers who believe in the
17
 * freedom of software and ideas.
18
 *
19
 * For legalese, check out the included GPL license.
20
 */
21
 
22
/*      Console output functions        */
23
 
24
#include <ll/i386/hw-data.h>
25
#include <ll/i386/hw-instr.h>
26
#include <ll/i386/cons.h>
1621 fabio 27
#include <arch/i386/string.h>
28
#include <arch/i386/stdlib.h>
29
#include <arch/i386/stdio.h>
30
#include <arch/stdarg.h>
44 pj 31
 
32
FILE(cprintf);
33
 
34
int cprintf(char *fmt,...)
35
{
36
    static char cbuf[500];
37
    va_list parms;
38
    int result;
39
    va_start(parms,fmt);
40
    result = vsprintf(cbuf,fmt,parms);
41
    va_end(parms);
42
    cputs(cbuf);
43
    return(result);
44
}
45
 
46
int printf_xy(int x,int y,char attr,char *fmt,...)
47
{
48
    char cbuf[200];
49
    va_list parms;
50
    int result;
51
 
52
    va_start(parms,fmt);
53
    result = vsprintf(cbuf,fmt,parms);
54
    va_end(parms);
55
    puts_xy(x,y,attr,cbuf);
56
    return(result);
57
}