diff options
| author | Mistivia <i@mistivia.com> | 2025-03-23 23:37:25 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-03-23 23:37:25 +0800 |
| commit | 4f7f0aa49844756dbf430f35600d7c88e1a6a730 (patch) | |
| tree | 7b3fcc235f33ebec5c7623b6cc3946a138162682 /src/as_op.c | |
| parent | 45e53e55aa555d5a53d9d489e8447e9112eac1f0 (diff) | |
refactor names
Diffstat (limited to 'src/as_op.c')
| -rw-r--r-- | src/as_op.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/as_op.c b/src/as_op.c index 6cfd8ce..8b5d887 100644 --- a/src/as_op.c +++ b/src/as_op.c @@ -2,13 +2,13 @@ #include <string.h> -struct opTableEntry{ +struct op_table_entry { enum op op; const char* name; }; -struct opTableEntry opTable[] = { +struct op_table_entry op_table [] = { // OP_SP, OP_SSP, OP_BP, OP_SBP, OP_PC, OP_RV, OP_SRV, {OP_SP, "sp"}, {OP_SSP, "ssp"}, @@ -93,9 +93,9 @@ struct opTableEntry opTable[] = { }; enum op str2op(const char* str) { - for (int i = 0; opTable[i].name != NULL; i++) { - if (strcmp(opTable[i].name, str) == 0) { - return opTable[i].op; + for (int i = 0; op_table[i].name != NULL; i++) { + if (strcmp(op_table[i].name, str) == 0) { + return op_table[i].op; } } return OP_END; |
