CVS log for epic5/source/log.c |
![]() |
Request diff between arbitrary revisions
* 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.
* Fix several bogons in add_to_log, found by ce.
* 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.
* Include <stddef.h> if we can, for no particular reason... * Nix now unused mangle_line(). yay! * Use (intptr_t) instead of (intmax_t) to treat pointers as integers... * Try to handle failures from the dns helpers with more grace.
* Convert the other users of mangle_line() to new_normalize_string (*gulp!*)
* Fix compile error for #define UNAME_HACK * Fix crash when you do $open(/file/doesnt/exist R) * Add an /on 338 default handler. * Fix integer underflow with log file refnums * Rename STATUS_USER0 to STATUS_USER for backwards compat. oops! * Whack BRACE_LOAD_HACK, it's been unsupported for a while. PF loader rules! * Don't allow /botmode if #define NO_BOTS * Fix DCC connections instantly "timing out"? (Check on this) * Whack FLOATING_POINT_SUPPORT and depend only on /set floating_point_math
Add $logctl(CURRENT) which returns the current operative logfile. For zlonix.
* Nix /save and pray nobody notices. * Implement pmatch_* stuff in alias.c to use the unified symbol table. * Commands, functions, and expandos now 100% integrated. HUZZAH! * Reimplement $get(set|command|function)s() to use the pmatch_* stuff. * So they now pick up changes at runtime. HUZZAH! * Allow built in /set to be conditionally added to the "set bucket" * Don't put user-created /set's in the bucket * Allow user to replace one user-created /sets but not builtin sets. * Allow mangling of ALT_CHAR -- how did this ever get missed? * Fix $currchans() so it works the way the documentation says it does. * Fix some const correctness issues, introduce others. bleh.
* Make stripcrap(ALL) exclude "ALL_OFF", so I can... * Fix bug with $stripcrap(ALL,-BOLD ^B^B^Btest). (rb BlackJac) * Make the #define Char const char thing global to all of epic now. * Whack /set scroll. * Create a "/set data" type (VARIABLE) which is union of (int) and (char *). * Expose VARIABLE and variable types in vars.h for others to use. * Break init of /set's into two parts, one to malloc() the set data * The second part is to init the default values once command line is done. * Fix some warnings from --with-warns * Fix all /set callbacks to accept a (void *)(VARIABLE *) variable * /Set callbacks can now directly modify the /set via that variable! * So don't allow direct setting of /set's from outside vars.c. * Everybody must use set_var_value() which is the backend to /set. * Whack the /IRCNAME and /REALNAME variable -- use /SET REALNAME, eh! * Hack up /xecho -x to bide my time until i whack all those /sets it uses. * Don't call set_input_prompt() in main() any more, it's handled elsewhere. * Whack /set logfile callback, since nobody seems to have missed it. * Whack the "number" (float) data in /set since i wasn't gonna use it. * Whack the "GLOBAL/CHANGED" tracking in /set's. Tell me if you miss this. * Unify output of /set values as "[New|Current] value of <var> is <val>" * Don't limit the size of /set continued_line, this will be revisited soon. * Quick and dirty hack to work around adm's bug, will fix this later.
GC a bunch of useless cruft and stuff.
*********** 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 ***********
* 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.
* 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.
Teach all the /set callbacks to take a (const void *). This fixes a bad-c problem with /set!
* 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.
Another merge.
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
* 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...
* Added functions $asciiq() $chrq() $exec() $timerctl() $tcl() $winline() and $floodinfo(). * Altered the two argument version of $read() to ctcp quote the strings it returns. * Added sets FLOOD_RATE_PER and FLOOD_MASKUSER. * Altered the "accept" mode of the dcc_raw and dcc_connect hooks to refer to the local port instead of the remote port. * Added a "-closein %proc" switch to /exec. * Altered the arg list mode of /alias to use extractw instead of next_arg. * Added the documented "words" argument to the above. * Tuned autoget, mudirc, tabkey.ce and commandqueues. * Altered /pretend to not chop the string. * Set about rewriting the flood detection and then decided that it's better off being a script. * Moved the function macros to their own file (functions.h) and replaced all the copies that are strewn throughout the source with an #include. The exception is array.c which broke when I tried it. * Moved the ctcp enquoting/dequoting functions to ircaux.c. * Added some command/function ordering checks to funcs/regress, and a check for all the functions that are undocumented. * Rewrote function chanmodetype() so that it doesn't have all those flakey buffering things. Hopefully it's readable now. The significant change is that if a mode character appears twice in CHANMODES, the first one is returned instead of the last. * Added EPIC::call() in the perl routines and an equivalent under tcl. this is designed to call a $function() directly, but it isn't really that fast, so I might rip them out again. * The /wait internals used to store a few other settings, which were taken out, so I put them back. * Fixed a few problems with normalize_filename() around the place. * Fixed a bug with /timer in which it would never show the timers after a callback.
* 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().
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.
* Fix expand_twiddle to take a (const char *) * Fix do_log and set_log_file to take a (const char *) * Remove a couple of no-ops in keys.c * Revamp do_log into two parts; open_log and close_log; do_log now a wrapper. * Fix a string that had a newline in it. spotted by Szabolcs Rumi.
Update copyright notices and copyright dates.
Due to the way the new attribute parser works, mangle_line needs a destination buffer that is at least eleven times as large as the original string. Change all uses of mangle_line to pass in 11 times as much as necessary. This avoids uneccesary truncation of input lines with excessive attribute changes in them.
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
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |