Commit graph

26 commits

Author SHA1 Message Date
Charlie Gordon
f4193d52f2 prevent potential buffer overflow 2007-12-26 09:49:52 +00:00
Charlie Gordon
8142f3a9e3 fixed eb_replace API
added capitalize-word (M-c) and capitalize-region (M-C-c)
fixed eb_changecase and added support for capitalization
simplified do_changecase_word and do_changecase_region
2007-12-21 22:34:31 +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
69b5b1f40e comments 2007-12-20 20:39:18 +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
e86feb3b8f added offsetof macro for platforms that do not have it
added eb_clear, eb_scratch, eb_replace, eb_delete_range
added remarks about inconsistentcies
check buffer readonly status in low level buffer primitives
2007-12-20 11:49:54 +00:00
Charlie Gordon
2d70f198fb added sanity tests
append system buffers to list instead of prepending them
2007-12-18 17:59:48 +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
ca80563f98 added ssizeof, cosmetics 2007-12-15 16:33:20 +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
915a19edb2 added and improved some buffer functions:
renamed eb_get_str to eb_get_contents
fixed buffer size issues in eb_get_line
fixed utf-8 issues in eb_get_strline
added eb_prev_line
added eb_goto_bol2: computes number of code points skipped
added eb_goto_eol
2007-12-15 07:24:03 +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
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
fac6bd9acf added eb_find_window()
added eb_trace_bytes()
improved eb_printf(): removed potential buffer overflow
2006-12-11 23:10:33 +00:00
Charlie Gordon
3551c36226 fixed typos, comments 2006-12-09 19:02:07 +00:00
Charlie Gordon
ade489eba5 msg 2005-07-08 09:30:43 +00:00
Charlie Gordon
c01661ec0e cosmetics only 2005-05-11 14:35:54 +00:00
Charlie Gordon
811a16a0e3 changed do_line_numbers to do_toggle_line_numbers
changed do_line_truncate to do_toggle_truncate_lines
fixed define_kbd_macro string arguments mixup
added edit_find() to locate window with a given buffer
removed test kludge in term_flush()
various cosmetics.
2005-05-09 03:19:36 +00:00
Charlie Gordon
662cbad090 added *trace* buffer to track actual tty input 2005-05-08 15:33:24 +00:00
Charlie Gordon
33716b7010 allow more C-X key combinations in command tables
improved error context handling, removed error_printf.
make get_str() skip spaces before and after token.
simplified use of get_str(), removing space skipping.
simplified libqhtml/xmlparse.c and libqhtml/cssparse.c accordingly.
extend config file syntax :
  support for 1 level if(0 or 1) { } blocks
  report syntax errors
added local config files .qerc for project based settings
added TODOs
added support for home dir syntax in canonize_absolute_path().
2005-05-08 15:07:28 +00:00
Charlie Gordon
da2628b53f added dummy display, error_context and error_printf to track errors during
startup time, esp. while parsing config file.
various comments and cosmetics
some cosmetic changes
some assertion checks in buffer.c
2005-05-05 13:40:57 +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
602faf3fe2 fixed gcc warnings 2005-05-04 19:30:10 +00:00
Charlie Gordon
3dd0f5660c Initial revision 2004-05-29 10:17:37 +00:00