* rename and pass flags to byte quoting functions:
`byte_quote` -> `strquote_byte`
* add `eb_print_style` to output data to a buffer in a given style
* add `eb_print_field` to output a field name and value using styles
* use styles in describe commands
* improve byte stats and page layout output in `describe-buffer`
* add `wall-chart` command (sorted list of bindings)
* add `describe-help` command
* improve color combining code for diff/patch output: preserve code
syntax coloring on red or green background.
* improve `curline_style` handling (needs more work)
* add `QETermStyle` transparent color handling in `apply_style`
* highlight trailing blanks in a single place
* transpose `qe_term_get_style()` arguments for consistency
* add `qe_term_style_string()` and `qe_styledef_string()`
* extend style string parser to accept missing foreground color
* add `filenames` specification in `ModeDef` structures
* generic mode probing can match a list of filenames
* remove unneeded mode_probe functions
* this enables diff coloring on Makefile
* use complete list of internal commands
* use tcl specific word parser
* fix quoted and braced string parsers
* improve variable colorizer
* add custom cases in probe function
* add `ustr_match_str`
* add `CLANG_C_TYPES` flag for generic C types
* add `CLANG_C_KEYWORDS` flag for generic C keywords
* add `CLANG_T_TYPES` flag for generic `xxx_t` types
* more explicit regex testing
* support for `u`, `U` and `u64` encoding prefixes
* improve comment detection in diff output for js and c3
* change `get_c_identifier` API for consistency
* add `is_c_identifier_start()` and `is_c_identifier_part()`
* move `qe_haslower` to **util.c**
* update C2 language keyword and type lists
* improve Pike colorizer
- add debug info in asan, msan and ubsan builds
- avoid function call in `qe_unaccent` for ASCII chars
- fix `find_ligature` return type to detect simple ligatures with a simple test
- fix crash bug in `expand_ligature`, behavior was bogus anyway.
Mouse:
- add `shift` state in all mouse events
- pass `QEmacsState *qs` to `qe_mouse_event`
- support non drag mouse events with `-m:2` command line option
- dragging beyond window borders generates scrolling events
(should autorepeat, should have menu line at the top for scrolling up)
- cancel active search on mouse_goto
- do not mouse activate window if current active window is modal (popup or
minibuf)
- handle double and triple click: select by words or lines
- handle shift click: extend selection
- add `EditState::mouse_down_offset` for initial dragging buffer offset
- pass `QEEvent *ev` to `mouse_goto()` handlers
events:
- add synthetic key events: QUIT CLOSE EXIT
- use synthetic events for GUI interaction (no longer simulate keystrokes)
tty:
- fix large OSC sequence support for terminal clipboard retrieval
Multicursor:
- use new `QECursor` for multicursor local states
- reallocate `multi_cursor` array in chunks
misc:
- add `eb_peekc(EditBuffer *b, int offset)`
- boolean cmdline options no longer require an argument, true if none provided
- int cmdline options either require an argument (CMD_LINE_INT_ARG) or take an
optional argument, value is incremented if argument is not provided.
- fix `buf_put_key()` for control keys
- add command line argument -mk=X for xterm modifyOtherKeys setting (0,1,2)
- improve argument parsing to avoid seg fault on bogus arg spec
- report command line argument errors in popup window
- improve escape sequence handling in tty.c
- support bogus iTerm2 encoding of option/command/control key combinations
- `canonicalize_path` returns destination array
allow for destination to overlap source
- `qe_strcollate` compare directory name before contents
this fixes the pathnames sorting
- add `get_relativename(filename, dirname)`
Simple regexp patterns use a subset of POSIX regexp:
- only simple character classes, no escape sequences
- no assertions (except $), no backreferences
- embedded groups always generate maximal matches which
may cause the outer expression to fail match
- replace `qe_malloc_dup()` with `qe_malloc_dup_bytes()` and `qe_malloc_dup_array()`
- replace `qe_realloc()` with `qe_realloc_bytes()` and `qe_realloc_array()`
- pass numbers of objects to `qe_malloc_dup_array` and `qe_realloc_array`
- add `qe_strndup()`
* Do not use CFLAGS for host tools when cross-compiling.
* Add a missing $(EXE). Maybe we should have a HOST_EXE but at least we can build.
* set target OS & CPU
Not really used, only for cosmetics.
Also, m68k is big endian. (Do we use this anywhere yet?)
* Force GNU-C99 standard for LLONG_MIN
* work around missing d_type in dirent struct
* adjusted `ustr_match_keyword` for consistency
* implement `byte_quote` natively
* implement `buf_byte_quote` using `byte_quote` instead of the reverse
* rename `buf_encode_byte()` as `buf_quote_byte()`
* change `buf_printf` return value for consistency
* let `strquote` always return the length of the conversion like `snprintf`
*equivalents* are strings that should compare equal in a `compare-windows`
session. You can define such strings in a **.qerc** file in the directory of
one of the files being compared. This helps ignoring known changes such as
type of function renaming... Here is an example to help compare files between
the `bellard/quickjs` and the `quickjs-ng/quickjs` repositories:
```
define_equivalent("JS_DupValue(ctx, ", "js_dup(");
define_equivalent("JSValue", "JSValueConst");
define_equivalent("JS_NewInt32(ctx, ", "js_int32(");
define_equivalent("JS_NewInt32(ctx,\n", "js_int32(");
define_equivalent("JS_NewUint32(ctx, ", "js_uint32(");
define_equivalent("JS_NewUint32(ctx,\n", "js_uint32(");
define_equivalent("JS_NewBool(ctx, ", "js_bool(");
define_equivalent("JS_NewFloat64(ctx, ", "js_float64(");
define_equivalent("JS_EXTERN ", "");
define_equivalent("JS_EXTERN JS", "JS");
define_equivalent("JS_EXTERN JS_", "JS_");
ignore_equivalent = 1;
```
Other changes were necessary for proper utf8 skipping:
- add `utf8_prefix_len(str1, str2)` to compute the length of a common initial
prefix not falling inside UTF-8 encoded codepoints.
- add `utf8_decode_prev` to get the previous codepoint
- add `eb_match_str_utf8_reverse`
* add multi-line strings with """ syntax and escaped newlines
* call commands with allocated string arguments instead of local arena
* improve triple quoted string support in C like colorizers
* increase SEARCH_LENGTH to 2K (should use allocated arrays)
* fix kill-matching-lines definition
* fix utf8_to_char32 implementation inconsistency for empty destination
* fix buffering errors in eb_insert_utf8_buf() and eb_insert_char32_buf()
* bump version to 5.4.1e
* use memcpy and other value casts to avoid strict aliasing violations.
gcc 12.2 was wrongly assuming that utf8_decode(&p) did not modify p
because *pp was never explicitly set, albeit *(const u8 **)pp = p; was
storing te updated value of p into it and the code generated for that
was produced. The code generator was miscompiling strtokey1 because
the compiler relied on bogus code analysis at the call site.
The gcc team is wasting many hours of valuable debugging time.
They should at least issue a warning about aliasing rules violations.
* fix compiler warning on missing Xvideo header
* fix compiler warning on missing fallthrough
* bump version to 5.4.1c
* eb_get_region_contents and eb_get_contents take an extra argument
encode_null to encode embedded null bytes as "\xC0\x80"
* use steps instead of flags for isearch state array:
max 256 code points, 512 steps and 768 search bytes
* add remove_string() to remove a string from a StringArray and pack the array
* rename get_history() as qe_get_history() and make it public
* prevent multiple registration of command tables in qe_register_commands()
* silence compiler warning on array size in charname_complete()
* remove last_search_u32 data, use search history list instead
* restrict search commands to the current region if highlighted
* bump version to 5.4.1b
* add wctoupper() and wctolower()
* add qe_unaccent(c);
* use ligature functions for the above
* handle accents in qe_toupper() and qe_tolower()
* add convert_entry() method in CompletionDef
* pass CompletionDef pointer to minibuffer_edit callback
- char32_t is defined in cutils.h but may conflict with <uchar.h>
- all qe_isxxx functions take a char32_t
- add etf8x encoding for full range of char32_t type
- add utf8_decode_strict()
- add ustr_match_keyword()
- utf8_encode() / utf8_decode() handle up to 32 bits
- improve detect_charset():
- detect utf8 and utf8x
- avoid failure on partial utf8 sequence at end of buffer
- detect overlong utf8 sequences
- fix display bugs for code points beyond MAX_UNICODE_DISPLAY
- simplify do_compare_windows(), avoid magic char values.
- rename functions:
eb_encode_uchar -> eb_encode_char32
eb_insert_uchar -> eb_insert_char32
eb_insert_uchars -> eb_insert_char32_n
eb_match_uchar -> eb_match_char32
eb_delete_uchar -> eb_delete_char32
eb_replace_uchar -> eb_replace_char32
utf8_to_unicode -> utf8_to_char32
- use char32_t for all variables and arrays holding code-points
- fix some language syntax parsers.
- fix detect_eol_type_32bit(), used uint16_t instead of uint32_t
- bump VERSION to 5.4.0
- remove redundant include files
- no longer include qe.h in charset.c, libqhtml
- add unicode_join.h for bidir definitions
- move QASSERT, MAX_WORD_SIZE, MAX_FILENAME_SIZE from qe.h to util.h
- move CompleteState and CompleteFunc to util.h
- bump VERSION to 5.3.4z
- split color/css functions from util.c into color.c
- add util.h and color.h for declarations
- util.c no longer includes qe.h
- move get_clock_ms() and get_clock_usec() to unix.c
- remove unused QString functions
- bump VERSION to 5.3.4s
- remove opaque argument in exec_command()
- remove CMD_ISS and CMD_ISSi command signatures
- pass window pointer to isearch_xxx() functions
- isearch-exit() takes key, sets mark where search started;
used for exiting incremental search on other commands.
- isearch-cancel() takes point back where search started;
used for isearch-abort()
- handle prefix argument in query-replace (word match)
- add query_replace_help() on '?', C-h, f1
- remove dead code
- bump VERSION to 5.3.4q
- add utility function:
char *file_load(const char *filename, int max_size, int *sizep);
- publish QEValue, selected TOK_xxx and value setters in qe.h
- add more common functions in parser.c
qe_cfg_init(), qe_cfg_release()
- add generic argument parser qe_cfg_get_args()
- add conversion functions in qescript.c:
char(v), int(v), string(v)
- add delim argument in qe_cfg_parse_string() in parse.c
- pass QEmacsDataSource pointer to has_token(), expect_token()
- bump VERSION to 5.3.4j
- add byte_guote() to encode a single byte
- encode non ASCII bytes in strquote()
- split function call parse and evaluation into qe_cfg_call() in tqe's parser.c
- use has_token() in full parser
- fix bogus function name in config file parsing errors
- bump VERSION to 5.3.4i
- add eb_skip_accents(), eb_skip_glyphs(), eb_delete_glyphs()
- overwriting a character with accents replaces it completely
- C-d deletes characters along with subsequent accents
- handle wide characters and accents in shell console
- handle repeated wide characters
- use Hex in trace_buffer for non-ASCII bytes
- bumped version to 5.3.4c
- add screen_top to avoid recomputing from buffer contents
- fix getline behavior on very long lines in shell buffer
- add LF bindings to run qemacs in lldb session
- qe_term_get_pos() returns screen start
- handle \t and wide chars inside shell buffers for xy positioning
- split qe_term_goto_pos() from qe_term_goto_xy()
- add flags in qe_term_goto_pos():
TG_RELATIVE_COL: column number is relative to offset position
TG_RELATIVE_ROW: row number is relative to offset position
TG_RELATIVE: column and/or row is relative
TG_NOCLIP: do not clip destx/desty coordinates
TG_NOEXTEND: do not modify buffer to reach destination
- add qe_term_fix_wrap() to break wrapping lines
- fix qe_term_goto_tab() behavior on long lines
- fix qe_term_skip_lines() to handle wrapping lines
- handle UTF-8 for lastc and repeat graphics character
- bump VERSION to 5.3.3e