From: deskull Date: Tue, 11 Jun 2019 13:03:39 +0000 (+0900) Subject: [Refactor] #37353 ASCII マクロを util.h へ移動. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=75ac7571b16104fbcf3d6f88d69006f1c978fa2a;p=hengband%2Fhengband.git [Refactor] #37353 ASCII マクロを util.h へ移動. --- diff --git a/src/h-define.h b/src/h-define.h index 9954318a0..bc928e0a3 100644 --- a/src/h-define.h +++ b/src/h-define.h @@ -87,22 +87,6 @@ #undef SGN #define SGN(a) (((a) < 0) ? (-1) : ((a) != 0)) - -/* - * Hack -- allow use of "ASCII" and "EBCDIC" for "indexes", "digits", - * and "Control-Characters". - * - * Note that all "index" values must be "lowercase letters", while - * all "digits" must be "digits". Control characters can be made - * from any legal characters. - */ -#define A2I(X) ((X) - 'a') -#define I2A(X) ((char)(X) + 'a') -#define D2I(X) ((X) - '0') -#define I2D(X) ((X) + '0') -#define KTRL(X) ((X) & 0x1F) -#define ESCAPE '\033' - /* * Refer to the member at offset of structure */ diff --git a/src/util.h b/src/util.h index c506047c5..7056f4e1f 100644 --- a/src/util.h +++ b/src/util.h @@ -1,6 +1,21 @@ #pragma once /* + * Hack -- allow use of "ASCII" and "EBCDIC" for "indexes", "digits", + * and "Control-Characters". + * + * Note that all "index" values must be "lowercase letters", while + * all "digits" must be "digits". Control characters can be made + * from any legal characters. + */ +#define A2I(X) ((X) - 'a') +#define I2A(X) ((char)(X) + 'a') +#define D2I(X) ((X) - '0') +#define I2D(X) ((X) + '0') +#define KTRL(X) ((X) & 0x1F) +#define ESCAPE '\033' + +/* * Hack -- Prepare to use the "Secure" routines */ #if defined(SET_UID) && defined(SECURE)