--- lbbs/include/bbs_cmd.h 2025/05/17 15:39:51 1.8 +++ lbbs/include/bbs_cmd.h 2025/11/04 13:49:50 1.10 @@ -1,28 +1,25 @@ -/*************************************************************************** - bbs_cmd.h - description - ------------------- - Copyright : (C) 2004-2025 by Leaflet - Email : leaflet@leafok.com - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * bbs_cmd + * - manager of menu command handler + * + * Copyright (C) 2004-2025 by Leaflet + */ -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ #ifndef _BBS_CMD_H_ #define _BBS_CMD_H_ #define MAX_CMD_LENGTH 20 -#define MENU_OK 0x0 -#define UNKNOWN_CMD 0xff -#define EXITBBS 0xfe -#define REDRAW 0x1 -#define NOREDRAW 0x2 +enum menu_return_t +{ + MENU_OK = 0x0, + REDRAW = 0x1, + NOREDRAW = 0x2, + EXITMENU = 0x3, + UNKNOWN_CMD = 0xff, + EXITBBS = 0xfe, +}; typedef int (*bbs_cmd_handler)(void *p_param);