projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
COMETII命令実行部分を、switch文から関数ポインタへ変更
[YACASL2.git]
/
include
/
struct.h
diff --git
a/include/struct.h
b/include/struct.h
index
39f874b
..
de1aa4b
100644
(file)
--- a/
include/struct.h
+++ b/
include/struct.h
@@
-97,6
+97,7
@@
typedef struct {
char *name; /**<命令名 */
CMDTYPE type; /**<命令タイプ */
WORD code; /**<命令コード */
char *name; /**<命令名 */
CMDTYPE type; /**<命令タイプ */
WORD code; /**<命令コード */
+ const void (*ptr); /**<命令の関数ポインタ */
} CMD;
/**
} CMD;
/**
@@
-154,6
+155,11
@@
bool create_code_type();
*/
CMDTYPE getcmdtype(WORD code);
*/
CMDTYPE getcmdtype(WORD code);
+/**
+ * 命令コードから命令の関数ポインタを返す
+ */
+const void (*getcmdptr(WORD code));
+
/**
* コードがキーの命令ハッシュ表を解放する
*/
/**
* コードがキーの命令ハッシュ表を解放する
*/