CVS log for epic5/source/screen.c |
![]() |
Request diff between arbitrary revisions
Change toplines so they don't sometimes end one column short
xecho's -all option clobbered the first word after it as if it took params
Revamped input line a little. Added indicator for text scrolled off the left of our input line.
A slight change here. This time, the hook returns the correct window. :)
Added /on. /ON WINDOW_NOTIFED.
* Phase two of larne's patch is to isolate features that require job control * You can #define NO_JOB_CONTROL to turn off fork/exec type stuff. * Soon, the configure script will auto-grok this.
* Roll forward portability changes from epic4-2.10 (larne) * This also includes term.h -> termx.h -- Make sure you rerun configure!
* Add /on signal (pegasus) * Fix build on interix (twincest) * Fix compile warnings and a c99-ism * Fix another panic() causable by /echo. ugh.
* Put 'sig.inc' in include rather than source to fix build for r/o srcdir * #undef strtoimax() if we are going to define our own to fix build * Fix printf() qualification for syserr() * Fix $write(@W<num> ...) so uppercase W works * Nix strip_control() which isn't used any more. * Make #define WINDOW_CREATE go away -- it's now mandatory. * Reorganize do_screens() in prep for future work
Emergency fix.
* Add a new internal function prepare_display2() a reduced version of p_d(). * Add a new internal function fix_string_width(), the guts of $fix_string() * Fix /set indent to use prepare_display2(). Now you can use ^C codes. yay! * Fix fd leak if fork() fails for /exec. * Fix window toplines so they extend the width of the screen like statusbars.
Remove u_* bsd-isms so we can compile with -ansi on linux.
* Add new level SYSERR (see UPDATES) * Add a server refnum to syserr() to send the syserr to the proper window. * Add a server refnum to new_open() so we can pass it to syserr(). * Add new flag to /XECHO, /XECHO -AS (output to all windows on server) * This should make syserrs go to the "correct window" most of the time (larne)
Flush recent changes.
Move some functions out of input.c to places where they make more sense. This makes it easier for me to re-org input.c.
* Add arg to panic() controlling whether panic is sent via QUIT (rb black)
* Stage 2 -- start eliminating "optimizations", use update_input() for redraw
Stage 1 in a major overhaul of the input line handling code. Caution -- road may be slippery when wet. Many more changes to come.
Add code to do threaded stdout (from larne)
This is the start of a major project to normalize the behavior of word handling in built in functions. The project involves stipulating that every place that handles a "word list" define what a "word" is and use it consistenly, and to output the same type of "words" that it accepts as input. This leverages /xdebug dword to control optional support for dwords in many built in functions.
* Add SEDSHA cipher type, which is better than SED, and always available. * Add my_sleep|isreadable|iswritable() funcs to phase out rogue selects()h * Add support for multiple concurrent servers to /encrypt. yay! * Store the length of the Crypt key within the key itself. * This moves us closer to being able to decrypt arbitrary data. * Test all of the cipher types, incl. compat of CAST with ircII. All set!
Suspend protocol enforcement while handling user keypresses. This was a wishlist item of Phoen.
* Eliminate the third argument to expand_alias(), the statement spanner. * Rename parse_line() to parse_block() to better reflect its duties. * Make parse_block() static. Everything needs to call runcmds() now. * Eliminate the local-stack-creating feature of parse_block(), callers do this. * Rename 'line' to 'stmt' in parse_statement(). * Sort of forget to re-implement /set cmdchars. The / is the cmdchar. * Try to optimize parse_statement() and next_statement() some.
* Constify get_*_alias(), so lookups can't modify the actual alias this way. * Rename parse_command() to parse_statement(). * Create a next_statement() to figure out how long the next stmt is. * Stop using expand_alias() to rip apart statements. yay! * Refactor parse_command and parse_statement to better define their roles. * Push responsibility for expansion to parse_statement, someday, to cmds! * Push responsibility for handling block statements to parse_statement. * "Forget" to re-implement /set input_aliases. I wonder if anyone will notice. * Change the name of "hist_flag" to "interactive" to reflect its purpose. * Change /load -std to use parse_statement() instead of parse_line()
* Add /window indent, allowing you to overrule /set indent per-window basis. * Make window breaking use /window indent * But /set indent still overrules any /window indent's you've set. :/
* New file, levels.c, holds all the Mask and window level manip stuff. * Move level_to_str/str_to_level, mask_to_str/str_to_mask to levels.c * Change #define LEVEL_*'s into (int)s * Use BIT_VALID() instead of NUMBER_OF_LEVELS, whack NUMBER_OF_LEVELS. * Whack hardcoded level_types char array. yay! * Change users of "LEVEL_CURRENT" into "LEVEL_NONE" and whack "LEVEL_CURRENT" * Add "OTHER" window level, as replacement for "CRAP" * Continue to honor "CRAP" as a synonym for "OTHER". * New function $levelctl(), to add/query window levels. * Window/lastlog levels can now be added at runtime. HUZZAH!
* Fix /away -all so it doesn't error on gaps in server list (weirdo) * Fix bogon in /xecho. doh. * Fix /who -real so it matches both with and without the hopcount. * Convert all uses of message_to() to message_setall(). yay!
* Nix some func decls in windows.h that don't exist any more * Add message_setall(), lets you save to_window on the message_from stack. * Replace users of message_to() with message_setall(). * Replace direct users of to_window with message_setall(). yay! * /XECHO got rewritten as part of this. See UPDATES * Fix various compiler warnings.
Fix braino.
* Handle \f as a special case in new_normalize_string for the status bar. * Do some re-org in screen.c, screen.h * Roll window_disp() into its only caller, add_to_window(). * Change create_new_screen() into a void function
* Force \r (carriage return) to be type 5 char (never printable ever)
* Change all the builtin functions to use new_normalize_string(). * Change the input prompt to use new_normalize_string(). * Add /set mangle_display. HUZZAH! * Change the display stuff to new_normalize_string() and /set mangle_display * Whack the now unused normalize_string(). HUZZAH! HUZZAH! HUZZAH! * Change the seperator of the mangler-type-parser to be spaces and not commas. * Start keeping a monotonically increasing refnum for all lastlog items * Change add_to_lastlog() to return the lastlog refnum * Change add_to[_window]_scrollback]() to take the lastlog refnum * Cross-link scrollback items with the corresponding lastlog refnum. * Save scrollback/hold position across scrollback rebuilds * This means rebuilding doesn't affect scrollback/hold users! HUZZAH! * Whack the now unnecessary /window auto_scrollback (mis)feature. * Don't unconditionally unclear after rebuild, if everything still fits.
* Add the idea of a "visible" and "invisible" lastlog entry * Always skip "invisible" lastlog entries, handle them when trimming, etc. * Rename remove_from_lastlog() to trim_lastlog() and have it do looping * Unconditionally keep every item in the lastlog, even if it's "hidden". * When screen changes width, purge+recreate all window's scrollback * Add /window rebuild_scrollback to manually invoke this process. * For now, auto-recreate unholds all, and cancels scrollback * Add /window auto_scrollback to opt-out of auto-recreate feature * Store each window's width individually, don't refer to server * Use each window's personal width to re-break lines (more on this later) * Fix so "/window lastlog foo" doesn't delete your lastlog!
For a little while at least, $stripcrap() acts differently from the /set mangle_* type stuff. This is a work in progress. Please be patient =) * Nix the last vestiges of the unsupported ROM_CHAR feature. * Nix some now unused function decls in screen.h * Add new_normalize_line, which is a unified normalizer/mangler (*gulp*) * Cut over $stripcrap() to use new_normalize_line (*double gulp*) * Rename "ANSI" mangle type to "NORMALIZE", but still accept "ANSI" * Nix the gxlate table, and change ^T from State 4 to State 6 character.
* Fix some bugs, naturally. * Nix the (apparantly) unused normalize_never_xlate global variable. * Add function comments to some stuff in screen.c (comments! the horor!) * Move read_esc_seq so it's closer to read_color_seq. * State 1 chars (C1 chars) are stripped unless /set allow_c1_chars * State 6 chars (Control chars) are stripped unless TERM_CAN_GCHAR is set * State 4 chars (Highlight chars) are handled singly * Plus, ALL_OFF is not generated unless you do an ALL_OFF! HUZZAH!
* Fix $stripc() to be a clone of $stripcrap(), just to strip colors * Nix the now unused strcpy_nocolorcodes(). * Fix up read_color_seq() to return an offset, not ptr, a la skip_ctl_c_seq(). * Fix mangle_line() to use read_color_seq instead of skip_ctl_c_seq * Nix the now unused skip_ctl_c_seq(). Only one thing now reads ^C's! HUZZAH. * Rename skip_esc_seq() to read_esc_seq() just because. * Begin moving logic|display_attributes towards a change model system * Begin a radical change on how characters are given "state" (see source) * Basically 8 bit chars (except c1 chars) are treated as "always printable" now * Mangle a few other callers to logic_attributes, i'm sure these are b0rked.
* Remove some now unused xdebugs, fix compile warnings.
* Split handling of ESC seqs out of normalize_string() into skip_esc_seq().
* Fix bug with comma operator in new math parser that crazyeddy found. * Whack support for 7 bit terminals (8 bit support is now assumed) * Whack support for /set eight_bit_characters * Whack support for /set beep_max, tab, tab_max, and nd_space_max
No functional changes in this commit, just some source cleanup before I go through and wrangle the screen recalculation code into submission.
Privileged yell()s still need to be run through normalize_string(), doh!
* Make /bind "compress" string, and bind and print it compressed. * This fixes /bind'ing literal characters being displayed literally. * Round 3 of blackjac's builtins script * Round 1 of fudd's loadformats script. * Fix some "all-the-world's-an-int" bugs reported by xlc (aix's compiler).
* Take a new arg to new_open() to control whether INFO -- errors are output. * Don't output the "INFO --" things for dcc or execs
* Make /xecho -v output to current window if it's visible. * Permit status updates right away, instead of after first connection. * If /input is done in hidden window, switch to the main window. * Make arglists look a little less odd for fudd.
* Refactor the error stuff by eliminating my_strerror() and dgets_errno. * Error messages are now delivered on multiple levels as info is available. * This may get annoying, but it's a lot more accurate now! * Change inet_* functions to return int's since their retval is unused. * Add a new internal "syserr()" function that generates formatted errors. * Syserr's look like say()s but they act like yell()s. (can hook with /on yell) * Keep an counter in the server stuff so we can count off as addrs are used. * So the error message in /ON DCC_LOST is always just "ERROR" now. * Fix various compiler warnings and stuff. * Add $hookctl(GET HOOK <ref> STRING), return /load'able format of ON * Fix some debugging outbound in switch_hostname(), doh! * Roll set_socket_options() into a new Socket() function. * Roll connections to AF_UNIX sockets into the mainline stuff. * Roll nonblocking/connect/nonblocking into Connect(). * Add AF_UNIX support to Getnameinfo() to remove annoying errors. * When doing recovery from EBADF in select, only check fd's we're using * Just puke if configured for kqueue() and kqueue() fails. * Don't puke on default 353 output if the userlist arg is missing. (for ratbox) * Permit doing /window name to change case of window's name.
* Refactor $sar() and $msar() so they share as much code as possible. * Refactor newio, support select/kqueue/poll (#define's in newio.h) * ... Getting closer to not needing select! * Fix SSL. * Fix a bunch of misc compiler warnings * Remove restrictions on /QUOTE, so there! * Add pthread support to newio for larne. HUZZAH! * I'm sure a zillion things are broken, so it's time to test!
PHEAR the breakage! * Major refactoring of newio system: * Change main io() look into a "fill" cycle and a "drain" cycle, using buffers * Change new_open() to take an io policy to perform when fd is "ready" * Use token to determine if an fd is "dirty" or "clean" (is data ready?) * Process accept()s through newio/dgets. * Merge nonblocking connects as just another type of new_open() policy. * Nonblocking connects emit sockaddr info when connected for dgets(). * Change dgets() to not perform io, but just drain from the buffer * Now all data goes through dgets()! huzzah! * Nuke kqueue support for the moment (will come back later) * Hide the "holding" status of a fd inside the IO metadata. * This allows me to support "holding" in other IO models. * Major refactoring of ssl support: * Move all meta-data about ssl in ssl.c in a linked list * As much as possible, have server treat the ssl case as "normal" * Implement all ssl interfaces even in non-ssl case, guard with panics ^^^^ None of the above should be user-visible changes.
* Fix add_to_screen() so /query nick catches /dcc chat nick. (rb adm) * Fix /away -all which sends a bogus string to the server. (rb rain)
Add $logctl(CURRENT) which returns the current operative logfile. For zlonix.
* Fix bug that brought up all servers at once. * Fix /window topline so it doesn't chop/wrap-off last word.
* Refactor window_check_servers() to work with server's current window only. * Roll forward all the rest of changes from epic4 (i think) * Add /ON NEW_NICKNAME, when epic needs a new nickname from you. * Run 'make depend', fix compile errors, fix 'environment' script
* After connect()ing to a server, save the remote peername * This fixes $serverctl(GET <num> PORT) * This also fixes $servports(), which should work as (not) documented. * Fix for notify_signon default handler, from larne. thanks! * Add $serverctl(GET <num> ADDRFAMILY), returns "ipv4", "ipv6" or "unix" * Allow /hostname <ipv4>/<ipv6>, separately set v4/v6 vhosts! (see UPDATES)
Fix color-bleed problem, as per epic4 commit 721.
* Add /window toplines <N>, reserve N lines as nonscrollable on top of window * Add /window topline <N> "<str>" change the Nth topline to <str> * You can have 1 to 9 toplines.
Add very rough proof of concept /window topline "...." feature. Use /window topline - to remove it.
* Begin massive refactorization of alias.c, redefining "Alias" as "Symbol" * Refactor parse_line() with a bunch of front end call_* functions. * And a general parse_line() front end, "runcmds()". * Roll builtin expandos in with the user variables * Roll variables and commands together into one name space. HUZZAH! * Nix the caches for the global name space, for now. * I definitely broke /stack alias|assign here. I'll fix it later. * Inline expandos are now officially strings instead of a single char. * Fix bug with $unshift() that popped up. * Move after_expando() to ircaux.c. I think it belongs there more.
Revert a commit I did not intend to have made.
Fix bugorz.
Some debugging stuff for hsoc.
* Fix (maybe?) a NULL deref with prepare_display() that hsoc tripped across. * Revert all the regex stuff for /on's -- the idea needs a lot more thoguht. * Convert do_hook()'s algorithm so it's safe to delete /on's from within /on's
* Split (Window)->miscflags into "notify_when_hidden" and "notified" * Add $windowctl(... NOTIFY ...) and $windowctl(... NOTIFIED ...) * Change $windowctl(GET <refnum> MISCFLAGS) to always return 0. * Make /window notify and /window notified take ON|OFF|TOGGLE. * New function, $strtol(<base> <num>), convert <num> in base <base> to base 10. * New function, $tobase(<base> <num>), convert <num> in base 10 to base <base>.
* Add a counter to WNickList, for tracking queries * Each window gets a "current query counter", to find it's current query. * Adding nicks with /window add <A>gives them query counters of 0 * Adding nicks with /window query <A> gives them next higher query counter. * Removing query with /window query, still removes <A> from nick list! * New binding "SWITCH_QUERY" to switch between queries, duh! * Nix "query_list" in Window, totaly dynamic now, huzzah! * Fix places using "query_list" to use "get_equery_by_refnum()" * Refactor add_to_screen(). wheee! * Change "Update %H on status bar..." to "Update %B on status bar..." * So $windowctl(... QUERY_NICK ...) returns empty string now.
* If a /set indent line would indent > 1/3 of the screen, indent to 1/3, not 0.
* Move Lastlog definition to lastlog.c, leave stub behind for window.h * Add window_all_channels(), return all windows for channel from names.c * Change boolean vartype for windows and status: int -> short. * Add do_short_boolean(), like do_boolean(), but it takes a short. * Make the default server quit message "Leaving" * Have /window describe show all the channels in a window. * Have /window describe show nicks, channels in flat list, not one per line. * Make sure to use the server's default quit message when closing it. * Create a prototype of atoll() for compat systems.
Add /xecho -f, which suppress window notify events (%F)
Well, at least it compiles again, but I think i still need at least one or two sweeps of the code to make sure I got everything proper.
*********** DONT RUN THIS -- IT'S WORK IN PROGRESS -- DONT RUN THIS *********** * Import epic4 commits 674 through 692, inclusive. * Import epic4 commits 693 through 710, inclusive (epic4-2.0 final) * Change _X and _Y macros to LEVEL and LEVELMASK for linux (sigh) * Add a searchbuf() 8 bit clean byte-finder for future use. * Convert flood checking, ignore checking, lastlog, logfiles to int masks. * Convert message_from to int masks. *********** DONT RUN THIS -- IT'S WORK IN PROGRESS -- DONT RUN THIS ***********
* Hide new_select() behind wait_select(), which will hold the result fd_set's * Don't make do_filedesc() take fd_set's, but rather get them from wait_select. * Be cautious and when redrawing one screen, redraw all screens. * Refactor io() some more; no explicit dependancy on select() now * Refactor io(), optimize placement of some of the post-select operations. * When wserv changes size, recalculate windows, and allow io() to redraw it.
* Make new_open[_for_write] take a callback function, stash it in io_rec. * Add handle_filedescs() which takes select() results and calls callbacks * Make io() call handle_filedescs() instead of the four callback functions. * This is the first stage of an extendable callback event looper! huzzah!
Fix brain-o.
Make 'empty_string' (const char []). Now we're cooking with gas!
EPIC5-0.0.1! Huzzah!
Make message_from() work off of a stack; use panics to guard against unmatched message_from()s, and other wackiness.
* Nix auto-append-of-$* feature (args_flag to expand_alias/parse_inline) * Fix provided scripts to add $* when necessary. * Fix up Makefile, configure, et al, to use epic5/ directories.
* 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.
Fix typo after i told nsx the bug couldn't possibly be becuase of a typo. (nsx found the way to reproduce the bug so he did all the hard work here)
* Fix a possible logic hole in ok_to_output() * Fix memory leaks found by valgrind.
* current_window_priority should be global variable * Valgrind is my hero -- fix buffer underruns with mangle_line(). * Make the "current input window" its server's current window on user input.
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.
Expound a few panics to help track down a bug.
* Add /set wserv_type, either "xterm" or "screen". * Add malloc_strcat_word_c, add a single word to word list, with "" support * Convert a bunch of stuff to use malloc_strcat_word_c to honor ""s right. * GC a bunch of unused code.
Commit 610: * Use the server's message in our default 330 output. * Make $numwords() use count_words() as a test. Looks ok so far... * Make $indextoword() use count_words(). * Implement regression tests for $indextoword() * Any further problems with $indextoword() should add regress tests! * Make epic behave like ircII when doing /window create with screen and X. * Make move_to_next_word() stop when it hits a trailing nul, duh!
Implement "privleged yells" which allow syou to do /set debug 7 at the same time as /set output_rewrite. Yea~!
* 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.
* 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!
* Add "ON/OFF" toggle set variable to the system timer data. * Create 'update_system_timer' which uses the "toggle" var to run or stop timer * Merge '(start|stop)_system_timer' into 'update_system_timer' * Nix #define MINIMUM_(NOTIFY|CLOCK|MAIL)_INTERVAL since we can't stop that. * Do not enforce minimums for /SET *_INTERVAL since user could get around it. * Track "last event" time, maybe I'll use that in the future * Reset "now" global variable before calling timer callback. * Fix null deref bug with $($$) * Add default binding to ^G to "self_insert" for beeps. * Do not enforce MINIMUM_NOTIFY_INTERVAL in do_notify() * Don't include exec.h from screen.c * Add 'number' (floating point) field to /set's * Add FLOAT_TYPE_VAR type for /set's, using 'number' field * Update all the /set entries to include a default 'number' field. * Add get_float_var() to get the 'number' field in a set. * Add set_float_var() to set the 'number' field in a set. * Teach set_variable() about FLOAT_TYPE_VAR sets. * Teach save_variables() about FLOAT_TYPE_VAR sets. * Teach get_string_variable() about FLOAT_TYPE_VAR sets.
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!
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.
Okay. User input is now handled specially, and parse_command() will not accept incomplete command names anymore. -wd
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.
* Fix bug that caused cursor to go wacky on screen < 32 columns. * Fix 464 handler to only prompt for password if we're not registered yet. * Fix bug that made ^C,,, slurp up all ,'s after it.
* 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.
* Reorganize param list to dgets() to include a length argument * Add (set|get)_server_line_length(), the maximum size of an irc protocol line. * Convert dgets() callers to the new calling style.
Oops. fix a typo.
64 bytes of slop is no longer enough to work with a "logically denormalized" string. (it was before Attributes). 192 bytes is plenty for now.
* $dccctl() changes as per UPDATES. * Misc bug fixes as per KNOWNBUGS.
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
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.
Fix all the rest of the compile issues. bleh.
* 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...
Uncripple CPU_SAVER mode. yea!
Fix bug where /window delete caused 100% cpu usage Add /log level which I overlooked. Oops.
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.
Commit the current /LOG command and $logctl() function. These are nowhere near ready to be used at this point. I am still working on them, but this is good enough if you want to take a look at it. THINGS WILL STILL CHANGE FROM THIS POINT. DON'T BE USING THIS YET.
Cleaned up a few -Wall warnings.
New keybindings system coming through. Details can be found in doc/keys and in a few other places. :) -wd
* Applied MaXxX's patch which readjusts the mirc to ansi colour translations. In particular, the colours for ^c5 and ^c7 have been swapped, and the bold/flash values have also been tuned. * Re-integrated support for /set term_does_bright_blink. If this is on, bright backgrounds which are not normally supported by ansi terminals will be given the blink attribute instead, which many/most xterms normally translate to bold.
Update copyright notices and copyright dates.
Add the commit_id to /version, requested by adm Fix an obscure bug that caused an abort() in the attribute code. This was found/reported by fudd and was caused when the first line of a multi-line output contained an attribute change but no space.
No functional changes, just removal of unecessary whitespace at the end of lines. From adm.
Unbreak /window create for the time being. I'm not real wild about this solution. I'll look into it later.
Make $connect() protocol independant. This requires changing dcc->offer to a (struct sockaddr_storage) and requires changing dcc_open and even register_dcc_offer. Much progress being made on the protocol-independance of DCC. Somehow I doubt IPv6 will ever come to DCC, but it's nice to at least say that we'll be prepared when it comes...
* Convert more (last?) inet_ntoa to inet_ntop, and inet_aton to inet_pton. * Fix bug with $convert() (one_to_another) * Try to make /window create only bind to 127.0.0.1.