projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doxygenドキュメントの修正
[YACASL2.git]
/
src
/
struct.c
diff --git
a/src/struct.c
b/src/struct.c
index
f6d4128
..
72c1c9c
100644
(file)
--- a/
src/struct.c
+++ b/
src/struct.c
@@
-64,7
+64,7
@@
static int comet2cmdsize = ARRAYSIZE(comet2cmd);
* ハッシュ表のサイズ
*/
enum {
* ハッシュ表のサイズ
*/
enum {
- CMDTABSIZE =
39
,
+ CMDTABSIZE =
41
,
};
/**
};
/**
@@
-112,7
+112,7
@@
unsigned hash_cmdtype(const char *cmd, CMDTYPE type)
*/
bool create_cmdtable(CMDTAB_HASH hash)
{
*/
bool create_cmdtable(CMDTAB_HASH hash)
{
- CMDTAB *p;
+ CMDTAB *p
= NULL
;
unsigned hashval;
int i;
unsigned hashval;
int i;
@@
-122,7
+122,7
@@
bool create_cmdtable(CMDTAB_HASH hash)
if(hash == HASH_CMDTYPE) {
hashval = hash_cmdtype(comet2cmd[i].name, comet2cmd[i].type);
} else if(hash == HASH_CODE) {
if(hash == HASH_CMDTYPE) {
hashval = hash_cmdtype(comet2cmd[i].name, comet2cmd[i].type);
} else if(hash == HASH_CODE) {
- hashval = hash_code(
(&comet2cmd[i])->
code);
+ hashval = hash_code(
comet2cmd[i].
code);
}
p->next = cmdtab[hash][hashval];
cmdtab[hash][hashval] = p;
}
p->next = cmdtab[hash][hashval];
cmdtab[hash][hashval] = p;
@@
-141,9
+141,9
@@
void free_cmdtable(CMDTAB_HASH hash)
for(i = 0; i < CMDTABSIZE; i++) {
for(p = cmdtab[hash][i]; p != NULL; p = q) {
q = p->next;
for(i = 0; i < CMDTABSIZE; i++) {
for(p = cmdtab[hash][i]; p != NULL; p = q) {
q = p->next;
- cmdtab[hash][i] = NULL;
FREE(p);
}
FREE(p);
}
+ cmdtab[hash][i] = NULL;
}
}
}
}