Commit graph

978 commits

Author SHA1 Message Date
Charlie Gordon
478a9d9f69 graphics: add graphics viewer for popular image formats
- use stb_image.h to display bmp, jpeg, pmg, gif, targa and other
  popular image formats
- disable text based image converters
2017-05-15 09:58:02 +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
8a4aaca67a extra-modes: add Magpie scripting language 2017-05-15 08:05:24 +00:00
Charlie Gordon
bc392f4ca1 markdown: support more syntaxes for verbatim blocks
- accept :::lang syntax for verbatim block language spec
2017-05-15 08:00:20 +00:00
Charlie Gordon
b30e014175 basic: fix CRC shadow buffer crash bug
- add consistency checks for shadow buffer indexing
- use generic_mode_probe() as default if mode extensions
  are set for all modes, not just MODEF_SYNTAX
- improve mode name construction for modeline
- display TAB as ^I in minibuffer
- prevent display of characters in [128..159] for raw buffers
  this improves display speed in X11-Mac version
- force window content and border invalidation if complete_refresh
2017-05-15 07:57:12 +00:00
Charlie Gordon
6963105415 clang: add support for the wren scripting language
- small fixes in C number parsing
- add CLANG_LINECONT mode flag for line continuation support
- small fixes in javascript parsing: template strings
2017-05-15 07:48:30 +00:00
Charlie Gordon
0ad980192b basic: fix bogus bindings 2017-05-11 10:43:09 +00:00
Charlie Gordon
a69bceb37d display: fix various old bugs
- add st_errno in ModeProbeData so dired only matches wildcards if no
  file exists with that exact name (argument passed probe_mode())
- add LF_NOWILDCARD qe_load_file flag to prevent wildcard handling
- display line numbers and terminal right margin in new gutter style
- free EditState:line_shadow display CRCs when changing modes:
  this fixes an old display bug when switching between html and text mode
- added convenient default bindings:
  C-c ~     -> toggle-read-only
  C-c c     -> set-buffer-file-coding-system
  C-c b     -> toggle-bidir
  C-c C-\   -> set-input-method
  C-c l     -> toggle-line-numbers
  C-c t     -> toggle-truncate-lines
  C-c w     -> word-wrap
- disable terminal emulation on shell buffers without the SF_COLOR flag
- only update mark on process output in interactive terminal emulator buffers
- only compute shell current directory on terminal emulator buffers
- auto select mode and character set after 3MB of output
- update wrap_cols on all windows upon shell-refresh (C-l in shell-mode)
- improve shell_get_curpath(): handle debian default prompt
- updated TODOs
2017-05-10 15:46:16 +00:00
Charlie Gordon
0dc8e11a20 sql: recognise phpMyAdmin SQL Dumps 2017-05-10 15:42:47 +00:00
Charlie Gordon
a6de322430 build: add generic rule to make host utility executables 2017-05-10 15:21:46 +00:00
Charlie Gordon
f0670101bb modes: avoid duplicate mode names
- rename ModeDef.mode_name as alt_name, only use if needed
- remove duplicates from and extend mode name completion list
- remove duplicate html-mode and list-mode commands
- do_set_mode() command bypasses dired pane
2017-05-08 10:47:22 +00:00
Charlie Gordon
c27505b807 shell: simplify do_shell
- publish qe_find_target_window() to bypass dired pane
- simplify do_shell, restart process in last shell buffer
  used and switch to interactive mode
2017-05-08 10:26:56 +00:00
Charlie Gordon
c36cccd4bf build: group all intermediary targets in .objs directory
- each architecture has a specific subdirectory
- object files for qe, xqe and tqe are each in an arch specific subdirectory
- libraries are generated in .objs with an arch specific name
2017-05-08 10:15:43 +00:00
Charlie Gordon
eb97ef08b7 shell: fix spurious crash bug
- add check_mode_data() to verify mode data pointer validity
- avoid double free in qe_free_mode_data() and shell_pid_cb()
2017-05-07 20:32:30 +00:00
Charlie Gordon
c4550e1e7f clang: add Game Monkey scripting language 2017-05-07 20:29:29 +00:00
Charlie Gordon
bc0e355e5c archive: fix small bugs 2017-05-07 20:27:18 +00:00
Charlie Gordon
16359e92ae tests: add test from gnome vte 2017-05-07 08:06:07 +00:00
Charlie Gordon
1b0fc02549 tty: detect and handle AtariST terminal TW100 (F.Revol) 2017-05-07 06:18:40 +00:00
Charlie Gordon
bd44951866 build: fix X11 directory lookup (F.Revol) 2017-05-07 06:17:11 +00:00
Charlie Gordon
2866a48b11 build: Cross-compile using the NetSurf SDK. (F.Revol) 2017-05-07 06:12:39 +00:00
Charlie Gordon
d2d3a7b31e build: detect missing SA_RESTART definition in qe_event_init (F.Revol) 2017-05-07 06:09:19 +00:00
Charlie Gordon
128d0c28dd build: use CONFIG_MMAP when unmapping buffer data in eb_clear() (F.Revol) 2017-05-07 06:08:57 +00:00
Charlie Gordon
4bdbd8bd9e build: use target specific size utility via SIZE configuration variable (F.Revol) 2017-05-07 06:08:32 +00:00
Charlie Gordon
5f0fc5eacf fractal: use graphics API instead of colored buffer text
- use bmp_draw to update the screen instead of generating utf-8 art
- add color parametric color palette and palette shifting
- separate image invalidation from actual redrawing
- changing fractal type also resets origin
- some computation simplifications
2017-05-06 17:18:42 +00:00
Charlie Gordon
cda5479aa0 tty: add graphics emulation with 2 pixels per char 2017-05-05 20:10:51 +00:00
Charlie Gordon
20dbafc03b colors: add macros to extract red, green and blue components 2017-05-05 20:08:52 +00:00
Charlie Gordon
634d3c9165 graphics: add 1 and 8 bit bitmap formats 2017-05-05 20:07:52 +00:00
Charlie Gordon
860d805b92 x11: fix QEPicture format for 24 bit depth with 32 bits per pixel 2017-05-05 20:05:35 +00:00
Charlie Gordon
11a7e6a6d8 image: only invalidate current window upon movement 2017-05-05 19:59:49 +00:00
Charlie Gordon
3165dcad8b basic: C-g erases diag area (bottom right corner) 2017-05-05 19:58:39 +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
5d8e56710f display: add window fields for character cell size
- compute_client_area computes default character sizes in
  EditState.char_width and EditState.line_height.
- edit_invalidate() takes extra parameter to invalidate
  all windows
- do_toggle_full_screen() no longer toggles modeline
- reset WF_POPLEFT in do_delete_other_windows
- bind toggle-full-screen on C-c f
- bind toggle-mode-line on C-c m
- move fill_border to display.c
2017-05-03 12:58:23 +00:00
Charlie Gordon
870af2da67 display: add window fields for character cell size
- compute_client_area computes default character sizes in
  EditState.char_width and EditState.line_height.
- edit_invalidate() takes extra parameter to invalidate
  all windows
- do_toggle_full_screen() no longer toggles modeline
- reset WF_POPLEFT in do_delete_other_windows
- bind toggle-full-screen on C-c f
- bind toggle-mode-line on C-c m
- move fill_border to display.c
2017-05-03 10:50:49 +00:00
Charlie Gordon
d0e6015bc7 x11: small improvements
- interpret X11 geometry string as pixels, not characters
- fix invalid UCS2 character display in x11
2017-05-03 10:08:16 +00:00
Charlie Gordon
3db0dd892f script: split script-mode into shell specific modes
- add specific modes for sh, bash, csh, ksh, zsh and tcsh
2017-05-03 08:10:56 +00:00
Charlie Gordon
94dac6e8cb archive: select tar on .taz and man on .roff 2017-05-03 08:04:08 +00:00
Charlie Gordon
03bb89b96f shell: set error pointer upon process buffer creation 2017-05-03 07:18:05 +00:00
Charlie Gordon
aadbb5ede3 tests: add fractal types 2017-04-29 09:22:45 +00:00
Charlie Gordon
f1888d89b5 display: fix graphics cursor in process buffer
- force cursor minimum width at end of line
2017-04-28 21:46:01 +00:00
Charlie Gordon
df77bc2635 fractal: use buffer_mode_data instead of static structure for FractalState 2017-04-28 13:32:43 +00:00
Charlie Gordon
dbc17518c2 tests: add fractal test functions
- improve mandelbrot shell script
- add fractal.c: a fractal generator and navigator that can
  be used as a terminal stress test.
- add fractal-mode for easy fractal navigation and zooming
  with key bindings.
- try it out with C-h m SP / SP / SP ...
2017-04-27 23:04:10 +00:00
Charlie Gordon
b50a3f42b1 shell: improve terminal emulation
- emulate alternate screen, snap top of screen in display_hook
- add ShellState.alternate_screen_top
- save and restore cursor
- handle combination marks and wide glyphs in qe_term_get_pos() and
  qe_term_goto_xy()
- erase screen \E[J
- prevent automatic switch to interactive mode in full screen applications
  when moving point to cur_offset. Must use C-o as a toggle.
- notify shell process of window size change with C-l (shell-refresh)
2017-04-26 07:05:42 +00:00
Charlie Gordon
ff1952f5a0 display: improve line wrap handling
- add WRAP_AUTO and WRAP_TERM (for terminal emulator)
  WRAP_AUTO wraps lines if the window is more than 3/4 of the screen width
  if window is narrower, lines are truncated.
  WRAP_TERM does not display the \ wrapping mark to simulate terminal behavior
- add default_wrap member in ModeDef structure
- delegate to view pane for man, ssh and compile commands
2017-04-25 17:41:27 +00:00
Charlie Gordon
5bb58a9c16 display: improve window splitting API
- add EditState *qe_split_window(EditState *s, int prop, int side_by_side);
  takes proportion and direction
- set-trace splits the current window 75/25
- add start-trace-mode
2017-04-25 17:15:03 +00:00
Charlie Gordon
161053d03f dired: update sort order prompt 2017-04-25 17:14:30 +00:00
Charlie Gordon
b66bdb1206 tty: hide cursor during redisplay 2017-04-25 16:58:46 +00:00
Charlie Gordon
d210ba864b charset: improve eol and binary detection
- accept extra CR in badly encoded DOS files
- ignore ^Z in DOS files, do not detect them as binary
2017-04-25 16:56:26 +00:00
Charlie Gordon
d329669530 buffer: new APIs
- int eb_insert_uchars(EditBuffer *b, int offset, int c, int n);
- int eb_replace_uchar(EditBuffer *b, int offset, int c);
- inline eb_insert_spaces() using eb_insert_uchars() instead
- add minp(), maxp() and clampp() with side effect on first argument
- publish ucs2 and ucs4 charsets
2017-04-25 16:46:41 +00:00
Charlie Gordon
59ce60a518 lisp: add xaos-mode 2017-04-25 13:28:41 +00:00
Charlie Gordon
0496b811d8 man-mode: recognise .man files that look like man page source files 2017-04-25 12:52:16 +00:00