Vim v1.14
CR = Code Readingという事で、今日からOlderなUnixのプログラムのコードを読んでみたいと思います。
alloc.c
#include "vim.h" #undef FALSE /* these are redefined in exec/types.h */ #undef TRUE #include <exec/memory.h> #undef FALSE #define FALSE 0 #undef TRUE #define TRUE 1
う〜ん・・・今だったら、
#ifndef bool typedef enum { false, true } bool; #endif
とかするなぁ。
ひじょうによみにくいです><
char *
lalloc(size, message)
u_long size;
bool_t message;
{
...
}
追記
って、お、bool_tがある。
/* * Boolean type definition and constants */ typedef int bool_t;
う〜ん・・・?