From 75ac7571b16104fbcf3d6f88d69006f1c978fa2a Mon Sep 17 00:00:00 2001 From: deskull Date: Tue, 11 Jun 2019 22:03:39 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20ASCII=20=E3=83=9E=E3=82=AF?= =?utf8?q?=E3=83=AD=E3=82=92=20util.h=20=E3=81=B8=E7=A7=BB=E5=8B=95?= =?utf8?q?=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/h-define.h | 16 ---------------- src/util.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 16 deletions(-) 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) -- 2.11.0