CVS log for epic4/source/status.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.
* Add %{2}W and %{3}W from epic5 (for blackjac)
* Fix $stripcrap(ALL,-<type> ...) from epic5.
* Add support for +e and +I numeric replies for efnet.
* Increase buffer for %F (and %{1}F) from 80 bytes to 2k.
* 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.
* 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)
* 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.
Teach all the /set callbacks to take a (const void *). This fixes a bad-c problem with /set!
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.
Commit 556 * Change #define DEFAULT_CPU_SAVER_EVERY to 60, it needs not be 0. * Create 'clock.c', to hold clock generation, system timers, cpu saver watchdog * Create notion of "sys(tem)timers", callbacks for mail, notify, clock gen. * Add 'system_timer', generalized callback for all of the system timers. * Fix add_timer() so the 'command' argument does what the docs say it does. * Extern 'timer_exists' so we don't try to remove_timer() and invalid timer * Redo dependancies because clock.h exists. * Add code to bootstrap mail systimer with /set mail * Add code to bootstrap clock generation with /set clock * Add code to bootstrap notify handling with /set notify_interval. * Start enforcing "NOTIFY_INTERVAL" again in do_notify() to avoid excess flood.
Commit #555: * Add #define MINIMUM_CLOCK_INTERVAL and MINIMUM_MAIL_INTERVAL in config.h * Add #define DEFAULT_CLOCK_INTERVAL and DEFAULT_MAIL_INTERVAL in config.h * Add reset_system_timers(), do_update_clock(), and set_cpu_saver_after() * Add time_to_next_interval(), general form of time_to_next_minute(). * Add get_clock() and reset_clock() to replace update_clock(). * Make remove_timer() an extern function so i can delete timers. ;-) * Add /SET CLOCK_INTERVAL and /SET MAIL_INTERVAL * Make $T use the static clock. * Reorganize system timers 1 and 2 into four timers: * - CPU SAVER timer, checks for idleness, to turn on cpu saver * - CLOCK timer, updates the status bar clock periodically * - MAIL timer, checks for new mail periodically * - NOTIFY timer, checks for others on irc periodically * The above three honor "cpu saver" mode. * Nix the old "do_every_minute" timer. * Reorganize the clock generation stuff into "reset_*_clock" functions * Generate the clock statically; only update it from the CLOCK timer * Add reset_system_timers() which regenerates all four system timers. * Don't set system timers in main, call reset_system_timers() instead. * Don't enforce "notify interval" in do_notify(), handle that in NOTIFY timer. * Comment stuff in words.c
Convert m_strdup() to malloc_strdup().
* 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!
Expanding the status bar's expandos can occur during the "main output loop" (the end of it, to be precise), and output is forbidden by rule during the main output loop (because it is not recursive). So we must specifically and explicitly suppress error messages during status bar expansion to avoid an infinite loop that causes a crash.
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.
Add %{1}+ status expando.
Fix status_voice().
* 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.
* Explicitly set "mask" to 0 in cs_alist_hash(), so it is initialized * Change type() to typecmd() to avoid name conflicts. * Change 'dot' to 'dotlocl' to avoid name conflicts. * Change 'op' to 'reduce' to avoid name conflicts. * Fix a typo in the error message from /window kill. * Add a panic to detect larne's recent bug that I fixed, just in case. * Constify the "path" argument to uzfopen(). * Make sure return value of strlen() is assigned to a 'size_t' not an 'int'. * Split load() into load() and load1(), load1() reads a file opened by load(). * Now load() is "interpretation-free", and load1() can be replaced. * Fix various minor compile-time issues. * Change %P status line expando to give more useful information.
* Add extra slop for logically attributed denormalized display strings * Const-ify a few Timevals, just for good measure. * Don't hardcode use of AF_INET in dcc.c, rather use a global variable for it. * Use "global_family" var to pass hint what socket fam to use. AF_INET for now. * Add extra sanity check just in case window->screen goes NULL in status redraw * Fix several benign compile-time issues. * Reword a few previous entries to fit onto one line.
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
* CTCP-over-DCC fix. There are some things that confuse me about the inner
workings here, so I'm not sure if this fix was done properly, but I did
a few tests including a DCC send over a SED encrypted DCC and everything
seems to tick over well.
* Unix socket configure tests as per KNOWNBUGS.
* /set flood_ignore defaulted to off.
* Tuned commandqueues.
* The 324 hook is now called for joins as well.
* %{1}D status setting as per UPDATES.
* DCC hold mode as per UPDATES.
People have been bugging me to "fix" this forever. Well, for at least as long as /set status_does_expandos has existed. The fix is when we change current_window over to the window we're expanding for, also set from_server so things like $channel() or whatever work correctly.
Add %{1}R status format which always gives you the window refnum.
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.
* 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'
* 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...
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.
Update copyright notices and copyright dates.
No functional changes, just removal of unecessary whitespace at the end of lines. From adm.
It appears as though the last two changes to configure.in did not result in the configure script being recreated and committed -- do that now. This introduces configure changes to 'ssl' and the check for 'socklen_t'. Also, fix a compiler warning in status.c.
Fix typo.
Remove some debugging code from compat.c Fix /set status_ssl to not return NULL. I should fix this.
* New STATUS_HALFOP setting which acts much the same way as STATUS_CHANOP. * New function $getcommands() which acts much the same way as $getsets(). The internals for these two functions probably need to be rolled together. * Cleanups and minor updates to tabkey.ce.
Applied the SSL patch from ay-ar. Details are in README.SSL. This works well at this point, but there may be teething problems.
Apparantly newer version of gcc-3 choke on the ## in my macro. Bleh.
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.
This is the new highlight/attribute renderer. It is a "true renderer" because it actually renders things to look like what you say. No longer does turning on some attributes (color) turn others off, nor does turning some off (bold) turn others off. Some things may break with this, please let me know, or feel free to pitch in and fix them. Zinx will be happy to know that i did NOT use the epic5 "prepare_display" routine because he was right, i did totaly break it. I used the epic4 prepare_display function but just made it aware of the new attribute stuff.
Fix instant coredump if you do /set -status_channel. Doh.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |