stdio.rst 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. stdio.h
  2. ====================================
  3. 简介:
  4. =======
  5. 向标准输入输出里操作
  6. 函数列表:
  7. ======
  8. ``int64_t put_string(char *str, uint64_t front_color, uint64_t bg_color)``
  9. 输出字符串(带有前景色,背景色)
  10. ``int printf(const char *fmt, ...)``
  11. 就是正常的 ``printf``
  12. ``int sprintf(char *buf,const char *fmt,...)```
  13. 就是正常的 ``sprintf``
  14. ``int vsprintf(char *buf,const char *fmt,va_list args)``
  15. 格式化,不建议调用,请用 printf 或 sprintf 替代。
  16. 宏定义
  17. =======
  18. 字体颜色的宏定义
  19. =========
  20. ``#define COLOR_WHITE 0x00ffffff //白``
  21. ``#define COLOR_BLACK 0x00000000 //黑``
  22. ``#define COLOR_RED 0x00ff0000 //红``
  23. ``#define COLOR_ORANGE 0x00ff8000 //橙``
  24. ``#define COLOR_YELLOW 0x00ffff00 //黄``
  25. ``#define COLOR_GREEN 0x0000ff00 //绿``
  26. ``#define COLOR_BLUE 0x000000ff //蓝``
  27. ``#define COLOR_INDIGO 0x0000ffff //靛``
  28. ``#define COLOR_PURPLE 0x008000ff //紫``
  29. 无需使用
  30. =======
  31. ``#define SEEK_SET 0 /* Seek relative to start-of-file */``
  32. ``#define SEEK_CUR 1 /* Seek relative to current position */``
  33. ``#define SEEK_END 2 /* Seek relative to end-of-file */``
  34. ``#define SEEK_MAX 3``