Source of Nothingness - 2009-12-20 :

* 2009-12-20 :

#define XDEF(a, b, c, d, e, f, g) {a, b, c, d, e, f, g}

#define XDEFSF(a, b, c) XDEF (a, b, c, 2, 0, FFspecial_form, 0)
#define XSI_DEFSF3(name) XDEFSF (STR (name), "Fsi_" STR(name), "Ssi_" STR(name))

#define XDEFUN(a, b, c, d, e, f) XDEF (a, b, c, d, e, f, 0)
#define XDEFUN3(name, req, opt, f) \
  XDEFUN (STR (name), "F" STR (name), "S" STR (name), req, opt, f)
#define XSI_DEFUN3(name, req, opt, f) \
  XDEFUN (STR (name), "Fsi_" STR(name), "Ssi_" STR (name), req, opt, f)

#define XVDEF(a, b, c) {a, 0, b, 0, 0, c}
#define XDEFCONST(a, b) XVDEF (a, b, SFconstant | SFspecial)
#define XDEFCONST2Q(name) XDEFCONST (STR (name), "Q" STR (name))
#define XDEFVAR(a, b) XVDEF (a, b, SFspecial)
#define XDEFVAR2(name) XDEFVAR (STR (name), "V" STR(name))
#define XSI_DEFVAR2(name) XDEFVAR (STR (name), "Vsi_" STR (name))
#define XMAKE_SYMBOL(a, b) XVDEF (a, b, 0)
#define XMAKE_SYMBOL2(name) XMAKE_SYMBOL (STR (name), "V" STR (name))
#define XMAKE_SYMBOL2QC(name) XMAKE_SYMBOL (STR (name), "QC" STR (name))
#define XSI_MAKE_SYMBOL2(name) XMAKE_SYMBOL (STR (name), "Vsi_" STR(name))


ソース書き換え無しでビルドプロセスをいじってよいならg++ -Eを一旦中間ファイルに落とすのは簡単にいけますけど…いまいち。

佐野

bulbさんのやり方が一番修正が少なくていいかなぁと。
あんまり理解してませんが、http://docs.sun.com/app/docs/doc/821-0386/bjakk?l=ja&a=viewで紹介されているK&R Cでのトークン連結方法の前者のやり方が使えるということなんだと思います。 -- NANRI

update : 2010-01-15 (Fri) 19:06:08