CVS log for epic5/source/expr.c |
![]() |
Request diff between arbitrary revisions
* Add arg to panic() controlling whether panic is sent via QUIT (rb black)
* Normalize $shift() and $unshift() in the same way as $push() and $pop(). * Fix /eval echo $func($*) at the input prompt causing "add is NULL" panic.
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.
* 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()
Attempt to give some trailing context for unmatched (s and {s and [s
for jm, because I can't give him the line number, even at load time...
* Add /set old_math_parser, to turn on the old math parser (don't do this! :P)
GC a bunch of stuff no longer in use.
* Make /xdebug new_math the default, you can /xdebug old_math to go back. * Make /xdebug new_math and /xdebug -new_math no-ops. * Don't do %#p in printf formats, since it has no effect. (%p is better).
Comment out all of the history code. Will GC it later.
* Change "ERROR --" to "INFO --" to not alarm people as much. * Change a few other warnings to not be so alarming. * Change new_realloc() to not move ptr if it is big enough to hold new size. * Fix all the status_* sub-formats to not have any hardcoded size limits.
* 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
* 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
Fix buffer overrun with ${<expr{
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 ***********
Make 'empty_string' (const char []). Now we're cooking with gas!
* 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.
* 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.
Implement "privleged yells" which allow syou to do /set debug 7 at the same time as /set output_rewrite. Yea~!
* 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.
* Convert parse_line_with_return() to call_lambda_function().
Convert m_strdup() to malloc_strdup().
Cut over m_sprintf() to malloc_sprintf().
It is better to use (ssize_t) instead of (int) when refering to string lengths.
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.
Fix a bug reported by void, when you do @ foo = [....
* 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.
Okay. User input is now handled specially, and parse_command() will not accept incomplete command names anymore. -wd
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.
Whee. Preliminary work is done. I've converted things to use hash tables instead of alists (if this doesn't work out, I'll go back to alists). Namespaces exist, but are not yet addable. That will come. I'm very sure things are still a bit unstable, but the absolute basics of adding variables/functions and executing/retrieving them works. That was my first milestone. -wd
Add $joinstr() and let $jot() work on floating point variables.
Update copyright notices and copyright dates.
I'm going to start sweeping the entire source, adding the official copyright notice to each file (like ircII does already), and making sure that the /* $EPIC$ */ thingee is at the top of the file. This is my first swath of files.
* Merged in another /fe fix I was brewing.
* Altered new_next_arg to not truncate the arguments list if the argument
taken happened to be empty. This fixes bugs with /fe and $shift() where
the list has "" arguments.
* Gave malloc_strcat and m_strcat_ues a clue variable and used it within
the variable expansion routines so that expanding works in liner time.
* I am a little bothered by this. The _correct_ thing to do is to put
the clue variables into the malloc data for the strings themselves
like perl does.
* Moved the base structure for 1cmd in command queues from last.qcmd. to
1cmd.
* Added command completion to tabkey.ce.
No functional changes, just removal of unecessary whitespace at the end of lines. From adm.
This extends /encrypt to add a new argument, which will be treated as a program with which to filter messages through to be encrypted/decrypted. The protocol so far is: One line in text mode, with the key as the first word. Followed (starting on the second line and ending at EOF), by the encrypted message in binary. Binary messages returned are automatically quoted and unquoted for transmission over the wire. Ascii Armoring if performed by the program will "bypass" the quoting features. This patch also alters the way floating point numbers are returned. Before, canon_number was passed over the textual value. Now, ftoa() reads the correct way to do it from FLOATING_POINT_MATH.
Altered the floating point precision to 50 digits, added $ceil(), $floor() and $abs(), rewrote exec_pipe. _And_, altered $trunc(0 ...) to convert the given number to an integer.
Extended the precision of floating point return values to 999 characters since some calculations can return hundreds of digits. This will dramatically decrease the error of calculations, but the length may be a little excessive for displaying, so it may need tuning. It would be nice to make this a define, but this could be a little tricky because the format specifier in question is a string.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |