Skip to content
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 003: LUNATIC FORCE [Stage Final] #61

Merged
merged 260 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
45664c8
so/xyz.c: `x_siteinfo()`: Eliminate `#ifdef` for checking module onli…
IepIweidieng Dec 17, 2019
4330ff8
Remove global `now` and `syncnow()` because vDSO exists.
IepIweidieng Dec 18, 2019
6e66a7a
BBS-Lua: Environment settings: Add `BBSLUA_USE_LUAJIT`.
IepIweidieng Dec 17, 2019
6edaa29
BBS-Lua: `bbslua()`: Reset color to prevent invisible error messages.
IepIweidieng Feb 13, 2020
854fc7f
BBS-Ruby: Remove signal handling codes.
IepIweidieng Dec 17, 2019
f875d91
BBS-Ruby: `run_ruby()`: Eliminate buffer allocation for `cpBuf`.
IepIweidieng Dec 17, 2019
9298e1a
BBS-Ruby: `typedef` `rb_func_t` to refactor casts to `VALUE (*)(ANYAR…
IepIweidieng Dec 17, 2019
e10b6cf
BBS-Ruby: Extract `bbsruby_load_TOC()` from `ruby_script_range_detect…
IepIweidieng Dec 18, 2019
5b2dc58
BBS-Ruby: `run_ruby()`: `refresh()` after `clear()` to immediately cl…
IepIweidieng Dec 18, 2019
246f95a
BBS-Ruby: `print_exception()`: Reset color to prevent invisible error…
IepIweidieng Feb 13, 2020
9c80ce4
BBS-Ruby: `bbsruby_init_bbs_class()` -> `bbsruby_init_bbs_module()`: …
IepIweidieng Dec 18, 2019
018eda8
BBS-Ruby: Replace `rb_funcall()` calls with type-safe `rb_funcallv()`.
IepIweidieng Dec 19, 2019
8c77e4a
BBS-Ruby: Make variadic BBS-Ruby API functions accept a C array inste…
IepIweidieng Dec 19, 2019
f27c939
BBS-Ruby: Do not print exception on initialization failure of Ruby in…
IepIweidieng Dec 21, 2019
d37a655
BBS-Ruby/mruby: Support mruby.
IepIweidieng Dec 21, 2019
70451dc
BBS-Ruby/mruby: Add options for compiling BBS-Ruby with mruby.
IepIweidieng Dec 21, 2019
05de086
BBS-Ruby/mruby: Show mruby version info if mruby is used.
IepIweidieng Dec 21, 2019
3c742ad
BBS-Ruby/mruby: Load only safe mruby gem libraries.
IepIweidieng Dec 21, 2019
71ef574
BBS-Ruby/mruby: Fix parameter type incompatibility on mruby 2.1.0.
IepIweidieng Dec 21, 2019
e893cdf
BBS-Ruby/mruby: `print_exception(): Fix crash on printing exceptions …
IepIweidieng Dec 21, 2019
e7e99d4
Fix 5 places of misused `memcpy()` with overlapped source and destina…
IepIweidieng Dec 22, 2019
d53aee5
Move class image building tasks from `account` to `acpro`
IepIweidieng Dec 23, 2019
12ff13c
so/adminutil.c: `m_resetsys()`: Remove codes for removed `bmtad`.
IepIweidieng Dec 23, 2019
6d98783
maple/edit.c: `vedit()`: `ve_key`: Fix line deletion in ANSI mode bro…
IepIweidieng Jan 9, 2020
26de30f
maple/edit.c: `vedit()`: `ve_key`: `KEY_DEL`: `col`, not `pos`.
IepIweidieng Dec 22, 2019
8aa44ce
so/ascii.c: Merge arrays and branches.
IepIweidieng Dec 22, 2019
30a10e7
util/: Fix and re-enable `readBENZ`, `readFRIENZ`, & `readUSR`.
IepIweidieng Dec 23, 2019
3886586
lib/ & util/: Clean up unnecessary `include`s and make sure `"config.…
IepIweidieng Dec 23, 2019
0880086
Constness: Make 12 local pointers in pure functions point to `const`.
IepIweidieng Dec 23, 2019
704cb93
Widescreen: Extract `NECK_BANMAIL`, `NECK_ALOHA`, `NECK_BRDSTAT`, & `…
IepIweidieng Dec 22, 2019
15ad16f
Widescreen: Refine UI alignment and make it fill up to 79 characters.
IepIweidieng Dec 23, 2019
21a5ab8
visio/widescreen: Use the new function `outsep()` to output a repeate…
IepIweidieng Dec 23, 2019
e0567c4
visio/widescreen: Make match list adapt to widescreen.
IepIweidieng Jan 1, 2020
4581513
Widescreen: maple/menu.c: `vs_head()`: Refine centering.
IepIweidieng Dec 24, 2019
3fe4d47
Use the new function `vs_mid()` to output centered title.
IepIweidieng Dec 24, 2019
b680a06
struct `XO`: Make member `xyz` `void *`.
IepIweidieng Dec 23, 2019
47d11bf
maple/xover.c: `xover()`: Invoke callback function for `XO_FOOT`.
IepIweidieng Dec 23, 2019
da90929
so/innbbs.c: Rewrite with `xover()`.
IepIweidieng Dec 23, 2019
c9f2c4f
xover: Remove unused `xo_cursor()`.
IepIweidieng Dec 23, 2019
409aac6
maple/: gem.c, mail.c, & post.c; so/: mailgem.c & so/song.c: Add footer.
IepIweidieng Dec 23, 2019
e2ec909
xover: Return `XO_FOOT` instead of `XO_NONE` if row `b_lines` is over…
IepIweidieng Dec 23, 2019
93c2311
maple/board.c: `board_outs()`: Prevent black class text.
IepIweidieng Dec 23, 2019
6ea58e5
Add macro `HAVE_UFO2_CONF()` for checking config-dependent ufo2 flags.
IepIweidieng Dec 23, 2019
9a24a5b
maple/acct.c: `bitset()`: Hide and clear settings with `NULL` descrip…
IepIweidieng Dec 24, 2019
2656d96
maple/acct.c: `acct_setup()` & `bm_setup()`: Protect personal informa…
IepIweidieng Dec 24, 2019
cf6dfb3
visio: Refine and enable functions `cursor_show()`, `cursor_clear()`,…
IepIweidieng Dec 23, 2019
ea8ae7c
Refine cursor output with `cursor_show()` and `cursor_clean()`
IepIweidieng Dec 23, 2019
9e48f5c
visio/lightbar: Add menu lightbar system.
IepIweidieng Dec 23, 2019
3d4012a
visio/lightbar: Refine menu lightbar display.
IepIweidieng Dec 23, 2019
e787a3a
xover/lightbar: maple/xover.c: `xover()`: Fix double lightbar when th…
IepIweidieng Dec 26, 2019
ed41775
xover: Fix callbacks from `'h'` functions not invoked in C mode. [ref…
IepIweidieng Dec 26, 2019
1d8faed
xover: Use type aliases for `KeyFunc` types.
IepIweidieng Dec 24, 2019
4f8c553
xover/C++: Use C++ STL hash table for xover callback function list.
IepIweidieng Dec 24, 2019
b4cbfce
GCC compat: include/struct.h: Workaround for g++ not currently suppor…
IepIweidieng Dec 27, 2019
a897e3f
C99 compat: include/cppdef.h: Assume the C standard used is not older…
IepIweidieng Dec 25, 2019
c589a00
C++ compat: Refine `constexpr` constructs with new `CXX_CONSTEXPR_*` …
IepIweidieng Dec 27, 2019
75f42d3
DSO: Refine code using new macros `DL_NAME_GET()` & `DL_NAME_CALL()`.
IepIweidieng Dec 25, 2019
df738ad
DSO: Make macros `DL_NAME_GET()` & `DL_NAME_CALL()` cast the result t…
IepIweidieng Dec 25, 2019
a14749b
DSO: Make macros `DL_GET()` and `DL_NAME*()` macros work for non-func…
IepIweidieng Dec 25, 2019
ff9c205
DSO: include/cppdef.h: Use new `EXPR_BLOCK_*()` macros to add null ch…
IepIweidieng Dec 29, 2019
f6c66d9
include/struct.h: struct `ACCT`: Deprecate unused member `ident`.
IepIweidieng Dec 25, 2019
d164a32
User perm: Use `(bool)(cuser.userlevel)` to check whether the user is…
IepIweidieng Dec 25, 2019
a4c5034
Refine user/board attribute strings with the new macro `ATTR_CONF_STR()`
IepIweidieng Dec 26, 2019
3e2a18d
C/C++ compat: Temp value: include/cppdef.h: Add new macros `LISTLIT()…
IepIweidieng Dec 27, 2019
adfe044
Temp value: Eliminate unused local variables for `getyx()` using macr…
IepIweidieng Dec 27, 2019
10c3a0b
Attribute: Synchronize attributes between declaration and definition.
IepIweidieng Dec 27, 2019
ccff91d
maple/visio.c: `vget()`: Use visio `getyx()` if pfterm is not enabled.
IepIweidieng Dec 27, 2019
0be9a50
test/lib_splay.c: Fix `splay_free()` not working.
IepIweidieng Dec 27, 2019
97c947b
lib/dns.c: Extract function `dns_openip()` from `dns_open()` to elimi…
IepIweidieng Dec 27, 2019
35f4841
include/dns.h & lib/dns.c: Fix circular inclusion problem.
IepIweidieng Dec 27, 2019
23dda54
include/dao.h: Add missing declaration for `dns_query()`.
IepIweidieng Dec 27, 2019
0cc16de
Scope: Reduce variable scope
IepIweidieng Dec 27, 2019
d9c22ce
util/utmp-dump.c: Fix broken command-line options.
IepIweidieng Dec 28, 2019
d418f84
util/utmp-dump.c: Fix option `-u` reseting loaded arguments.
IepIweidieng Dec 28, 2019
5543926
Splay: Move `splay_out()` & `splay_free()` from 'test/lib_splay.c' to…
IepIweidieng Dec 28, 2019
91a3cea
util/: acl-sort.c & poststat.c: Call `splay_free()` to eliminate reac…
IepIweidieng Dec 28, 2019
dd3d458
test/lib_xsort.c: Fix memory leak for `y`.
IepIweidieng Dec 28, 2019
59959dc
test/: Refine code using `assert()` and `static_assert()`.
IepIweidieng Dec 28, 2019
4f81a2e
test/testsize.c: Use `assert()` if `static_assert()` is not available.
IepIweidieng Jan 4, 2020
de6a353
DNS: lib/dns.c: Use ISO C90/ISO C++98 conforming struct assignment.
IepIweidieng Dec 27, 2019
f5ff75c
Socket: Use `AF_*` macros instead of `PF_*` macros for `socket()` dom…
IepIweidieng Dec 27, 2019
5e7a8b9
IPv6 compat: Replace obsoleted `gethostbyname()` with `getaddrinfo()`.
IepIweidieng Dec 27, 2019
9429984
IPv6 compat: innbbsd/ & maple/xchatd.c: Support IPv6.
IepIweidieng Dec 28, 2019
6e6b361
IPv6 compat: Make `bbsd` support IPv6.
IepIweidieng Dec 28, 2019
0cdb3a4
IPv6 compat/dns: Make dns library support IPv6.
IepIweidieng Dec 28, 2019
4b33a0b
IPv6: Use `ip_addr` for global `tn_addr`, `UTMP::in_addr` & 'maple/xc…
IepIweidieng Dec 28, 2019
0dbfc4e
User list: Widen field `from`.
IepIweidieng Dec 28, 2019
b57f58c
include/struct.h: Enlarge `UTMP::from` from 30 to 48 types.
IepIweidieng Dec 28, 2019
f5d4af1
Buffer size: lib/dns: Add `*_sz` parameters to `dns_ident()` & `dns_n…
IepIweidieng Dec 29, 2019
69f13a2
IPv6 compat/dns: `dns_mx()` & `dns_smtp()`: Fix the list delimiter co…
IepIweidieng Dec 29, 2019
18eb677
visio/input: `vkey()`: Handle `<ESC> <ESC>` / `<ESC> + possible speci…
IepIweidieng Dec 29, 2019
0d48854
visio/key: Refine handling of `I_TIMEOUT` & `I_OTHERDATA` with functi…
IepIweidieng Dec 29, 2019
4e5f210
visio/key: `vkey()`: Lower the timeout interval while processing esca…
IepIweidieng Dec 29, 2019
97812e9
Hotkey: Refine hotkeys about `KEY_ESC`.
IepIweidieng Dec 29, 2019
998d345
Hotkey/browser-compat: Add `Esc-R`, `Esc-T`, & `Esc-W` hotkeys which …
IepIweidieng Dec 29, 2019
28c878a
xover/C++: Use C++ STL hash table for xover thread mode op-code list.
IepIweidieng Dec 29, 2019
f1156d4
xover: Add function `xo_cb_*()` for returning `XO_*` special keys for…
IepIweidieng Dec 30, 2019
538da2c
Verinfo: Add 'scripts/verinfo.sh' to generate git version info. [ref:…
IepIweidieng Dec 30, 2019
5251ca2
scripts/verinfo.sh: Use customized date format.
IepIweidieng Jan 8, 2020
c68671a
so/xyz.c: `x_siteinfo()`: Shorten info strings.
IepIweidieng Dec 26, 2019
75833ba
so/xyz.c: `x_siteinfo()`: Show git version info.
IepIweidieng Dec 30, 2019
9e505e7
`x_siteinfo()`: Make info strings for configs `const` variables.
IepIweidieng Dec 30, 2019
2b9c1ef
include/cppdef.h: Shorten `DL_PATCH_STR` from `DlPatch` to `DL`.
IepIweidieng Dec 30, 2019
03d0f4d
so/xyz.c: `x_siteinfo()`: Refine module information.
IepIweidieng Dec 30, 2019
81ac1fa
maple/board.c: `remove_perm()`: Fix only removing the write permissio…
IepIweidieng Dec 31, 2019
324c026
Refine code using reenabled macro `COUNTOF()` renamed from `countof()`.
IepIweidieng Dec 31, 2019
9fce774
lib/header.c: `hdr_stamp()`: Refine commment to prevent someone from …
IepIweidieng Dec 31, 2019
a94a73e
util/acl-sort.c: `at_cmp()`: Fix buffer overrun for identical `x` and…
IepIweidieng Dec 31, 2019
22d3fe4
Refine bitwise char conversion to lower case
IepIweidieng Dec 31, 2019
ede75ca
Refine non-intuitive bitwise operations
IepIweidieng Dec 31, 2019
d1ed9b7
maple/visio.c: `igetch()`: Fix setting wrong boundary for `iac_count(…
IepIweidieng Dec 31, 2019
44e454e
visio/bbs-script: maple/bbslua.c: `read_vin()`: Fix wrong size for `m…
IepIweidieng Dec 31, 2019
60b6353
visio: Handle `'\0'` and `'\xFF'`.
IepIweidieng Dec 31, 2019
64a5792
Make 37+ arrays `static const`
IepIweidieng Dec 31, 2019
60e04b6
lib/: string.c & chrono32.c: Fix possible undefined behavior of integ…
IepIweidieng Dec 31, 2019
7a1f905
maple/visio.c: `outz()` & `prints()`: Use `outs()` instead of loop.
IepIweidieng Jan 1, 2020
6c64679
maple/menu.c: Add hotkeys `'S'` & `'/'` for board searching.
IepIweidieng Jan 1, 2020
ffc78a8
maple/visio.c: Reduce variable scope and refine code.
IepIweidieng Jan 1, 2020
2b48a99
maple/visio.c: Refine match list hotkeys (' ' & '\t' for auto complet…
IepIweidieng Jan 1, 2020
ec2f87f
visio/history: `vget()`: Refine history handling.
IepIweidieng Jan 5, 2020
39afd97
Widescreen: maple/acct.c: `bitset()`: Adapt to widescreen.
IepIweidieng Jan 1, 2020
2e00106
Widescreen: so/adminutil.c: `special_search()`: Adapt to tall-screen.
IepIweidieng Jan 4, 2020
9ec3f55
Widescreen: so/passwd.c: `new_passwd()`: Adapt to tall-screen.
IepIweidieng Jan 4, 2020
a57162c
menu: Extract and refine functions `main_menu()` & `domenu()` from `m…
IepIweidieng Jan 1, 2020
f486bcf
Move logout code from 'maple/menu.c': `goodbye()` to 'maple/bbsd.c': …
IepIweidieng Jan 1, 2020
1484336
`bbsd` & `xchatd`: Enable ident and dns if macro `NOIDENT` is undefined.
IepIweidieng Jan 1, 2020
534164c
Do not use `igetch()` directly for getting input; use `vkey()` instea…
IepIweidieng Jan 1, 2020
be938ec
maple/bbsd.c: `logattempt()`: Log connection type (`"BBS"` (telnet) o…
IepIweidieng Jan 1, 2020
6c33bcd
Eliminate redundant `extern` for external function declarations
IepIweidieng Jan 2, 2020
da6899c
Make declarations of internal function `static`.
IepIweidieng Jan 2, 2020
ea49b02
Move `extern` and function declarations into `include/` and eliminate…
IepIweidieng Jan 2, 2020
6a70639
Refine dbcs handling code with macro `IS_DBCS_HI()`, which is renamed…
IepIweidieng Jan 2, 2020
0acbe41
pfterm/color: Make `UFO2_COLOR` & `showansi` work with pfterm.
IepIweidieng Jan 2, 2020
8f48169
maple/xover.c: `xover()`: Remove commented-out, obsoleted inline vers…
IepIweidieng Jan 1, 2020
760f9e3
xover callback: Make 150+ local pointers point to `const`.
IepIweidieng Jan 2, 2020
d1c3873
maple/post.c: `post_browse()`: Fix `xo_pool` not restore completely a…
IepIweidieng Jan 2, 2020
e1ebb71
struct: Add comment tags `DISKDATA`, `SHMDATA`, & `Hashable`.
IepIweidieng Jan 3, 2020
6be30db
`MENU`: Extract union `MenuItem` from struct `MENU` and refine releva…
IepIweidieng Jan 3, 2020
bed0a98
Refine hash map types with macro `PAIR_T()` and template `UnorderedMa…
IepIweidieng Jan 4, 2020
eb4031b
so/: Refine function scope.
IepIweidieng Jan 4, 2020
77bf73e
DSO: lib/dl_lib.c: Refine code.
IepIweidieng Jan 4, 2020
9d72e6c
DSO: lib/dl_lib.c: `DL_get()`: Try loading again if failed the last t…
IepIweidieng Jan 4, 2020
b662e9d
DSO: Support hot-swapping, enabled with new flag `DL_HOTSWAP`.
IepIweidieng Jan 3, 2020
1688a0f
DSO: Prevent libraries in use from being unloaded when hot-swapping i…
IepIweidieng Jan 4, 2020
a1dc6c2
so/pip.c: Revise `outs*()` with indirect buffers & `pip_play_outing()…
IepIweidieng Dec 31, 2019
b13e70b
so/pip.c: Replace boolean string `"Y"` & `"N"` with `bool` value `tru…
IepIweidieng Dec 31, 2019
d5b0bf0
so/pip.c: Refine `pip_check_levelup()` with `COUNTOF()`.
IepIweidieng Dec 31, 2019
07df32a
so/pip.c: Refactor struct `newendingset` and related functions to be …
IepIweidieng Jan 1, 2020
132761f
pip: Refactor data struct `royalset` & `goodsofpip` to 0-indexed.
IepIweidieng Dec 31, 2019
d3a80e5
so/pip.c: Refactor `classrank[]`, `classmoney[]`, & ` classvariable[]…
IepIweidieng Jan 4, 2020
6c3ec22
so/pip.c: `get_man()` & `pip_meet_vs_man()`: Refine logic to be 0-ind…
IepIweidieng Jan 5, 2020
8bf1441
pip: `pip_weapon_doing_menu()`: Hide the `0`-nd item; refactor out `w…
IepIweidieng Feb 10, 2020
7951866
so/pip.c: `pip_marriage_offer()`: Fix buffer overrun for unknown gend…
IepIweidieng Jan 5, 2020
5d10f8a
so/pip.c: Eliminate redundant conditions and fix counterintuitive con…
IepIweidieng Jan 5, 2020
ff63c82
so/pip.c: `twice()`: Fix calculation for float variables `a` & `b` no…
IepIweidieng Jan 5, 2020
136814c
so/pip.c: `pip_mainmenu()`: Eliminate a useless assignment to `anynum`.
IepIweidieng Jan 5, 2020
485648c
so/pip.c: Refine `pip_read_file()` & `pip_write_file()` to refactor o…
IepIweidieng Jan 5, 2020
d93447a
pip: Refine `struct pipcommands` to drop member `key2`.
IepIweidieng Jan 5, 2020
29e8cda
pip: `struct chicken`: Drop unused member `birth[]`.
IepIweidieng Jan 5, 2020
a469a7d
pip: Refine `struct chicken` with arrays.
IepIweidieng Jan 5, 2020
7e36b83
so/pip.c: Extract functions `pip_age_grade()`, `pip_age_name()`, & `p…
IepIweidieng Jan 5, 2020
1ce6fb1
so/pip.c: `pip_results_show_ending()` & `pip_results_show_ending()`: …
IepIweidieng Jan 5, 2020
a243ade
maple/mail.c: `hdr_outs()`: Make bracket highlight handle dbcs.
IepIweidieng Jan 5, 2020
73f1871
maple/menu.c & include/proto.h: Rename `count_len()` to `strip_ansi_l…
IepIweidieng Jan 7, 2020
30eaf41
innbbsd/rec_article.c: Re-adapt `Date and Time Specification` from RF…
IepIweidieng Jan 8, 2020
bad27ac
innbbsd/rec_article.c: `parse_date()`: Make the parsing logic more co…
IepIweidieng Jan 8, 2020
67ad46b
ARPA date: Text in parentheses is comment; drop it.
IepIweidieng Jan 8, 2020
934f407
innbbsd/rec_article.c: `parse_date()`: Rewrite timezone parsing with …
IepIweidieng Jan 8, 2020
5a131c7
ARPA date: Use new macro `BBSUTCZONE` to eliminate hardcoded timezones.
IepIweidieng Jan 8, 2020
d4d0e56
visio/move: maple/visio.c: Make move functions clip move positions ra…
IepIweidieng Jan 9, 2020
5256cd2
visio & pfterm: Add function `grayoutrect()` for `grayout()`ing a rec…
IepIweidieng Jan 9, 2020
4fa20a8
visio/lightbar: Add functions `cursor_bar_show()`, `cursor_bar_clear(…
IepIweidieng Jan 9, 2020
6d88d5a
visio: Make `outf()` expand `'\t'` with `d_cols` spaces if presents.
IepIweidieng Jan 12, 2020
8964f8b
MENU: Add struct `FuncArg` & `DlFuncArg` for carrying arguments to el…
IepIweidieng Jan 6, 2020
3f29ad7
MENU: `domenu()`: Add parameters `y` & `x` for item offset.
IepIweidieng Jan 6, 2020
08fd275
MENU: Support multiple character description prefix matching.
IepIweidieng Jan 7, 2020
116ec3d
MENU: Suppress movie display when menu starts at (y, x) where `MENU_N…
IepIweidieng Jan 7, 2020
a83dd51
MENU: maple/menu.c: `domenu()`: Save the last command only when `cmdm…
IepIweidieng Jan 9, 2020
8b9dc9e
MENU: maple/menu.c: `domenu()`: Add hotkey `Esc` & `Esc-Esc` for jump…
IepIweidieng Jan 12, 2020
e54219a
MENU: maple/menu.c: `domenu()`: Invoke hotkey functions for keyboard …
IepIweidieng Jan 31, 2020
90ab320
MENU: `domenu()`: Support displaying menu items in multiple columns.
IepIweidieng Jan 9, 2020
424daf5
`MENU::desc`: Add explanation displayed at the screen bottom (format:…
IepIweidieng Jan 12, 2020
6df6ebe
MENU: `x_file()`: Rewritten to use `domenu()`.
IepIweidieng Jan 12, 2020
5d7b62b
MENU/widescreen: `menu_foot()`: Make main menu footer fill up to 79 c…
IepIweidieng Jan 12, 2020
dac0ca1
maple/acct.c: `x_file()`: Use fixed indentation for filename display.
IepIweidieng Jan 13, 2020
d6819a5
visio/widescreen: Add screen size referencing coordinate mapping func…
IepIweidieng Jan 13, 2020
778e7e9
MENU/widescreen: `domenu()`: Use screen size referencing coordinate m…
IepIweidieng Jan 13, 2020
73480e7
popupmenu: Add hotkey `Esc` & `Esc-Esc` for jumping out of a popupmenu.
IepIweidieng Jan 23, 2020
0bcfe11
BRH: maple/board.c: `brh_add()`: Prevent `BRH::bcount` from being ove…
IepIweidieng Jan 21, 2020
d8b8800
BRH: maple/board.c: `brh_add()`: Prevent loss of history when `chrono…
IepIweidieng Jan 21, 2020
4469b76
BRH: maple/board.c: `brh_add()`: Modify the last time interval instea…
IepIweidieng Jan 21, 2020
c91ee87
BRH: maple/board.c: `brh_get()`: Use `sizeof(BRH)` instead of `3 * si…
IepIweidieng Jan 21, 2020
523f5b1
BRH: `include/struct.h`: `BRH_WINDOW`: Use exact maximum size of a BR…
IepIweidieng Jan 21, 2020
a9f6ac0
visio/clear: Fix screen clearing functions broken when the size of `s…
IepIweidieng Jan 26, 2020
a0743cd
pmore/Maple3: Remove the [K (CSI K) problem workaround because pmore …
IepIweidieng Jan 23, 2020
8fea9d3
popupmenu: Use traditional `(y, x)` coordinate.
IepIweidieng Feb 4, 2020
209e34c
so/list.c: `list_search()`: Fix search broken if the list top on scre…
IepIweidieng Feb 12, 2020
f5f78c4
pfterm/cattr: Rename "virtual attribute" (`vattr`) to "cursor attribu…
IepIweidieng Jan 13, 2020
b8a75ea
pfterm/cattr: Handle cursor attribute in `outc()`.
IepIweidieng Jan 13, 2020
5577dfd
pfterm/cattr: True standout/standend (reverse) attribute behavior (em…
IepIweidieng Jan 13, 2020
51967d6
pfterm/cattr: Add simulated support for SGR 3/23 (italic) & SGR 8/28 …
IepIweidieng Jan 14, 2020
e2b3dcd
pfterm/cattr: Add simulated support for SGR 90-97 (FG-bright) & SGR 1…
IepIweidieng Jan 14, 2020
e55e485
pfterm/cattr: Make `reverse` swap color intensity.
IepIweidieng Jan 14, 2020
9a6b5d3
pfterm/SGR: Convert SGR 2 (intensity: faint) to `intensity: normal`.
IepIweidieng Jan 14, 2020
6342223
pfterm: `fterm_exec()`: Fix `CSI ; <m> H` being misinterpreted as `CS…
IepIweidieng Jan 14, 2020
eca9ca9
pfterm: `fterm_exec()`: Simply `atoi()` + `while` loops with `strtol()`.
IepIweidieng Jan 14, 2020
1c13f66
pfterm/ECMA-48: Revise the usage of technical terminologies.
IepIweidieng Jan 26, 2020
1967c85
xover list: Add hotkey `Esc` & `Esc-Esc` for jumping out of a list.
IepIweidieng Jan 30, 2020
f1f5cb7
xover/item: maple/mail.c: `mbox_item()`: Fix the tags disappear after…
IepIweidieng Jan 30, 2020
9bd828f
xover/item: maple/post.c: `post_visit()`: Using `XO_BODY` to redraw t…
IepIweidieng Jan 30, 2020
9fba89f
xover/item: Fix outlier item marks by always redrawing the whole item.
IepIweidieng Jan 30, 2020
de9d133
xover/item: Redraw the cursor if the line under cursor is redrawn in …
IepIweidieng Jan 30, 2020
c1a7930
key value: include/global.h: Reassign and refine key values.
IepIweidieng Jan 28, 2020
0a23c6b
key value: Refactor out usages of `KEY_NONE`.
IepIweidieng Jan 28, 2020
84f0a9d
xover: struct `XZ`: Move member `cb` into struct `XO`.
IepIweidieng Jan 6, 2020
dfe5069
xover: struct `XO`: Add member `recsiz` for the size of an xover record.
IepIweidieng Jan 13, 2020
51e2579
Replace usages of macro `STR4(x)` with `strncmp(s1, s2, 4)`; remove m…
IepIweidieng Feb 1, 2020
ae9b0d7
xover/key value: Reassign and refine key values.
IepIweidieng Jan 28, 2020
4737116
xover/key value: Implement combined command chaining mechanism.
IepIweidieng Feb 9, 2020
3d64a79
xover/movement: Add `XO_REL` for relative movement.
IepIweidieng Jan 28, 2020
acd506d
xover/zone-switching move: Switch xover zone using cursor movement se…
IepIweidieng Jan 28, 2020
39b309b
xover/zone-switching move: Handle null `xo` and null `xcmd`.
IepIweidieng Feb 9, 2020
6c2cb84
xover/zone-switching move: Add fallback movement for relative movement.
IepIweidieng Feb 9, 2020
820dfd4
xover/zone-switching move: Prevent `XZ::xo` from being a dangling poi…
IepIweidieng Jan 29, 2020
bd8bdbd
xover/move: Refine usages of macro `XO_MOVE`.
IepIweidieng Jan 30, 2020
71e851f
xover/move: `xover()`: Make page flips work with cursor wrapping.
IepIweidieng Jan 27, 2020
7a34672
xover/move: Make `PgUp` snap the cursor to the list bottom on screen …
IepIweidieng Jan 30, 2020
201cb3e
xover/message footer: `xover()`: Clear the message footer and redraw …
IepIweidieng Jan 30, 2020
778025b
xover/message footer: Remove `#if` directives for message footers.
IepIweidieng Feb 9, 2020
439e655
xover/message footer: `xover()`: Refine and recover the message for t…
IepIweidieng Feb 9, 2020
4940e01
xover/key value: `xo_thread()`: Fix redraw commands not returned if a…
IepIweidieng Feb 4, 2020
4a0f542
xover/key value: Search functions: Redraw footer after execution.
IepIweidieng Feb 4, 2020
9549750
xover/ulist: Fix missing redraw functions and eliminate useless callb…
IepIweidieng Jan 29, 2020
ad6041e
so/vote.c: `vlist_student()`: Fix local `VCHS` object `tmp` used only…
IepIweidieng Feb 2, 2020
ba1e7cd
visio w/o pfterm: `refresh()`: Replace VLA `char buf[p_lines]` with `…
IepIweidieng Feb 2, 2020
e88633c
visio/widescreen: `vget()`: Use screen size referencing coordinate ma…
IepIweidieng Feb 2, 2020
98de014
popupmenu/widescreen: Use screen size referencing coordinate mapping …
IepIweidieng Feb 4, 2020
a5afd1f
lightbar: maple/bbsd.c: `acct_apply()` & `tn_login()`: Enable menu li…
IepIweidieng Feb 10, 2020
7e77016
wsproxy: Improve error handling and logging.
robertabcd Dec 15, 2019
039a150
wsproxy: Add bbs_lport variable for overriding lport sent to logind.
robertabcd Dec 15, 2019
fbfe986
Assume `mmap()` is available; remove macro `HAVE_MMAP` and relevant c…
IepIweidieng Jan 2, 2020
fd0a433
xover/mmap: `xo_load()`: `mmap()` the whole file.
IepIweidieng Jan 2, 2020
8ff20ee
xover/mmap: `xo_thread()`: Eliminate reloading.
IepIweidieng Jan 2, 2020
441c0eb
xover/mmap: maple/xover.c: `xo_thread()`: Scroll only if found.
IepIweidieng Jan 5, 2020
dc1aed6
xover/mmap: maple/post.c: `xypost_pick()` & `xpost_browse()`: Load al…
IepIweidieng Jan 6, 2020
92ada77
xover/mmap: maple/post.c: `post_history()`: Simplify the seeking logi…
IepIweidieng Jan 30, 2020
9eacc56
xover/mmap: Eliminate usages of `xo_pool`; mark `xo_pool` as deprecated.
IepIweidieng Jan 30, 2020
3725ecc
xover/scroll: Eliminate reloading for scrolling.
IepIweidieng Jan 2, 2020
25a2f8b
xover/scroll: Add hotkeys for scrolling up (`ESC-UP` & `K`) and scrol…
IepIweidieng Jan 2, 2020
b58f120
xover/scroll: Eliminate scrolling alignment.
IepIweidieng Jan 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
make_export.conf
maple/make_export.conf

# git version info
verinfo_export.conf

# add split-out build directory for cmake
build/

Expand Down Expand Up @@ -89,6 +92,9 @@ util/match
util/msgall
util/outgo
util/poststat
util/readBENZ
util/readFRIENZ
util/readUSR
util/reaper
util/redir
util/resetvmail
Expand Down
50 changes: 44 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if(NOT USE_CXX)
else()
# specify the C++ standard
add_compile_options(-x c++ --std=gnu++14)
link_libraries(stdc++)
set(USE_CXX ON CACHE BOOL "Compile C code using C++ mode")
endif()

Expand Down Expand Up @@ -66,15 +67,30 @@ function(LOADVALUE conf default hdr output)
set("${output}" "${${output}}" PARENT_SCOPE)
endfunction(LOADVALUE)

function(GETID options name output)
set(ID_DEFAULT 9999)

function(GETUID name output)
execute_process(
COMMAND sh -c "id ${options} ${name} || echo 9999"
COMMAND sh -c "id -u ${name} || echo ${ID_DEFAULT}"
OUTPUT_VARIABLE "${output}"
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
set("${output}" "${${output}}" PARENT_SCOPE)
endfunction(GETID)
endfunction(GETUID)

function(GETGID name output)
execute_process(
COMMAND getent group ${name}
COMMAND cut -d: -f3 -
OUTPUT_VARIABLE "${output}"
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if ("${${output}}" STREQUAL "")
set("${output}" ${ID_DEFAULT})
endif()
set("${output}" "${${output}}" PARENT_SCOPE)
endfunction(GETGID)

function(DEF_TEST conf hdr output)
if("${hdr}" IS_NEWER_THAN ${CMAKE_CACHEFILE_DIR}/CMakeCache.txt)
Expand All @@ -91,6 +107,7 @@ set(BBSCONF "${PROJECT_SOURCE_DIR}/dreambbs.conf")
set(BBSCONF_ORIGIN "${PROJECT_SOURCE_DIR}/include/config.h")
set(EXPORT_PROJECT "${PROJECT_SOURCE_DIR}/make_export.conf")
set(EXPORT_MAPLE "${PROJECT_SOURCE_DIR}/maple/make_export.conf")
set(EXPORT_VERINFO "${PROJECT_SOURCE_DIR}/verinfo_export.conf")

if(NOT EXISTS ${EXPORT_PROJECT})
execute_process(COMMAND touch ${EXPORT_PROJECT})
Expand All @@ -107,9 +124,9 @@ LOADVALUE(BBSGROUP "${BBSGROUP_DEFAULT}" ${BBSCONF_ORIGIN} BBSGROUP)
LOADVALUE(WWWGROUP "www-data" ${BBSCONF_ORIGIN} WWWGROUP)

# UIDs and GIDs
GETID(-u "${BBSUSR}" BBSUID_DEFAULT)
GETID(-g "${BBSGROUP}" BBSGID_DEFAULT)
GETID(-g "${WWWGROUP}" WWWGID_DEFAULT)
GETUID("${BBSUSR}" BBSUID_DEFAULT)
GETGID("${BBSGROUP}" BBSGID_DEFAULT)
GETGID("${WWWGROUP}" WWWGID_DEFAULT)
LOADVALUE(BBSUID "${BBSUID_DEFAULT}" ${BBSCONF_ORIGIN} BBSUID)
LOADVALUE(BBSGID "${BBSGID_DEFAULT}" ${BBSCONF_ORIGIN} BBSGID)
LOADVALUE(WWWGID "${WWWGID_DEFAULT}" ${BBSCONF_ORIGIN} WWWGID)
Expand All @@ -124,12 +141,21 @@ execute_process(
)
LOADVALUE(BBSHOME "${BBSUSR_HOME}" ${BBSCONF_ORIGIN} BBSHOME)

## Numeric local timezone
execute_process(
COMMAND date %z
OUTPUT_VARIABLE BBSUTCZONE_DEFAULT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
LOADVALUE(BBSUTCZONE "${BBSUTCZONE_DEFAULT}" ${BBSCONF_ORIGIN} BBSUTCZONE)

# Flags for enabling modules
DEF_TEST(M3_USE_PMORE ${BBSCONF} USE_PMORE)
DEF_TEST(M3_USE_PFTERM ${BBSCONF} USE_PFTERM)
DEF_TEST(M3_USE_BBSLUA ${BBSCONF} USE_BBSLUA)
DEF_TEST(M3_USE_BBSRUBY ${BBSCONF} USE_BBSRUBY)
DEF_TEST(BBSLUA_USE_LUAJIT ${BBSCONF} USE_LUAJIT)
DEF_TEST(BBSRUBY_USE_MRUBY ${BBSCONF} USE_MRUBY)

# Flags for disabling shared objects
if(DEFINED ENV{NO_SO})
Expand Down Expand Up @@ -223,7 +249,12 @@ if(USE_BBSRUBY)
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
link_libraries(-Wl,--no-as-needed)
endif()
if(USE_MRUBY)
set(RUBY_CFLAGS)
set(RUBY_LDFLAGS mruby m)
else()
pkg_search_module(RUBY REQUIRED ruby<=2.2 ruby-2.2)
endif()
endif()

## Generate configure file
Expand All @@ -239,6 +270,13 @@ endfunction()

EXPORT_CONF(${CMAKE_CURRENT_SOURCE_DIR}/make_export.conf)

add_custom_target(verinfo
ALL
sh scripts/verinfo.sh CMake ${MULTIARCH}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
add_compile_options(-imacros "${EXPORT_VERINFO}")

set(CMAKE_INSTALL_PREFIX ${BBSHOME})

add_subdirectory(lib)
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ EXPORT_FILE := "$(REALSRCROOT)/make_export.conf"
# some directories need to be compiled:
# lib innbbsd maple so util test

all:
all: verinfo
@(cd lib; $(MAKE) all)
@(cd maple; $(MAKE) all)
@(cd util; $(MAKE) all)
Expand All @@ -30,7 +30,7 @@ all:
.endif
@(cd test; $(MAKE) all)

njob:
njob: verinfo
@(cd lib; $(MAKE) -j$(NPROC) all)
@(cd maple; $(MAKE) -j$(NPROC) all)
@(cd util; $(MAKE) -j$(NPROC) all)
Expand All @@ -49,6 +49,7 @@ export:
@$(EXPORTVAR$(exconf::= BBSGID))
@$(EXPORTVAR$(exconf::= WWWGID))
@$(EXPORTCONF$(exconf::= BBSHOME)$(exvalue::= \"$(BBSHOME)\"))
@$(EXPORTCONF$(exconf::= BBSUTCZONE)$(exvalue::= \"$(BBSUTCZONE)\"))
@$("$(ARCHI)" == "64" :? $(EXPORTCONF$(exconf::= _FILE_OFFSET_BITS)$(exvalue::= 64)) :)

configure:
Expand All @@ -63,6 +64,9 @@ configure:
# Continue execution with a new `bmake` instace and stop current `bmake` instance
@if [ "$(TARGETS_REST)" ]; then sh -c "$(MAKE) $(TARGETS_REST) $(MAKEFLAGS)"; printf "\033[1;36mJob done. Force stop.\033[m\n" >&2; false; fi

verinfo: .PHONY
@sh scripts/verinfo.sh "BSD-make" "$(MULTIARCH)"

runtest:
@(cd test; $(MAKE) runtest)

Expand Down
30 changes: 24 additions & 6 deletions dreambbs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ VALUEIF = "\#ifdef $(conf)$(.newline)$(conf:M*)$(.newline)\#else$(.newline)$(def
DEFVAR = "\#undef $(exconf:M*)$(.newline)\#define $(exconf:M*) $($(exconf:M*):M*)"
DEFCONF = "\#undef $(exconf:M*)$(.newline)\#define $(exconf:M*) $(exvalue:M*)"

GETVAR = [ "$(var:M*:$(UNQUOTE))" ] && echo "$(var:M*:UNQUOTE)" || $(else_var)
GETVAR = [ "$(var:M*:$(UNQUOTE))" ] && echo "$(var:M*:$(UNQUOTE))" || $(else_var)
GETCONFS = echo "" | $(CC) -x c -dM -E -P $(hdr:@v@-imacros "$v"@) - 2>/dev/null
GETVALUE = { echo $(VALUEIF$(conf::= $(conf:M*:$(UNQUOTE)))$(default::= $(default:M*))) | $(CC) -x c -E -P $(hdr:@v@-imacros "$v"@) - | xargs; } 2>/dev/null
EXPORTVAR = echo $(DEFVAR$(exconf::= $(exconf:M*))) >> $(EXPORT_FILE)
Expand All @@ -50,24 +50,34 @@ EXPORTCONF = echo $(DEFCONF$(exconf::= $(exconf:M*))$(exvalue::= $(exvalue:M*)))
BBSCONF := $(REALSRCROOT)/dreambbs.conf
BBSCONF_ORIGIN := $(REALSRCROOT)/include/config.h
EXPORT_MAPLE := $(REALSRCROOT)/maple/make_export.conf
EXPORT_VERINFO := $(REALSRCROOT)/verinfo_export.conf
!= touch $(EXPORT_MAPLE)
CFLAGS_MK += -imacros "$(EXPORT_VERINFO)"

# User names and group names
BBSUSR != $(GETVAR$(var::= "$(BBSUSR)")$(else_var::= $(GETVALUE$(conf::= "BBSUSR")$(default::= "$(:!id -un!)")$(hdr::= $(BBSCONF_ORIGIN)))))
BBSGROUP != $(GETVAR$(var::= "$(BBSGROUP)")$(else_var::= $(GETVALUE$(conf::= "BBSGROUP")$(default::= "$(:!id -gn!)")$(hdr::= $(BBSCONF_ORIGIN)))))
WWWGROUP != $(GETVAR$(var::= "$(WWWGROUP)")$(else_var::= $(GETVALUE$(conf::= "WWWGROUP")$(default::= "www-data")$(hdr::= $(BBSCONF_ORIGIN)))))

# UIDs and GIDs
ID_FALLBACK = 2>/dev/null || echo 9999
ID_DEFAULT = 9999
ID_FALLBACK = 2>/dev/null || echo $(ID_DEFAULT)
BBSUID != $(GETVAR$(var::= "$(BBSUID)")$(else_var::= $(GETVALUE$(conf::= "BBSUID")$(default::= "$(:!id -u $(BBSUSR) $(ID_FALLBACK)!)")$(hdr::= $(BBSCONF)))))
BBSGID != $(GETVAR$(var::= "$(BBSGID)")$(else_var::= $(GETVALUE$(conf::= "BBSGID")$(default::= "$(:!id -g $(BBSGROUP) $(ID_FALLBACK)!)")$(hdr::= $(BBSCONF)))))
WWWGID != $(GETVAR$(var::= "$(WWWGID)")$(else_var::= $(GETVALUE$(conf::= "WWWGID")$(default::= "$(:!id -g $(WWWGROUP) $(ID_FALLBACK)!)")$(hdr::= $(BBSCONF)))))
BBSGROUP_GID != getent group $(BBSGROUP) | cut -d: -f3
BBSGROUP_GID != $(GETVAR$(var::= "$(BBSGROUP_GID)")$(else_var::= echo $(ID_DEFAULT)))
BBSGID != $(GETVAR$(var::= "$(BBSGID)")$(else_var::= $(GETVALUE$(conf::= "BBSGID")$(default::= "$(BBSGROUP_GID)")$(hdr::= $(BBSCONF)))))
WWWGROUP_GID != getent group $(WWWGROUP) | cut -d: -f3
WWWGROUP_GID != $(GETVAR$(var::= "$(WWWGROUP_GID)")$(else_var::= echo $(ID_DEFAULT)))
WWWGID != $(GETVAR$(var::= "$(WWWGID)")$(else_var::= $(GETVALUE$(conf::= "WWWGID")$(default::= "$(WWWGROUP_GID)")$(hdr::= $(BBSCONF)))))

## BBS path prefixes and suffixes
BBSVER != $(GETVALUE$(conf::= "BBSVER_SUFFIX")$(default::= "")$(hdr::= $(BBSCONF_ORIGIN)))
BBSUSR_HOME != getent passwd $(BBSUSR) | cut -d: -f6
BBSHOME != $(GETVAR$(var::= "$(BBSHOME)")$(else_var::= $(GETVALUE$(conf::= "BBSHOME")$(default::= "$(BBSUSR_HOME)")$(hdr::= $(BBSCONF)))))

## Numeric local timezone
BBSUTCZONE != $(GETVAR$(var::= "$(BBSUTCZONE)")$(else_var::= $(GETVALUE$(conf::= "BBSUTCZONE")$(default::= "$(:!date +%z!)")$(hdr::= $(BBSCONF)))))

# rules ref: PttBBS: mbbsd/Makefile
DEF_LIST != sh -c '$(GETCONFS$(hdr::= $(BBSCONF)))'
DEF_TEST = [ $(DEF_LIST:M$(conf:M*:S/"//g:N")) ] # Balance the quotes
Expand All @@ -77,12 +87,13 @@ USE_PFTERM != sh -c '$(DEF_TEST$(conf::= "M3_USE_PFTERM")) $(DEF_YES)'
USE_BBSLUA != sh -c '$(DEF_TEST$(conf::= "M3_USE_BBSLUA")) $(DEF_YES)'
USE_BBSRUBY != sh -c '$(DEF_TEST$(conf::= "M3_USE_BBSRUBY")) $(DEF_YES)'
USE_LUAJIT != sh -c '$(DEF_TEST$(conf::= "BBSLUA_USE_LUAJIT")) $(DEF_YES)'
USE_MRUBY != sh -c '$(DEF_TEST$(conf::= "BBSRUBY_USE_MRUBY")) $(DEF_YES)'

# Flags for disabling shared objects
DEF_LIST != sh -c '$(GETCONFS$(hdr::= $(EXPORT_MAPLE)))'
NO_SO_CLI := $("$(NO_SO_CLI)" != "" :? $(NO_SO_CLI) : $(NO_SO:DYES:UNO))
NO_SO_CONF != sh -c '$(DEF_TEST$(conf::= "NO_SO")) $(DEF_YES)'
NO_SO = $(NO_SO_CLI:S/NO//g)$(NO_SO_CONF)
NO_SO_CONF != $(GETVALUE$(conf::= "NO_SO")$(default::= "0")$(hdr::= $(EXPORT_MAPLE)))
NO_SO = $(NO_SO_CLI:S/NO//g)$(NO_SO_CONF:S/0//g)

CC_HASFLAGS = echo "" | $(CC) -x c -E $(flags:M*) -Werror - >/dev/null 2>&1

Expand Down Expand Up @@ -121,8 +132,10 @@ NO_SO = YES

.if $(NO_SO)
CFLAGS_MAPLE += -DNO_SO
CFLAGS_SO += -DNO_SO
.else
CFLAGS_MAPLE += -DNO_SO=0
CFLAGS_SO += -DNO_SO=0
.endif

.if $(CC:M*++) || $(CC:M*++-*)
Expand Down Expand Up @@ -170,9 +183,14 @@ LUA_LDFLAGS != pkg-config --libs $(LUA_PKG_NAME)
RUBY_LDFLAGS_ARCHI = -Wl,--no-as-needed
.endif

.if $(USE_MRUBY)
RUBY_CFLAGS =
RUBY_LDFLAGS = -lmruby -lm
.else
RUBY_CFLAGS != pkg-config --cflags ruby-2.2
RUBY_LDFLAGS != pkg-config --libs ruby-2.2
.endif
.endif

.endif # .ifndef DREAMBBS_MK

Expand Down
71 changes: 15 additions & 56 deletions include/battr.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef BATTR_H
#define BATTR_H

#include "cppdef.h"

/* ----------------------------------------------------- */
/* Board Attribution : flags in BRD.battr */
/* ----------------------------------------------------- */
Expand Down Expand Up @@ -63,67 +65,24 @@ static const char *const battrs[NUMATTRS] =
"���i��H��K�峹",
"�۰ʪ��[e-mail",
"���׫H",
#ifdef HAVE_DETECT_VIOLATELAW
"�����������H�k",
#else
"�����������H�k(�t�Υ\\�ॼ�}��)",
#endif
#ifdef HAVE_DETECT_CROSSPOST
"������ cross post",
#else
"������ cross post(�t�Υ\\�ॼ�}��)",
#endif
ATTR_CONF_STR("�����������H�k", HAVE_DETECT_VIOLATELAW),
ATTR_CONF_STR("������ cross post", HAVE_DETECT_CROSSPOST),
"�ݪO��Ū�T��o���^��",
"�������ݪ��\\Ū�v",
#ifdef HAVE_RESIST_WATER
"�����ݪ��������",
#else
"�����ݪ��������(�t�Υ\\�ॼ�}��)",
#endif
#ifdef HAVE_BRDTITLE_CHANGE
"�O�D�ק睊�W",
#else
"�O�D�ק睊�W(�t�Υ\\�ॼ�}��)",
#endif
#ifdef HAVE_USER_MODIFY
"�ϥΪ̤��i�ק�峹",
#else
"�ϥΪ̤��i�ק�峹(�t�Υ\\�ॼ�}��)",
#endif
#ifdef HAVE_RECOMMEND
"�T����ˤ峹",
#else
"�T����ˤ峹(�t�Υ\\�ॼ�}��)",
#endif
#ifdef MultiRecommend
"���i�PID�s��",
"���i�ֳt�s��",
"�i�H���N��",
"�i�H�ۭq����ʵ�",
#else
"���i�PID�s��(�t�Υ\\�ॼ�}��)",
"���i�ֳt�s��(�t�Υ\\�ॼ�}��)",
"�i�H���N��(�t�Υ\\�ॼ�}��)",
"�i�H�ۭq����ʵ�(�t�Υ\\�ॼ�}��)",
#endif
#ifdef HAVE_COUNT_BOARD
"�������ݪO��T�έp",
#else
"�������ݪO��T�έp(�t�Υ\\�ॼ�}��)",
#endif
ATTR_CONF_STR("�����ݪ��������", HAVE_RESIST_WATER),
ATTR_CONF_STR("�O�D�ק睊�W", HAVE_BRDTITLE_CHANGE),
ATTR_CONF_STR("�ϥΪ̤��i�ק�峹", HAVE_USER_MODIFY),
ATTR_CONF_STR("�T����ˤ峹", HAVE_RECOMMEND),
ATTR_CONF_STR("���i�PID�s��", MultiRecommend),
ATTR_CONF_STR("���i�ֳt�s��", MultiRecommend),
ATTR_CONF_STR("�i�H���N��", MultiRecommend),
ATTR_CONF_STR("�i�H�ۭq����ʵ�", MultiRecommend),
ATTR_CONF_STR("�������ݪO��T�έp", HAVE_COUNT_BOARD),
"�[�ݶi�O����",
#ifdef HAVE_POST_BOTTOM
"�峹�m��",
#else
"�峹�m��(�t�Υ\\�ॼ�}��)",
#endif
ATTR_CONF_STR("�峹�m��", HAVE_POST_BOTTOM),
"�u�}�I�ƬݪO",
"���ϥ�",
#ifdef ANTI_PHONETIC
"�T��`����",
#else
"�T��`����(�t�Υ\\�ॼ�}��)",
#endif
ATTR_CONF_STR("�T��`����", ANTI_PHONETIC),
"�o�孭��ݪO",
"�O�D�i�ۭq�o�����O",
"RSS�ݪO"
Expand Down
12 changes: 9 additions & 3 deletions include/bbs_script.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ extern "C" {
/* BBS-Ruby */

#ifdef M3_USE_BBSRUBY
#include <ruby/version.h>
#ifdef BBSRUBY_USE_MRUBY
#include <mruby/version.h>

#define RUBY_RELEASE_STR \
VER_PATCH_STR(RUBY_API_VERSION_MAJOR, RUBY_API_VERSION_MINOR, RUBY_API_VERSION_TEENY)
#define RUBY_RELEASE_STR MRUBY_RUBY_VERSION
#else
#include <ruby/version.h>

#define RUBY_RELEASE_STR \
VER_PATCH_STR(RUBY_API_VERSION_MAJOR, RUBY_API_VERSION_MINOR, RUBY_API_VERSION_TEENY)
#endif
#endif

#define HAVE_BBSRUBY
Expand Down
Loading