stdio.h 991 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <libc/sys/types.h>
  3. #include <stdarg.h>
  4. // 字体颜色的宏定义
  5. #define COLOR_WHITE 0x00ffffff //白
  6. #define COLOR_BLACK 0x00000000 //黑
  7. #define COLOR_RED 0x00ff0000 //红
  8. #define COLOR_ORANGE 0x00ff8000 //橙
  9. #define COLOR_YELLOW 0x00ffff00 //黄
  10. #define COLOR_GREEN 0x0000ff00 //绿
  11. #define COLOR_BLUE 0x000000ff //蓝
  12. #define COLOR_INDIGO 0x0000ffff //靛
  13. #define COLOR_PURPLE 0x008000ff //紫
  14. #define SEEK_SET 0 /* Seek relative to start-of-file */
  15. #define SEEK_CUR 1 /* Seek relative to current position */
  16. #define SEEK_END 2 /* Seek relative to end-of-file */
  17. #define SEEK_MAX 3
  18. /**
  19. * @brief 往屏幕上输出字符串
  20. *
  21. * @param str 字符串指针
  22. * @param front_color 前景色
  23. * @param bg_color 背景色
  24. * @return int64_t
  25. */
  26. int64_t put_string(char *str, uint64_t front_color, uint64_t bg_color);
  27. int printf(const char *fmt, ...);
  28. int sprintf(char *buf, const char *fmt, ...);
  29. int vsprintf(char *buf, const char *fmt, va_list args);