diff options
-rw-r--r-- | include/pttstruct.h | 5 | ||||
-rw-r--r-- | mbbsd/cache.c | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h index 58ac0810..6e879f92 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -569,9 +569,10 @@ typedef struct { char notes[MAX_MOVIE][256*11]; char gap_18[sizeof(int)]; char today_is[20]; - int n_notes[MAX_MOVIE_SECTION]; /* 一節中有幾個 看板 */ + // FIXME remove never_used__n_notes & never_used__next_refresh + int never_used__n_notes[MAX_MOVIE_SECTION]; /* 一節中有幾個 看板 */ char gap_19[sizeof(int)]; - int next_refresh[MAX_MOVIE_SECTION]; /* 下一次要refresh的 看板 */ + int never_used__next_refresh[MAX_MOVIE_SECTION]; /* 下一次要refresh的 看板 */ char gap_20[sizeof(int)]; msgque_t loginmsg; /* 進站水球 */ int max_film; diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 465a59e0..45c21f06 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -849,7 +849,7 @@ reload_pttcache(void) fileheader_t item, subitem; char pbuf[256], buf[256], *chr; FILE *fp, *fp1, *fp2; - int id, section = 0; + int id; SHM->Pbusystate = 1; SHM->max_film = 0; @@ -864,8 +864,6 @@ reload_pttcache(void) pbuf, item.filename); if (!(fp1 = fopen(buf, "r"))) continue; - SHM->next_refresh[section] = SHM->n_notes[section] = id; - section++; while (fread(&subitem, sizeof(subitem), 1, fp1)) { snprintf(buf, sizeof(buf), "%s/%s/%s", pbuf, item.filename, @@ -880,14 +878,13 @@ reload_pttcache(void) break; } fclose(fp1); - if (id >= MAX_MOVIE || section >= MAX_MOVIE_SECTION) + if (id >= MAX_MOVIE) break; } } fclose(fp); } - SHM->next_refresh[section] = -1; - SHM->n_notes[section] = SHM->max_film = id - 1; + SHM->max_film = id - 1; SHM->max_history = SHM->max_film - 2; if (SHM->max_history > MAX_HISTORY - 1) SHM->max_history = MAX_HISTORY - 1; |