int main (int argc, char *argv[]) { init_bbsenv(); resolve_brdshm(); apply_brdshm(fptr); return 0; }
int CreateBoardList(const USEREC *curuserp) { int i, j; char fname_zaprc[PATHLEN]; cp = curuserp; if (all_brds) /* lthuang */ { free(all_brds); all_brds = NULL; } num_alloc_brds = resolve_brdshm(); num_brds = 0; if (!all_brds) { if ((all_brds = (struct BoardList *) calloc(1, sizeof(struct BoardList) * num_alloc_brds)) == NULL) { return num_brds; } } if (cp) { sethomefile(fname_zaprc, cp->userid, UFNAME_ZAPRC); ZapRC_Init(fname_zaprc); } apply_brdshm_board_t(malloc_board); /* Merge spaces to tail */ for (i = 0, j = 0; i < num_brds; i++) { if (!all_brds[i].bhr) { if (j < i) j = i; while (++j < num_alloc_brds) { if (all_brds[j].bhr) { memcpy(&(all_brds[i]), &(all_brds[j]), sizeof(struct BoardList)); memset(&(all_brds[j]), 0, sizeof(struct BoardList)); break; } } if (j >= num_alloc_brds) break; } } return num_brds; }
int Class() { resolve_brdshm(); resolve_classhm(); cur_cs = search_class_by_cid(1); depth_class = 1; for (;;) { if (cursor_menu(4, 0, NULL, board_comms, sizeof(struct BoardList), &class_ccur, board_title, board_btitle, board_entry, class_get, class_max, board_findkey, 0, TRUE, SCREEN_SIZE-4) == 0) { if (--depth_class < 1) break; cur_cs = search_class_by_cid(save_cs[depth_class - 1]); class_ccur = save_class_ccur[depth_class - 1]; } } depth_class = 0; /* reload previous menu */ return C_LOAD; }