Commit graph

34 commits

Author SHA1 Message Date
Charlie Gordon
15ab1f9601 improve x11 clipboard support
* add eb_get_content_size() to compute size of buffer contents encoded in utf8
* simplify selection_send()
2014-02-07 15:56:15 +00:00
Charlie Gordon
d582ce5ea5 add support for wm_delete_window and utf8 clipboard in x11 (Francois Revol) 2014-02-07 07:54:27 +00:00
Charlie Gordon
9fd2f32a9e fix x11 crash on yank 2014-02-06 00:26:25 +00:00
Charlie Gordon
e967914b5a improve consistency in new/delete methodology
* use qe_mallocz for all structures
* prevent spurious uses of malloc/free/realloc
* pass pointers to pointers to all deletion functions
* use consistent patterns for list deletions
* add more dependencies in Makefiles
2014-01-23 12:56:22 +00:00
Charlie Gordon
4226224c4c improve kill / yank functions
* fix bug in do_kill that caused M-w to fail on read-only buffers
* pass base buffer to new_yank_buffer to initialize charset correctly
2014-01-13 11:28:00 +00:00
Charlie Gordon
68b4ba44ab fix for C++ compile (needed for Haiku)
renamed private structure members to priv_data
added casts on assignents from void* (OK in C, not in C++)
2013-12-17 16:06:35 +00:00
Charlie Gordon
58b5872c52 fixed OpenBSD compile issues:
- check OpenBSD as uname output
- no longer use strcpy, strcat, sprintf
- added CONFIG_PTSNAME to disable Unix98 API under BSD
- fixed crash bug in tty.c on empty window
2008-04-15 23:24:03 +00:00
Charlie Gordon
82ca364b60 made tty_term_glyph_width generic and faster
improved tty_term_flush:
 - separate handling of fgcolor and bgcolor changes
 - simplified line drawing kludge
 - cleaned up handling of missing glyph
2008-03-31 09:44:27 +00:00
Charlie Gordon
18a00e8379 prevented many useless redraw calls in X11 event handling 2008-03-28 08:38:14 +00:00
Charlie Gordon
e483a5bc9c added buffer variable EditBuffer::tab_size
added buffer variable EditBuffer::offset
added more tests for CONFIG_XV
added test on GCC version for forward reference on hex_mode
2008-03-25 10:13:37 +00:00
Charlie Gordon
28397f424f moved input_methods to QEmacsState
qe_register_binding takes ModeDef* and returns status
cosmetic changes in QEDisplay API
added int dpy_init(QEditScreen *s, QEDisplay *dpy, int w, int h);
  copies *dpy (or dummy_dpy if NULL) to QEditScreen and calls method
simplified dpy_init methods and calls
inlined 5 more methods
moved dummy_dpy to display.c and simplified
simplified to_hex
simplified qe_colors array handling
2008-01-11 11:29:28 +00:00
Charlie Gordon
a5eae3ed92 bumped copyrights, some cosmetics 2008-01-08 16:37:54 +00:00
Charlie Gordon
98939ddcac changed API for completion functions:
- use CompleteState struct
- use complete_test for each potential match with simple prefix comparison
added new smart string compare function qe_collate to sort strings in
  lexicographical order but sort numeric portions in numerical order
use qe_collate in popup lists and dired
removed redundant alias "iso8859-2"
added strequal(a,b) as an alias for !strcmp(a,b)
  this function makes string collation with strcmp more explicit
  this even fixed a spurious bug in do_set_emulation
2008-01-08 03:42:53 +00:00
Charlie Gordon
f11cf4a207 eb_scratch takes buffer creation flags
added eb_find_new -> find a buffer by name, create one from flags if not found.
qe_register_cmd_table takes ModeDef* instead of mode name
do_global_set_key -> do_set_key with local/global flag
added local-set-key
reuse *bufed* buffer if one exists
bind increase/decrease-width commands from command definition
cosmetics, comments, remarks
renamed kill buffers from *yank* to *kill-%d*
save QErrorContext in parse_args, load_all_modules:
  improves readability in *messages* buffer
fixed qe_init to fall back from x11 display to terminal session upon failure
2008-01-04 22:24:37 +00:00
Charlie Gordon
4743fa1308 added remove_slash and append_slash path utilities
renamed canonize to canonicalize
added crude support for ~user -> /home/user
added win32 specific stuff in basename
added C-/ as an alias for C-_
some cosmetics, moved code
create files with mode 0644 in raw_save_buffer
untabified, removed redundant spaces
modified code generators to the same effect
2008-01-03 09:51:29 +00:00
Charlie Gordon
1a6fe3489e use INT_MAX instead of MAXINT
use INT_MIN for NO_ARG
2007-12-21 10:32:27 +00:00
Charlie Gordon
105aab2f47 cosmetics 2007-12-18 12:10:50 +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
4e5dcc5437 0 initialize allocated QEfonts 2007-12-15 07:31:11 +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
7817049123 cosmetics 2007-12-12 08:51:02 +00:00
Charlie Gordon
2eb5a83259 fixed some meta ctrl key combinations in x11 2007-12-12 02:21:45 +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
d286b27756 made more local variables static
fixed bug in cfb32_fill_rectangle
use c99 syntax for new style struct initializers instead of gcc specific
simplified tolower unsigned char hacks
fixed various sparse warnings
2007-12-06 17:43:47 +00:00
Charlie Gordon
6c65411200 added missing headings, cosmetics 2007-12-03 16:10:38 +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
6f747dbdaf default X11 window size to 80x50 2006-12-09 17:45:26 +00:00
Charlie Gordon
ade489eba5 msg 2005-07-08 09:30:43 +00:00
Charlie Gordon
f6867f8b51 - Added font locking to fix crash bugs in html/css.
- select_font() now locks the font, which must be unlocked with
  release_font().  Extra locks can be added with lock_font().
- Added release_font() wherever needed.
- Added put_error() to store errors in *errors* system buffer.
- Make put_status() store messages in *messages* system buffer.
2005-05-13 10:05:23 +00:00
Charlie Gordon
74970610a0 limit fallback sequence in font lookup
fixed crash bug when font fallback scheme fails
2005-05-11 12:01:32 +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
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
649256de71 cosmetic changes : spaces, alignment 2005-05-04 19:27:36 +00:00
Charlie Gordon
3dd0f5660c Initial revision 2004-05-29 10:17:37 +00:00