colors.c

来自「MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程」· C语言 代码 · 共 33 行

C
33
字号
/*   Color stuff for Upshot   Ed Karrels   Argonne National Laboratory*/#include "colors.h"static char *color_list[] = {  "red", "blue", "green", "cyan", "yellow", "magenta", "orange3",  "maroon", "gray45", "gray75", "purple4", "darkgreen", "white",  "black", 0};static int color_no = 0;int Color_Reset() {  color_no = 0;  return 0;}char *Color_Get() {  char *color;  color = color_list[color_no++];  if (!color_list[color_no])    color_no = 0;  return color;}

⌨️ 快捷键说明

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