Commit graph

34 commits

Author SHA1 Message Date
Charlie Gordon
a0ea65c425 pass argument to do_char, do_tab, do_quote (fixes bug in C-u C-q a)
pass closure to quote_key
2007-12-25 07:54:00 +00:00
Charlie Gordon
f6d34c25cf use bold flag for high intensity tty colors
use default PuTTY colors
2007-12-24 09:31:36 +00:00
Charlie Gordon
658149e9f8 moved global variables to QEmacsState structure:
- first_mode, first_key, first_cmd,
 - first_completion, first_history
 - trace_buffer, trace_buffer_state,
 - backspace_is_control_h
2007-12-21 12:30:55 +00:00
Charlie Gordon
4f0ad2e393 new_shell_buffer takes a optional buffer argument
comments, simplifications
2007-12-20 20:37:16 +00:00
Charlie Gordon
788461233d raw_save_buffer takes range and returns number of bytes written
added eb_write_buffer, returns number of bytes written
renamed save_buffer to eb_save_buffer, returns number of bytes written
added range in buffer_save method in EditBufferDataType
no longer reset undo log upon file saving
renamed do_save to do_save_buffer
added do_write_region (bound to C-X w)
renamed command execute-extended-command to execute-command
renamed command vc-toggle-read-only to toggle-read-only
fixed mark-whole-buffer to set point to start and mark to end of buffer
query-replace accept upper-case Y and N, and . for replace and quit.
shell passes universal argument to do_shell
bind next-error to C-X `
2007-12-20 16:27:21 +00:00
Charlie Gordon
4cc7a43a4a use ssizeof 2007-12-18 12:18:54 +00:00
Charlie Gordon
bf17e23390 renamed css_isxxx and css_toxxx ctype alternatives to qe_* 2007-12-15 16:44:31 +00:00
Charlie Gordon
5768f42cd8 no longer use ctype.h macros and functions
- ctype.h has strong constraints on arguments
- ctype.h implements bogus irrelevant inefficient locale specific behaviour
- use replacement css_xxx functions
- all take int arguments: can be any value, yet only test ASCII subset
- all css_isxxx return true boolean (1 or 0)
- removed utoupper(int) -> css_toupper(int) has same functionality

resolved ffmpeg clash on string functions from cutils.c module
- added #defines to make them local
- renamed some strixxx functions to strxxxx (extended behaviour)
- moved case insensitive stuff to util.c

fixed bug in strtokey: C-M-x combinations were not recognized
improved eb_changecase
fixed C comment parsing in css parser
2007-12-15 16:02:47 +00:00
Charlie Gordon
559b3bb3bc simplified code using new buffer functions 2007-12-15 07:30:20 +00:00
Charlie Gordon
26ea3f69a0 added wrappers and utilities for safer memory allocation:
type *qe_malloc(type);
type *qe_mallocz(type);
type *qe_malloc_array(type, count);
type *qe_mallocz_array(type, count);
type *qe_malloc_hack(type, extra_bytes);
type *qe_mallocz_hack(type, extra_bytes);
void qe_free(&ptr);
void *qe_realloc(&ptr, new_size);
char *qe_strdup(const char *str);
void *qe_malloc_bytes(size_t size);
void *qe_mallocz_bytes(size_t size);
void *qe_malloc_dup(const void *src, size_t size);

pass pointer address to bmp_free()
2007-12-12 11:49:02 +00:00
Charlie Gordon
57c3461e0d simplified set_color API, made in inline
improved command parsing, refined argval handling, pass as optional arg
pass command arguments as an array of unions
use correct type in command dispatcher (upto 2 arguments)
merged do_goto_byte, do_goto_line, do_goto_char, extend syntax
fixed kill commands: kills are appended/prepended to kill buffer
added append_next_kill command
added do_kill_line (split from do_kill_region)
added do_kill_word (removed do_delete_word)
added do_kill_paragraph
pass argval to do_backspace and do_delete_char, fix kill behaviour
fixed kill-ring initial state bug
fixed do_yank: set mark and this_cmd_func
fixed do_yank_pop: test last_cmd_func, use eb_delete instead of do_undo
fixed do_yank_pop kill-ring bug
added clamp(int x, int min, int max);
added qs->this_cmd_func so commands can override qs->last_cmd_func
allow KEY_ESC + extended key as command binding
added do_c_forward_block, needs rewrite using colorization code
added do_c_kill_block
added insert-char command (argval repeats instead of forcing char value)
renamed delete-word to kill-word
renamed backward-delete-word to backward-kill-word
added kill-beginning-of-line
2007-12-12 02:51:05 +00:00
Charlie Gordon
0507ffacc3 fixed function key mapping issues in X11 and Wndz
fixed C lang colorizer for some multiline stuff, wide char/strings
use countof() macro
cosmetics
2007-12-10 13:28:07 +00:00
Charlie Gordon
6c65411200 added missing headings, cosmetics 2007-12-03 16:10:38 +00:00
Charlie Gordon
0e1cfa053a report correct column number in terminal emulation, fixed crash bug on TAB in process buffer non interactive mode 2007-02-07 23:28:36 +00:00
Charlie Gordon
494e9f7866 include cflags.mk for extra gcc warnings if present
utf8_encode now returns the number of characters copied,
  simplified code accordingly
made local functions static
tagged unused function arguments
fixed shadowing issues
added support for GCC attributes for unused arguments and format strings
use snprintf() instead of sprintf()
moved scattered declarations to qe.h
removed duplicate declarations in header files
eb_write() payload argument is now const
fixed crash bug: reset trace_buffer upon deletion
improved trace_buffer readability: trace all pseudo tty streams separately
added missing structure initializers
removed buffered string handling from cutils.h
added new buffered string API for statically allocated buffers (should unify)
small improvements in X11 initialization
improved consistency in tty.c (function names...)
  added STDIN and STDOUT streams in QEditScreen to stop using stdin and stdout
  use unlocked stream I/O if available (faster)
  changed and documented terminal setup and exit sequences
  improved charset handling
mode_line functions now return the character count (like snprintf)
2006-12-31 19:34:00 +00:00
Charlie Gordon
714157c255 added TTY_STATE_STRING state to ignore escape string sequences
improved tty_goto_xy() [renamed from tty_gotoxy()] x and y can be specified
   as relative independently
fixed bug on relative y argument: caused bogus display
fixed another bug in tty_goto_xy() : caused last non blank character on row
   to be missing sometimes.
factorized code
added comments about many more colors and escape sequences
made ^H erase the character on the left (back_color_erase capability)
simplified CSI escape sequence parsing, default argument values to 1
added support for alt_charset_mode with 32 char kludge
ignore set-window-title xterm command: \E]0xxxxxxx\007
added \E[xG (goto_column_address) and \E[xd (goto y)
implement \E[xX erase n characters
document \E[y;xr change_scroll_region, still unimplemented
2006-12-11 23:35:45 +00:00
Charlie Gordon
d447798717 added missing licence header
fixed typos
added constness
comments about potential problems
identified 64 bit portability problem
fixed small issue in get_default_path()
allow signed numbers in config file
added comments about old code for reference (tty.c, shell.c)
2006-12-09 19:47:20 +00:00
Charlie Gordon
ade489eba5 msg 2005-07-08 09:30:43 +00:00
Charlie Gordon
b9cee713fb added shell-intr to send kill signal on C-c 2005-06-01 23:49:30 +00:00
Charlie Gordon
2176037305 - added diagnostics messages for shell command failure
- added extra escape sequences for full screen mode switch
- added shell-yank as a pass-thru to shell getline
2005-06-01 23:43:37 +00:00
Charlie Gordon
312836fc43 fixed some buffer sizes, cosmetics 2005-05-11 12:13:56 +00:00
Charlie Gordon
6dbffb4024 added '*' in command argument strings for commands that modify buffer contents
changed command definitions accordingly.
added C-x C-g binding for abort
added C-\ binding for call-last-kbd-macro
changed binding for switch-input-method to C-x C-\
added commands:
  not-modified on A-~ (reset buffer modified flag)
  load-file-from-path(file)
  mark-whole-buffer() on C-x h
  count-lines() on C-x l
  what-cursor-position on C-x =
allow key_grabber to quit and unget last key.
added splitpath() to dispatch directory and filename into separate buffers.
make separate functions for show_version and show_usage.
make separate function for parse_command_line.
added command line options:
  --help          -h   display help message and exit
  --no-init-file  -q   do not load config files
  --user          -u   load ~USER/.qe/config instead of your own
  --version       -V   display version information and exit
added -- as a marker for end of command line options.
allow most keys to be transmitted to shell process, including function keys.
improved shell buffer escape sequence parser.
added automatic detection of full screen shell applications and grab all keys
  try mc, Menuconfig, or even qemacs within qemacs !
improved *trace* buffer: do not trace keys when trace buffer is current,
  thus allowing navigation without side-effects
improved Makefile to not make html stuff if disabled
reduced CONFIG_TINY feature set
2005-05-09 09:10:37 +00:00
Charlie Gordon
421067af0b added fake charset vt100 for shell buffer
use simpler utf8 terminal test, ie: compatible with shell buffer.
added terminal dependant escape sequences,
  with limited support for vt100 variants.
more precise escape sequence parser in shell buffer.
trace shell output in trace_buffer.
improved file_completion :
  fix buffer overflows,
  ignore . and .. and backup files
  ignore file_completion_ignore_extensions,
2005-05-09 06:21:49 +00:00
Charlie Gordon
9dc81376fc cosmetics only : untabified 2005-05-09 06:03:07 +00:00
Charlie Gordon
c6fa69e7d4 added more shell buffer emulation stuff.
select charsets in vt100 tty.
2005-05-09 03:32:19 +00:00
Charlie Gordon
ff7d6f4c34 another try for linedrawing chars using alternate charsets 2005-05-09 03:24:22 +00:00
Charlie Gordon
8fac0ab42e reordered KEY_xxx definitions
added KEY_DEL=127 (formerly KEY_BACKSPACE)
added KEY_BS=8  C-H  to handle control-h as backspace on some ttys
fixed KEY_F6 thru KEY_F12 (were off by one)
added strtokeys() to convert a string with key names to a key buffer
added define-kbd-macro() from key string
added execute-macro-keys() to execute commands from a key string
improved qe_key_process().
changed method to update shell cursor : tty_update_cursor disabled
  shell_display_hook() used instead
greatly improved shell buffer behaviour, charset handling.
much improved tty input handling : support more key combinations and modes.
added missing charset declarations in qe.h
added borders_invalid and complete_refresh window flags
made C-L completely refresh display
moved window border display to separate function
changed edit_display() to allow complete redisplay even with popups
fixed window delete crash bugs by improving consistency with
  edit_attach and edit_detach.
2005-05-09 02:17:47 +00:00
Charlie Gordon
be58a93b28 test TERM variable for backspace key code detection (^H or DEL)
ansi, cygwin, vt -> ^H
  linux, xterm, ... -> DEL (unchanged)
changed set-backspace-is-control-h to toggle-control-h.
changed CMD() command definition macro to CMD_() with arg definition
  string at the end for improved readability.
removed obsolete CMDi and CMDss command definition macros.
dired.c hex.c image.c latex-mode.c qe.c qe.h qeconfig.h shell.c tty.c
2005-05-08 16:31:47 +00:00
Charlie Gordon
82c15b904b cosmetics, comments 2005-05-08 14:54:34 +00:00
Charlie Gordon
d438ba54a2 retrieve errors from *errors* buffer as well 2005-05-06 08:08:57 +00:00
Charlie Gordon
90da5da321 removed most references to global state structure qe_config 2005-05-05 17:11:13 +00:00
Charlie Gordon
2fc6a8c2ad better initialization for shell structure
some minor cosmetics
2005-05-05 16:53:45 +00:00
Charlie Gordon
90f94c7af3 fixed compilation warnings about signed/unsigned comparisons
fixed compilation warnings about const string literals
some cosmetic fixes
2005-05-05 11:10:26 +00:00
Charlie Gordon
3dd0f5660c Initial revision 2004-05-29 10:17:37 +00:00