-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Pack 005c: System Evaporation #64
Merged
holishing
merged 34 commits into
ccns:master
from
IepIweidieng:fixpack005c-System-Evaporation
Oct 6, 2020
Merged
Fix Pack 005c: System Evaporation #64
holishing
merged 34 commits into
ccns:master
from
IepIweidieng:fixpack005c-System-Evaporation
Oct 6, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- maple/acct.c: `m_register()` - maple/mail.c: `m_setmboxdir()`
…iac_count()` - Rewrite `iac_count()` into `iac_process()` - Add another `iac_count()` function implemented with `iac_process()` for backward compatibility. - `igetch()`: Replace the use of `iac_count()` with `iac_process()`.
- maple/visio.c: - `iac_process()`: Return `I_RESIZETERM` for term size changes. - `char_opt()`: Forward the special key value `I_RESIZETERM`.
- maple/menu.c: `domenu()` - maple/popupmenu.c: `do_menu()` & `popupmenu_ans()` - maple/window.c: `popupmenu_ans2()` - maple/visio.c: `vget()`
…terns `I_RESIZETERM`
…ns `I_RESIZETERM`
…orming relative move - Replace codes like: ```cpp move(3 + cur, 0); sth_item(pos + 1, sth); cursor_show(3 + cur, 0); return XR_FOOT + XO_MOVE + XO_REL + 1; ``` with: ```cpp move(3 + cur, 0); sth_item(pos + 1, sth); return XR_FOOT + XO_CUR + 1; ```
…r()` - `int xover_exec_cb(XO *xo, int cmd)` - `int xover_key(XO *xo, int zone, int cmd)` - Reduce variable scope and eliminate reused variables - Rewrite unnecessary assignments into `return` statements - Fix the stack level counter not decreasing when the user exits from a full mailbox
- Implement `*_cur()` callback functions and add them to the callback tables
- Replace codes like: ```cpp move(3 + cur, 0); sth_item(pos + 1, sth); return XR_FOOT + XO_CUR + 1; ``` with: ```cpp return XR_FOOT + XO_CUR + 1; ```
- `every_Z()`: Pass parameter `xo` to `popupmenu()`
- Extract main menu redraw codes into xover callback functions. - Add xover zone flag `XZ_SKIN` for changing skin; usage: `XO_SKIN + {XO_WRAP|XO_SCRL|XO_REL} + skin_index`. (`XO_SKIN` = `(XZ_ZONE | XZ_SKIN) + XO_MOVE`) - Redefine menu commands `XEASY`, `QUIT`, & `SKIN` as xover commands. - Extract function `domenu_exec()` from `domenu()` for executing a single command. - `domenu_exec()`: Pass `XO` object to `every_Z()` for handling term resizing.
…()` on redrawing
- Use `move_ansi()` to move for printing explanation. - Add `DomenuXyz::explan_len_prev` to store the length of the last displayed explanation. - Clean the last displayed explanation before printing the current one. - Add lengthed length function `strip_ansi_n_len()`. - Exclude the item explanation from `item_length` calculation.
…union type `DlMenuItem` - maple/popupmenu.c: `do_cmd()`: Refine code for handling `M_DL(umode)`.
…enu system - Add user mode alias macros: `M_MENU` & `M_FUN`. - Add user mode flag macros: `M_QUIT`, `M_XO`, `M_DOINSTANT`, `M_MENUTITLE`, & `M_TAIL_MASK`. - Reassign the value of macro `M_ARG`. - Make macro `M_DL()` a flag to avoid negative numbers. - Change the type of `MENU::umode` from `int` to `unsigned int`. - Implement `M_XO`. - Add `FuncArg::xofunc` & `DlFuncArg::xofunc`. - Add `DlMenuItem` members which correspond to the members of `MenuItem`. - Move the definitions of macro `PERM_MENU` into `include/modes.h`. - Unify the condition for determining the tail element of a menu list. - Remove macros `POPUP_MASK` & `POPUP_DO_INSTANT`. - Redefine remaining `POPUP_*` macros with the new `M_*` macros.
…welcome screen This also fixes the issue that `BRD_V_BIT` is never set for boards without the welcome screen.
- Add new functions `proc_runv()` and `proc_runl()`. - Add new macro `PROC_CMD()`.
…C_CMD()` - Use hardcoded path for system executables for security - Use `/bin/sh` for executing shell scripts (use `#!/usr/bin/env bash` in scripts to make them executed by `bash` instead)
…ing tasks in background
… xterm-style) The macro `ANSI_IS_PARAM()` is changed to accept `':'` for parsing ECMA-48-style parameter elements of a parameter substring.
- maple/pmore.c: - Add macro `MOVIE_KEY_NONE`. - Make `mf_movieWaitKey()` return `MOVIE_KEY_NONE` on timeouts. - Make `mf_movieNamedKey()` return `MOVIE_KEY_NONE` for invalid keys. - `mf_movieOptionHandler()`: - Initialize variable `c` to `MOVIE_KEY_NONE` rather than `0`. This command makes pmore hang: ``` 0c 23 00 2c 66 31 23 0a 30 ab ab ab ab ab ab ``` In plaintext with mix of caret notation and C escape sequences: ``` ^L#\0,f1# 0\xab\xab\xab\xab\xab\xab ``` Where: ``` ^L#\0,f1# ``` sets up a interactive choice with one option without the prompt. It literally means to go to the 1st frame when the user send `'\0'` (`Ctrl-Shift-2` on PCMan), although `'\0'` is an invalid choice key. But there is a logic error in `mf_movieOptionHandler()`: ```c // handle selection if (c == key || (key == MOVIE_KEY_ANY && c != 0)) { // hotkey pressed selected = 1; isel = maxsel; } ``` When `^L#\0,f1#` is processed, the variable `key` is `'\0'`, and the variable `c` is its initial value, which is also `0`. This makes the program think that the hotkey `'\0'` is pressed even if the user presses nothing, and therefore no user inputs will be processed. Then the command `f1` will be executed in `mf_movieExecuteOffsetCmd()`, making the pmore interpreter go to the 1st frame, where `^L#\0,f1#` resides. The pmore interpreter will then enter a infinity loop which repeatly executes `^L#\0,f1#` and skips user inputs due to the logic error aforementioned, which makes the interpreter ignore user inputs and hang forever. There are 2 ways to fix the issue: 1. Modify the condition to always check `c` against `0`. This is the simple way but is only a workaround. 2. Introduce another special `vget()` value which `vget()` never returns, to distinguish _nothing_ from `'\0'`. This also makes pmore correctly handle `'\0'` as a normal key (but still an invalid choice key). The 2nd way was chosen since it make the intention of the code clearer.
… unlock the post
- Add function `blog_pid` for calling `blog` with `pid` specified - `tn_login()`: Use `blog_pid()` to log the kick event
17 tasks
IepIweidieng
added a commit
that referenced
this pull request
May 3, 2021
IepIweidieng
added a commit
that referenced
this pull request
May 3, 2021
IepIweidieng
added a commit
that referenced
this pull request
May 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relevant issues: #45
Fix Pack 005c Change Log (en-US)
Fixes relevant to user experience
xover()
,popupmenu()
,vget()
.XO_CUR + pos
. This command redraws the item under the cursor and then relatively moves the cursor, so that the relevant function is simplified and improvedFixes relevant to BBS architecture
Some commands for main menu were changed to be consistent with xover list.
Please re-compile the programs, since the macro values have been changes.
Now the
POPUP_*
macros for popupmenu are not used in the internal code.Please re-compile the programs, since the macro values have been changed.
iac_count()
in favor of the new bound-checkingiac_process()
system()
function calls to improve securityOther fixes
mailpost
ignores bottomed posts\0
(fixed in PttBBS beforehand)Fix Pack 005c Change Log (zh-TW)
與使用者體驗有關的修正
xover()
列表、popupmenu()
選單、vget()
訊息XO_CUR + pos
,此指令可重繪游標所在的項目再相對移動游標,簡化並改善了相關功能的處理與 BBS 架構有關的修正
Macro 值改了,請重新編譯。
內部處理程式不再使用彈出式選單的
POPUP_*
macros。Macro 值改了,請重新編譯。
iac_count()
,改用新的有邊界檢查的iac_process()
system()
函式呼叫,改善安全性其它修正
mailpost
忽略置底文章的問題\0
按鍵的問題(已先在 PttBBS 修正)