浏览代码

add config.h

tags/v20240302
Emil Williams 4 个月前
父节点
当前提交
39e27a03dd
找不到此签名对应的密钥 GPG 密钥 ID: 5432DB986FDBCF8A
共有 2 个文件被更改,包括 23 次插入21 次删除
  1. +3
    -21
      bake.c
  2. +20
    -0
      config.h

+ 3
- 21
bake.c 查看文件

@@ -3,7 +3,7 @@
*
* Licensed under the GNU Public License version 3 only, see LICENSE.
*
* @BAKE cc -std=c89 -O2 $@ -o $* $+ # @STOP
* @BAKE cc -std=c89 -O2 -I. $@ -o $* $+ # @STOP
*/

#define _POSIX_C_SOURCE 200809L
@@ -22,29 +22,11 @@
#include <sys/stat.h>
#include <unistd.h>

/* Require space after START */
#define REQUIRE_SPACE
/* Enable colors */
#define COLOR

#ifdef COLOR
#define RED "\e[91m"
#define GREEN "\e[92m"
#define YELLOW "\e[93m"
#define DIM "\e[2m"
#define BOLD "\e[1m"
#define RESET "\e[0m"
#else
#define RED
#define GREEN
#define YELLOW
#define DIM
#define BOLD
#define RESET
#endif
#include "config.h"

#define START "@BAKE"
#define STOP "@STOP"

#define HELP \
BOLD "target-file" RESET " [arguments ...]\n" \
"Use the format `" BOLD "@BAKE" RESET " cmd ...' within the target-file, this will execute the\n" \


+ 20
- 0
config.h 查看文件

@@ -0,0 +1,20 @@
/* Require space after START */
#define REQUIRE_SPACE

#define ENABLE_COLOR

#ifdef ENABLE_COLOR
# define RED "\e[91m"
# define GREEN "\e[92m"
# define YELLOW "\e[93m"
# define DIM "\e[2m"
# define BOLD "\e[1m"
# define RESET "\e[0m"
#else
# define RED
# define GREEN
# define YELLOW
# define DIM
# define BOLD
# define RESET
#endif

正在加载...
取消
保存