Commit graph

25 commits

Author SHA1 Message Date
Charlie Gordon
671f634161 changed ustrstart() and ustristart() API
* take an `int *` for the match size instead of a `const unsigned int **`
2015-06-19 14:23:55 +00:00
Charlie Gordon
ae3601d217 favor html-src mode over xml colorizer 2014-06-01 12:09:12 +00:00
Charlie Gordon
2e5cc16713 improve syntax colorizing modes consistency
* create separate modes for all syntax colorizers
* add colorizing_flags to mode structure for code sharing
* pass ModeDef struct pointer to colorizing function
* remove obsolete window fields
2014-05-30 17:18:12 +00:00
Charlie Gordon
b8004d7072 simplify mode definitions
* assume text mode primitives for MODEF_SYNTAX modes
* initialize mode structures inline instead of cloning text_mode
2014-05-29 18:29:14 +00:00
Charlie Gordon
f527a58e18 add mode flags to specify different types of modes
* add  mode_flags as extra argument to qe_register_mode
* change all mode registration calls accordingly
2014-05-27 12:05:52 +00:00
Charlie Gordon
8f5f8350bb improve C, js, java modes, add php mode
* add php support as variant of c-mode
* add js_colorize_line, css_colorize_line and php_colorize_line
  as special cases of c_colorize_line
* use mode_flag specific keyword and type lists for C/CPP, Java, JS, PHP
2014-04-15 08:08:01 +00:00
Charlie Gordon
349a4995a3 improve xml and htmlsrc colorizers
* match script and style tags exactly
* handle short tags
* simplify recursive colorizing for script tags
* use c-mode colorizer for css styles
2014-04-10 08:03:04 +00:00
Charlie Gordon
2ef06f9131 pass QEColorizeContext to ColorizeFunc callbacks
* pass state and state_only as members of QEColorizeContext
* simplify ColorizeFunc, make them more consistent
* use offsets instead of pointers to prepare for further API changes
2014-04-05 15:49:14 +00:00
Charlie Gordon
b1ab7efb54 improve colorizers
* use mode specific namespace for colorizer states and styles
* use enum values instead of preprocessor macros for states and styles
2014-04-02 12:58:12 +00:00
Charlie Gordon
b2c2c9374e improve c-mode, add mode_flags to handle language mode flavors
* add mode_flags and mode_name in EditState
* pass mode_flags to ColorizeFuncs
* define several CLANG mode flavors for C, C++, Javascript, Java, etc.
* add flavor specific keyword lists for c-mode
* add regex support in c-mode for Javascript flavor
2014-03-24 10:58:09 +00:00
Charlie Gordon
09bee12c90 Fix mode priority for xml formats
* set priority order to html > htmlsrc > docbook > xml > text > binary
* make unihex a very low priority (1)
* fix unihex display bug on last line
2014-02-10 03:24:34 +00:00
Charlie Gordon
890af446cf simplify colorize_line functions: always pass NUL terminated line
* added ustrstart, ustrstr and ustristr utility functions
* simplified org_mode_colorize
2014-01-20 18:04:00 +00:00
Charlie Gordon
c91bd12b8f simplified editing modes
* added colorize_func in ModeDef struct
* removed mode_init functions for most language modes
* other small improvements in mode_probe functions
* no need for get_basename in mode_probe functions
2014-01-05 23:42:54 +00:00
Charlie Gordon
b3a709013a improve mode selection, cleanup
* pass ModeDef pointer to mode_probe functions
* add extensions field to mode structure
* rename ascii mode to binary mode
* rename mode variables and fields to more specific names
2014-01-04 17:26:30 +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
093951820b simplified probe code 2007-12-26 09:52:07 +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
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
a064ff97a0 more ctype unsigned char fixes 2007-12-06 17:59:23 +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
ade489eba5 msg 2005-07-08 09:30:43 +00:00
Charlie Gordon
c52d77ea70 cosmetics only (spacing, untabify) 2005-05-11 15:12:14 +00:00
Charlie Gordon
3dd0f5660c Initial revision 2004-05-29 10:17:37 +00:00