| 1 |
/*************************************************************************** |
/* SPDX-License-Identifier: GPL-3.0-or-later */ |
| 2 |
menu.c - description |
/* |
| 3 |
------------------- |
* menu |
| 4 |
Copyright : (C) 2004-2025 by Leaflet |
* - configurable user interactive menu feature |
| 5 |
Email : leaflet@leafok.com |
* |
| 6 |
***************************************************************************/ |
* Copyright (C) 2004-2025 by Leaflet <leaflet@leafok.com> |
| 7 |
|
*/ |
|
/*************************************************************************** |
|
|
* * |
|
|
* This program is free software; you can redistribute it and/or modify * |
|
|
* it under the terms of the GNU General Public License as published by * |
|
|
* the Free Software Foundation; either version 3 of the License, or * |
|
|
* (at your option) any later version. * |
|
|
* * |
|
|
***************************************************************************/ |
|
| 8 |
|
|
| 9 |
#include "bbs.h" |
#include "bbs.h" |
| 10 |
#include "bbs_cmd.h" |
#include "bbs_cmd.h" |
| 30 |
|
|
| 31 |
#define MENU_SET_RESERVED_LENGTH (sizeof(int16_t) * 4) |
#define MENU_SET_RESERVED_LENGTH (sizeof(int16_t) * 4) |
| 32 |
|
|
| 33 |
#define MENU_SHMGET_RETRY_LIMIT 3 |
#define MENU_SHMGET_RETRY_LIMIT 10 |
| 34 |
|
|
| 35 |
MENU_SET bbs_menu; |
MENU_SET bbs_menu; |
| 36 |
MENU_SET top10_menu; |
MENU_SET top10_menu; |
| 110 |
conf_file, size, errno, retry_cnt + 1); |
conf_file, size, errno, retry_cnt + 1); |
| 111 |
break; |
break; |
| 112 |
} |
} |
|
#ifdef _DEBUG |
|
| 113 |
log_error("shmget(conf_file=%s, proj_id=%d, key=0x%x, size=%d) error (%d), retry ...\n", |
log_error("shmget(conf_file=%s, proj_id=%d, key=0x%x, size=%d) error (%d), retry ...\n", |
| 114 |
conf_file, proj_id + retry_cnt, key, size, errno); |
conf_file, proj_id + retry_cnt, key, size, errno); |
|
#endif |
|
| 115 |
retry_cnt++; |
retry_cnt++; |
| 116 |
} |
} |
| 117 |
} while (p_menu_set->shmid == -1); |
} while (p_menu_set->shmid == -1); |