OSDN Git Service

[Refactor] #37353 ASCII マクロを util.h へ移動.
authordeskull <deskull@users.sourceforge.jp>
Tue, 11 Jun 2019 13:03:39 +0000 (22:03 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 11 Jun 2019 13:03:39 +0000 (22:03 +0900)
src/h-define.h
src/util.h

index 9954318..bc928e0 100644 (file)
 #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
  */
index c506047..7056f4e 100644 (file)
@@ -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)