• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisionc3473f619b2136cf391d12b521330741a46428fe (tree)
Time2019-05-05 11:38:40
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 message* を util.c/h を移動.

Change Summary

Incremental Difference

--- a/src/externs.h
+++ b/src/externs.h
@@ -180,12 +180,7 @@ extern bool *macro__cmd;
180180 extern char *macro__buf;
181181 extern STR_OFFSET quark__num;
182182 extern concptr *quark__str;
183-extern u32b message__next;
184-extern u32b message__last;
185-extern u32b message__head;
186-extern u32b message__tail;
187-extern u32b *message__ptr;
188-extern char *message__buf;
183+
189184 extern BIT_FLAGS option_flag[8];
190185 extern BIT_FLAGS option_mask[8];
191186 extern BIT_FLAGS window_flag[8];
--- a/src/util.c
+++ b/src/util.c
@@ -20,6 +20,36 @@
2020 #include "cmd-dump.h"
2121
2222
23+/*
24+ * The next "free" index to use
25+ */
26+u32b message__next;
27+
28+/*
29+ * The index of the oldest message (none yet)
30+ */
31+u32b message__last;
32+
33+/*
34+ * The next "free" offset
35+ */
36+u32b message__head;
37+
38+/*
39+ * The offset to the oldest used char (none yet)
40+ */
41+u32b message__tail;
42+
43+/*
44+ * The array of offsets, by index [MESSAGE_MAX]
45+ */
46+u32b *message__ptr;
47+
48+/*
49+ * The array of chars, by offset [MESSAGE_BUF]
50+ */
51+char *message__buf;
52+
2353 static int num_more = 0;
2454
2555 /* Save macro trigger string for use in inkey_special() */
--- a/src/util.h
+++ b/src/util.h
@@ -33,6 +33,13 @@ struct alloc_entry
3333 u16b total; /* Unused for now */
3434 };
3535
36+extern u32b message__next;
37+extern u32b message__last;
38+extern u32b message__head;
39+extern u32b message__tail;
40+extern u32b *message__ptr;
41+extern char *message__buf;
42+
3643 /* util.c */
3744 extern errr path_parse(char *buf, int max, concptr file);
3845 extern errr path_build(char *buf, int max, concptr path, concptr file);
--- a/src/variable.c
+++ b/src/variable.c
@@ -217,37 +217,6 @@ STR_OFFSET quark__num;
217217 */
218218 concptr *quark__str;
219219
220-
221-/*
222- * The next "free" index to use
223- */
224-u32b message__next;
225-
226-/*
227- * The index of the oldest message (none yet)
228- */
229-u32b message__last;
230-
231-/*
232- * The next "free" offset
233- */
234-u32b message__head;
235-
236-/*
237- * The offset to the oldest used char (none yet)
238- */
239-u32b message__tail;
240-
241-/*
242- * The array of offsets, by index [MESSAGE_MAX]
243- */
244-u32b *message__ptr;
245-
246-/*
247- * The array of chars, by offset [MESSAGE_BUF]
248- */
249-char *message__buf;
250-
251220 BIT_FLAGS option_flag[8]; //!< The array of normal options
252221 BIT_FLAGS option_mask[8]; //!< The array of normal options
253222 BIT_FLAGS window_flag[8]; //!< The array of window options
Show on old repository browser