• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision75ac7571b16104fbcf3d6f88d69006f1c978fa2a (tree)
Time2019-06-11 22:03:39
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 ASCII マクロを util.h へ移動.

Change Summary

Incremental Difference

--- a/src/h-define.h
+++ b/src/h-define.h
@@ -87,22 +87,6 @@
8787 #undef SGN
8888 #define SGN(a) (((a) < 0) ? (-1) : ((a) != 0))
8989
90-
91-/*
92- * Hack -- allow use of "ASCII" and "EBCDIC" for "indexes", "digits",
93- * and "Control-Characters".
94- *
95- * Note that all "index" values must be "lowercase letters", while
96- * all "digits" must be "digits". Control characters can be made
97- * from any legal characters.
98- */
99-#define A2I(X) ((X) - 'a')
100-#define I2A(X) ((char)(X) + 'a')
101-#define D2I(X) ((X) - '0')
102-#define I2D(X) ((X) + '0')
103-#define KTRL(X) ((X) & 0x1F)
104-#define ESCAPE '\033'
105-
10690 /*
10791 * Refer to the member at offset of structure
10892 */
--- a/src/util.h
+++ b/src/util.h
@@ -1,6 +1,21 @@
11 #pragma once
22
33 /*
4+ * Hack -- allow use of "ASCII" and "EBCDIC" for "indexes", "digits",
5+ * and "Control-Characters".
6+ *
7+ * Note that all "index" values must be "lowercase letters", while
8+ * all "digits" must be "digits". Control characters can be made
9+ * from any legal characters.
10+ */
11+#define A2I(X) ((X) - 'a')
12+#define I2A(X) ((char)(X) + 'a')
13+#define D2I(X) ((X) - '0')
14+#define I2D(X) ((X) + '0')
15+#define KTRL(X) ((X) & 0x1F)
16+#define ESCAPE '\033'
17+
18+/*
419 * Hack -- Prepare to use the "Secure" routines
520 */
621 #if defined(SET_UID) && defined(SECURE)
Show on old repository browser