Commit graph

93 commits

Author SHA1 Message Date
Charlie Gordon
e13fcfb543 remove trailing blanks 2020-10-21 15:01:52 +00:00
Charlie Gordon
2c85e017fd Improve colorization
- add QE_STYLE_BLANK_HILITE style for extra blanks at end of lines
- add MODEF_NO_TRAILING_BLANKS flag to control this feature on a mode basis
- add -nc (--no-crc) command line option du disable CRC based update cache
- add disable-crc global variable for the same purpose
- fix termios c_oflag flags in raw mode
2020-10-21 09:55:01 +00:00
Charlie Gordon
d0b9f3dad4 bumped copyrights on modified files 2020-10-17 21:09:49 +00:00
Charlie Gordon
6e0564d4ed Improve completion system
- pass CompleteState to print_entry() handler
- remove list_get_colorized_line()
- remove get_colorized_line() window handler
- add colorize_mode along with colorize_func
- add list_display_hook() to fix list mode navigation
- rename generic_get_colorized_line() as get_colorized_line()
- fix memory leak in eb_add_property()
- pretty print tags in tag_complete() and list_tags()
2020-10-17 20:55:47 +00:00
Charlie Gordon
9d967ad29c Improve completion system
- rename and extend CompletionEntry as CompletionDef
- create xxx_completion CompletionDef structures
- rename xxx_completion() functions to xxx_complete()
- register CompletionDef structs with qe_register_completion()
- add (start, end) range in CompleteState
- use eb_puts() and eb_putc() instead of eb_printf()
- simplify eb_delete_chars()
- ignore left pane in compare-windows()
- simplify qe_list_bindings()
- improve command and variable completion popup
2020-10-17 15:41:31 +00:00
Charlie Gordon
270e8daa10 basic: fix small issues
- fix spurious crash bug on bad qesession file.
- make bold terminal text with colors 0-7 appear brighter
  this makes black bold terminal test appear grey instead
  of invisible
2017-05-18 14:14:28 +00:00
Charlie Gordon
7d7103ca70 graphics: add device and generic picture display functions
- add bitmap formats for 4BPP and BGR combinations
- add color palette in QEPicture
- add xfactor and yfactor in QEDisplay for preferred pixel granularity
  yfactor is typically 2 for text mode display
- add dpy_draw_picture() device function
- add bitmap drawing functions:
    qe_create_picture(int width, int height, QEBitmapFormat format, int flags);
    int qe_picture_lock(QEPicture *ip);
    void qe_picture_unlock(QEPicture *ip);
    qe_free_picture(QEPicture **ipp);
    QE_PAL_MODE(r, g, b, incr)
    int qe_picture_set_palette(QEPicture *ip, int mode,
                    unsigned char *p, int count, int tcolor);
    int qe_picture_copy(QEPicture *dst, int dst_x, int dst_y, int dst_w, int dst_h,
                    const QEPicture *src, int src_x, int src_y, int src_w, int src_h,
                    int flags);
    int qe_draw_picture(QEditScreen *s, int dst_x, int dst_y, int dst_w, int dst_h,
                    const QEPicture *ip,
                    int src_x, int src_y, int src_w, int src_h,
                    int flags, QEColor col);
- add 3 compile time selectable image interfaces in flactal.c benchmark
2017-05-15 09:44:21 +00:00
Charlie Gordon
1b0fc02549 tty: detect and handle AtariST terminal TW100 (F.Revol) 2017-05-07 06:18:40 +00:00
Charlie Gordon
cda5479aa0 tty: add graphics emulation with 2 pixels per char 2017-05-05 20:10:51 +00:00
Charlie Gordon
a731522e72 tty: improve terminal color capabilities detection
- use COLORTERM environment variable
- detect OS/X iTerm.app
2017-05-04 08:15:16 +00:00
Charlie Gordon
b66bdb1206 tty: hide cursor during redisplay 2017-04-25 16:58:46 +00:00
Charlie Gordon
eacb2ad6e0 shell: major improvements in tty emulator
terminal emulator:
- add EditState.cols and EditState.rows: window dimensions in characters
- pass target window to new_shell_buffer()
- use window size for shell terminal emulator initial screen size
- set COLUMNS and LINES environment variables for child processes
- factorize emulator character output
- increase number of CSI arguments
- simplify and improve CSI m argument processing including
  multiple argument sequences
- minimal support for `:` as argument separator eg:
  \033[38;5;128:128:128m
- support erase line vt100 command:
  \033[K, \033[0K erase end of line
  \033[1K         erase beginning of line
  \033[2K         erase complete line
debugging:
- pass string argument to set-trace: on, off or list of trace indicators
- remove doctor command
- add QE_TRACE_EMULATE for emulator trace messages
- fix incorrect uses of eb_delete()
2017-04-21 14:44:14 +00:00
Charlie Gordon
c57a7c6233 display: small fixes for consistency
- add wrappers in display.h
- renamed tty dpy_xxx handlers for consistency
- separate tty_term_resize called on signal and tty_dpy_invalidate
- add dpy_xor_rectangle for software cursor, remove QECOLOR_XOR
2017-04-18 09:14:55 +00:00
Charlie Gordon
7b40bb4f3a display: improve automatic redisplay upon terminal window resize
- signal and detect asynchronous redisplay signal from SIGWINCH
2017-04-17 23:01:21 +00:00
Charlie Gordon
b39607410e fixed compilation warnings 2017-04-14 06:59:17 +00:00
Charlie Gordon
6c595c1f2c colors: extend color system
- add 8K color modes and 64-bit QETermStyle values
- add 64-bit buffer style support
- reduce colored character system used in syntax handlers to 8-bit style
  and 24-bit code point
- use QETermStyle type instead of int wherever a composite style is used
- force color system used by the terminal with environment variables:
  USE_16_COLORS=1, USE_256_COLORS=1 or USE_TRUE_COLORS=1
2017-04-12 07:33:20 +00:00
Charlie Gordon
5d463eb5ad styles: improve consistency
- rename font styles QE_STYLE_xxx to QE_FONT_STYLE_xxx
- rename font family QE_FAMILY_xxx to QE_FONT_FAMILY_xxx
- improve tests/16colors.pl: display bold italics combination
- improve tests/color-spaces.pl: compare true color and palette dumps
- add colortest target in Makefile to produce various color patterns
2017-04-11 06:46:13 +00:00
Charlie Gordon
799b1489bc display: full support for 256 color virtual terminal
- add various utilities for color escape sequence testing:
  tests/16colors.pl
  tests/256colors2.pl
  tests/color-spaces.pl
  tests/truecolors.sh
  tests/xterm-colortest.sh
  tests/xterm-colour-chart.py
- use colored code-points only for syntax highlighting
- use QETermStyle and QEStyleDef internally
- convert to TTYChar attributes only for text terminal output.
- remove most CHAR_MASK and STYLE_SHIFT handling
- pass QETermStyle array to get_colorized_line mode handlers
- pass QETermStyle array to isearch_colorize_matches
- remove combine_static_colorized_line
- move color matching functions to util.c
- rename get_tty_color as qe_map_color
- improve local variable naming consistency:
  DisplayState *ds, QEStyleDef *stp, QEStyleDef styledef.
2017-04-03 08:33:57 +00:00
Charlie Gordon
4104ab568b display: improve color and style handling
- add support for 256 and true color terminals
- fix color handling for defined styles
- fix bold, italic and underline handling for terminals
- use more explicit symbols for qe-term emulator in shell.c
- shell buffer terminal emulator still uses 16 colors
- display buffer style in C-X =
- bumped version to 0.5.0dev
2017-04-02 01:12:01 +00:00
Charlie Gordon
a63aff6f3e fixed compilation on stack Debian 2017-03-16 17:18:29 +00:00
Charlie Gordon
26fd39d9e0 unicode: improve support for wide and combining code points
- qe_isaccent() recognises all combining code points (to be refined)
- add computer generated width table unicode_width.h
- display difference in hex in compare-windows to distinguish
  space and nbsp, normal and combined form for accented letters.
- display multiple combining code points in what-cursor-position (C-x =)
- attach combining code points to preceeding space in display_char_bidir
- handle accents specificaaly in flush_fragment
- handle combining code-points in screen backstore via indirection table
  this transient table can be inspected via describe-screen
2017-03-16 09:16:31 +00:00
Charlie Gordon
ec07d5aec8 basic: charset improvements
- add QECharset.encode_table as a default for CharsetDecodeState.table
- make CharsetDecodeState.table const
- use static initializers for utf8 tables
- add al32utf8 charset name (used in Oracle for true utf-8 encoding)
- use direct pointers in unicode_glyph_range_index
- initialize unicode_glyph_range_index at run time
- rename unicode_glyph_tty_width as unicode_tty_glyph_width
- changed unihex display to space out single width characters
2017-03-15 23:42:23 +00:00
Charlie Gordon
38fdd559f5 display: improve display structure handling
- add QEDisplay.dpy_describe handler
- rename dpy_init as screen_init
- allocate TTYState instead of using static struct in tty.c
2017-03-15 07:24:31 +00:00
Charlie Gordon
d5e10dfe77 update copyrights, TODO list 2016-06-09 16:24:10 +00:00
Charlie Gordon
1f5a77a784 portability: stop defining symbols starting with __ 2015-09-16 22:18:22 +00:00
Charlie Gordon
fdaa11780f protect tty_resize against spurious window sizes 2015-09-16 12:35:01 +00:00
Charlie Gordon
bac5773927 tty: rearrange code 2015-08-17 18:13:50 +00:00
Charlie Gordon
65e16f7f82 tty: fixed non ASCII input from utf8 terminals 2015-08-14 15:56:28 +00:00
Charlie Gordon
f84a844a5e tty: improved support for OS/X iterm2
- added support for extended CSI sequences such as
  C-up    = ^[[1;5A
  C-down  = ^[[1;5B
  C-left  = ^[[1;5D
  C-right = ^[[1;5C
  S-left  = ^[[1;2D
  S-right = ^[[1;2C
2015-08-13 23:14:11 +00:00
Charlie Gordon
0efc7d9c56 commented casts 2015-06-19 21:39:07 +00:00
Charlie Gordon
5acb53ef0f fixed signed/unsigned inconsistency 2015-05-03 10:16:15 +00:00
Charlie Gordon
ebc8f89a82 prevent strict warnings 2014-05-27 22:59:48 +00:00
Charlie Gordon
d0e1447aa3 improve utf-8 support
* display non BMP code-points as utf-8 if not CONFIG_TINY
2014-05-14 17:40:53 +00:00
Charlie Gordon
90971b9861 improve c-mode
* add indent_func method in ModeDef
* make c-indent-region more general as indent-region
* add c-forward-conditional on M-]
* add c-backward-conditional on M-[
* add c-list-conditionals on M-i
* use trick to disambiguate M-[ and CSI sequences
* add eb_is_in_indentation(b, offset)
* fix c-mode indentation of case and default lines
2014-03-23 01:11:34 +00:00
Charlie Gordon
ee690b2895 add support for web protocols: ftp, http, https
* add wget-mode to retrieve web contents via find-file
* add shell flags for buffer mode change upon download completion
* fix do_electric_filename to keep http:// prefix and such
2014-03-19 19:42:30 +00:00
Charlie Gordon
48c14ba824 add support for combining marks (accents)
* add qe_isaccent() to test for combining marks
* add do_combine_char() command to insert or remove combining marks
* fix some display glitches involving combining marks
* add expand_ligature() and combine_accent() to handle simple ligatures
* change do_what_cursor_position() to display combining marks
2014-02-01 12:49:06 +00:00
Charlie Gordon
c5f56a0d5b Fix memory leaks and bad references detected by valgrind
* add free_font_cache()
* add css_free_colors()
* add unload_ligatures()
* add --free-all cmd line option to free memory upon exit for valgrind
* tty.c: fix off by 3 size in qe_realloc. Should be typed
* qe.c: fix invalid pointer reference upon destroying transient buffer
2014-01-24 00:46:26 +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
02da1bb7a1 add generic styles buffer from shell color mode
* styles_buffer hold static style info for each character in the buffer
* new buffer flags to create styles buffers with 1, 2 or 4 bytes per char
* copy static styles to the kill_ring and pasted them style enabled buffers
* preserve static styles in convert-buffer-file-coding-system
* display style bytes in bufed list
* add commands set-region-color, set-region-style, drop-styles
2014-01-15 19:44:24 +00:00
Charlie Gordon
5f12ffb390 prevent spurious cursor move when not found 2014-01-11 18:46:14 +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
02dec8bf1a added generic utility function unicode_glyph_tty_width in charset.c
* moved and improved code from tty_term_glyph_width
2014-01-02 11:28:30 +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
a10c10ecf1 hide local data 2008-04-23 15:30:33 +00:00
Charlie Gordon
3ac1bd5aa0 use proper format in fscanf 2008-04-20 11:55:49 +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
8a2ee13f81 further kludges for linedraw in cygwin 2008-04-14 00:42:32 +00:00
Charlie Gordon
08da1814c5 fixed some BSD build issues 2008-04-13 23:44:39 +00:00
Charlie Gordon
85d121989e fixed some more tty color issues.
use tty.term_flags for emulation flags
improved cygwin tests
do not use V220 escapes to reset bold and blink
reset char attributes in more places to avoid side effects
2008-04-12 19:26:05 +00:00
Charlie Gordon
fa7b29d311 use blink for high intensity background color 2008-04-12 12:40:23 +00:00