⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stdio.h

📁 一个小型的操作系统,采用gcc进行开发,几千行的代码,方便初学者学习
💻 H
字号:
/**  Snixos Project version 1.0, 2003.6*  (C) Copyright 2003,2004,2005 Jockeyson,KeqiangGao <Snallie@tom.com>*  All Rights Reserved.*  Distributed under the terms of the GNU General Public License.**  This program is a free and open source software and you can redistribute *  it and/or modify it under the terms of the GNU General Public License as*  published by the Free Software Foundation. As no any liablity is assumed *  for any incidental or consequential damages in connection with the *  information or program fragments contained herein,so any exception arised*  is at your own risk. It is ABSOLUTELY WITHOUT ANY WARRANTY.*  Bug report please send to Snallie@tom.com .*//*  stdio.h : prototype for the c function printf() in Snixos project  Author  : snallie@tom.com  Time    : 2003.6*/#ifndef _STDIO_H#define _STDIO_H#include <stdarg.h>enum colorMap {         ATTRIB_BLACK      = 0x0,        ATTRIB_BLUE       = 0x1,        ATTRIB_GREEN      = 0x2,        ATTRIB_CYAN       = 0x3,        ATTRIB_RED        = 0x4,        ATTRIB_MAGENTA    = 0x5,        ATTRIB_YELLOW     = 0x6,        ATTRIB_WHITE      = 0x7,        ATTRIB_BRIGHT     = 0x8,                                       ATTRIB_BLACK_BG   = 0x00,        ATTRIB_BLUE_BG    = 0x10,        ATTRIB_GREEN_BG   = 0x20,        ATTRIB_CYAN_BG    = 0x30,        ATTRIB_RED_BG     = 0x40,        ATTRIB_MAGENTA_BG = 0x50,        ATTRIB_YELLOW_BG  = 0x60,        ATTRIB_WHITE_BG   = 0x70,        ATTRIB_BLINK      = 0x80 };#define VIDTEXT_80X25 0#define VIDGRAPH_640X480 1#define NULL 0#define EOF 0x00 // end of file#define EOL 0x00 // end of line#define TRUE 1 #define FALSE 0 typedef int size_t;void screen_init( void );void screen_gotoxy( int x, int y );void screen_putchar( int x, int y, unsigned char c, unsigned char attrib );void set_attrib( unsigned char attrib );void print_char( char c );void print_str( char * str );void print_int( int num );void print_hex( unsigned int hex, int padded );void printf( char *fmt, ...);void sprintf( char *str, char *fmt, ... );void snprintf( char *str, int len, char *fmt, ... );#define TXTPutChar screen_putchar#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -