CVS log for epic5/source/input.c |
![]() |
Request diff between arbitrary revisions
* Add stub code for a scrollback indicator in the future (rb twincest) * Add stub code for a ucs32 input line in the future. * Reformat all of the /set creation code in vars.c
Implemented INPUT_INDICATOR_RIGHT. Default is a little + sign that will show up on the right-hand margin if there is text on the input line past that side.
* Add $serverctl(READ_FILE filename) to add servers from a servers file. * Add some preliminary code for sending a /msg to a logfile. * Make scrollback_start/end use "scroll up/down 999,999 lines" * This is for future consolidation of the scrollback code.
Revamped input line a little. Added indicator for text scrolled off the left of our input line.
* Roll forward portability changes from epic4-2.10 (larne) * This also includes term.h -> termx.h -- Make sure you rerun configure!
* 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
* Make /xecho -w -1 go to the current window, for compat with epic4 (rb Black) * Make the /server list show the vhost you're using. * /LOADing an executable file results in a warning and not an error. * Fix input line so it doesn't display hidden contents after ^L (rb wjr) * Add a $strptime() function, but I still need a strptime() compat version. * Add $ignorectl(SUSPEND) and $ignorectl(UNSUSPEND) to turn off ignores.
* 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.
* $info(o) now includes 'r' for libarchive, and 'x' for iconv support
* Unconditinally unset GREP_OPTIONS in configure (rb Pegasus)
* Fix /oper password being shown because term_echo() not called. (rb wjr)
* Properly handle multiple spaces between protocol tokens (rb Krisp)
* Fix crash with standard_warning_level() when you do /window level nonsense.
* Support /input "prompt" (args) {code}. See UPDATES. (rb kreca) (fusion)
* Fix BACKWARD_WORD or PREVIOUS_WORD or whatever it's called.
* Fix configure so --with-threaded-stdout pulls in -pthread * Include some commented out code that I'm ruminating over for input line * Create CURSOR_LEFT and CURSOR_RIGHT macros to avoid assigning LOGICAL_CURSOR * Default xforms now don't need to be ordered, or have default refnums.
Remove u_* bsd-isms so we can compile with -ansi on linux.
* Fix crash for /parsekey type_text
* Add socks5p.h from epic4 so we can build with socks5 again. * Remember, it's ./configure --with-socks5=/usr/local/lib * Make update_input() take a screen as an argument, to update one screen only. * Make /window create screen's input lines work again (rb kitambi)
Normalize the BUILT_IN_BINDING/BUILT_IN_KEYBINDING macros.
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.
Fix another minor bug.
* Fix warnings found by gcc4 and run make depend. * Add check for -Wno-pointer-sign to configure; makes using gcc4 less painful.
* Fix null deref in set_input() via reset_line() via ^U (rb kitambi)
* 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.
* Never allow INPUT_PROMPT_LEN to be < 0. * This fixes the damage from resizing to 1x1 and then back again.
* Fix replace_line, it wasn't moving the cursor before writing new contents. * Fix a double SSL_free, from yesterday's fixes. * Revamp the "THANKS" file, removing people who contributed to epic4 but not (yet) to epic5. Hopefully this will spur some of them to contribute again to be added again. =)
Fix bug. doh!
Add /set reset_line to replace your input line all in one fell swoop w/o mangling the cutbuffer. Requested by nullie.
* Lay the foundations for nonblocking ssl connection (not supported yet) * Change SEND_LINE to do SCROLL_FORWARD if we're in scrollback mode * Add support for maildir mailboxes. * Fix crash with 042 numeric.
* 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()
* 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.
* 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
Add support for single and double quoted strings in the new math parser (which is already the default)
GC a bunch of stuff no longer in use.
Comment out all of the history code. Will GC it later.
* 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.
* 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.
* Move some defines from comands.h to where they belong * Add and remove func decls in header files as necessary. * Add /wait =<fd> which returns when a nonblocking dcc connection finishes * Make all keybinding funcs/decls use the BUILT_IN_KEYBINDING macro. * Make the BUILT_IN_KEYBINDING macro use unsigned chars. * Hide (struct Key) inside keys.c, and use (void *) to hold state. * Make the input line use (unsigned char), not (char), huzzah! * Make the "othername" ($3 in /on dcc_raw "E") the port number. * Avoid a NULL deref with "parse_command" keybinding.
*********** 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.
Implement infinite recursion detector and thwarter. It requires a #define in config.h, the future of which I have not decided yet.
* 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 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.
* 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.
* 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.
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 minor bug with /xquote * Fix minor bug with reconnecting after server write failed. * Set input idle timer better. * Rewrite /stack (push|pop) set so they actually work now.
* 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.
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.
Fixed some style breakage, and some warnings. -wd
New keybindings system coming through. Details can be found in doc/keys and in a few other places. :) -wd
Update copyright notices and copyright dates.
No functional changes, just removal of unecessary whitespace at the end of lines. From adm.
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.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |