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
88ceb16
..
de1aa4b
100644
(file)
--- a/
include/struct.h
+++ b/
include/struct.h
@@
-84,6
+84,10
@@
typedef enum {
* オペランドなし
*/
NONE = 0,
* オペランドなし
*/
NONE = 0,
+ /**
+ * COMET II命令以外
+ */
+ NOTCMD = 077,
} CMDTYPE;
/**
} CMDTYPE;
/**
@@
-93,6
+97,7
@@
typedef struct {
char *name; /**<命令名 */
CMDTYPE type; /**<命令タイプ */
WORD code; /**<命令コード */
char *name; /**<命令名 */
CMDTYPE type; /**<命令タイプ */
WORD code; /**<命令コード */
+ const void (*ptr); /**<命令の関数ポインタ */
} CMD;
/**
} CMD;
/**
@@
-150,6
+155,11
@@
bool create_code_type();
*/
CMDTYPE getcmdtype(WORD code);
*/
CMDTYPE getcmdtype(WORD code);
+/**
+ * 命令コードから命令の関数ポインタを返す
+ */
+const void (*getcmdptr(WORD code));
+
/**
* コードがキーの命令ハッシュ表を解放する
*/
/**
* コードがキーの命令ハッシュ表を解放する
*/