CVS log for epic4/source/window.c |
![]() |
Request diff between arbitrary revisions
* Move "term.h" out of the way so we can #include <term.h> (mv'd to termx.h) * This makes it possible to avoid empty decls for tparm() * Which is supposed to fix the build for larne on who-only-knows-what. * Rename tparm() to my_tparm(). * Do a make depend since i changed the name of a header file. ugh. * Change the name of (struct term) to (struct my_term) for freebsd sake. ugh.
* Fix brain-o in a previous fix.
* Add $windowctl(GET <refnum> CHANNELS) in kindness to BlackJac.
* Fix inability to /query an /exec'd process.
Fix /window <refnum> scroll_forward/scroll_backward, for blackjac
* Fix null deref when you do /window flush while not in hold mode.
Bug fix as a personal favor.
EPIC4-2.0 passes its vote of confidence! * Fix a bug with /window channel frobnitz hide doing a null deref * NSX asked for one more change under the wire.
Script changes from howl and nsx, as requested.
* Make inet_vhostsockaddr() extern so dcc can use it * Make dcc_open() use inet_vhostsockaddr() to bind /hostname to dcc conns * Don't allow -b and -q, or -b -and -s, as they cause deadlocks/panics * Fix casting error that caused $urlencode() of high bit chars to segfault * If swapping in a window that has no room for double status, recalculate all * If double-on in a window that has no room for it, recalculate all
* Fixes to 'less' script from howl * New 'help' script from howl * Add /WINDOW SCROLLADJ.
Why do I know i'm goign to regret this...
* Add /ON WINDOW_BEFOREKILL
* Another iteration of the 'notify' script, hooks the system's /ONs now! =)
* Put a space in place of a newline in the PF loader.
* Always ignore spaces after semicolons in parse_line (the {} parser).
* Some compiler warning fixes from rain.
* Make the output-window-searcher ignore from_server for LOG_DCC * Make status_hold and status_hold_lines use scrollback numbers too. * Make add_to_scrollback() redraw status bar if output while scrollbacking.
Don't swap in windows on /window kill unless it's the last non-frozen window.
* Fix /window next, /window prev (SWAP_NEXT_WINDOW/SWAP_PREV_WINDOW) to skip non-swappable windows.
* Add /SET STATUS_NOSWAP
* Fix #define DEBUG_EXTRACTW_DEBUG/LASTLOG
* Add -o and -O command line options to turn off IEXTEN termio() options
* Add /WINDOW SWAPPABLE (defaults to on)
* Add %{1}W status expando, expands to /SET STATUS_NOSWAP if SWAPPABLE OFF
* Don't allow windows to be swapped in or out if SWAPPABLE OFF
* Don't allow windows to be shown or hidden if SWAPPABLE OFF
* Do allow windows to be swapped in with WINDOW KILL even if SWAPPABLE OFF
* Add $windowctl(GET <refnum> SWAPPABLE)
* Fix a couple of minor compiler nits EPIC4-1.2.1!
* Fix a NULL deref if you do /window when there is no current window (!) * Update notify script from nsx, add sping script from nsx.
* Update tabkey.jm one last time * Add 'notify' script, a replacement for the notify command. * Fix $windowctl(GET <refnum> DOUBLE) * Make /on window_command give two refnums, the before and after refnums.
* Add $windowctl(GET <refnum> DOUBLE) * Support inbound double quoted filenames in dcc handshakes. bleh. * Fix NULL deref when you kill hidden windows (ie, /window killswap)
(*gulp*) Some changes for fudd. * Add /ON WINDOW_COMMAND, hooked after every /window command, $* is refnum. * Add concept of "fixed" or "frozen" windows when you SKIP ON FIXED ON * Fix /window kill to not kill the last "non-fixed" window * Fix /window hide to not hide the last "non-fixed" window * Allow /window kill to kill a "fixed" window, but not the last window. * (*gulp*) I hope all of the above works! * Fix $windowctl(REFNUM ...) it was out of order with REFNUMS * Make /xecho -l override the "who_from" target and always send to the level
Fix a variety of problems found by nsx -- particularly a panic occured when you did "/window <refnum> double on" where <refnum> was a window that was hidden (in certain circumstances)
* Fix /window query, it was a victim of larneproofing. Ooops! (Bugref 6) * Hook in $windowctl(), just for fun for now. * Enclose a few more dcc outputs in the target nick context.
From previous commit... * Fix urldecode * /lastlog -msgs 3 is obliged to skip back 3 msgs, not just 3 lastlog entries. * Fix warnings in gailib.h From this commit... * Fix some const correctness issues * Make message_to() take an (int) and not (unsigned) so we can pass in -1. * Fix some arglist regression tests to reflect new extractw semantics. * Fix uninitialized variable in ok_to_output() that caused panics.
Fix a typo. Noticed by blackjac.
Fix /window scrollback 0 so it doesn't crash.
Commit 600 -- Huzzah! * New tabkey.jm script from nsx. * Set the window's waiting channel before sending out the JOIN * Let <pagedown> and <end> work on hold mode as well as scrollback.
Fix UNSTOP_ALL_WINDOWS keybinding, rb ce.
* Add $servernick(<global>) to return the client's global nickname * Update tabkey.jm to latest version * Add new ircII-compatable /window hold_mode thingee. * Add /set hold_slider, /window hold_slider * Add 'hold_mode' script, implements ircII-like /set hold_mode[_interval] * /XEVAL -- ends eval option processing, like how /xecho does it.
* Make /window swap update the current-window-priority thingee.
* Revert all uses of LOG_CURRENT to LOG_CRAP * Change all uses of message_to(0) to message_to(-1) * Fix show_help() to not change to_window, it doesn't need to care about that. * Fix help_put_it() to not change message_from, doesn't need to care about it. * Fix /lastlog to use message_to(0) to send all output to current window. * Don't make output of /log go to current window -- no point to that. * Teach add_to_screen() to honor from_server's current window for LOG_CURRENT * And for /set current_window_level as well * Fix message_from() not to save/restore lastlog level, doesn't need to care. * All of this pretty much nukes LOG_CURRENT except for /window, HUZZAH!
Fix null deref in /window channel
Teach all the /set callbacks to take a (const void *). This fixes a bad-c problem with /set!
* Fix time functions to take (const Timeval) if they don't change the arg. * Create a special handler for /squit to avoid sending QUIT * to server. * Protect some IPv6 stuff i added recently to dcc with #ifdef INET6. Ooops. * Hack up $repeat(<num><space><space>) so it works again. ugh. * Hack up /set <variable><space><space> so it works again. ugh. * Dont allow /timer -repeat -1 0 because that busy-loops. * Add shell of $windowctl() which will be filled in going forward.
Commit 558 * Don't allow user to /window number in a window with a channel (avoid panic) * Make check_mail return a (const char *), fix status_mail(). * Modularize/reorganize mail checking, with mbox reference implementation. * Automatically /set mail 0 if the user's mbox can't be found.
Overhaul of malloced string handling functions: * Convert m_[s]c3cat[_s]() to malloc_strcat_wordlist_c() * Nix m_e3cat(), m_s3cat(), m_s3cat_s(), m_3cat() * Nix m_ec3cat(), m_sc3cat(), m_sc3cat_s(), m_c3cat(). * Convert m_dupchar() to malloc_dupchar(). * Convert m_strndup() to malloc_strndup(). * Make malloc_strcpy/malloc_strcat/malloc_strcat2/malloc_strcat_wordlist macros * Convert m_2dup() to malloc_strdup2(). * Convert m_3cat() to malloc_strcat2[_c](). * Convert m_3dup() to malloc_strdup3(). * Convert m_ec3cat() to malloc_strcat2_c() * Use strlcat_c() in $repeat() instead of strlcpy(). whee! * Sanity check first arg to $regcomp(), to avoid crashes. * Don't pass NULL to bsearch(), even if 'nmem' is 0 [$remws()] * Nix the original malloc_strcpy (supplanted by malloc_strcpy_c) * Comment out all the deprecated functions
Convert m_strdup() to malloc_strdup().
COMMIT 521
* Fix casts to update_transfer_buffer, so status info is more correct.
* Fix really lame bug that i'm responsible for (/eval echo }{)
* Work around infinite recursion in update_all_windows().
Commit 519 * Change m_strcat_ues_c to take a (char *) "unescape" param and not (int) * Rename m_strcat_ues_c to malloc_strcat_ues_c * Rewrite malloc_strcat_ues_c to support new semantics. * Make sure not to pass 0 to alloca() in ctcp checks * Initialize (DCC)->server [found by valgrind] * Change 'expand_alias' so 'unescape' is (char *) and not (int) * Add extra sanity checks in mangle_line against buffer overruns * Fix window_channel() to use new malloc_strcat_ues() arguments.
* Rename 'dcc()' to 'dcc_cmd()' so we can use dcc as variable
* Garbage collect unused 'irc_path' global variable.
* Add --with-warns to configure to do FreeBSD "WARNS" like compiler checks
* Many hundreds of changes to improve the "quality of code" in epic, including:
* - Treat all literal strings as (const char *) and fix const correctness.
* - Mopping up all remaining const-correctness issues
* - Do not "launder" a (const char *) to a (char *) in string searches, (ala
strchr) but rather return a ssize_t offset value.
* - Particular, MatchingBracket() returns (ssize_t) and not (char *).
* - Eliminate all "shadow" variable names by changing them to something else.
* - Eliminate most function decls that do not include a prototype list.
* - Add prototypes for all extern functions that are missing them.
* - Ensure most function pointers include a prototype list.
* - In term.c, most of those (char *)'s are really (const char *)'s.
* - Explicitly specify 'static' functions as 'static'
* - Ensure every function is either 'static' or has a prototype.
* - Eliminate (unsigned) < (signed) type comparisons.
* Hopefully you should not notice any changes!
Nominally remove all uses of "unsafe" functions: (Commit 506)
* Convert all uses of strcpy() to strlcpy()
* Convert all uses of strcat() to strlcat()
* Convert all uses of strmcpy() to strlcpy()
* Convert all uses of strmcat() to strlcat()
* Convert all uses of sprintf() to snprintf()
* As much as possible, use 'sizeof var' in snprintf/strlcpy/strlcat.
* Qualify the size of some global vars so we can sizeof() them.
* Nuke strmcpy(), strmcat(), strmcat_ue(), strmccat(),
* Change strmopencat() to strlopencat().
* Change strmpcat() to strlpcat().
* Fix switch_hostname so it doesn't return a (const) string.
* Fix TimerTimeout so it doesn't return a (const) Timeval.
* Change things like (ret) to do ret while (0); for when "ret" is "{}".
* Fix initialization for load_level
* Stop passing in static strings into io(), so we can modify them.
* Make messages passed to io() more informative to the user.
* Fix CTCP FINGER handler not to assume (struct pw) strings can be overwritten.
* Use (socklen_t) and not an (int) for socket sizes.
* Don't return a value in a void function...
* Don't use return value of process_dcc_chat_ctcps() for assignment.
* Don't put semicolons after function bodies
* Fix $getopt() to save 'input_size' so we can use it with strl*().
* Convert all uses of stpcpy() to strlcat() and strlopencat().
* Nix checks for stpcpy() in configure -- regen configure.
* New /set, /SET SWITCH_CHANNELS_BETWEEN_WINDOWS * C language issues (const correctness, integer size correctness) * Revamp channel structure to hold window refnum and not window pointer * Add "current channel counter" to channel structure. * Determine "current channel" by election. * Garbage collect a lot of now unnecessary code. * Add get_echannel_by_refnum(), returns window's "elected" current channel * Add internal function is_waiting_for_channel() * Add internal function move_waiting_channel() * Add internal function get_winref_by_bound_channel() * Add internal function get_bound_channel_by_refnum() * Convert uses of get_channel_by_refnum() to get_echannel_by_refnum() * Fix $winbound() to work when given a window refnum * Fix valgrind issue with $regcomp() * Remove sanity checks from traverse_all_channels(); handled elsewhere now * Change traverse_all_channels() with "this server" or "not this server" arg * Nuke (Window *)->current_channel. Handled by channels now. HUZZAH! * Implement /ON SWITCH_WINDOWS again.
Another merge.
Whooo! I'm on a roll! Commit #487
* Add /timer -delete_for_window <winref> to delete window's timer.
* Enhance my_strerror() to take an EPIC Network Error and an errno.
* Enhance Getaddrinfo() to use AF_UNIX path as 'path' not 'host'.
* Confirmed that $match("\\[s s1 "s *"\\]" "s s") works like it should now.
* Store a "current window priority" number in each window.
* Add get_winref_by_servref() returns highest "priority" window for a server
* Have /defer track server, use server's "current window" (per above)
* I'd like to have other things use this, like maybe /xeval -s.
* Add window_scroll_(backward|forward|backwards_lines|forwards_line) * Add /WINDOW SCROLL_BACKWARD, /WINDOW SCROLL_FORWARD * Add /WINDOW SCROLL_START, /WINDOW SCROLL_END
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
Fix a bug found by larne who deserves a lot of credit for pestering me until i finally figured out what caused it. The bug: When windows are removed from the screen (via kill or hide), the space it leaves behind is distributed to the other windows; however, the window's top-of-window pointer is not moved until the next update_all_windows. If the window is vacated from the screen before that can occur, the window can think it is big, but the top of the window will not be pointing at the place it should be; this can cause output to be accepted onto the window without it logically scrolling. When you swap the window back in, it has output "below" the bottom fo the window. The evidence: /window new hide swap last [wait for output to appear in the hidden window] /window swap last You can use /window 1 describe and look at the "Geometry Info" to see the problem. All of this could be avoided by using /window new_hide. ;-)
* Docs say that $info(o) includes 'g' if $glob() is available. Add it.
* Revamp $win(serv|size|chan|bound|level)() to use get_window_by_desc.
* Revamp $win(screen)() to use get_window_by_desc.
* Use get_window_by_refnum(0) and not 'current_window'
* Allow a \ to escape a space where spaces would be stripped.
* Above bug fixes things like switch ($foo) {(foo\ ) {...}} to work.
* Add handler for /on 330, "user is logged in" numeric in ircu.
* Don't honor/ignore "#" in a window name/refnum. This was lame anways.
* Fix is_window_visible/get_window to use get_window_by_desc().
Commit 443 * Uniformly use 32 bit file sizes in dcc. That's the way it has to be. * Split process_incoming_chat into modular functions. It's an experiment. * Remove the old, #if 0'd dcc_getfile_resume. * Remove the second, redundant warning from /window refnum(_or_swap). * Make the ArgList portion of server messages const. All const! Huzzah! * Roll /names, /list, and /mode numeric handlers into numbers.c * Roll "funny" global variables into server-specific variables * Nuke funny.c and funny.h -- huzzah! * /on window_kill provides two args now, $0 is refnum, $1 is name/refnum. * Rename "numeric_banner" to "banner" * Rename "parse_notice" to "p_notice" * In /xecho, rename 'banner' local var to 'want_banner'. * Revamp p_notice to look like and act like p_privmsg as much as possible. * Finish the rest of the larnifications. Done with phase 1. Huzzah!
Commit #427 * Add -l<tcl> to the front of $LIBS so -lm can come after it * Look for SSL stuff in default location before hunting for it in /usr/local. * Reset $withval after check for perl so --without-perl doesn't --without-tcl * Make first arg of cvtchar() a (const char *) to silence warning. * Move 'this_sucks' label to a place where it is legal. * Make check_val() cope with NaNs and INFs more graciously... * Fix null deref with /lastlog -c * Update the input line in set_update(), not the caller * Do update the input line when redrawing status * Change make_status() to return a success/failure value. * Don't clear the "status line wants redraw" flag if redrawing status fails. * Nuke the now unecessary "in_window_command" global variable. * Fix bug where <scrollback> + <scrollforward> left you in scrollback mode. * Force init of Window->lines_held = 0 even though that shouldnt be needed.
* Fixed a leak in /window channel. * Fixed a couple of leaks in /server -d. * Added $finditems() but it isn't finished yet, so it's #ifed out.
* Remove colon at end of RETURN_MSTR so it is like others. * Unify dgets() and SSL_dgets() * Add a 4th argument to dgets(), an (SSL *) for ssl reads, NULL for normals * Integrate SSL stuff more tightly by removing unecessary #ifdef's * Change 'enable_ssl' to 'try_ssl' to avoid confusion with 'ssl_enabled' * Remove uneccesary members of (Window) * #include "functions.h" in any file implementing built in functions. * panic if ssl op attempted on non-ssl connection. * Don't call functions in RETURN_* macros. (they're evaled twice) * Nuke #ifdef 0'd uses of 'ceiling_of_display'
Paladin kept bugging me to put back the old behavior of the windows where if you scrolled down or went to the end, it "stopped" where you went back into scrollback. You know what I mean if you miss this feature. I hope i hope i hope i did not break anything.
* Use server_list_size() and not number_of_servers outside of server.c * Use NOSERV and not -1 for "no server" * Use (Timeval) and not (struct timeval) * Fix (get|set)_server_sent_*() et al to take server refnum. * Use parse_server_index() and not my_atol() to parse server refnums * re-indent quotecmd * Rename is_server_connected() to is_server_registered * Make /quote work as long as server is open (not registered) * Use send_to_aserver() when it can avoid setting from_server unecessarily * Change sent_to_server and clear_sent_to_server to (set|get)server_sent(). * Change doing_* to get_server_doing_*. * Use (unsigned short) and not (u_short) * Use (unsigned long) and not (u_long) * Make output_reject_ctcp() take a refnum * Lock a dcc while we are connecting it, just in case. ;-) * Fix /dcc send -p <port> * Store protocol enforcements as (get|set)_server_protocol_state(). * Use (Stat) and not (struct stat) * Rewrite $timerctl() so it works like $logctl() * Rename is_server_connected() to is_server_registered() * Fix an off-by-one error with /FOR ... IN ... * Keep track of both readable and writable fd's with newio stuff. * Convert server_list to an array of pointers * When user /server -delete's, leave a gap, don't change refnums around. * Nix code that handles deleting server refnums. * New function, new_open_for_writing(), for when we do nonblocking connects. * Change new_open() to deregister fd as "writable" * Renovate the notify stuff to take refnums and not just use from_server. * Renovate /WHO, /ISON, /USERHOST to take refnums and not just use from_server. * Make everything that uses server_list[] use get_server() instead. * Make everything capable of dealing with "gaps" in server_list[]. * Use a bunch of macros, to handle with getting and setting server attrs. * Make as much as possible use refnums as params and not from_server. * And a lot of other stuff...
* Change do_input_timeouts() to a timer callback. * Nuke the now unused global /wait stuff * Revamp timer.c so you can add/change/delete/update timers during a timer * Change add_timer() so it takes a winref not a window pointer. * Make the "key timeout" thing happen on demand instead of a recurring timer * Remove the recurring "key timeout" timer. * Remove the 'key timeout' thing from io(), also 'first time' stuff. * Call get_time() after select() in io(). * Fix two compile bugs found by larne. * Fix bug when you did /flush on a /clear window.
Another round of epic5 changes... * Make $B, $., $,, $:, $;, $I, /WAIT stuff server specific, from epic5 * Make tracking of doing_(privmsg|notice|ctcp) server specific, from epic5 * Fixes for Const Correctness.
Backport some changes from EPIC5... * Fix /WINDOW NAME so it takes extended-words (/window name "foo bar") * Add 'get_geom_by_winref()' for $geom(), 'const'ify a few things... * Fix $geom() so it can take a window refnum as an argument. * Replace $center() with a better one from epic5.
* Fix the recovery from the "output below window" bug.
* Update copyright notices. erf. * Fix short circuiting in new math parser not to spuriously error * #ifdef out all uses of bogus 'ceiling_of_display' for now. * Pull "initial" part of resize_window_display() into new_window() * Then forcibly call resize_window_display() to update old_display_size. * And then call make_window_current() last to make sure window updates there. * But I think that calling recalc_win_curs_and_disp_ip might be bogus there. * Make notes that calling make_window_current() can kill the window.
Doing a yell there causes an infinite loop.
* Remove /set suppress_server_motd which didn't really work anyways. * Add function decls for bsd_arc4* to ircaux.c * Always check (window->hold_mode || window->autohold) together! * Unhold_window()s only if both hold_mode and autohold are off! * unhold_window()s instead of doing scrollback_end for robustness. * Attempt to recover from the "output is below bottom of window" bug, whine.
Extra debugging info for desaster.
Move the initial calculation of window scrollback buffer vars to before we add it to a screen. At absolutely worst this change is benign, at best it fixes a bug (or two). I asked CE to test this and he didn't say that he noticed anything broke, so here goes!
* Change expand_twiddle(), path_search() to take results as params, int retval * Add normalize_filename(), to do job expand_twiddle() used to do. * Add isdir(), just because * Change /CD, /LOAD, /SAVE, /DCC SEND, /DCC GET, to use normalize_filename. * Change /DCC RESUME, $open(), $which(), $unlink() to use normalize_filename. * Change $rename(), $rmdir(), $fexist(), $fsize() to use normalize_filename. * Change $glob(), $globi(), $mkdir(), $chmod() to use normalize_filename. * Change $ftime(), $randread(), and uzfopen() to use normalize_filename. * Change /LOG, /SET LOGFILE, servers file to use normalize_filename. * Fix /LOG so maximum number of targets per log is a compile time #define. * Revamp expand_twiddle() and uzfopen(). * Fix uzfopen() to look for 'bunzip2' in addition to 'bunzip'. * Fix bug with /QUEUE -delete * Remove unused variable in window_scroll().
Fix /unclear so it calls recalc_window_cursor_and_display_ip(). This was causing the window to think it was in hold mode when it wasn't, which is bad.
Fix bug with doing SCROLL_FORWARD after SCROLL_HOME
Ach. Here goes nothing. Major commit which does many things, but the most prominent of which is the final integration of the scrollback buffer with the hold buffer. This fixes several annoying "features" and introduces a small truckload of new features which have been requested recently. Please see the KNOWNBUGS or UPDATES file for more info, since I don't want this message to be ridiculously long.
Fix some compile warnings. Nothing to write home about.
Update copyright notices and copyright dates.
Fix null deref when you /window flush in an empty/cleared window. Found/reported by adm.
No functional changes, just removal of unecessary whitespace at the end of lines. From adm.
Differentiate /window noserv from /window discon. After /window noserv, the window will not auto-reconnect to a server. After /window discon, the window will reconnect to its old server.
* Applied Ay-Ars patch (with a few modifications) which fully melds ssl into the server spec, which is now server:port:pass:nick:group:proto where proto currently is "irc" or "irc-ssl". * Removed -ssl flags from "/window server" and /server. * Ay-Ars patch also includes a new function, $servertype() which returns the proto field by way of extrapolation, (it is not the exact text entered into that field). * Entering a server spec in a /server or "/window server" that currently exists, but which has different additional field values normally alters the current spec to conform to the new spec. This doesn't work with the proto field. This is probably a bug. I am somewhat uncomfortable with all of this. I would like to alter add_to_server_list to be the one true reference for decoding the server spec and simplify the other functions to only breaking it into server, port and "additional". This may be too big a change currently.
Fix some debugging info, make /window channel 0 do the reasonable thing. Change the "sillyname" and release date based on a conversation on #epic. Just a silly little release. =)
This _addresses_ Debian bug #133581 ("/window channel" causes a crash).
I don't understand why this function is called or what it does, but
removing it seems to fix the problem.
Added "/window notified" which will toggle the windows notify list status. This will make it possible for the first time for the current windows notify status to be on, which conceivably could lead to complications. If it does, it would probably be just as easy to remove that capability as fix it.
Fix function that didn't build if #undef HAVE_SSL Don't permit window.c to leer into server_list[x].
Moved some server attribute altering stuff to server.c.
Applied the SSL patch from ay-ar. Details are in README.SSL. This works well at this point, but there may be teething problems.
* Fix $printlen() -- must call normalize_string() before output_with_count()! * Make 'add_to_window' and 'window_disp' static to screen.c again. * "Fix" /WINDOW ECHO to not call add_to_window() but rather use "to_window". Commit #150
Emit an error if the user tries to /JOIN a channel when they are not connected to a server. This prevents a panic in check_window_servers(). This came up becuase someone tried to /JOIN a channel in their ~/.ircrc that they loaded before connecting (-B command line option).
Fix a bug found by Q -- in the recent changes, I failed to make sure that the screen knows that the cursor is in the display -- so when we call cursor_to_input() it doesn't move the cursor because we didn't bother to tell it that it was moved to the window, capiche? This caused some "interesting" problems. Also, make sure the output of the /query command actually goes to the affected window, as this just makes more sense.
I was passing in the *normalized* string to the lastlog stuff, which was definitely a bad idea. Now i pass the raw string to window_disp and then pass the raw string onto lastlog and log, and so on, so that they don't get broken. I *will* be changing this again, but this is a stopgap fix for now.
Resizable wserv support! No, really! Backported from epic5. I have to go through term.c again and make sure there are no unintended casualties of the merge. We should also start testing the resize handlers to make sure they're happy. I don't promise they'll all work first time, but this is a good place to start!
set_channel_by_refnum() is the means by which we set the current_channel for a window, but due to my malfeasance, several bugs slipped through. Because referential integrity panic failures will occur if you incorrectly set a channel to a window, and because it's very hard to track down the cause of that after it's already happened, make set_channel_by_refnum() sanity check it's arguments and panic immediately if asked to do something invalid. Specifically, a window cannot have as its current channel a channel that has not yet been joined (it is a "waiting_channel" until we get the JOIN back), so set_channel_by_refnum() must refuse to make a channel the current channel if it does not, in fact, exist. Also, we must not default to the current window if the specified refnum is invalid. There is no reasonable circumstance in which an invalid window refnum could be passed to set_channel_by_refnum(). So if the window refnum lookup fails, abort immediately. These two changes should make it basically impossible to sneak a current channel onto an invalid window (ie, a window on another server), or to "accidentally" use a server refnum where a window refnum was needed.
Ok. Well, set_channel_by_refnum() takes a WINDOW refnum, not a SERVER refnum. Whitefang first reported this bug. (The bug is in /window rejoin, and therefore in /join)
Oh yes, how could I forget my favorite server class that chokes if you put a space after the channel names because it thinks you're specifying keys and won't join non-keyed channels with blank keys? Only send the space + keys in window_rejoin's JOIN if we have keys.
The 'JOIN' should be outside of the while{}, not inside of it.
In delete_window, move the channels away before we swap the window, because swapping the window is a sequence point. This avoids a panic when the ref checkers notice channels on a deceased window.
* Made window_rejoin() work directly with args rather than a local copy.
* Altered a use of m_s3cat_s to m_s3cat due to it messing up the JOIN command.
* Added a check in move_channel_to_window for whether the bind_channel
attribute is actually set.
* Documentation note: If /window rejoin is ever meant to be used in the
standard way in which commands can be appended to each other, the key
argument will be required.
eg: /window rejoin #chan key rejoin #chan key
* Add /window rebind, which moves a channel binding forcibly to a new window * Add /window rejoin, which joins a channel in the window you want it to go. * Make /join use /window rejoin, you can use it in an /on now! Huzzah! * Fix move_channel_to_window to revoke /window bind when a chan moves away. Commit 92
* Miscelaneous 3cat updates.
* History expansion copies the history buffer verbatim now.
* Bugfix: /!0 would not retrieve the first command entered.
* Bugfix: Negative numbers not found would be display the
incorrect number in the error message. eg: /!-4444
* Alterations to remove_trailing_spaces interface.
* $igetrmatches() was defined, but inaccessible.
Two things: * Remove /set notify_handler which didn't do anything. * Rewrite /lastlog so i understand how it works. Big new feature, -regex, to support regex searching on lastlog! * Commit #75.
* Fix reconnect() to call window_check_servers() before it returns. This should fix a number of places where windows are not properly informed that their server has gone away, meaning that they may be left holding the bag with a current channel that no longer exists. * Not sure what to do about window_change_servers() which really should support changing to new_server == -1. *sigh* I can't wait for output rules to moot all this. * Fix /window discon and /window noserv, which just blithely set the window's server to -1 without bothering to tell anyone, like say, the channels, or calling the servers via window_check_servers() or any of that, you know, important stuff. /window noserv is now a strict alias for /window discon.
Fix a typo in the 477 numeric handler (spotted by robohak) Fix reconnect stuff so it's done right. Hopefully Q will accept this. ;-) I'm hoping that channels are now saved properly, or at least that we can arrange for them to be. Watch out for the new panic i put in there!
Commit #47
* /window server resets the "reconnect attempt" counter ala /server
* /for i in <pattern> {...} now reserved, and emits an error.
* "make depend" done again.
* "my_next_expr" revamped, extra argument added
* "next_expr_with_type" like "next_expr" but first char is "type".
* The /for i in (list) and /for i from x to y commands now use the
above cruft.
* This is epic4-0.9.16-10
* "break_args" now uses "next_expr_with_type"
* "do_log" should use localtime(3) and not gmtime(3), duh.
* "clear_reconnect_counts" is now an extern function from server.c
Commit #30 -- all of this from Robohak Implement new "move_channel_to_window" function, which supercedes the functionality provided by "unset_window_current_channel" and "reset_window_current_channel" -- do not use those functions for anything new without talking to us first. This should make epic work with lice once again. Thanks robo! =)
Commit #29: * Add /on error, to handle ERROR protocol messages. * Fix /window * toggle, to actually toggle. * Add /defer command, per email on epic list. * New hybrid6 script from is-. * Fix a bug with strlcat() from openbsd via freebsd. * Axe long broken "1 second cursor in window" delay thing. * Repeal the "deferred free" stuff in 0.9.15-10 that wasn't too good. That's it!
Roll get_connected() into reconnect() and abolish all uses of get_connected(). Things are starting to look good here!
Commit #17 -- EPIC4-0.9.15 final preparation.
Commit #16 --
* Update the FTP mirror list
* Clean house on the KNOWNBUGS list
* Make 'remove_window_from_screen' a static function
* Fix bug where /on switch_windows * {window $3 double}
combined with /window hide in a window with channels induced a panic.
* This is commit #16.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |