-
- Downloads
New JS bbs methods:
- bbs.show_msg() - bbs.show_msg_header() Re-worked the JS bbs.netmail() implementation sbbs::show_msg(), show_msghdr(), msgtotxt() now take an smb_t* argument (don't use the pseudo-global 'smb' in these functions any longer) sbbs_t::putmsg() and JS console.putmsg() now accept an optional orig_columns argument to specify the original column width of a text for intelligent re-word-wrapping (e.g. as taken from a message header field). Previously, the original-column value was hard-coded to 80 columns (technically, 79). sbbs_t::show_msghdr() no longer sends a CRLF if the cursor is already at the top-of-screen (TOS). sbbs_t::show_msg() now uses the stored "columns" msg header fields to pass to putmsg() to intelligently re-word-wrap message bodies for display. sbbs_t::show_msg() and msgtotxt() return bool now instead of void. JS MsgBase.get_all_msg_headers() now supports an optional "expand_fields" argument (defaults to true). I contemplated just getting rid of the (few) expanding header fields (more like default-value-header fields, like 'id'), but decided against it, at least for now. JS MsgBase.put_msg_header(), the "number_or_offset" argument is optional and not needed if a header object argument is provided. Make this clear in this JS docs for this method Note: I sat on this commit for a while because I noticed occasional errors like this: Node 1 <Digital Man> !ERROR 2 (No such file or directory) (WinError 0) in readmsgs.cpp line 217 (sbbs_t::loadposts) locking "path/to/sub" access=-100 info=smb_locksmbhdr msgbase not open started cropping up after introducing these changes and which I never root-caused. But after a clean-build and waiting a week, I haven't seen it again, so hopefully it was just a incomplete rebuild issue and not a new bug.
Showing
- src/sbbs3/getmsg.cpp 51 additions, 40 deletionssrc/sbbs3/getmsg.cpp
- src/sbbs3/js_bbs.cpp 105 additions, 31 deletionssrc/sbbs3/js_bbs.cpp
- src/sbbs3/js_console.cpp 9 additions, 3 deletionssrc/sbbs3/js_console.cpp
- src/sbbs3/js_msgbase.c 37 additions, 30 deletionssrc/sbbs3/js_msgbase.c
- src/sbbs3/putmsg.cpp 5 additions, 3 deletionssrc/sbbs3/putmsg.cpp
- src/sbbs3/readmail.cpp 2 additions, 2 deletionssrc/sbbs3/readmail.cpp
- src/sbbs3/readmsgs.cpp 2 additions, 2 deletionssrc/sbbs3/readmsgs.cpp
- src/sbbs3/sbbs.h 5 additions, 5 deletionssrc/sbbs3/sbbs.h
- src/sbbs3/writemsg.cpp 1 addition, 1 deletionsrc/sbbs3/writemsg.cpp
Loading
Please register or sign in to comment