diff --git a/include/picrin.h b/include/picrin.h index f752d2cf..8dcd87b5 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -21,8 +21,8 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef PICRIN_H__ -#define PICRIN_H__ +#ifndef PICRIN_H +#define PICRIN_H #if defined(__cplusplus) extern "C" { @@ -188,8 +188,8 @@ struct pic_lib *pic_open_library(pic_state *, pic_value); struct pic_lib *pic_find_library(pic_state *, pic_value); #define pic_deflibrary(pic, spec) \ - pic_deflibrary_helper__(pic, GENSYM(i), GENSYM(prev_lib), spec) -#define pic_deflibrary_helper__(pic, i, prev_lib, spec) \ + pic_deflibrary_helper_(pic, GENSYM(i), GENSYM(prev_lib), spec) +#define pic_deflibrary_helper_(pic, i, prev_lib, spec) \ for (int i = 0; ! i; ) \ for (struct pic_lib *prev_lib; ! i; ) \ for ((prev_lib = pic->lib), pic_open_library(pic, pic_read_cstr(pic, spec)), pic_in_library(pic, pic_read_cstr(pic, spec)); ! i++; pic->lib = prev_lib) diff --git a/include/picrin/blob.h b/include/picrin/blob.h index 5837c04f..29a285e9 100644 --- a/include/picrin/blob.h +++ b/include/picrin/blob.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_BLOB_H__ -#define PICRIN_BLOB_H__ +#ifndef PICRIN_BLOB_H +#define PICRIN_BLOB_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/cont.h b/include/picrin/cont.h index 0a0da9f1..eeabb798 100644 --- a/include/picrin/cont.h +++ b/include/picrin/cont.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_CONT_H__ -#define PICRIN_CONT_H__ +#ifndef PICRIN_CONT_H +#define PICRIN_CONT_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/data.h b/include/picrin/data.h index a80ff209..0e59095d 100644 --- a/include/picrin/data.h +++ b/include/picrin/data.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_DATA_H__ -#define PICRIN_DATA_H__ +#ifndef PICRIN_DATA_H +#define PICRIN_DATA_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/dict.h b/include/picrin/dict.h index bf681cad..8d6077af 100644 --- a/include/picrin/dict.h +++ b/include/picrin/dict.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_DICT_H__ -#define PICRIN_DICT_H__ +#ifndef PICRIN_DICT_H +#define PICRIN_DICT_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/error.h b/include/picrin/error.h index bea590e2..5005346a 100644 --- a/include/picrin/error.h +++ b/include/picrin/error.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_ERROR_H__ -#define PICRIN_ERROR_H__ +#ifndef PICRIN_ERROR_H +#define PICRIN_ERROR_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/gc.h b/include/picrin/gc.h index c5f33e6a..9f165d80 100644 --- a/include/picrin/gc.h +++ b/include/picrin/gc.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_GC_H__ -#define PICRIN_GC_H__ +#ifndef PICRIN_GC_H +#define PICRIN_GC_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/irep.h b/include/picrin/irep.h index 4cb1cfba..c6e5befb 100644 --- a/include/picrin/irep.h +++ b/include/picrin/irep.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_IREP_H__ -#define PICRIN_IREP_H__ +#ifndef PICRIN_IREP_H +#define PICRIN_IREP_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/lib.h b/include/picrin/lib.h index ba43e49d..98ab3ae8 100644 --- a/include/picrin/lib.h +++ b/include/picrin/lib.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_LIB_H__ -#define PICRIN_LIB_H__ +#ifndef PICRIN_LIB_H +#define PICRIN_LIB_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/macro.h b/include/picrin/macro.h index e4f03b42..79148e51 100644 --- a/include/picrin/macro.h +++ b/include/picrin/macro.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_MACRO_H__ -#define PICRIN_MACRO_H__ +#ifndef PICRIN_MACRO_H +#define PICRIN_MACRO_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/pair.h b/include/picrin/pair.h index 49de01cc..89cfe938 100644 --- a/include/picrin/pair.h +++ b/include/picrin/pair.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_PAIR_H__ -#define PICRIN_PAIR_H__ +#ifndef PICRIN_PAIR_H +#define PICRIN_PAIR_H #if defined(__cplusplus) extern "C" { @@ -36,8 +36,8 @@ pic_value pic_list_by_array(pic_state *, size_t, pic_value *); pic_value pic_make_list(pic_state *, int, pic_value); #define pic_for_each(var, list) \ - pic_for_each_helper__(var, GENSYM(tmp), list) -#define pic_for_each_helper__(var, tmp, list) \ + pic_for_each_helper_(var, GENSYM(tmp), list) +#define pic_for_each_helper_(var, tmp, list) \ for (pic_value tmp = (list); \ pic_nil_p(tmp) ? false : ((var = pic_car(pic, tmp)), true); \ tmp = pic_cdr(pic, tmp)) diff --git a/include/picrin/port.h b/include/picrin/port.h index e51d8759..334746cb 100644 --- a/include/picrin/port.h +++ b/include/picrin/port.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_PORT_H__ -#define PICRIN_PORT_H__ +#ifndef PICRIN_PORT_H +#define PICRIN_PORT_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/proc.h b/include/picrin/proc.h index b443d3d9..bf5dda36 100644 --- a/include/picrin/proc.h +++ b/include/picrin/proc.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_PROC_H__ -#define PICRIN_PROC_H__ +#ifndef PICRIN_PROC_H +#define PICRIN_PROC_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/read.h b/include/picrin/read.h index c77398e3..18d46ff7 100644 --- a/include/picrin/read.h +++ b/include/picrin/read.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_READ_H__ -#define PICRIN_READ_H__ +#ifndef PICRIN_READ_H +#define PICRIN_READ_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/string.h b/include/picrin/string.h index 5a224d3d..325bec11 100644 --- a/include/picrin/string.h +++ b/include/picrin/string.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_STRING_H__ -#define PICRIN_STRING_H__ +#ifndef PICRIN_STRING_H +#define PICRIN_STRING_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/util.h b/include/picrin/util.h index f2f5e719..d56cd9f6 100644 --- a/include/picrin/util.h +++ b/include/picrin/util.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_UTIL_H__ -#define PICRIN_UTIL_H__ +#ifndef PICRIN_UTIL_H +#define PICRIN_UTIL_H #if defined(__cplusplus) extern "C" { @@ -20,12 +20,12 @@ extern "C" { #define FALLTHROUGH ((void)0) #define UNUSED(v) ((void)(v)) -#define GENSYM2__(x,y) G##x##_##y##__ -#define GENSYM1__(x,y) GENSYM2__(x,y) +#define GENSYM2_(x,y) G##x##_##y##__ +#define GENSYM1_(x,y) GENSYM2_(x,y) #if defined(__COUNTER__) -# define GENSYM(x) GENSYM1__(__COUNTER__,x) +# define GENSYM(x) GENSYM1_(__COUNTER__,x) #else -# define GENSYM(x) GENSYM1__(__LINE__,x) +# define GENSYM(x) GENSYM1_(__LINE__,x) #endif #if GCC_VERSION >= 40500 || __clang__ @@ -36,8 +36,8 @@ extern "C" { #endif #define SWAP(type,a,b) \ - SWAP_HELPER__(type,GENSYM(tmp),a,b) -#define SWAP_HELPER__(type,tmp,a,b) \ + SWAP_HELPER_(type,GENSYM(tmp),a,b) +#define SWAP_HELPER_(type,tmp,a,b) \ do { \ type tmp = (a); \ (a) = (b); \ diff --git a/include/picrin/value.h b/include/picrin/value.h index dc8c6297..560e578a 100644 --- a/include/picrin/value.h +++ b/include/picrin/value.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_VALUE_H__ -#define PICRIN_VALUE_H__ +#ifndef PICRIN_VALUE_H +#define PICRIN_VALUE_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/var.h b/include/picrin/var.h index 556647a8..4c1ba7c5 100644 --- a/include/picrin/var.h +++ b/include/picrin/var.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_VAR_H__ -#define PICRIN_VAR_H__ +#ifndef PICRIN_VAR_H +#define PICRIN_VAR_H #if defined(__cplusplus) extern "C" { diff --git a/include/picrin/vector.h b/include/picrin/vector.h index d4e54da9..514ecb4b 100644 --- a/include/picrin/vector.h +++ b/include/picrin/vector.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_VECTOR_H__ -#define PICRIN_VECTOR_H__ +#ifndef PICRIN_VECTOR_H +#define PICRIN_VECTOR_H #if defined(__cplusplus) extern "C" {