Now parses charmap files.
Wed May 5 2004 Joe Allen <jhallen@world.std.com>
- * bw.c charmap.c main.c qw.c qw.h regex.c regex.h
- syntax.c types.h uisrch.c usearch.c utf8.c utf8.h:
+ * bw.c charmap.c main.c qw.c qw.h regex.c regex.h
+ syntax.c types.h uisrch.c usearch.c utf8.c utf8.h:
Regex search now works properly with UTF-8 chars.
Incremental search now works with UTF-8.
Tue May 4 2004 Joe Allen <jhallen@world.std.com>
* ChangeLog TODO b.c bw.c charmap.c charmap.h cmd.c help.c
- i18n.c i18n.h joerc.in jpicorc.in jstarrc.in macro.c main.c
- menu.c pw.c pw.h rc.c regex.c rjoerc.in scrn.c scrn.h syntax.c
- types.h ublock.c uedit.c uerror.c ufile.c uformat.c umath.c
- usearch.c ushell.c utag.c utf8.c utils.c utils.h w.c:
+ i18n.c i18n.h joerc.in jpicorc.in jstarrc.in macro.c main.c
+ menu.c pw.c pw.h rc.c regex.c rjoerc.in scrn.c scrn.h syntax.c
+ types.h ublock.c uedit.c uerror.c ufile.c uformat.c umath.c
+ usearch.c ushell.c utag.c utf8.c utils.c utils.h w.c:
Everything about character set is now contained in struct charmap.
Oops: fixed status line.
Fri Apr 16 2004 Joe Allen <jhallen@world.std.com>
- * ChangeLog TODO cmd.c macro.c pw.c pw.h rc.c regex.c ublock.c
- uedit.c ufile.c umath.c usearch.c ushell.c utag.c utf8.c w.c
- w.h:
+ * ChangeLog TODO cmd.c macro.c pw.c pw.h rc.c regex.c ublock.c
+ uedit.c ufile.c umath.c usearch.c ushell.c utag.c utf8.c w.c
+ w.h:
UTF-8 now supported in file names and prompts.
position update (which was the default before). Now we don't
use tabs by default.
- Completed change to 'unsigned char *' and elimination of
- MAXINT. What a mess. No warnings with gcc -pedantic.
+ Completed change to 'unsigned char *' and elimination of
+ MAXINT. What a mess. No warnings with gcc -pedantic.
Fix UTF-8 bugs where cursor was not correct on scrolled screen.
able to find patch :(
______________________________________________________________________
-$MirOS: contrib/code/jupp/ChangeLog,v 1.10 2017/12/06 23:17:32 tg Exp $
+$MirOS: contrib/code/jupp/ChangeLog,v 1.11 2018/02/01 02:17:54 tg Exp $
-$MirOS: contrib/code/jupp/INFO,v 1.11 2014/06/29 11:39:50 tg Exp $
+$MirOS: contrib/code/jupp/INFO,v 1.12 2018/02/01 02:33:43 tg Exp $
------------------------------------------------------------------
Jupp
JPICO - An enhanced version of the Pine mailer system's PICO
editor.
- JSTAR - A complete imitation of WordStar including many "JOE"
- extensions.
+ JSTAR - A complete imitation of WordStar in non-document mode
+ including many "JOE" extensions.
RJOE - A restricted version of JOE which allowed you to edit
only the files specified on the command line.
- JMACS - A GNU-EMACS imitation which is about one order of
+ JMACS - A GNU-Emacs imitation which is about one order of
magnitude smaller than real GNU-EMACS.
- JUPP - A modern editor for programmers with WordStar-like bindings
+ JUPP - A modern editor for programmers with WordStar-like
+ bindings; an improvement over classical JSTAR
Features:
When you ask for help, one of six small help reference cards appears
on the screen and remains while you continue to use the editor. Here is the
-first help card:
+first help card for Joe:
CURSOR GO TO BLOCK DELETE MISC EXIT
^B left ^F right ^U prev. screen ^KB begin ^D char. ^KJ reformat ^KX save
^KF find text ^KV end of file ^KY delete ^_ undo ^[N word ^KR insert
^L find next ^KL to line No. ^K/ filter ^^ redo ^[L file ^KD save
+ Other editor flavours differ; to get help for those, press either
+Ctrl-J (^J) for jstar and jupp, ^G for jpico, Ctrl-X followed (Ctrl depressed)
+by h (^Xh) for jmacs or, for joe and rjoe, ^KH (Ctrl-K+h).
+
+ The jupp and jstar flavours attempt to imitate WordStar in
+non-document mode; see here for more documentation on WordStar keybindings:
+
+ - http://www.stormbringer.org/pers/siaru/tlg/wsfile.txt
+
+ - http://www.stormbringer.org/pers/siaru/tlg/ws5file.txt
+
JOE has a powerful set of editing commands suitable for editing both
text files and programs:
-$MirOS: contrib/code/jupp/LIST,v 1.11 2017/08/08 21:39:27 tg Exp $
------------------------------------------------------------------
+$MirOS: contrib/code/jupp/LIST,v 1.14 2018/02/01 02:33:43 tg Exp $
+------------------------------------------------------------------
Joe commands grouped by function
turn on marking mode. Otherwise set markb to cursor and
turn on marking mode.
-select Set markb. If it was already set, do nothing.
+select Set markb. If it was already set, do nothing.
filt Filter block or file through a unix command
markb Set beginning of block mark
markk Set end of block mark
eop Move cursor to end of paragraph
fwrdc Search forward for matching character
gomark Move cursor to a bookmark
-home Move cursor to beginning of line
+home Move cursor to beginning of line ("smart")
line Move cursor to specified line
ltarw Move cursor left
nedge Move cursor to next edge
retype Refresh screen
shell Suspend process or execute a sub-shell
stat Display cursor position
+sync Call sync(2)
tag Tags file search
txt Insert text
#!/bin/mksh
-# $MirOS: contrib/code/jupp/Make-w32.sh,v 1.22 2017/12/16 22:05:25 tg Exp $
+# $MirOS: contrib/code/jupp/Make-w32.sh,v 1.23 2018/02/01 02:26:45 tg Exp $
usage() {
print -ru2 "Usage: $0 [-bCgn]"
print -r -- "$line"
fi
done >setup.inf
-sed -bi "/^setup.inf=1,,/s/^.*\$/$(stat -c '%n=1,,%s\r' setup.inf)/" setup.inf
-sed -bi "/^setup.inf=1,,/s/^.*\$/$(stat -c '%n=1,,%s\r' setup.inf)/" setup.inf
+sz=$(stat -c '%n=1,,%s\r' setup.inf)
+sed -bi "/^setup.inf=1,,/s/^.*\$/$sz/" setup.inf
+sz=$(stat -c '%n=1,,%s\r' setup.inf)
+sed -bi "/^setup.inf=1,,/s/^.*\$/$sz/" setup.inf
+if [[ $sz != "$(stat -c '%n=1,,%s\r' setup.inf)" ]]; then
+ print -rnu2 "Size of SETUP.INF destabilises between $sz and "
+ stat -c '%n=1,,%s\r' setup.inf
+ exit 1
+fi
chmod 444 *
cd ..
zip -D -X -9 -k ../JWIN31$jWIN.ZIP $jtop/*
-$MirOS: contrib/code/jupp/NEWS,v 1.112 2017/12/16 22:18:51 tg Exp $
+$MirOS: contrib/code/jupp/NEWS,v 1.119 2018/02/13 20:04:11 tg Exp $
-------------------------------------------------------------------
jupp-current
- …
+JOE 3.1jupp33
+
+- Fix several issues pointed out by Coverity Scan
+ * dead code
+ * use-after-free (minor)
+ * uninitialised variables (no relevance)
+ * TOCTOU in DEADJOE writing (major)
+ * nil pointer deref (no to minor relevance)
+ * infinite loop (indeed, but no practical relevance)
+ * failure to restore non-local value (minor, unpractical)
+ * memory leaks (minor)
+ * fd leaks (minor)
+ * some Coverity boilerplate
+- Constify and clean up code further
+- Allow *any* char for {to,rv}match (goto next same in given direction)
+- Fix regression: `` did no longer insert a sole ` (etc.)
+- Improved shebang and diff recognition of syntax highlighting file types
+- Render instruction to show online help as BLINKING BOLD so it stands out
+- Let screen scroll back to the left on ^QL, ^B, ^KD, while in hex mode
+- Slightly safer saving of backup files, using fsync(2) if existent
+- Add new command “sync”
+- (crb3) Add ^QV to jupprc; add WordStar documentation references;
+ (tg) Rename ^[! to ^[! to match ^K'; (crb3) Add ^[@ and ^[!
+- jupprc: Fix eolmenu; replace bol with home for smarthome users;
+ switch ^[? to show macros (matches WS), query moves to ^[/ (which was
+ unused); ^U can abort menu and prompt (matches WS)
+- Sync improvements across rc files
+- Remove obsolete GNU autoconf check
+
JOE 3.1jupp32
- Harmonise help rendering in jupprc (also for 2.8, 3.7, (NEW) 4.4)
The SHELL environment variable is not set or exported (Cygwin has this
problem). Put:
- export SHELL=/bin/bash
- or setenv SHELL /bin/bash
+ export SHELL=/bin/mksh
+ or setenv SHELL /bin/csh
In you .profile or .cshrc file and send mail to the Cygwin mailing list
so that they fix this problem.
These options can also be set in the joerc file. The NOXON, LINES,
COLUMNS, DOPADDING and BAUD options can also be set with environment
-variables.
+variables. The rc files shipped except jupprc also contain documentation
+and examples for the options.
The JOETERM environment variable can be set to override the TERM
environment variable.
Termcap is better than terminfo because it is a more open standard.
Programs can directly access the termcap database and future versions of
terminfo may require programs to use curses. The only argument in
-terminfo's favor is that it is faster than termcap. To fix this problem,
+terminfo's favour is that it is faster than termcap. To fix this problem,
JOE will use a termcap index file if it exists and if it is up to date.
This is the procedure to make the termcap index file:
setenv JOETERM fansi
-If you use sh, ksh or bash, place this in your .profile file:
+If you use mksh, ksh, sh or GNU bash, place this in your .profile file:
JOETERM=fansi; export JOETERM
TERMINFO=$HOME/.info; export TERMINFO
- if you use bash, sh or ksh)
+ if you use mksh, ksh, sh or GNU bash)
4) tic joe/terminfo
joe filename </dev/tty >/dev/tty
___________________________________________________________________
-$MirOS: contrib/code/jupp/README,v 1.6 2017/01/11 22:04:31 tg Exp $
+$MirOS: contrib/code/jupp/README,v 1.7 2018/02/01 02:33:44 tg Exp $
└───────────┘
• replace all int with size_t where applicable
+• default utf8.c:locale_map to utf-8 when applicable (configure-time
+ option perhaps? Android definitely, Cygwin definitely not…)
• merge syntax handling code from joe-3.7+
• merge math from joe-3.7+
• make -Wcast-qual clean
with a / somewhere (file_prompt in joe 4.4 wmkpw)
• bracketed paste mode should disable autoindent, wordwrap,
updating the status line, …(?) ⇐ implemented using a “paste”
- labeled ftype that is switched to using the UI (command)
+ labeled ftype (including using not the help cards for indication)
• switch from autoconf to mirtoconf2
• ANSI syntax highlighting; auto-turn it on in shell windows (‽)
⇒ would need to hide the ANSI chars, yet enable backspacing
-• handle combining characters in the scrn array somehow
+• redraw a line if it has been scrolled and had combining
+ characters in it before — actually, scrap that; make that:
+ handle Unicode combining characters, *at all* (in the scrn array)
• add a soft line break flag: display as line-wrapped, do not
save any newlines introduced by that
• perhaps wrap at U+00AD?
-• put all configuration files into /usr/share; use XDG dirs for
- overriding (HOME, maybe site?)
+• have an mdoc(7) page actually describing its keybindings
+• put all “configuration” into /usr/share/ and have them
+ (all, not just *rc) overridable from the user’s home; use XDG dirs
+ while at it maybe? and replace autoconf with mirtoconf, and use
+ serial numbers for versions (jupp-26 follows joe-3.1jupp25)
+• do charset conversion and support more charsets, both SBCS and
+ Unicode (UTF-{16,32}{BE,LE} for example) sponsored by ⮡ tarent
• plug memory leaks (Valgrind reports a few)
+• fix Coverity-pointed-out issues
+• fixup some joe4.4 jupprc ftypes
• …
__________________________________________________________________
-$MirOS: contrib/code/jupp/TODO,v 1.44 2017/12/07 00:05:08 tg Exp $
+$MirOS: contrib/code/jupp/TODO,v 1.48 2018/01/07 20:32:45 tg Exp $
-dnl $MirOS: contrib/code/jupp/acinclude.m4,v 1.3 2008/05/13 13:08:20 tg Exp $
-dnl
-dnl ------------------
-dnl Check for properly working isblank()
-dnl ------------------
-AC_DEFUN([joe_ISBLANK],
- [AC_CACHE_CHECK([whether isblank() works correctly with side effect expressions],
- [joe_cv_isblank],
- [AC_TRY_RUN([
-#include <ctype.h>
-int main() {
- int a = 0;
- isblank(a++);
- exit(a != 1);
-}
- ],
- [joe_cv_isblank=yes],
- [joe_cv_isblank=no],
- [joe_cv_isblank=no])
- ])
- if test "$joe_cv_isblank" = yes; then
- AC_DEFINE([HAVE_WORKING_ISBLANK], 1, [Define if isblank() works with expressions with side effects])
- fi
-])
+dnl $MirOS: contrib/code/jupp/acinclude.m4,v 1.4 2018/02/01 02:36:51 tg Exp $
dnl ------------------
dnl Check if setpgrp must have two arguments
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
+/* Define to 1 if you have the `fsync' function. */
+#undef HAVE_FSYNC
+
/* Define if GCC has Anil's bounds checker */
#undef HAVE_GCC_ATTRIBUTE_BOUNDED
/* Define to 1 if you have the `isatty' function. */
#undef HAVE_ISATTY
-/* Define to 1 if you have the `isblank' function. */
-#undef HAVE_ISBLANK
-
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
+/* Define to 1 if you have the `sync' function. */
+#undef HAVE_SYNC
+
/* We have <termio.h> and <sys/termio.h> */
#undef HAVE_SYSV_TERMIO
/* Define to 1 if you have the <utmp.h> header file. */
#undef HAVE_UTMP_H
-/* Define if isblank() works with expressions with side effects */
-#undef HAVE_WORKING_ISBLANK
-
/* Unix absolute paths base */
#undef JOERC
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/b.c,v 1.28 2017/12/08 02:28:04 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/b.c,v 1.35 2018/01/08 02:01:18 tg Exp $");
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <limits.h>
#include <pwd.h>
#include <errno.h>
#include <stdlib.h>
VFILE *vmem;
const unsigned char *msgs[] = {
- US "No error",
- US "New File",
- US "Error reading file",
- US "Error seeking file",
- US "Error opening file",
- US "Error writing file",
- US "File on disk is newer"
+ UC "No error",
+ UC "New File",
+ UC "Error reading file",
+ UC "Error seeking file",
+ UC "Error opening file",
+ UC "Error writing file",
+ UC "File on disk is newer"
};
/* Get size of gap (amount of free space) */
}
/* Insert a block */
-static void ginsm(H *hdr, unsigned char *ptr, int ofst, unsigned char *blk, int size)
+static void ginsm(H *hdr, unsigned char *ptr, int ofst, const unsigned char *blk, int size)
{
if (ofst != hdr->hole)
gstgap(hdr, ptr, ofst);
c = d == NO_MORE_DATA ? 0x1000FFFF : 0x1000FFFE;
wid = 1;
} else if (val)
- wid = joe_wcwidth(1,c);
+ wid = joe_wcwidth(c);
} else {
wid = 1;
}
if (val && c!='\t' && c!='\n') {
p->valcol = 1;
- p->col -= joe_wcwidth(1,d);
+ p->col -= joe_wcwidth(d);
}
return d;
if (c == '\t')
wid = p->b->o.tab - p->col % p->b->o.tab;
else
- wid = joe_wcwidth(1,c);
+ wid = joe_wcwidth(c);
if (p->col + wid > goalcol)
break;
}
/* Make a chain out of a block of memory (the block must not be empty) */
-static H *bldchn(unsigned char *blk, int size, long *nlines)
+static H *bldchn(const unsigned char *blk, int size, long *nlines)
{
H anchor, *l;
}
/* insert memory block 'blk' at 'p' */
-P *binsm(P *p, unsigned char *blk, int amnt)
+P *binsm(P *p, const unsigned char *blk, int amnt)
{
long nlines;
H *h = NULL;
P *binsbyte(P *p, unsigned char c)
{
if (p->b->o.crlf && c == '\n')
- return binsm(p, US "\r\n", 2);
+ return binsm(p, UC "\r\n", 2);
else
return binsm(p, &c, 1);
}
} else {
unsigned char ch = c;
if (p->b->o.crlf && c == '\n')
- return binsm(p, US "\r\n", 2);
+ return binsm(p, UC "\r\n", 2);
else
return binsm(p, &ch, 1);
}
*
* Returns new variable length string.
*/
-unsigned char *parsens(unsigned char *s, long int *skip, long int *amnt)
+unsigned char *
+parsens(const unsigned char *s, long int *skip, long int *amnt)
{
unsigned char *n = vsncpy(NULL, 0, sz(s));
size_t x;
* -3 for seek error
* -4 for open error
*/
-B *bload(unsigned char *s)
+B *
+bload(const unsigned char *s)
{
unsigned char buffer[SEGSIZ];
FILE *fi;
if (!s || !s[0]) {
error = -1;
b = bmk(NULL);
- setopt(b,US "");
+ setopt(b, UC "");
b->rdonly = b->o.readonly;
b->er = error;
return b;
n = parsens(s, &skip, &amnt);
/* Open file or stream */
- if (n[0] == '!') {
+ if (s[0] == '!') {
nescape(maint->t);
ttclsn();
fi = popen((char *)(n + 1), "r");
error = -1;
else
error = -4;
- b = bmk(NULL);
- setopt(b,n);
- b->rdonly = b->o.readonly;
goto opnerr;
}
fclose(fi);
opnerr:
+ if (!b) {
+ /* error case */
+ b = bmk(NULL);
+ setopt(b,n);
+ b->rdonly = b->o.readonly;
+ }
+
if (s[0] == '!') {
ttopnn();
nreturn(maint->t);
}
/* Find already loaded buffer or load file into new buffer */
-B *bfind(unsigned char *s)
+B *
+bfind(const unsigned char *s)
{
B *b;
if (!s || !s[0]) {
error = -1;
b = bmk(NULL);
- setopt(b,US "");
+ setopt(b, UC "");
b->rdonly = b->o.readonly;
b->internal = 0;
b->er = error;
}
/* Find already loaded buffer or load file into new buffer */
-B *bfind_scratch(unsigned char *s)
+B *
+bfind_scratch(const unsigned char *s)
{
B *b;
if (!s || !s[0]) {
error = -1;
b = bmk(NULL);
- setopt(b,US "");
+ setopt(b, UC "");
b->rdonly = b->o.readonly;
b->internal = 0;
b->er = error;
return b;
}
-B *bfind_reload(unsigned char *s)
+B *
+bfind_reload(const unsigned char *s)
{
B *b;
b = bload(s);
return b;
}
-B *bcheck_loaded(unsigned char *s)
+B *
+bcheck_loaded(const unsigned char *s)
{
B *b;
/* Save edit buffers when editor dies */
-RETSIGTYPE ttsig(int sig)
+RETSIGTYPE
+ttsig(int sig)
+{
+ ttabrt(sig, NULL);
+ _exit(1);
+}
+
+void
+ttabrt(int sig, const char *msg)
{
time_t tim = time(NULL);
B *b;
int tmpfd;
struct stat sbuf;
+ if (msg) {
+ fprintf(stderr, "\r\n*** Aborting JOE because: %s ***\r\n", msg);
+ fflush(stderr);
+ }
+
if ((tmpfd = open("DEADJOE", O_RDWR | O_EXCL | O_CREAT, 0600)) < 0) {
+ struct stat cbuf;
+
if (lstat("DEADJOE", &sbuf) < 0)
_exit(-1);
if (!S_ISREG(sbuf.st_mode) || sbuf.st_uid != geteuid())
_exit(-1);
- /*
- A race condition still exists between the lstat() and the open()
- systemcall, which leads to a possible denial-of-service attack
- by setting the file access mode to 600 for every file the
- user executing joe has permissions to.
- This can't be fixed w/o breacking the behavior of the orig. joe!
- */
if ((tmpfd = open("DEADJOE", O_RDWR | O_APPEND)) < 0)
_exit(-1);
+ /* https://stackoverflow.com/a/2917482/2171120 */
+ if (fstat(tmpfd, &cbuf) < 0 ||
+ cbuf.st_dev != sbuf.st_dev || cbuf.st_ino != sbuf.st_ino)
+ _exit(-1);
if (fchmod(tmpfd, S_IRUSR | S_IWUSR) < 0)
_exit(-1);
}
_exit(-1);
fprintf(f, "\n*** Modified files in JOE when it aborted on %s", ctime(&tim));
- if (sig)
+ if (msg)
+ fprintf(f, "*** JOE was aborted: %s\n", msg);
+ else if (sig)
fprintf(f, "*** JOE was aborted by signal %d\n", sig);
else
fprintf(f, "*** JOE was aborted because the terminal closed\n");
fflush(f);
bsavefd(b->bof, fileno(f), b->eof->byte);
}
+ fclose(f);
if (sig)
ttclsn();
- _exit(1);
}
#define _JOE_B_H 1
#ifdef EXTERN
-__IDSTRING(rcsid_b_h, "$MirOS: contrib/code/jupp/b.h,v 1.9 2017/12/07 00:35:13 tg Exp $");
+__IDSTRING(rcsid_b_h, "$MirOS: contrib/code/jupp/b.h,v 1.10 2018/01/06 00:28:30 tg Exp $");
#endif
extern unsigned char stdbuf[stdsiz];
B *bmk(B *prop);
void brm(B *b);
-B *bfind(unsigned char *s);
-B *bfind_scratch(unsigned char *s);
-B *bcheck_loaded(unsigned char *s);
-B *bfind_reload(unsigned char *s);
+B *bfind(const unsigned char *s);
+B *bfind_scratch(const unsigned char *s);
+B *bcheck_loaded(const unsigned char *s);
+B *bfind_reload(const unsigned char *s);
P *pdup(P *p);
P *pdupown(P *p, P **o);
/* insert buffer 'b' into another at 'p' */
P *binsb(P *p, B *b);
/* insert a block 'blk' of size 'amnt' into buffer at 'p' */
-P *binsm(P *p, unsigned char *blk, int amnt);
+P *binsm(P *p, const unsigned char *blk, int amnt);
/* insert character 'c' into buffer at 'p' */
P *binsc(P *p, int c);
* -3 for seek error
* -4 for open error
*/
-B *bload(unsigned char *s);
+B *bload(const unsigned char *s);
B *bread(int fi, long int max);
B *borphan(void);
int bsave(P *p, unsigned char *s, long int size,int flag);
int bsavefd(P *p, int fd, long int size);
-unsigned char *parsens(unsigned char *s, long int *skip, long int *amnt);
+unsigned char *parsens(const unsigned char *s, long int *skip, long int *amnt);
/* Get byte at pointer or return NO_MORE_DATA if pointer is at end of buffer */
int brc(P *p);
*/
#include "config.h"
-__RCSID("$MirOS: contrib/code/jupp/blocks.c,v 1.6 2017/12/02 02:07:23 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/blocks.c,v 1.8 2018/01/06 00:28:30 tg Exp $");
/* This module requires ALIGNED and SIZEOF_INT to be defined correctly */
# define SHFT 3
#elif SIZEOF_INT == 4
# define SHFT 2
-#elif SIZEOF_INT == 2
-# define SHFT 1
#endif
/* Set 'sz' 'int's beginning at 'd' to the value 'c' */
} else {
unsigned z = SIZEOF_INT - ((unsigned long)d & (SIZEOF_INT - 1));
- if (z != SIZEOF_INT) {
- switch (z) {
- case 7: d[6] = c; /* FALLTHROUGH */
- case 6: d[5] = c; /* FALLTHROUGH */
- case 5: d[4] = c; /* FALLTHROUGH */
- case 4: d[3] = c; /* FALLTHROUGH */
- case 3: d[2] = c; /* FALLTHROUGH */
- case 2: d[1] = c; /* FALLTHROUGH */
- case 1: d[0] = c; /* FALLTHROUGH */
- case 0: /* do nothing */;
- }
+ switch (z) {
+ case SIZEOF_INT: break;
+#if SIZEOF_INT >= 8
+ case 7: d[6] = c; /* FALLTHROUGH */
+ case 6: d[5] = c; /* FALLTHROUGH */
+ case 5: d[4] = c; /* FALLTHROUGH */
+ case 4: d[3] = c; /* FALLTHROUGH */
+#endif
+ case 3: d[2] = c; /* FALLTHROUGH */
+ case 2: d[1] = c; /* FALLTHROUGH */
+ case 1: d[0] = c; /* FALLTHROUGH */
+ case 0:
d += z;
sz -= z;
+ break;
}
msetI(d,
#if SIZEOF_INT >= 8
c, sz >> SHFT);
d += sz & ~(SIZEOF_INT - 1);
switch (sz & (SIZEOF_INT - 1)) {
+#if SIZEOF_INT >= 8
case 7: d[6] = c; /* FALLTHROUGH */
case 6: d[5] = c; /* FALLTHROUGH */
case 5: d[4] = c; /* FALLTHROUGH */
case 4: d[3] = c; /* FALLTHROUGH */
+#endif
case 3: d[2] = c; /* FALLTHROUGH */
case 2: d[1] = c; /* FALLTHROUGH */
case 1: d[0] = c; /* FALLTHROUGH */
s -= z;
d -= z;
switch (z) {
+#if SIZEOF_INT >= 8
case 7: d[6] = s[6]; /* FALLTHROUGH */
case 6: d[5] = s[5]; /* FALLTHROUGH */
case 5: d[4] = s[4]; /* FALLTHROUGH */
case 4: d[3] = s[3]; /* FALLTHROUGH */
+#endif
case 3: d[2] = s[2]; /* FALLTHROUGH */
case 2: d[1] = s[1]; /* FALLTHROUGH */
case 1: d[0] = s[0]; /* FALLTHROUGH */
d -= sz;
s -= sz;
switch (sz & (SIZEOF_INT - 1)) {
+#if SIZEOF_INT >= 8
case 7: d[6] = s[6]; /* FALLTHROUGH */
case 6: d[5] = s[5]; /* FALLTHROUGH */
case 5: d[4] = s[4]; /* FALLTHROUGH */
case 4: d[3] = s[3]; /* FALLTHROUGH */
+#endif
case 3: d[2] = s[2]; /* FALLTHROUGH */
case 2: d[1] = s[1]; /* FALLTHROUGH */
case 1: d[0] = s[0]; /* FALLTHROUGH */
case 2: d[6] = s[6]; /* FALLTHROUGH */
case 1: d[7] = s[7]; /* FALLTHROUGH */
case 0: /* do nothing */;
-#else
-#if SIZEOF_INT == 4
+#elif SIZEOF_INT == 4
case 3: d[1] = s[1]; /* FALLTHROUGH */
case 2: d[2] = s[2]; /* FALLTHROUGH */
case 1: d[3] = s[3]; /* FALLTHROUGH */
case 0: /* do nothing */;
-#else
-#if SIZEOF_INT == 2
- case 1: d[1] = s[1]; /* FALLTHROUGH */
- case 0: /* do nothing */;
-#endif
-#endif
#endif
}
s += SIZEOF_INT;
case 2: d[5] = s[5]; /* FALLTHROUGH */
case 1: d[6] = s[6]; /* FALLTHROUGH */
case 0: /* do nothing */;
-#else
-#if SIZEOF_INT == 4
+#elif SIZEOF_INT == 4
case 3: d[0] = s[0]; /* FALLTHROUGH */
case 2: d[1] = s[1]; /* FALLTHROUGH */
case 1: d[2] = s[2]; /* FALLTHROUGH */
case 0: /* do nothing */;
-#else
-#if SIZEOF_INT == 2
- case 1: d[0] = s[0]; /* FALLTHROUGH */
- case 0: /* do nothing */;
-#endif
-#endif
#endif
}
} else {
/* Utility to count number of lines within a segment */
-int mcnt(register unsigned char *blk, register unsigned char c, int size)
+int mcnt(register const unsigned char *blk, register unsigned char c, int size)
{
register int nlines = 0;
#define _JOE_BLOCKS_H 1
#ifdef EXTERN_B_C
-__IDSTRING(rcsid_blocks_h, "$MirOS: contrib/code/jupp/blocks.h,v 1.7 2017/12/06 21:16:54 tg Exp $");
+__IDSTRING(rcsid_blocks_h, "$MirOS: contrib/code/jupp/blocks.h,v 1.8 2018/01/06 00:28:30 tg Exp $");
#endif
/* char *mmove(char *d,char *s,int sz); Copy 'sz' bytes from 's' to 'd'.
*
* Count the number of occurances a character appears in a block
*/
-int mcnt(unsigned char *blk, unsigned char c, int size);
+int mcnt(const unsigned char *blk, unsigned char c, int size);
#endif
#include "config.h"
-__RCSID("$MirOS: contrib/code/jupp/builtin.c,v 1.8 2017/12/08 02:00:38 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/builtin.c,v 1.10 2018/01/08 00:48:06 tg Exp $");
#include <stdlib.h>
#include <string.h>
return rtn;
}
-unsigned char *jfgets(unsigned char *buf,int len,JFILE *f)
+/*XXX fails to honour len (= 1024, in practice) for builtins */
+unsigned char *
+jfgets(unsigned char *buf, int len, JFILE *f)
{
if (f->f)
return (unsigned char *)fgets((char *)buf, len, f->f);
#ifdef EXTERN_RC_C
-__IDSTRING(rcsid_builtin_h, "$MirOS: contrib/code/jupp/builtin.h,v 1.5 2017/12/06 23:02:01 tg Exp $");
+__IDSTRING(rcsid_builtin_h, "$MirOS: contrib/code/jupp/builtin.h,v 1.6 2018/01/08 00:08:18 tg Exp $");
#endif
/* Support for built-in config files */
typedef struct jfile {
FILE *f; /* Regular file, or NULL for built-in */
- unsigned char *p; /* Built-in file pointer */
+ const unsigned char *p; /* Built-in file pointer */
} JFILE;
JFILE *jfopen(const unsigned char *name, const char *mode);
unsigned char *jfgets(unsigned char *buf,int len,JFILE *f);
int jfclose(JFILE *f);
-extern unsigned char *builtins[];
+extern const unsigned char * const builtins[];
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/builtins.c,v 1.27 2017/12/16 22:18:52 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/builtins.c,v 1.29 2018/02/13 20:09:04 tg Exp $");
#ifndef JUPPRC_BUILTIN_NAME
#define JUPPRC_BUILTIN_NAME "jupprc"
#endif
const unsigned char * const builtins[] = {
- US JUPPRC_BUILTIN_NAME, US
+ UC JUPPRC_BUILTIN_NAME, UC
"-assume_color\n"
"-dopadding\n"
"--force\n"
"-pg 2\n"
"-lmsg \\i%k%T%*\\b%n\\b%R\n"
"-rmsg R%r<%l C%c\\u%o|%O\\i\\b%a|%A\\b\\i\\u %u\n"
- "-hmsg ^J = Help\n"
+ "-hmsg \\i\\f\\b^J = Help\\b\\f\n"
"-guess_crlf\n"
"-french\n"
"-indentc 9\n"
"-spaces\n"
"\n"
"*\n"
- "+#!\\+\\[ ]\\+\\[a-z/]/python\n"
+ "+#!\\+\\[ ]\\+\\[/a-z0-9._-]/python\n"
"-encoding utf8\n"
"-tab 4\n"
"-indentc 32\n"
"-spaces\n"
"\n"
"*\n"
- "+#!\\+\\[ ]\\+\\[a-z/]/env\\+\\[ ]python\n"
+ "+#!\\+\\[ ]\\+\\[/a-z0-9._-]/env\\[ ]\\+\\[ ]python\n"
"-encoding utf8\n"
"-tab 4\n"
"-indentc 32\n"
"\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
"\\i \\i\\u\\bMACROS\\b\\u \\u\\bMISC\\b\\u \\u\\bSCROLL\\b\\u \\u\\bSHELL\\b\\u \\u\\bGOTO\\b\\u \\u\\bI-SEARCH\\b\\u \\i \\i\n"
"\\i \\i^[( record ^Q? status ^Q. right ^K' window ^QB to ^KB ^[R backwards \\i \\i\n"
- "\\i \\i^[) stop ^QQ repeat ^Q, left ^[! command ^QK to ^KK ^[S forwards \\i \\i\n"
- "\\i \\i^[? query ^QM math \\u\\bCharSEARCH\\b\\u \\u\\bQUOTE\\b\\u \\u\\bDELETE\\b\\u \\u\\bBOOKMARKS\\b\\u \\i \\i\n"
- "\\i \\i^[D dump ^[H message ^QH forwrd ` Ctrl- ^[Y yank ^K 0-9 define \\i \\i\n"
+ "\\i \\i^[) stop ^QQ repeat ^Q, left ^[' command ^QK to ^KK ^[S forwards \\i \\i\n"
+ "\\i \\i^[/ query ^QM math \\u\\bCharSEARCH\\b\\u \\u\\bQUOTE\\b\\u \\u\\bDELETE\\b\\u \\u\\bBOOKMARKS\\b\\u \\i \\i\n"
+ "\\i \\i^[? lst def ^[H message ^QH forwrd ` Ctrl- ^[Y yank ^K 0-9 define \\i \\i\n"
"\\i \\i^[ 0-9 play ^N play #0 ^QG backwd ^P Meta- ^[O word< ^Q 0-9 goto \\i \\i\n"
"\\i \\i \\u\\bIn math mode,\\b\\u use 0xCAFE for hex. All ops are floating point internally. \\i \\i\n"
"\\i \\i \\u\\bPredefined variables:\\b\\u byte col height line lines top width \\i \\i\n"
"\n"
"{Programs\n"
"\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
- "\\i \\i\\u\\bGOTO\\b\\u \\u\\bCOMPILING\\b\\u \\u\\bSLIDING\\b\\u \\i \\i\n"
+ "\\i \\i\\u\\bGOTO\\b\\u ^QV start of last search \\u\\bCOMPILING\\b\\u \\u\\bSLIDING\\b\\u \\i \\i\n"
"\\i \\i^Q= next merge conflict marker ^[C compile & parse errors ^W up \\i \\i\n"
"\\i \\i^Q] next matching brace ^[E parse errors ^Z down \\i \\i\n"
"\\i \\i^Q[ previous \" \" \\u\\bINDENT\\b\\u ^KF save, compile & upload to NXT brick \\i \\i\n"
"\\i \\i go to \\uhttp://sf.net/projects/joe-editor/\\u for upstream bug reports. JUPP 2.8 \\i \\i\n"
"\\i \\i for DOS compiled by A. Totlis, packed with LHarc 2.13; JUPP 3.x for UNIX\\d(R)\\d \\i \\i\n"
"\\i \\i at \\uhttp://mirbsd.de/jupp\\u and by \\bThorsten \"\\dmirabilos\\d\" Glaser <\\utg@mirbsd.org\\u>\\b \\i \\i\n"
- "\\i \\i @(#) blt_in 2017-12-06; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \\i \\i\n"
+ "\\i \\i @(#) blt_in 2018-02-01; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \\i \\i\n"
"}\n"
"\n"
"{CharTable\n"
"arg ^Q ^Q\n"
"arg ^Q q\n"
"arg ^[ q q\n"
+ "explode .k6\n"
"explode ^K I\n"
"explode ^K ^I\n"
"explode ^K i\n"
"explode ^[ [ 1 7 ~\n"
- "explode .k6\n"
+ "help .k1\n"
"help ^J\n"
"help ^[ [ 1 1 ~\n"
- "help .k1\n"
"hnext ^[ .\n"
"hprev ^[ ,\n"
"math ^Q M\n"
"mathres ^[ =\n"
"msg ^[ H\n"
"msg ^[ h\n"
+ "nextw .k8\n"
"nextw ^K N\n"
"nextw ^K ^N\n"
"nextw ^K n\n"
"nextw ^[ [ 1 9 ~\n"
- "nextw .k8\n"
"play ^[ 0 TO 9\n"
+ "prevw .k7\n"
"prevw ^K P\n"
"prevw ^K ^P\n"
"prevw ^K p\n"
"prevw ^[ [ 1 8 ~\n"
- "prevw .k7\n"
- "query ^[ ?\n"
+ "query ^[ /\n"
"quote `\n"
"quote8 ^P\n"
"record ^[ (\n"
"\n"
":main\n"
":inherit windows\n"
+ ":def dosrch setmark,\":\",ffirst\n"
+ ":def dorepl setmark,\":\",qrepl\n"
":def pastemain helpcard,\"Paste\",rtn,keymap,\"Paste\",rtn\n"
- ":def conflictmarker ffirst,\"\\\\^\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[ \\\\n]\",rtn,rtn,ltarw\n"
+ ":def conflictmarker dosrch,\"\\\\^\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[ \\\\n]\",rtn,rtn,ltarw\n"
":def fixwhitespace eof,\" \",bof,\"a\",qrepl,\"\\\\[\",quote,\"i\",quote,\"k\",quote,\"l\",quote,\"m ]\\\\+\\\\[\",quote,\"i\",quote,\"k\",quote,\"l\",quote,\"m ]\\\\$\",rtn,rtn,rtn,\"r\",eof,rtn,ffirst,\"\\\\^\\\\[^\\\\n]\",rtn,\"b\",rtn,eol,markb,bof,delch,eof,markk,blkdel,ffirst,\"\\\\?\",rtn,\"b\",rtn,eol,rtn\n"
":def freedroidz splitw,prevw,scratch,\"nbc-Output\",rtn,nextw,save,markk,bol,markb,prevw,prevw,blkcpy,nextw,nextw,rtn,prevw,eol,\"'\",bol,qrepl,\"'\",rtn,rtn,\"'\\\\\\\\''\",rtn,\"r\",backs,backs,backs,bol,\"LC_ALL=C; export LC_ALL; fn='\",eol,\"; p=--posix; sed $p -e q </dev/null >/dev/null 2>&1 || p=; r=$(sed $p -e 's\ 1[^^]\ 1[&]\ 1g; s\ 1\\\\^\ 1\\\\\\\\^\ 1g' <<EOF\",rtn,\"$fn\",rtn,\"EOF\",rtn,\"); (case $fn in *.nxc) ;; *) echo '==> Error: filename not *.nxc'; exit ;; esac; echo \\\"Compiling $fn\\\"; nbc -sm- -d \\\"$fn\\\" 2>&1; x=$?; if test $x = 0; then echo '==> OK'; else echo '==> Error code:' $x; fi) | tr '\\\\n' '\ 1' | sed $p -e 's!\ 1# *\\\\([^\ 1]*\\\\)\ 1File \\\"[^\\\"]*/\\\\('\\\"$r\\\"'\\\\)\\\" ; line \\\\([0-9]*\\\\)\ 1!\ 1\\\\2:\\\\3: \\\\1\ 1!g' -e 's!\ 1#\\\\([^\ 1]*\\\\)\ 1File \\\"\\\\([^\\\"]*\\\\)\\\" ; line \\\\([0-9]*\\\\)\ 1!\ 1\\\\2:\\\\3: \\\\1\ 1!g' | tr '\ 1' '\\\\n'\",rtn,nmark,filt,\"sh\",rtn,rtn,\"Press ^KQ to close this window!\",rtn,parserr\n"
":def docompile edit,rtn,filt,query,parserr\n"
+ ":def filtall nmark,filt,uparw\n"
+ ":def pvsrch prevpos,gomark,\":\"\n"
+ ":def inscurdate insf,\"!date '+%Y-%m-%d'\",rtn,eol,delch\n"
+ ":def inscurtime insf,\"!date '+%H:%M:%S'\",rtn,eol,delch\n"
"begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A\n"
"begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B\n"
"begin_marking,rtarw,toggle_marking ^[ [ 1 ; 2 C\n"
"pastemain ^[ p\n"
"pastemain ^[ [ 2 0 0 ~\n"
"nop ^[ [ 2 0 1 ~\n"
- "fixwhitespace ^K ]\n"
- "conflictmarker ^Q =\n"
"backs ^?\n"
"backs ^H\n"
"backw ^[ o\n"
"bof ^Q r\n"
"bof ^[ [ 1 ; 5 H\n"
"bof ^[ q r\n"
- "bol .kh\n"
- "bol ^Q S\n"
- "bol ^Q ^S\n"
- "bol ^Q s\n"
- "bol ^[ [ 1 ~\n"
- "bol ^[ [ 7 ~\n"
- "bol ^[ [ H\n"
- "bol ^[ q s\n"
+ "home .kh\n"
+ "home ^Q S\n"
+ "home ^Q ^S\n"
+ "home ^Q s\n"
+ "home ^[ [ 1 ~\n"
+ "home ^[ [ 7 ~\n"
+ "home ^[ [ H\n"
+ "home ^[ q s\n"
"bos ^Q X\n"
"bos ^Q ^X\n"
"bos ^Q x\n"
"center ^K ^A\n"
"center ^K a\n"
"col ^Q -\n"
+ "col ^[ q -\n"
+ "conflictmarker ^Q =\n"
+ "conflictmarker ^[ q =\n"
"crawll ^Q ,\n"
"crawll ^[ q ,\n"
"crawlr ^Q .\n"
"exsave ^K X\n"
"exsave ^K ^X\n"
"exsave ^K x\n"
- "ffirst ^Q F\n"
- "ffirst ^Q ^F\n"
- "ffirst ^Q f\n"
- "ffirst ^[ q f\n"
+ "dosrch ^Q F\n"
+ "dosrch ^Q ^F\n"
+ "dosrch ^Q f\n"
+ "dosrch ^[ q f\n"
"filt ^K /\n"
- "nmark,filt,uparw ^[ [ 2 0 ~\n"
+ "filtall .k9\n"
+ "filtall ^[ [ 2 0 ~\n"
+ "fixwhitespace ^K ]\n"
"fmtblk ^K D\n"
"fmtblk ^K ^D\n"
"fmtblk ^K d\n"
+ "format ^B\n"
"fnext .k3\n"
"fnext ^L\n"
"fnext ^[ [ 1 3 ~\n"
- "format ^B\n"
+ "freedroidz ^K F\n"
+ "freedroidz ^K ^F\n"
+ "freedroidz ^K f\n"
"fwrdc ^Q H ^@ TO \xFF\n"
"fwrdc ^Q ^H ^@ TO \xFF\n"
"fwrdc ^Q h ^@ TO \xFF\n"
"groww ^K G\n"
"groww ^K ^G\n"
"groww ^K g\n"
+ "inscurdate ^[ @\n"
+ "inscurtime ^[ !\n"
"insf ^K R\n"
"insf ^K ^R\n"
"insf ^K r\n"
"ltarw ^[ O D\n"
"ltarw ^[ [ D\n"
"ltarw ^[ s\n"
- "macros ^[ D\n"
- "macros ^[ d\n"
+ "macros ^[ ?\n"
"markb ^K B\n"
"markb ^K ^B\n"
"markb ^K b\n"
"mode ^O\n"
"mode,\"T\" .kI\n"
"mode,\"T\" ^V\n"
+ "mode,\"T\" ^[ [ 2 ~\n"
+ "mode,\"T\" ^[ [ L\n"
"nextpos ^K =\n"
"nextword ^F\n"
"nextword ^[ [ 1 ; 5 C\n"
"docompile ^[ c\n"
"parserr ^[ E\n"
"parserr ^[ e\n"
- "freedroidz ^K F\n"
- "freedroidz ^K ^F\n"
- "freedroidz ^K f\n"
"pgdn .kN\n"
"pgdn ^C\n"
"pgdn ^[ [ 6 ~\n"
+ "pgdn ^[ [ G\n"
"pgup .kP\n"
"pgup ^R\n"
"pgup ^[ [ 5 ~\n"
+ "pgup ^[ [ I\n"
"play,\"0\" ^N\n"
"prevpos ^Q P\n"
"prevpos ^Q ^P\n"
"prevword ^[ [ 1 ; 5 D\n"
"prverr ^[ N\n"
"prverr ^[ n\n"
- "qrepl ^Q A\n"
- "qrepl ^Q ^A\n"
- "qrepl ^Q a\n"
- "qrepl ^[ q a\n"
+ "pvsrch ^Q V\n"
+ "pvsrch ^Q ^V\n"
+ "pvsrch ^Q v\n"
+ "pvsrch ^[ q v\n"
+ "dorepl ^Q A\n"
+ "dorepl ^Q ^A\n"
+ "dorepl ^Q a\n"
+ "dorepl ^[ q a\n"
"redo ^^\n"
"rindent ^K .\n"
"rsrch ^[ R\n"
"rtarw ^D\n"
"rtarw ^[ O C\n"
"rtarw ^[ [ C\n"
- "run ^[ !\n"
+ "run ^[ '\n"
"save ^K S\n"
"save ^K ^S\n"
"save ^K s\n"
":inherit main\n"
":def pasteprompt keymap,\"Pasteprompt\",rtn,msg,\"Entered bracketed paste mode\",rtn\n"
"abort ^C\n"
+ "abort ^U\n"
"complete ^I\n"
"nop ^L\n"
"pasteprompt ^[ P\n"
"\n"
":menu\n"
":inherit windows\n"
+ "abort ^U\n"
"abort ^[ ^[\n"
"backsmenu ^?\n"
"backsmenu ^H\n"
"dnarwmenu ^X\n"
"dnarwmenu ^[ O B\n"
"dnarwmenu ^[ [ B\n"
- "eof ^[ [ 1 ; 5 F\n"
"eofmenu ^Q C\n"
"eofmenu ^Q ^C\n"
"eofmenu ^Q c\n"
+ "eofmenu ^[ [ 1 ; 5 F\n"
"eofmenu ^[ q c\n"
"eolmenu .@7\n"
"eolmenu .kH\n"
"ltarwmenu ^[ O D\n"
"ltarwmenu ^[ [ D\n"
"ltarwmenu ^[ s\n"
+ "pgdnmenu .kN\n"
+ "pgdnmenu ^C\n"
+ "pgdnmenu ^[ [ 6 ~\n"
+ "pgdnmenu ^[ [ G\n"
+ "pgupmenu .kP\n"
+ "pgupmenu ^R\n"
+ "pgupmenu ^[ [ 5 ~\n"
+ "pgupmenu ^[ [ I\n"
"rtarwmenu .kr\n"
"rtarwmenu ^D\n"
"rtarwmenu ^[ O C\n"
"rtarwmenu ^[ [ C\n"
"rtn SP\n"
- "rtn ^I\n"
"rtn ^J\n"
+ "tabmenu ^I\n"
"uparwmenu .ku\n"
"uparwmenu ^E\n"
"uparwmenu ^[ O A\n"
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/bw.c,v 1.33 2017/12/08 02:28:04 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/bw.c,v 1.37 2018/01/08 02:01:19 tg Exp $");
#include <string.h>
#include <stdlib.h>
-#include <limits.h>
#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
/* For hex */
-static void bwfllwh(BW *w)
+static void
+bwfllwh(BW *w)
{
+ long dofs = 0;
+
/* Top must be a muliple of 16 bytes */
if (w->top->byte%16) {
pbkwd(w->top,w->top->byte%16);
}
/* Adjust scroll offset */
- if (w->cursor->byte%16+60 < w->offset) {
- w->offset = w->cursor->byte%16+60;
- msetI(w->t->t->updtab + w->y, 1, w->h);
- } else if (w->cursor->byte%16+60 >= w->offset + w->w) {
- w->offset = w->cursor->byte%16+60 - (w->w - 1);
+ if (w->cursor->byte % 16 + 60 >= w->w)
+ dofs = w->cursor->byte % 16 + 60 - (w->w - 1);
+ if (w->offset != dofs) {
+ w->offset = dofs;
msetI(w->t->t->updtab + w->y, 1, w->h);
}
}
prm(newtop);
}
-/* Adjust column */
+ /* Adjust column */
if (w->cursor->xcol < w->offset) {
w->offset = w->cursor->xcol;
msetI(w->t->t->updtab + w->y, 1, w->h);
/* Update a single line */
-static int lgen(SCRN *t, int y, int *screen, int *attr, int x, int w, P *p, long int scr, long int from, long int to,int st,BW *bw)
-
-
- /* Screen line address */
- /* Window */
- /* Buffer pointer */
- /* Starting column to display */
- /* Range for marked block */
+static int
+lgen(SCRN *t, int y,
+ /* screen line address */
+ int *screen,
+ int *attr, int x,
+ /* window */
+ int w,
+ /* buffer pointer */
+ P *p,
+ /* starting column to display */
+ long int scr,
+ /* range for marked block */
+ long int from, long int to,
+ int st, BW *bw)
{
int ox = x;
int tach, tach1;
goto eobl;
else {
int wid = 1;
- if (p->b->o.charmap->type) {
+
+ /* should be p->b->o.charmap->type but for Coverity; they are identical here */
+ if (bw->b->o.charmap->type) {
c = utf8_decode(&utf8_sm,bc);
if (c>=0) /* Normal decoded character */
- wid = joe_wcwidth(1,c);
+ wid = joe_wcwidth(c);
else if(c== -1) /* Character taken */
wid = -1;
else if(c== -2) { /* Incomplete sequence */
} else {
int wid = -1;
int utf8_char;
- if (p->b->o.charmap->type) { /* UTF-8 */
+ /* should be p->b->o.charmap but it’s identical */
+ if (bw->b->o.charmap->type) {
+ /* UTF-8 */
utf8_char = utf8_decode(&utf8_sm,bc);
- if (utf8_char >= 0) { /* Normal decoded character */
- wid = joe_wcwidth(1,utf8_char);
- } else if(utf8_char== -1) { /* Character taken */
+ if (utf8_char >= 0) {
+ /* Normal decoded character */
+ wid = joe_wcwidth(utf8_char);
+ } else if (utf8_char == -1) {
+ /* Character taken */
wid = -1;
- } else if(utf8_char== -2) { /* Incomplete sequence (FIXME: do something better here) */
+ } else if (utf8_char == -2) {
+ /* Incomplete sequence (FIXME: do something better here) */
unget_cch:
ungetit = bc;
++amnt;
utf8_char = 0x1000FFFE;
wid = utf8_sm.ptr;
utf8_init(&utf8_sm);
- } else if(utf8_char== -3) { /* Invalid UTF-8 start character 128-191, 254, 255 */
+ } else if (utf8_char == -3) {
+ /* Invalid UTF-8 start character 128-191, 254, 255 */
/* Show as control character */
wid = 1;
utf8_char = 0x1000FFFE;
int c = brch(bw->cursor);
if (c == NO_MORE_DATA)
- joe_snprintf_4((char *)buf, sizeof(buf), "** Line %ld Col %ld Offset %ld(0x%lX) **", bw->cursor->line + 1, piscol(bw->cursor) + 1, bw->cursor->byte, bw->cursor->byte);
+ joe_snprintf_4((char *)buf, sizeof(buf),
+ "** Line %ld Col %ld Offset %ld(0x%lX) **",
+ bw->cursor->line + 1, piscol(bw->cursor) + 1,
+ bw->cursor->byte, bw->cursor->byte);
else
- joe_snprintf_9((char *)buf, sizeof(buf), "** Line %ld Col %ld Offset %ld(0x%lX) %s %d(0%o/0x%X) Width %d **", bw->cursor->line + 1, piscol(bw->cursor) + 1, bw->cursor->byte, bw->cursor->byte, bw->b->o.charmap->name, c, c, c, joe_wcwidth(bw->o.charmap->type,c));
+ joe_snprintf_9((char *)buf, sizeof(buf),
+ "** Line %ld Col %ld Offset %ld(0x%lX) %s %d(0%o/0x%X) Width %d **",
+ bw->cursor->line + 1, piscol(bw->cursor) + 1,
+ bw->cursor->byte, bw->cursor->byte,
+ bw->b->o.charmap->name, c, c, c,
+ bw->o.charmap->type ? joe_wcwidth(c) : 1);
msgnw(bw->parent, buf);
return 0;
}
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/charmap.c,v 1.27 2017/12/07 01:00:31 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/charmap.c,v 1.30 2018/01/06 00:28:30 tg Exp $");
#include <stdlib.h>
#include <string.h>
const unsigned char *alias;
const unsigned char *builtin;
} alias_table[] = {
- { US "c", US "ascii" },
- { US "posix", US "ascii" },
- { US "iso646", US "ascii" },
- { US "8859-1", US "iso-8859-1" },
- { US "8859-2", US "iso-8859-2" },
- { US "8859-3", US "iso-8859-3" },
- { US "8859-4", US "iso-8859-4" },
- { US "8859-5", US "iso-8859-5" },
- { US "8859-6", US "iso-8859-6" },
- { US "8859-7", US "iso-8859-7" },
- { US "8859-8", US "iso-8859-8" },
- { US "8859-9", US "iso-8859-9" },
- { US "8859-10", US "iso-8859-10" },
- { US "8859-11", US "iso-8859-11" },
- { US "8859-13", US "iso-8859-13" },
- { US "8859-14", US "iso-8859-14" },
- { US "8859-15", US "iso-8859-15" },
- { US "8859-16", US "iso-8859-16" },
- { US "oem", US "cp437" },
- { US "ansi", US "cp1252" },
- { US "latin1", US "iso-8859-1" },
- { US "latin2", US "iso-8859-2" },
- { US "latin3", US "iso-8859-3" },
- { US "latin4", US "iso-8859-4" },
- { US "cyrillic", US "iso-8859-5" },
- { US "arabic", US "iso-8859-6" },
- { US "greek", US "iso-8859-7" },
- { US "hebrew", US "iso-8859-8" },
- { US "latin5", US "iso-8859-9" },
- { US "turkish", US "iso-8859-9" },
- { US "latin6", US "iso-8859-10" },
- { US "nordic", US "iso-8859-10" },
- { US "thai", US "iso-8859-11" },
- { US "latin7", US "iso-8859-13" },
- { US "latin8", US "iso-8859-14" },
- { US "latin9", US "iso-8859-15" },
- { US "cp20127", US "ascii" },
- { US "cp20866", US "koi8-r" },
- { US "cp21866", US "koi8-u" },
- { US "cp28591", US "iso-8859-1" },
- { US "cp28592", US "iso-8859-2" },
- { US "cp28593", US "iso-8859-3" },
- { US "cp28594", US "iso-8859-4" },
- { US "cp28595", US "iso-8859-5" },
- { US "cp28596", US "iso-8859-6" },
- { US "cp28597", US "iso-8859-7" },
- { US "cp28598", US "iso-8859-8" },
- { US "cp28599", US "iso-8859-9" },
- { US "cp28603", US "iso-8859-13" },
- { US "cp28605", US "iso-8859-15" },
- { US "cp65001", US "utf-8" },
+ { UC "c", UC "ascii" },
+ { UC "posix", UC "ascii" },
+ { UC "iso646", UC "ascii" },
+ { UC "8859-1", UC "iso-8859-1" },
+ { UC "8859-2", UC "iso-8859-2" },
+ { UC "8859-3", UC "iso-8859-3" },
+ { UC "8859-4", UC "iso-8859-4" },
+ { UC "8859-5", UC "iso-8859-5" },
+ { UC "8859-6", UC "iso-8859-6" },
+ { UC "8859-7", UC "iso-8859-7" },
+ { UC "8859-8", UC "iso-8859-8" },
+ { UC "8859-9", UC "iso-8859-9" },
+ { UC "8859-10", UC "iso-8859-10" },
+ { UC "8859-11", UC "iso-8859-11" },
+ { UC "8859-13", UC "iso-8859-13" },
+ { UC "8859-14", UC "iso-8859-14" },
+ { UC "8859-15", UC "iso-8859-15" },
+ { UC "8859-16", UC "iso-8859-16" },
+ { UC "oem", UC "cp437" },
+ { UC "ansi", UC "cp1252" },
+ { UC "latin1", UC "iso-8859-1" },
+ { UC "latin2", UC "iso-8859-2" },
+ { UC "latin3", UC "iso-8859-3" },
+ { UC "latin4", UC "iso-8859-4" },
+ { UC "cyrillic", UC "iso-8859-5" },
+ { UC "arabic", UC "iso-8859-6" },
+ { UC "greek", UC "iso-8859-7" },
+ { UC "hebrew", UC "iso-8859-8" },
+ { UC "latin5", UC "iso-8859-9" },
+ { UC "turkish", UC "iso-8859-9" },
+ { UC "latin6", UC "iso-8859-10" },
+ { UC "nordic", UC "iso-8859-10" },
+ { UC "thai", UC "iso-8859-11" },
+ { UC "latin7", UC "iso-8859-13" },
+ { UC "latin8", UC "iso-8859-14" },
+ { UC "latin9", UC "iso-8859-15" },
+ { UC "cp20127", UC "ascii" },
+ { UC "cp20866", UC "koi8-r" },
+ { UC "cp21866", UC "koi8-u" },
+ { UC "cp28591", UC "iso-8859-1" },
+ { UC "cp28592", UC "iso-8859-2" },
+ { UC "cp28593", UC "iso-8859-3" },
+ { UC "cp28594", UC "iso-8859-4" },
+ { UC "cp28595", UC "iso-8859-5" },
+ { UC "cp28596", UC "iso-8859-6" },
+ { UC "cp28597", UC "iso-8859-7" },
+ { UC "cp28598", UC "iso-8859-8" },
+ { UC "cp28599", UC "iso-8859-9" },
+ { UC "cp28603", UC "iso-8859-13" },
+ { UC "cp28605", UC "iso-8859-15" },
+ { UC "cp65001", UC "utf-8" },
{ 0, 0 }
};
int extra_b7, extra_2192;
int to_uni[256];
} builtin_charmaps[] = {
- { US "ascii", 0x20, 0x20, {
+ { UC "ascii", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1 }},
- { US "iso-8859-1", 0xB7, 0xAC, {
+ { UC "iso-8859-1", 0xB7, 0xAC, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff }},
- { US "iso-8859-2", 0x20, 0x20, {
+ { UC "iso-8859-2", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 }},
- { US "iso-8859-3", 0x20, 0x20, {
+ { UC "iso-8859-3", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
-1, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7,
0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9 }},
- { US "iso-8859-4", 0x20, 0x20, {
+ { UC "iso-8859-4", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b,
0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9 }},
- { US "iso-8859-5", 0x20, 0x20, {
+ { UC "iso-8859-5", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f }},
- { US "iso-8859-6", 0x20, 0x20, {
+ { UC "iso-8859-6", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
0x0650, 0x0651, 0x0652, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1 }},
- { US "iso-8859-7", 0x20, 0x20, {
+ { UC "iso-8859-7", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf,
0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7,
0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, -1 }},
- { US "iso-8859-8", 0x20, 0x20, {
+ { UC "iso-8859-8", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
0x05e8, 0x05e9, 0x05ea, -1, -1, 0x200e, 0x200f, -1 }},
- { US "iso-8859-9", 0x20, 0x20, {
+ { UC "iso-8859-9", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff }},
- { US "iso-8859-10", 0x20, 0x20, {
+ { UC "iso-8859-10", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef,
0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169,
0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138 }},
- { US "iso-8859-11", 0x20, 0x20, {
+ { UC "iso-8859-11", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
0x0e58, 0x0e59, 0x0e5a, 0x0e5b, -1, -1, -1, -1 }},
- { US "iso-8859-13", 0x20, 0x20, {
+ { UC "iso-8859-13", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c,
0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7,
0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019 }},
- { US "iso-8859-14", 0x20, 0x20, {
+ { UC "iso-8859-14", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff }},
- { US "iso-8859-15", 0x20, 0x20, {
+ { UC "iso-8859-15", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff }},
- { US "iso-8859-16", 0x20, 0x20, {
+ { UC "iso-8859-16", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b,
0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff }},
- { US "koi-8", 0x20, 0x20, {
+ { UC "koi-8", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, -1 }},
- { US "koi8-r", 0x20, 0x20, {
+ { UC "koi8-r", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }},
- { US "koi8-t", 0x20, 0x20, {
+ { UC "koi8-t", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }},
- { US "koi8-u", 0x20, 0x20, {
+ { UC "koi8-u", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e,
0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412,
0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }},
- { US "cp437", 0xF9, 0xAA, {
+ { UC "cp437", 0xF9, 0xAA, {
/* From: src/share/i18n/csmapper/CP/CP437%UCS.src,v 1.2 2014/06/26 18:58:50 tg Exp $ */
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229,
0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248,
0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 }},
- { US "cp1251", 0x20, 0x20, {
+ { UC "cp1251", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f }},
- { US "cp1252", 0xB7, 0xAC, {
+ { UC "cp1252", 0xB7, 0xAC, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff }},
- { US "cp1255", 0x20, 0x20, {
+ { UC "cp1255", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df,
0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7,
0x05e8, 0x05e9, 0x05ea, -1, -1, 0x200e, 0x200f, -1 }},
- { US "cp1256", 0x20, 0x20, {
+ { UC "cp1256", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0649, 0x064a, 0x00ee, 0x00ef,
0x064b, 0x064c, 0x064d, 0x064e, 0x00f4, 0x064f, 0x0650, 0x00f7,
0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2 }},
- { US "armscii-8", 0x20, 0x20, {
+ { UC "armscii-8", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f,
0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583,
0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x055a, -1 }},
- { US "tis-620", 0x20, 0x20, {
+ { UC "tis-620", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
0x0e58, 0x0e59, 0x0e5a, 0x0e5b, -1, -1, -1, -1 }},
- { US "georgian-ps", 0x20, 0x20, {
+ { UC "georgian-ps", 0x20, 0x20, {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
extra_b7 = builtin->extra_b7;
extra_2192 = builtin->extra_2192;
map = malloc(sizeof(struct charmap));
- map->name = (unsigned char *)strdup((const char *)builtin->name);
+ map->name = builtin->name;
map->type = 0;
map->is_punct = byte_ispunct;
map->is_print = byte_isprint;
/* install UTF-8 map (ties into i18n module) */
map = malloc(sizeof(struct charmap));
- map->name = US "utf-8";
+ map->name = UC "utf-8";
map->type = 1;
map->to_uni = rtn_arg;
map->from_uni = rtn_arg;
into_the_loop:
while ((ca = *a) == '-' || ca == '_')
++a;
- while ((cb = *b) == '-' || ca == '_')
+ while ((cb = *b) == '-' || cb == '_')
++b;
goto loop_beg;
loop_end:
}
/* Parse and install character map from file */
- if (f && (b = parse_charmap(name, f)))
- return (process_builtin(b));
+ if (f && (b = parse_charmap(name, f))) {
+ m = process_builtin(b);
+ free(b);
+ return (m);
+ }
/* Check builtin sets */
for (y = 0; y != NELEM(builtin_charmaps); ++y)
if ((p = (unsigned char *)getenv("HOME"))) {
joe_snprintf_1((char *)buf, sizeof(buf), "%s/.jupp/charmaps", p);
- if (!chpwd(buf) && (t = rexpnd(US "*"))) {
+ if (!chpwd(buf) && (t = rexpnd(UC "*"))) {
for (x = 0; x != aLEN(t); ++x)
if (strcmp(t[x], "..")) {
for (y = 0; y != aLEN(encodings); ++y)
}
}
- if (!chJpwd(US ("charmaps")) && (t = rexpnd(US "*"))) {
+ if (!chJpwd(UC "charmaps") && (t = rexpnd(UC "*"))) {
for (x = 0; x != aLEN(t); ++x)
if (strcmp(t[x], "..")) {
for (y = 0; y != aLEN(encodings); ++y)
#define _Icharmap 1
#ifdef EXTERN
-__RCSID("$MirOS: contrib/code/jupp/charmap.h,v 1.11 2017/12/06 21:16:55 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/charmap.h,v 1.12 2017/12/20 23:33:56 tg Exp $");
#endif
/* For sorted from_map entries */
struct charmap {
struct charmap *next; /* Linked list of loaded character maps */
- unsigned char *name; /* Name of this one */
+ const unsigned char *name; /* Name of this one */
int type; /* 0=byte, 1=UTF-8 */
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/cmd.c,v 1.26 2017/12/08 02:00:38 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/cmd.c,v 1.30 2018/01/18 21:59:11 tg Exp $");
#include <stdlib.h>
#include <string.h>
C("ffirst", TYPETW + TYPEPW, pffirst, NULL, 0, NULL),
C("filt", TYPETW + TYPEPW + EMOD + EBLOCK, ufilt, NULL, 0, NULL),
C("finish", TYPETW + TYPEPW + EMOD, ufinish, NULL, 1, NULL),
-C("fmtblk", TYPETW + EMOD + EFIXXCOL + EBLOCK, ufmtblk, NULL, 1, NULL),
+C("fmtblk", TYPETW + EMOD + EFIXXCOL + EBLOCK + ECHK0COL, ufmtblk, NULL, 1, NULL),
C("fnext", TYPETW + TYPEPW, pfnext, NULL, 1, NULL),
-C("format", TYPETW + TYPEPW + EFIXXCOL + EMOD, uformat, NULL, 1, NULL),
+C("format", TYPETW + TYPEPW + EFIXXCOL + EMOD + ECHK0COL, uformat, NULL, 1, NULL),
C("fwrdc", TYPETW + TYPEPW, ufwrdc, NULL, 1, "bkwdc"),
C("gomark", TYPETW + TYPEPW + EMOVE, ugomark, NULL, 0, NULL),
C("groww", TYPETW, ugroww, NULL, 1, "shrinkw"),
C("quote8", TYPETW + TYPEPW + EMOD, uquote8, NULL, 0, NULL),
C("record", TYPETW + TYPEPW + TYPEMENU + TYPEQW, urecord, NULL, 0, NULL),
C("redo", TYPETW + TYPEPW + EFIXXCOL, uredo, NULL, 1, "undo"),
-C("retype", TYPETW + TYPEPW + TYPEMENU + TYPEQW, uretyp, NULL, 0, NULL),
+C("retype", TYPETW + TYPEPW + TYPEMENU + TYPEQW + ECHK0COL, uretyp, NULL, 0, NULL),
C("rfirst", TYPETW + TYPEPW, prfirst, NULL, 0, NULL),
C("rindent", TYPETW + TYPEPW + EFIXXCOL + EMOD + EBLOCK, urindent, NULL, 1, "lindent"),
C("rsrch", TYPETW + TYPEPW, ursrch, NULL, 0, NULL),
C("splitw", TYPETW, usplitw, NULL, 0, NULL),
C("stat", TYPETW + TYPEPW, ustat_j, NULL, 0, NULL),
C("stop", TYPETW + TYPEPW + TYPEMENU + TYPEQW, ustop, NULL, 0, NULL),
+C("sync", TYPETW + TYPEPW + TYPEMENU + TYPEQW, usync, NULL, 0, NULL),
C("swap", TYPETW + TYPEPW + EFIXXCOL, uswap, NULL, 0, NULL),
C("switch", TYPETW + TYPEPW, uswitch, NULL, 0, NULL),
C("tabmenu", TYPEMENU, umtab, NULL, 1, "ltarwmenu"),
skip:
- /* Make dislayed cursor column equal the actual cursor column
- * for commands which arn't simple vertical movements */
+ /* scroll screen to the left */
+ if ((cmd->flag & ECHK0COL) && bw->offset != 0) {
+ bw->offset = 0;
+ updall();
+ }
+
+ /*
+ * Make displayed cursor column equal the actual cursor column
+ * for commands which aren't simple vertical movements
+ */
if (cmd->flag & EFIXXCOL)
bw->cursor->xcol = piscol(bw->cursor);
#define _JOE_CMD_H 1
#ifdef EXTERN_CMD_C
-__IDSTRING(rcsid_cmd_h, "$MirOS: contrib/code/jupp/cmd.h,v 1.8 2017/12/06 21:41:02 tg Exp $");
+__IDSTRING(rcsid_cmd_h, "$MirOS: contrib/code/jupp/cmd.h,v 1.9 2018/01/07 17:24:48 tg Exp $");
#endif
extern CMD cmds[]; /* Built-in commands */
#define EMOD 128 /* Not allowed on readonly files */
/* These use same bits as TYPE* in types.h */
#define EBLOCK 0x4000 /* Finish block selection */
+#define ECHK0COL 0x8000 /* Reposition screen from leftmost */
/* CMD *findcmd(char *s);
* Return command address for given name
/*-
- * Copyright © 2004, 2005, 2006, 2007, 2011, 2012, 2017
+ * Copyright © 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012,
+ * 2013, 2014, 2016, 2017, 2018
* mirabilos <m@mirbsd.org>
*
* Provided that these terms and disclaimer and all copyright notices
*-
* Compatibility and fully new utility functions for jupp.
*
+ * - jalloc: based on lalloc.c,v 1.26 from mksh
* – ctime: based on mirtime from MirBSD libc; not leap second capable
* src/kern/include/mirtime.h,v 1.2 2011/11/20 23:40:11 tg Exp
* src/kern/c/mirtime.c,v 1.3 2011/11/20 23:40:10 tg Exp
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/compat.c,v 1.9 2017/12/02 17:00:53 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/compat.c,v 1.10 2018/01/07 20:32:46 tg Exp $");
-#include <limits.h>
+#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
+#ifdef MKSH_ALLOC_CATCH_UNDERRUNS
+#include <sys/mman.h>
+#include <err.h>
+#endif
+#include "tty.h"
#include "utils.h"
+/* jalloc */
+
+#define malloc_osi(sz) malloc(sz)
+#define realloc_osi(p,sz) realloc((p), (sz))
+#define free_osimalloc(p) free(p)
+
+#ifndef DEBUG
+#define Sabrt void
+#else
+#define Sabrt const char *emsg
+#endif
+static void abrt(Sabrt) __attribute__((__noreturn__));
+
+static void
+abrt(Sabrt)
+{
+#ifdef DEBUG
+ fputs(emsg, stderr);
+#endif
+ ttabrt(0, "memory allocation error");
+ /* try to get a coredump */
+ abort();
+}
+#ifndef DEBUG
+#define abrt(x) (abrt)()
+#endif
+
+/* build with CPPFLAGS+= -DUSE_REALLOC_MALLOC=0 on ancient systems */
+#if defined(USE_REALLOC_MALLOC) && (USE_REALLOC_MALLOC == 0)
+#define remalloc(p,n) ((p) == NULL ? malloc_osi(n) : realloc_osi((p), (n)))
+#else
+#define remalloc(p,n) realloc_osi((p), (n))
+#endif
+
+#ifndef MKSH_ALLOC_CATCH_UNDERRUNS
+#define ALLOC_ISUNALIGNED(p) (((size_t)(p)) % sizeof(struct jalloc_common))
+#else
+#define ALLOC_ISUNALIGNED(p) (((size_t)(p)) & 4095)
+#undef remalloc
+#undef free_osimalloc
+
+static void
+free_osimalloc(void *ptr)
+{
+ struct jalloc_item *lp = ptr;
+
+ if (munmap(lp, lp->len))
+ abrt("free_osimalloc");
+}
+
+static void *
+remalloc(void *ptr, size_t size)
+{
+ struct jalloc_item *lp, *lold = ptr;
+
+ size = (size + 4095) & ~(size_t)4095;
+
+ if (lold && lold->len >= size)
+ return (ptr);
+
+ if ((lp = mmap(NULL, size, PROT_READ | PROT_WRITE,
+ MAP_ANON | MAP_PRIVATE, -1, (off_t)0)) == MAP_FAILED)
+ abrt("remalloc: mmap");
+ if (ALLOC_ISUNALIGNED(lp))
+ abrt("remalloc: unaligned");
+ if (mprotect(((char *)lp) + 4096, 4096, PROT_NONE))
+ abrt("remalloc: mprotect");
+ lp->len = size;
+
+ if (lold) {
+ memcpy(((char *)lp) + 8192, ((char *)lold) + 8192,
+ lold->len - 8192);
+ if (munmap(lold, lold->len))
+ abrt("remalloc: munmap");
+ }
+
+ return (lp);
+}
+#endif
+
+void
+jalloc_init(void)
+{
+#ifdef MKSH_ALLOC_CATCH_UNDERRUNS
+ long pgsz;
+ if ((pgsz = sysconf(_SC_PAGESIZE)) != 4096)
+ errx(1, "fatal: pagesize %lu not 4096!", pgsz);
+#endif
+}
+
+void *
+jalloc(void *ptr, size_t nmemb, size_t siz)
+{
+ ALLOC_ITEM *lp;
+ size_t usiz;
+
+ if (notoktomul(nmemb, siz))
+ abrt("jalloc nmemb*siz");
+ usiz = nmemb * siz;
+ if (notoktoadd(usiz, siz))
+ abrt("jalloc usiz + terminator");
+ usiz += siz;
+ if (notoktoadd(usiz, sizeof(ALLOC_ITEM)))
+ abrt("jalloc usiz + header");
+
+ if (ptr) {
+#ifdef DEBUG
+ if (ALLOC_ISUNALIGNED(ptr))
+ abrt("jalloc realloc unaligned");
+#endif
+ lp = jalloc_krnl(ptr);
+ } else
+ lp = NULL;
+
+ if ((lp = remalloc(lp, usiz + sizeof(ALLOC_ITEM))) == NULL)
+ abrt("jalloc remalloc failed");
+#ifdef DEBUG
+ if (ALLOC_ISUNALIGNED(lp))
+ abrt("jalloc remalloc unaligned");
+#endif
+ if (!ptr)
+ lp->ALLOC_INFO(elen) = 0;
+ lp->ALLOC_INFO(esiz) = nmemb;
+ return (jalloc_user(lp));
+}
+
+void
+jfree(void *ptr)
+{
+ ALLOC_ITEM *lp;
+
+ if (ptr != NULL) {
+#ifdef DEBUG
+ if (ALLOC_ISUNALIGNED(ptr))
+ abrt("jalloc free unaligned");
+#endif
+ lp = jalloc_krnl(ptr);
+ free_osimalloc(lp);
+ }
+}
+
+/* strlcpy/strlcat */
+
#undef L_strlcat
#undef L_strlcpy
#ifndef HAVE_STRLCAT
#include "strlfun.inc"
#endif
+/* ctime */
+
#ifndef HAVE_CTIME
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
}
#endif /* ndef HAVE_CTIME */
+/* popen */
+
#ifndef HAVE_POPEN
#undef __RCSID
#define __RCSID(x) __IDSTRING(rcsid_popen_inc,x)
#include "popen.inc"
#endif
+/* utility stuff */
+
size_t
ustoc_hex(const void *us, int *dp, size_t lim)
{
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61-MirPorts-2 for joe 3.1jupp32.
+# Generated by GNU Autoconf 2.61-MirPorts-2 for joe 3.1jupp33.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='joe'
PACKAGE_TARNAME='joe'
-PACKAGE_VERSION='3.1jupp32'
-PACKAGE_STRING='joe 3.1jupp32'
+PACKAGE_VERSION='3.1jupp33'
+PACKAGE_STRING='joe 3.1jupp33'
PACKAGE_BUGREPORT=''
ac_unique_file="b.c"
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures joe 3.1jupp32 to adapt to many kinds of systems.
+\`configure' configures joe 3.1jupp33 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of joe 3.1jupp32:";;
+ short | recursive ) echo "Configuration of joe 3.1jupp33:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-joe configure 3.1jupp32
+joe configure 3.1jupp33
generated by GNU Autoconf 2.61-MirPorts-2
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by joe $as_me 3.1jupp32, which was
+It was created by joe $as_me 3.1jupp33, which was
generated by GNU Autoconf 2.61-MirPorts-2. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='joe'
- VERSION='3.1jupp32'
+ VERSION='3.1jupp33'
cat >>confdefs.h <<_ACEOF
fi
fi
-for ac_func in isblank
+
+
+
+
+
+
+for ac_func in alarm ctime fsync get_current_dir_name isatty mkdir mkstemp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
fi
done
-if test x"$ac_cv_func_isblank" = xyes; then
- { echo "$as_me:$LINENO: checking whether isblank() works correctly with side effect expressions" >&5
-echo $ECHO_N "checking whether isblank() works correctly with side effect expressions... $ECHO_C" >&6; }
-if test "${joe_cv_isblank+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- joe_cv_isblank=no
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-int main() {
- int a = 0;
- isblank(a++);
- exit(a != 1);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- joe_cv_isblank=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-joe_cv_isblank=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-{ echo "$as_me:$LINENO: result: $joe_cv_isblank" >&5
-echo "${ECHO_T}$joe_cv_isblank" >&6; }
- if test "$joe_cv_isblank" = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WORKING_ISBLANK 1
-_ACEOF
-
- fi
-
-fi
-
-
-
-
-
-
-
-
-
-for ac_func in alarm mkdir mkstemp putenv setlocale strchr strdup utime setpgid
+for ac_func in nl_langinfo popen putenv setitimer setlocale setpgid
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-for ac_func in setitimer sigaction sigvec siginterrupt sigprocmask isatty
+for ac_func in sigaction siginterrupt sigprocmask sigvec strchr strdup
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-
-
-for ac_func in strlcpy strlcat nl_langinfo get_current_dir_name ctime popen
+for ac_func in strlcat strlcpy sync utime
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by joe $as_me 3.1jupp32, which was
+This file was extended by joe $as_me 3.1jupp33, which was
generated by GNU Autoconf 2.61-MirPorts-2. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-joe config.status 3.1jupp32
+joe config.status 3.1jupp33
configured by $0, generated by GNU Autoconf 2.61-MirPorts-2,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-# $MirOS: contrib/code/jupp/configure.ac,v 1.66 2017/12/16 22:38:03 tg Exp $
+# $MirOS: contrib/code/jupp/configure.ac,v 1.69 2018/02/13 20:04:11 tg Exp $
#-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.54)
#### Here's the only place where to change version number ####
-AC_INIT(joe, 3.1jupp32)
+AC_INIT(joe, 3.1jupp33)
#### But see main.c for the Copyright (c) owner and year! ####
AC_CONFIG_SRCDIR([b.c])
AC_MSG_ERROR([don't know how to get current working directory])
fi
fi
-AC_CHECK_FUNCS([isblank])
-if test x"$ac_cv_func_isblank" = xyes; then
- joe_ISBLANK
-fi
-AC_CHECK_FUNCS([alarm mkdir mkstemp putenv setlocale strchr strdup utime setpgid])
-AC_CHECK_FUNCS([setitimer sigaction sigvec siginterrupt sigprocmask isatty])
-AC_CHECK_FUNCS([strlcpy strlcat nl_langinfo get_current_dir_name ctime popen])
+AC_CHECK_FUNCS([alarm ctime fsync get_current_dir_name isatty mkdir mkstemp])
+AC_CHECK_FUNCS([nl_langinfo popen putenv setitimer setlocale setpgid])
+AC_CHECK_FUNCS([sigaction siginterrupt sigprocmask sigvec strchr strdup])
+AC_CHECK_FUNCS([strlcat strlcpy sync utime])
AC_ARG_ENABLE([fork],
[ --disable-fork disable use of fork],
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/hash.c,v 1.6 2017/12/08 02:00:39 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/hash.c,v 1.7 2018/01/07 23:51:34 tg Exp $");
#include <stdlib.h>
#include <string.h>
int x;
if (!freentry) {
- entry = calloc(64, sizeof(HENTRY));
+ entry = ralloc(64, sizeof(HENTRY));
for (x = 0; x != 64; ++x) {
entry[x].next = freentry;
freentry = entry + x;
#include "config.h"
#include "types.h"
-__RCSID("$MirOS: contrib/code/jupp/help.c,v 1.15 2017/12/08 03:24:15 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/help.c,v 1.18 2018/01/08 00:40:44 tg Exp $");
#include <stdlib.h>
#include <string.h>
#include "utf8.h"
#include "w.h"
-#define NOT_ENOUGH_MEMORY -11
-
struct help *help_actual = NULL; /* actual help screen */
/*
* Process help file
- * Returns 0 if the help file was succefully processed
- * -1 if the help file couldn't be opened
- * NOT_ENOUGH_MEMORY if there is not enough memory
*/
-int
+void
help_init(const unsigned char *filename)
{
JFILE *fd; /* help file */
unsigned char buf[1024]; /* input buffer */
-
struct help *tmp;
- unsigned int bfl; /* buffer length */
- unsigned int hlpsiz, hlpbsz; /* number of used/allocated bytes for tmp->text */
- unsigned char *tempbuf;
+ char *cp;
- if (!(fd = jfopen((const char *)filename, "r")))/* open the help file */
- return -1; /* return if we couldn't open the file */
+ /* open the help file */
+ if (!(fd = jfopen(filename, "r")))
+ return;
fprintf(stderr, "Processing '%s'...", filename);
fflush(stderr);
- while (jfgets((char *)buf, sizeof(buf), fd)) {
- if (buf[0] == '{') { /* start of help screen */
- if (!(tmp = malloc(sizeof(struct help)))) {
- return NOT_ENOUGH_MEMORY;
- }
-
- tmp->text = NULL;
- tmp->lines = 0;
- hlpsiz = 0;
- hlpbsz = 0;
- tmp->name = vsncpy(NULL, 0, sz(buf + 1) - 1);
-
- while ((jfgets((char *)buf, sizeof(buf), fd)) && (buf[0] != '}')) {
- bfl = strlen((char *)buf);
- if (hlpsiz + bfl > hlpbsz) {
- if (tmp->text) {
- tempbuf = realloc(tmp->text, hlpbsz + bfl + 1024);
- if (!tempbuf) {
- free(tmp->text);
- free(tmp);
- return NOT_ENOUGH_MEMORY;
- } else {
- tmp->text = tempbuf;
- }
- } else {
- tmp->text = malloc(bfl + 1024);
- if (!tmp->text) {
- free(tmp);
- return NOT_ENOUGH_MEMORY;
- } else {
- tmp->text[0] = 0;
- }
- }
- hlpbsz += bfl + 1024;
- }
- strlcpy((char *)(tmp->text + hlpsiz), (char *)buf, 1024);
- hlpsiz += bfl;
+ while (jfgets(buf, sizeof(buf), fd)) {
+ if (buf[0] == '{'/*}*/) {
+ /* start of help screen */
+ tmp = calloc(1, sizeof(struct help));
+ /* drop newline */
+ buf[strlen(buf) - 1] = '\0';
+ tmp->name = (unsigned char *)strdup((char *)buf + 1);
+ /* read text */
+ while (jfgets(buf, sizeof(buf), fd) && buf[0] != /*{*/'}') {
+ tmp->text = vsncpy(sv(tmp->text), sz(buf));
++tmp->lines;
}
- if (buf[0] == '}') { /* set new help screen as actual one */
- tmp->prev = help_actual;
- tmp->next = NULL;
- if (help_actual) {
- help_actual->next = tmp;
- }
- help_actual = tmp;
- } else {
- fprintf(stderr, "\nHelp file '%s' is not properly ended with } on new line.\n", filename);
- fprintf(stderr, "Do you want to accept incomplete help screen (y/n)?");
+ /* end of help screen */
+ if (buf[0] != /*{*/'}') {
+ fprintf(stderr, /*{*/ "\nHelp file '%s' is not properly ended with } on new line.\nDo you want to accept incomplete help screen (y/n)?", filename);
fflush(stderr);
- if (fgets((char *)buf, 8, stdin) == NULL ||
+ if (!fgets((char *)buf, sizeof(buf), stdin) ||
(buf[0] | 0x20) != 'y') {
- free(tmp->text);
+ vsrm(tmp->text);
+ free(tmp->name);
free(tmp);
- return 0;
- } else {
- tmp->prev = help_actual;
- tmp->next = NULL;
- if (help_actual) {
- help_actual->next = tmp;
- }
- help_actual = tmp;
+ goto out;
}
}
+ /* intern string to save memory */
+ if ((cp = strdup((char *)tmp->text))) {
+ vsrm(tmp->text);
+ tmp->text = (unsigned char *)cp;
+ }
+ /* set new help screen as actual one */
+ tmp->prev = help_actual;
+ if (help_actual)
+ help_actual->next = tmp;
+ help_actual = tmp;
}
}
- jfclose(fd); /* close help file */
-
fprintf(stderr, "done\n");
+ out:
+ /* close help file */
+ jfclose(fd);
- while (help_actual && help_actual->prev) { /* move to first help screen */
+ /* move to first help screen */
+ while (help_actual && help_actual->prev)
help_actual = help_actual->prev;
- }
-
- return 0;
}
/*
void
help_display(SCREEN *t)
{
- unsigned char *str;
+ const unsigned char *str;
int y, x, z;
int atr = 0;
if (help_actual) {
str = help_actual->text;
} else {
- str = NULL;
+ str = UC "";
}
for (y = skiptop; y != t->wind; ++y) {
if (t->t->updtab[y]) {
- unsigned char *start = str;
+ const unsigned char *start = str;
int width=0;
int nspans=0;
int spanwidth;
#define _JOE_HELP_H 1
#ifdef EXTERN
-__IDSTRING(rcsid_help_h, "$MirOS: contrib/code/jupp/help.h,v 1.8 2017/12/06 23:02:02 tg Exp $");
+__IDSTRING(rcsid_help_h, "$MirOS: contrib/code/jupp/help.h,v 1.9 2018/01/08 00:40:44 tg Exp $");
#endif
extern struct help *help_actual;
void help_display(SCREEN *t); /* display text in help window */
void help_off(SCREEN *t); /* turn help off */
int help_on(SCREEN *t); /* turn help on */
-int help_init(const unsigned char *filename); /* load help file */
+void help_init(const unsigned char *filename); /* load help file */
struct help *find_context_help(const unsigned char *name);
int u_help(BASE *base); /* toggle help on/off */
#include "config.h"
#include <stdlib.h>
-__RCSID("$MirOS: contrib/code/jupp/i18n.c,v 1.32 2017/12/07 01:00:31 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/i18n.c,v 1.33 2018/01/08 02:01:19 tg Exp $");
#include "charmap.h"
#include "utils.h"
"<%X>", ucs));
}
-int joe_wcwidth(int wide, unsigned int ucs)
+int
+joe_wcwidth(unsigned int ucs)
{
+ int wide;
+
#ifndef TEST
/* If terminal is not UTF-8 or file is not UTF-8: width is 1 */
/* FIXME */
- if (!locale_map->type || !wide)
+ if (!locale_map->type)
return (1);
#endif
printf("print=%X\n",joe_iswprint(NULL,c));
printf("xdigit=%X\n",joe_iswxdigit(NULL,c));
printf("blank=%X\n",joe_iswblank(NULL,c));
- printf("width=%X\n",joe_wcwidth(1,c));
+ printf("width=%X\n",joe_wcwidth(c));
printf("toupper=%X\n",joe_towupper(NULL,c));
printf("tolower=%X\n",joe_towlower(NULL,c));
return (0);
#define _Ii18n 1
#ifdef EXTERN
-__IDSTRING(rcsid_i18n_h, "$MirOS: contrib/code/jupp/i18n.h,v 1.11 2017/12/06 21:16:57 tg Exp $");
+__IDSTRING(rcsid_i18n_h, "$MirOS: contrib/code/jupp/i18n.h,v 1.12 2018/01/08 02:01:20 tg Exp $");
#endif
#ifdef TEST_I18N
int joe_iswblank(struct charmap *,int c);
#endif
-int joe_wcwidth(int wide, unsigned int c);
+int joe_wcwidth(unsigned int c);
/* Looking for wswidth? Take a look at scrn.c/txtwidth() */
int joe_towupper(struct charmap *,int c);
- $MirOS: contrib/code/jupp/jmacsrc.in,v 1.24 2017/12/06 23:17:33 tg Exp $
+ $MirOS: contrib/code/jupp/jmacsrc.in,v 1.31 2018/02/01 02:33:44 tg Exp $
- Initialization file for JOE
+ Initialisation file for JOE
GNU-Emacs Joe
+ This file must be written in the 8-bit encoding, not UTF-8.
+
JOE looks for this file in:
1 - $HOME/.jmacsrc
2 - @jrcbefore@jmacsrc@jrcafter@
This file can include other files by placing the following include command
- in the first column:
+ in the first column (comment lines start with space or tab):
:include filename
FIRST SECTION: Default global options (these options can also be specified
- on the command line. Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
+ on the command line. Also, the NOXON, LINES, COLUMNS, DOPADDING and BAUD
options can be specified in environment variables):
Put each option you want set in the first column:
-option Sets the option
--option Clears the option
- -mid Cursor is recentered when scrolling is necessary
- -marking Text between ^KB and cursor is highlighted
+ -mid Cursor is recentred when scrolling is necessary
+ -marking Text between ^KB and cursor is highlighted; use with:
+ -lightoff Turn off highlighting after block copy or move
+-autoswap Swap markb with markk when necessary
-asis Characters 128 - 255 shown as-is
-hex Hex editing mode
- -force Force final newline when files are saved
-nobackups If you don't want backup files to be created
- -lightoff Turn off highlighting after block copy or move
+ -backpath path
+ Where to store backup files (do not quote, no comment after)
+ -force Force final newline when files are saved
-exask ^KX always confirms file name
-beep Beep on errors and when cursor goes past extremes
-nosta Disable top-most status line
-keepup %k and %c status line escape sequences updated frequently
-pg 1 No. lines to keep for PgUp/PgDn
-csmode ^KF after a pervious search does a ^L instead
- -backpath path Directory to store backup files
- (do not use quotes, and remove the comment after path)
-nonotice Disable copyright notice
-noxon Attempt to turn off ^S/^Q processing
-orphan Put extra files given on command line in orphaned buffers
instead of in windows
-dopadding Output pad characters (for when there is no tty handshaking)
-lines nnn Set no. screen lines
--baud 19200 Set baud rate for terminal optimizations
+-baud 19200 Set baud rate for terminal optimisations
-columns nnn Set no. screen columns
-help Start with help on
-skiptop nnn Don't use top nnn lines of the screen
--notite Don't send terminal initialization and termination strings: prevents
- restoration of screen on exit.
+-notite Don't send terminal initialisation and termination strings:
+ prevents restoration of screen on exit
-pastetite Enter bracketed paste mode automatically for TERM=xterm-xfree86
- -usetabs Use tabs to help optimize screen update.
+ -usetabs Use tabs to help optimise screen update
--assume_color Assume terminal has ANSI color support even if termcap/terminfo entry
- says that it doesn't. This only applies if the terminal otherwise
- looks like an ANSI terminal (support bold and capability starts with
- ESC [).
+-assume_color Assume terminal has ANSI colour support even if its termcap
+ or terminfo entry says that it doesn't. This only applies if
+ the terminal otherwise looks like an ANSI terminal (supports
+ bold and capability starts with ESC [).
--guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
+-guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
--guess_indent Guess indent character (tab or space).
+-guess_indent Guess indent character (tab or space)
--menu_explorer Stay in menu system when a directory is selected (otherwise
- directory is added to path and menu is closed).
-
--icase Search is case insensitive by default.
+-menu_explorer Stay in menu system when a directory is selected (otherwise
+ directory is added to path and menu is closed)
+-icase Search is case-insensitive by default
-wrap Search wraps
--autoswap Swap markb with markk when necessary
-
- Status line definition strings. -lmsg defines the left-justified string,
+ Status line definition strings. -lmsg defines the left-justified string,
and -rmsg defines the right-justified string. The first character of -rmsg
- is the background fill character. -hmsg (3.1jupp15) defines the help hint
+ is the background fill character. -hmsg (3.1jupp15) defines the help hint
(only about a dozen chars) displayed next to the copyright notice in the
- initial status line. The following escape sequences can be used in these
- strings:
-
- %t 12 hour time
- %u 24 hour time
- %T O for overtype mode, I for insert mode
- %W W if wordwrap is enabled
- %I A if autoindent is enabled
- %X Rectangle mode indicator
- %n File name
- %m '(Modified)' if file has been changed
- %* '*' if file has been changed
- %R Read-only indicator
- %r Row (line) number
- %c Column number
- %o Byte offset into file
- %O Byte offset into file in hex
- %a Ascii value of character under cursor
- %A Ascii value of character under cursor in hex
- %k Entered prefix keys
- %p Percent of file cursor is at
- %l No. lines in file
- %S '*SHELL*' if there is a shell running in window
- %M Macro recording message
- %y Syntax
-
- The formatting escape sequences may also be given:
-
- \i Inverse
- \u Underline
- \b Bold
- \d Dim
- \f Blink
+ initial status line (inverted by default, unless starting with exactly \i).
+ The following escape sequences can be used in these strings:
+
+ %t 12-hour time
+ %u 24-hour time
+ %T O for overtype mode, I for insert mode
+ %W W if wordwrap is enabled
+ %I A if autoindent is enabled
+ %X rectangle mode indicator
+ %n file name
+ %m '(Modified)' if file has been changed
+ %* '*' if file has been changed
+ %R read-only indicator
+ %r row (line) number
+ %c column number
+ %o byte offset into file (decimal)
+ %O byte offset into file in hex
+ %a ASCII value of character under cursor (decimal)
+ %A ASCII value of character under cursor in hex
+ %p percent of file cursor is at
+ %l number of lines in file
+ %k entered prefix keys
+ %S '*SHELL*' if there is a shell running in window
+ %M macro recording message
+ %y syntax
+ %x context (first non-indented line going backwards)
+
+ These formatting escape sequences may also be given:
+
+ \i Inverse
+ \u Underline
+ \b Bold
+ \d Dim
+ \f Blink
-lmsg \i%k%T%W%I%X %* [%n] %y %M
-rmsg %S Row %r Col %c %u
--hmsg Help: ^Xh
+-hmsg \i\f\bHelp: ^Xh\b\f
- SECOND SECTION: File name dependant local option settings:
+ SECOND SECTION: filename-dependent local option settings:
Each line with '*' in the first column indicates the modes which should be
- files which match the regular expression. If more than one regular
- expression matches the file name, than the last matching one is chosen.
-
- Here is a list of modes which can be set:
-
- -utf8 File is UTF-8 coded
-
- -syntax name Specify syntax (syntax file called
- 'name.jsf' will be loaded)
-
- -highlight Enable highlighting
-
- -smarthome Home key first moves cursor to beginning of line,
- then if hit again, to first non-blank character.
-
- -indentfirst Smart home goes to first non-blank character first,
- instead of going the beginning of line first.
-
- -smartbacks Backspace key deletes 'istep' number of
- 'indentc's if cursor is at first non-space
- character.
-
- -tab nnn Tab width
-
- -indentc nnn Indentation character (32 for space, 9 for tab)
-
- -istep nnn Number of indentation columns
-
- -spaces TAB inserts spaces instead of tabs.
-
- -purify Fix indentation if necessary for rindent, lindent and backs
- (for example if indentation uses a mix of tabs and spaces,
- and indentc is space, indentation will be converted to all
- spaces).
-
- -crlf File uses CR-LF at ends of lines
-
- -wordwrap Wordwrap
-
- -autoindent Auto indent
-
- -overwrite Overtype mode
-
- -picture Picture mode (right arrow can go past end of lines)
-
- -lmargin nnn Left margin
-
- -rmargin nnn Right margin
-
+ set for files whose name matches the regular expression. If more than one
+ regular expression matches the file name, then the last matching one is
+ chosen.
- -french One space after '.', '?' and '!' for wordwrap
- and paragraph reformat instead of two. Joe
- does not change the spacing you give, but
- sometimes it must put spacing in itself. This
- selects how much is inserted.
+ A file contents regular expression may also be specified on a separate line
+ with '+regex'. If this regular expresssion is given, then both the file name
+ regex and the file contents regex must match for the options to apply.
- -linums Enable line numbers on each line
-
- -rdonly File is read-only
-
- -keymap name Keymap to use if not 'main'
-
- -lmsg Status line definition strings-
- -rmsg see previous section for more info.
-
- -mnew macro Macro to execute when new files are loaded
- -mold macro Macro to execute when existing files are loaded
- -msnew macro Macro to execute when new files are saved
- -msold macro Macro to execute when existing files are saved
-
- -square Rectangular block mode
-
- Macros for the above options are in the same format as in the key
- binding section below- but without the key name strings.
+ Here is a list of modes which can be set:
- Default local options
+ -keymap name Keymap to use if not 'main'
+ -square Rectangular block mode
+ -overwrite Overtype mode
+ -picture Picture mode (cursor right can go past end of line)
+ -linums Show line numbers in front of each line
+ -rdonly File is read-only
+ -crlf File uses CR-LF at end of lines
+ -encoding utf8 File is UTF-8 encoded
+ -syntax name Specify syntax (syntax file called
+ 'name.jsf' will be loaded)
+ -highlight Enable syntax highlighting
+
+ -french One space after '.', '?' and '!' for wordwrap and
+ paragraph reformat instead of two. JOE does not
+ change the spacing you give, but sometimes it must
+ put spacing in itself. This selects how much is
+ inserted in those cases.
+ -purify Fixup indentation if necessary for rindent, lindent
+ and backs (for example if indentation uses a mix of
+ tabs and spaces, and indentc is space, indentation
+ will be converted to all spaces)
+
+ -lmargin nnn Left margin
+ -rmargin nnn Right margin
+ -tab nnn Tab width
+ -indentc nnn Indentation character (32 = space, 9 = tab)
+ -istep nnn Amount of 'indentc's per indentation level
+ -spaces Tab key inserts spaces instead of tabs
+ -wordwrap Wordwrap
+ -autoindent Auto indent
+ -smartbacks Backspace key deletes 'istep' number of 'indentc's
+ if cursor is at first non-space character
+ -smarthome Home key first moves cursor to beginning of line,
+ then if hit again, to first non-blank character
+ -indentfirst Smart home goes to first non-blank character first,
+ instead of to the beginning of the line first
+
+ -lmsg Status line definition strings;
+ -rmsg see previous section for more info
+
+ -mnew macro Macro to execute when new files are loaded
+ -mold macro Macro to execute when existing files are loaded
+ -msnew macro Macro to execute when new files are saved
+ -msold macro Macro to execute when existing files are saved
+
+ Macros for the above options are in the same format as in the key
+ binding section below but without the key name strings.
+
+ Default local options:
-highlight
-french
--tab 8
-indentc 9
-istep 1
-purify
--autoindent
-smartbacks
+-tab 8
--wordwrap
#HOOK#1 global/default flags
-highlight
-syntax diff
+*
++Only in[ ]
+-highlight
+-syntax diff
+
+*
++Nur in[ ]
+-highlight
+-syntax diff
+
+*
++\[1-9]\+\[0-9]\[cda]
+-highlight
+-syntax diff
+
*.sh*
-syntax sh
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+tcsh\>
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+tcsh\>
-syntax csh
=== Diff
-encoding utf8
-syntax java
- === Joe Syntax File
+ === JOE Syntax File
*.jsf
-syntax conf
- === flex
-*.l
--syntax lex
-
=== LISP
*.lisp
-syntax lisp
*.el
-syntax lisp
- === M4
-*.m4
--syntax m4
-
=== Make
*akefile
-syntax conf
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/perl
++#!\+\[ ]\+\[/a-z0-9._-]/perl
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]perl
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]perl
-syntax perl
=== PHP
-spaces
*
-+#!\+\[ ]\+\[a-z/]/python
++#!\+\[ ]\+\[/a-z0-9._-]/python
-encoding utf8
-syntax python
-tab 4
-spaces
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]python
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]python
-encoding utf8
-syntax python
-tab 4
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
=== TCL
-encoding utf8
-syntax xml
- === yacc
-*.y
--syntax yacc
-
=== Text (except in jupp)
*.asc
-wordwrap
THIRD SECTION: Named help screens:
- Use \i to turn on/off inverse video
- Use \u to turn on/off underline
- Use \b to turn on/off bold
- Use \d to turn on/off dim
- Use \f to turn on/off flash
+ Use \| to insert a spring: all springs in a given line are set to the same
+ width such that the entire line exactly fits in the width of the screen
+ (if it's not an exact multiple so that there are N spaces remaining, the
+ rightmost N springs each get one extra space). Hint: if you want vertical
+ alignment, each line should have the same number of springs.
{Basic
\i Help Screen \|turn off with ^XH more help with ^X. \i
Section names you must provide:
- :main For editing window
- :prompt For prompt lines
- :query For single-character query lines
- :querya Singe-character query for quote
- :querysr Search & Replace single-character query
+ :main editing window
+ :prompt prompt lines
+ :query single-character query lines
+ :querya singe-character query for quote
+ :querysr search-and-replace single-character query
- Other sections may be given as well for organization purposes or for
+ Other sections may be given as well for organisation purposes or for
use with the '-keymap' option.
Use:
Keys:
- Use ^@ through ^_ and ^? for Ctrl chars
+ Use ^@ through ^_ and ^? for C0 control characters and DEL
Use SP for space
Use a TO b to generate a range of characters
- You can also use termcap string capability names. For example:
+ You can also use termcap string capability names. For example:
.ku Up
.kd Down
.kP PgUp
.kN PgDn
.k1 - .k9 F1 - F9
- .k0 F0 or F10... you decide.
+ .k0 F0 or F10
.k; F10
Macros:
- Simple macros can be made by comma seperating 2 or more command names. For
- example:
+ Simple macros can be made by comma seperating two or more command names.
+ For example:
eof,bol ^T Z Goto beginning of last line
- Also quoted matter is typed in literally:
+ Also quoted matter is typed in literally (backslashes escape):
bol,">",dnarw .k1 Quote news article line
- Macros may cross lines if they end with ,
+ Macros may cross lines if they end with a comma.
+ Commands or named macros may be created with :def.
+ For example, you can use...
+
+ :def foo eof,bol
+
+ ... to define a command foo which will go to the beginning of the last line.
:windows Bindings common to all windows
#HOOK#4 common keybindings
-type ^@ TO ÿ Self insert
+type ^@ TO ÿ
abort ^G Abort window
abort ^X ^C
abort ^C
uarg ^U Repeat prefix
uarg ^[ -
uarg ^[ 0 TO 9
-help ^X h Help
+help .k1
help ^X H
help ^X ^H
+help ^X h Help
+help ^[ [ 1 1 ~
hnext ^X .
hprev ^X ,
math ^[ m Calculator
pgdn .kN Screen down
pgdn ^V
pgdn ^[ [ 6 ~
+pgdn ^[ [ G SCO
pgup .kP Screen up
-pgup ^[ v
pgup ^[ [ 5 ~
+pgup ^[ [ I SCO
+pgup ^[ v
play,"0" ^X e Execute keyboard macro
prevw ^X p Previous window (uemacs)
query ^X q Query insert
:main Text editing window
:inherit windows
-helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
-nop ^[ [ 2 0 1 ~
-
- #HOOK#5 main keybindings
-
- ESC-x compile
-
+ compile
+ :def compile switch,"*Build-Log*",rtn,markb,eof," ",markk,blkdel,filt,query,parserr
:def compile querysave,query,scratch,"* Build Log *",rtn,bof,markb,eof," ",markk,blkdel,build
- Ispell
+ spell check
+:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
+:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
:def ispellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
:def ispellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
- Aspell
-:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
-:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
+ #HOOK#5 main keybindings
@SPELL@word ^[ $
-ctrl ^Q Quote Ctrl chars
- ctrl ` Quote Ctrl chars
-
-insc ^[ [ 2 ~
-insc ^[ [ L SCO
-
-delch ^[ [ 3 ~
-
-pgup ^[ [ I SCO
-
-pgdn ^[ [ G SCO
+helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
+nop ^[ [ 2 0 1 ~
-home ^[ [ 1 ~ Putty, Linux, Cygwin
-home ^[ [ H Xterm, Konsole, SCO
-home ^[ O H gnome-terminal
-home ^[ [ 7 ~ RxVT
+begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A xterm shift-up mark
+begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B xterm shift-down mark
+begin_marking,rtarw,toggle_marking ^[ [ 1 ; 2 C xterm shift-right mark
+begin_marking,ltarw,toggle_marking ^[ [ 1 ; 2 D xterm shift-left mark
+begin_marking,bol,toggle_marking ^[ [ 1 ; 2 H xterm shift-home
+begin_marking,eol,toggle_marking ^[ [ 1 ; 2 F xterm shift-end
+begin_marking,bof,toggle_marking ^[ [ 1 ; 6 H xterm shift-ctrl-home
+begin_marking,eof,toggle_marking ^[ [ 1 ; 6 F xterm shift-ctrl-end
-eol ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eol ^[ [ F Xterm, Konsole, SCO
-eol ^[ O F gnome-terminal
-eol ^[ [ 8 ~ RxVT
+ctrl ^Q Quote Ctrl chars
+ctrl ` Quote Ctrl chars
- Macros of non-existant emacs functions
+ Macros of non-existent Emacs functions
psh,nextword,markk,prevword,markb,upper,nextword ^[ u Upcase word
psh,nextword,markk,prevword,markb,lower,nextword ^[ l Downcase word
psh,uparw,bol,markb,dnarw,markk,
dnarw,blkmove,dnarw ^X ^T Transpose lines
-begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A xterm shift-up mark
-begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B xterm shift-down mark
-begin_marking,rtarw,toggle_marking ^[ [ 1 ; 2 C xterm shift-right mark
-begin_marking,ltarw,toggle_marking ^[ [ 1 ; 2 D xterm shift-left mark
-begin_marking,bol,toggle_marking ^[ [ 1 ; 2 H xterm shift-home
-begin_marking,eol,toggle_marking ^[ [ 1 ; 2 F xterm shift-end
-begin_marking,bof,toggle_marking ^[ [ 1 ; 6 H xterm shift-ctrl-home
-begin_marking,eof,toggle_marking ^[ [ 1 ; 6 F xterm shift-ctrl-end
-
Old way- broken at end of line
psh,prevword,markb,nextword,
nextword,prevword,markk,nextword,
" lines in region",rtn ^[ = Count lines region
mode,"O" ^X ^Q Toggle read-only
-compile ^X c Compile
-nxterr ^X n
-nxterr ^X `
-prverr ^X p
+compile ^X c Compile
+nxterr ^X n
+nxterr ^X `
+prverr ^X p
backs ^? Backspace
backs ^H
bknd ^X ' Shell window (joe)
bof ^[ < Goto beginning of file
bof ^X [
-home .kh Goto beginning of line
-home ^A
-home ^[ [ H
+bof ^[ [ 1 ; 5 H
+home ^A Goto beginning of line
+home .kh
home ^[ [ 1 ~
+home ^[ [ 7 ~
+home ^[ [ H
bop ^[ p (uemacs)
bufed ^X b
bknd ^[ ' Shell window
crawll ^X < Scroll to the left
delch .kD Delete character
delch ^D
+delch ^[ [ 3 ~
deleol ^K Delete to end of line
delw ^[ d Delete word
dnarw .kd Go down
edit ^X ^F Edit a file: creates orphaned buffers
eof ^[ > Go to end of file
eof ^X ]
-eol .kH Go to end of line
+eof ^[ [ 1 ; 5 F
eol .@7
+eol .kH Go to end of line
eol ^E
-eol ^[ [ F
eol ^[ [ 4 ~
+eol ^[ [ 8 ~
+eol ^[ [ F
eop ^[ n (uemacs)
execmd ^[ x
insc ^C (uemacs)
mode ^[ ^[ Change modes
nbuf ^X ^B Next buffer in current window
nbuf ^X x (uemacs)
- nextpos ^K = Goto next position in position history
+ nextpos ^K = Goto next position in position history
nextword ^[ f Goto next word
+nextword ^[ [ 1 ; 5 C
notmod ^[ ~ Not modified
open ^O Split line
open ^[ ^O
pbuf ^X b Previous buffer in current window
- prevpos ^K - Goto previous position in position history
+ prevpos ^K - Goto previous position in position history
prevword ^[ b Previous word
+prevword ^[ [ 1 ; 5 D
qrepl ^[ % Query replace
qrepl ^[ r Query replace (uemacs)
qrepl ^[ ^R Query replace (uemacs)
:menu Selection menus
:inherit windows
-
-pgupmenu ^[ [ I
-
-pgdnmenu ^[ [ G
-
-bolmenu ^[ [ 1 ~ Putty, Linux, Cygwin
-bolmenu ^[ [ H Xterm, Konsole
-bolmenu ^[ O H gnome-terminal
-bolmenu ^[ [ 7 ~ RxVT
-
-eolmenu ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eolmenu ^[ [ F Xterm, Konsole
-eolmenu ^[ O F gnome-terminal
-eolmenu ^[ [ 8 ~ RxVT
-
abort ^[ ^[
backsmenu ^?
backsmenu ^H
bofmenu ^K U
bofmenu ^K ^U
bofmenu ^K u
-bolmenu .kh
+bofmenu ^[ [ 1 ; 5 H
bolmenu ^A
+bolmenu .kh
+bolmenu ^[ [ 1 ~
+bolmenu ^[ [ 7 ~
+bolmenu ^[ [ H
dnarwmenu .kd
dnarwmenu ^N
dnarwmenu ^[ [ B
eofmenu ^K V
eofmenu ^K ^V
eofmenu ^K v
+eofmenu ^[ [ 1 ; 5 F
+eolmenu .@7
eolmenu .kH
eolmenu ^E
+eolmenu ^[ [ 4 ~
+eolmenu ^[ [ 8 ~
+eolmenu ^[ [ F
ltarwmenu .kl
ltarwmenu ^B
ltarwmenu ^[ [ D
ltarwmenu ^[ O D
-pgdnmenu .kN Screen down
+pgdnmenu .kN
pgdnmenu ^V
pgdnmenu ^[ [ 6 ~
-pgupmenu .kP Screen up
-pgupmenu ^[ v
+pgdnmenu ^[ [ G
+pgupmenu .kP
pgupmenu ^[ [ 5 ~
+pgupmenu ^[ [ I
+pgupmenu ^[ v
rtarwmenu .kr
rtarwmenu ^F
rtarwmenu ^[ [ C
uparwmenu ^[ [ A
uparwmenu ^[ O A
-:querysr Search & replace query window
-type ^@ TO ÿ
-
:query Single-key query window
:inherit windows
:querya Single-key query window for quoting
type ^@ TO ÿ
+
+:querysr Search & replace query window
+type ^@ TO ÿ
- $MirOS: contrib/code/jupp/joerc.in,v 1.25 2017/12/06 23:17:33 tg Exp $
+ $MirOS: contrib/code/jupp/joerc.in,v 1.31 2018/02/01 02:33:45 tg Exp $
- Initialization file for JOE
+ Initialisation file for JOE
Standard Joe
This file must be written in the 8-bit encoding, not UTF-8.
2 - @jrcbefore@joerc@jrcafter@
This file can include other files by placing the following include command
- in the first column:
+ in the first column (comment lines start with space or tab):
:include filename
FIRST SECTION: Default global options (these options can also be specified
- on the command line. Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
+ on the command line. Also, the NOXON, LINES, COLUMNS, DOPADDING and BAUD
options can be specified in environment variables):
Put each option you want set in the first column:
-option Sets the option
--option Clears the option
- -mid Cursor is recentered when scrolling is necessary
-
- -marking Text between ^KB and cursor is highlighted (use with -lightoff)
-
+ -mid Cursor is recentred when scrolling is necessary
+ -marking Text between ^KB and cursor is highlighted; use with:
+ -lightoff Turn off highlighting after block copy or move
+ -autoswap Swap markb with markk when necessary
-asis Characters 128 - 255 shown as-is
-
- -force Force final newline when files are saved
-
+ -hex Hex editing mode
-nobackups If you don't want backup files to be created
-
- -lightoff Turn off highlighting after block copy or move
-
+ -backpath path
+ Where to store backup files (do not quote, no comment after)
+ -force Force final newline when files are saved
-exask ^KX always confirms file name
-
-beep Beep on errors and when cursor goes past extremes
-
-nosta Disable top-most status line
-
-keepup %k and %c status line escape sequences updated frequently
-
-pg nnn No. lines to keep for PgUp/PgDn
-
-csmode ^KF after a pervious search does a ^L instead
-
- -backpath path Directory to store backup files
- (do not use quotes, and remove the comment after path)
-
-nonotice Disable copyright notice
-
-noxon Attempt to turn off ^S/^Q processing
-
-orphan Put extra files given on command line in orphaned buffers
instead of in windows
-
-dopadding Output pad characters (for when there is no tty handshaking)
-
-lines nnn Set no. screen lines
-
- -baud nnn Set baud rate for terminal optimizations
-
+ -baud nnn Set baud rate for terminal optimisations
-columns nnn Set no. screen columns
-
-help Start with help on
-
-skiptop nnn Don't use top nnn lines of the screen
--notite Don't send terminal initialization and termination strings: prevents
- restoration of screen on exit.
+-notite Don't send terminal initialisation and termination strings:
+ prevents restoration of screen on exit
-pastetite Enter bracketed paste mode automatically for TERM=xterm-xfree86
- -usetabs Use tabs to help optimize screen update.
+ -usetabs Use tabs to help optimise screen update
--assume_color Assume terminal has ANSI color support even if termcap/terminfo entry
- says that it doesn't. This only applies if the terminal otherwise
- looks like an ANSI terminal (support bold and capability starts with
- ESC [).
+-assume_color Assume terminal has ANSI colour support even if its termcap
+ or terminfo entry says that it doesn't. This only applies if
+ the terminal otherwise looks like an ANSI terminal (supports
+ bold and capability starts with ESC [).
--guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
+-guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
--guess_indent Guess indent character (tab or space).
+-guess_indent Guess indent character (tab or space)
--menu_explorer Stay in menu system when a directory is selected (otherwise
- directory is added to path and menu is closed).
+-menu_explorer Stay in menu system when a directory is selected (otherwise
+ directory is added to path and menu is closed)
- -icase Search is case insensitive by default.
+ -icase Search is case-insensitive by default
+ -wrap Search wraps
- -wrap Search wraps
-
- -autoswap Swap markb with markk when necessary
-
- Status line definition strings. -lmsg defines the left-justified string,
+ Status line definition strings. -lmsg defines the left-justified string,
and -rmsg defines the right-justified string. The first character of -rmsg
- is the background fill character. -hmsg (3.1jupp15) defines the help hint
+ is the background fill character. -hmsg (3.1jupp15) defines the help hint
(only about a dozen chars) displayed next to the copyright notice in the
- initial status line. The following escape sequences can be used in these
- strings:
-
- %t 12 hour time
- %u 24 hour time
- %T O for overtype mode, I for insert mode
- %W W if wordwrap is enabled
- %I A if autoindent is enabled
- %X Rectangle mode indicator
- %n File name
- %m '(Modified)' if file has been changed
- %* '*' if file has been changed
- %R Read-only indicator
- %r Row (line) number
- %c Column number
- %o Byte offset into file
- %O Byte offset into file in hex
- %a Ascii value of character under cursor
- %A Ascii value of character under cursor in hex
- %p Percent of file cursor is at
- %l No. lines in file
- %k Entered prefix keys
- %S '*SHELL*' if there is a shell running in window
- %M Macro recording message
- %y Syntax
- %x Context (first non-indented line going backwards)
+ initial status line (inverted by default, unless starting with exactly \i).
+ The following escape sequences can be used in these strings:
+
+ %t 12-hour time
+ %u 24-hour time
+ %T O for overtype mode, I for insert mode
+ %W W if wordwrap is enabled
+ %I A if autoindent is enabled
+ %X rectangle mode indicator
+ %n file name
+ %m '(Modified)' if file has been changed
+ %* '*' if file has been changed
+ %R read-only indicator
+ %r row (line) number
+ %c column number
+ %o byte offset into file (decimal)
+ %O byte offset into file in hex
+ %a ASCII value of character under cursor (decimal)
+ %A ASCII value of character under cursor in hex
+ %p percent of file cursor is at
+ %l number of lines in file
+ %k entered prefix keys
+ %S '*SHELL*' if there is a shell running in window
+ %M macro recording message
+ %y syntax
+ %x context (first non-indented line going backwards)
These formatting escape sequences may also be given:
- \i Inverse
- \u Underline
- \b Bold
- \d Dim
- \f Blink
+ \i Inverse
+ \u Underline
+ \b Bold
+ \d Dim
+ \f Blink
-lmsg \i%k%T%W%I%X %n %m%y%R %M %x
-rmsg %S Row %r Col %c %t Ctrl-K H for help
--hmsg Help: ^KH
+-hmsg \i\f\bHelp: ^KH\b\f
- SECOND SECTION: File name dependant local option settings:
+ SECOND SECTION: filename-dependent local option settings:
Each line with '*' in the first column indicates the modes which should be
- set for files whose name matches the regular expression. If more than one
+ set for files whose name matches the regular expression. If more than one
regular expression matches the file name, then the last matching one is
chosen.
A file contents regular expression may also be specified on a separate line
- with '+regex'. If this regular expresssion is given, then both the file name
+ with '+regex'. If this regular expresssion is given, then both the file name
regex and the file contents regex must match for the options to apply.
- Here are the modes which can be set:
-
- -utf8 File is UTF-8 coded
-
- -syntax name Specify syntax (syntax file called
- 'name.jsf' will be loaded)
-
- -highlight Enable highlighting
-
- -smarthome Home key first moves cursor to beginning of line,
- then if hit again, to first non-blank character.
-
- -indentfirst Smart home goes to first non-blank character first,
- instead of going the beginning of line first.
-
- -smartbacks Backspace key deletes 'istep' number of
- 'indentc's if cursor is at first non-space
- character.
-
- -tab nnn Tab width
-
- -indentc nnn Indentation character (32 for space, 9 for tab)
-
- -istep nnn Number of indentation columns
-
- -spaces TAB inserts spaces instead of tabs.
-
- -purify Fix indentation if necessary for rindent, lindent and backs
- (for example if indentation uses a mix of tabs and spaces,
- and indentc is space, indentation will be converted to all
- spaces).
-
- -crlf File uses CR-LF at ends of lines
-
- -wordwrap Wordwrap
-
- -autoindent Auto indent
-
- -overwrite Overtype mode
-
- -picture Picture mode (right arrow can go past end of lines)
-
- -lmargin nnn Left margin
-
- -rmargin nnn Right margin
-
-
- -french One space after '.', '?' and '!' for wordwrap
- and paragraph reformat instead of two. Joe
- does not change the spacing you give, but
- sometimes it must put spacing in itself. This
- selects how much is inserted.
-
- -linums Enable line numbers on each line
-
- -rdonly File is read-only
-
- -keymap name Keymap to use if not 'main'
-
- -lmsg Status line definition strings-
- -rmsg see previous section for more info.
-
- -mnew macro Macro to execute when new files are loaded
- -mold macro Macro to execute when existing files are loaded
- -msnew macro Macro to execute when new files are saved
- -msold macro Macro to execute when existing files are saved
-
- -square Rectangular block mode
-
- Macros for the above options are in the same format as in the key
- binding section below- but without the key name strings.
-
- Default local options
+ Here is a list of modes which can be set:
+
+ -keymap name Keymap to use if not 'main'
+ -square Rectangular block mode
+ -overwrite Overtype mode
+ -picture Picture mode (cursor right can go past end of line)
+ -linums Show line numbers in front of each line
+ -rdonly File is read-only
+ -crlf File uses CR-LF at end of lines
+ -encoding utf8 File is UTF-8 encoded
+ -syntax name Specify syntax (syntax file called
+ 'name.jsf' will be loaded)
+ -highlight Enable syntax highlighting
+
+ -french One space after '.', '?' and '!' for wordwrap and
+ paragraph reformat instead of two. JOE does not
+ change the spacing you give, but sometimes it must
+ put spacing in itself. This selects how much is
+ inserted in those cases.
+ -purify Fixup indentation if necessary for rindent, lindent
+ and backs (for example if indentation uses a mix of
+ tabs and spaces, and indentc is space, indentation
+ will be converted to all spaces)
+
+ -lmargin nnn Left margin
+ -rmargin nnn Right margin
+ -tab nnn Tab width
+ -indentc nnn Indentation character (32 = space, 9 = tab)
+ -istep nnn Amount of 'indentc's per indentation level
+ -spaces Tab key inserts spaces instead of tabs
+ -wordwrap Wordwrap
+ -autoindent Auto indent
+ -smartbacks Backspace key deletes 'istep' number of 'indentc's
+ if cursor is at first non-space character
+ -smarthome Home key first moves cursor to beginning of line,
+ then if hit again, to first non-blank character
+ -indentfirst Smart home goes to first non-blank character first,
+ instead of to the beginning of the line first
+
+ -lmsg Status line definition strings;
+ -rmsg see previous section for more info
+
+ -mnew macro Macro to execute when new files are loaded
+ -mold macro Macro to execute when existing files are loaded
+ -msnew macro Macro to execute when new files are saved
+ -msold macro Macro to execute when existing files are saved
+
+ Macros for the above options are in the same format as in the key
+ binding section below but without the key name strings.
+
+ Default local options:
-highlight
-french
-indentc 9
-highlight
-syntax diff
+*
++Only in[ ]
+-highlight
+-syntax diff
+
+*
++Nur in[ ]
+-highlight
+-syntax diff
+
+*
++\[1-9]\+\[0-9]\[cda]
+-highlight
+-syntax diff
+
*.sh*
-syntax sh
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+tcsh\>
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+tcsh\>
-syntax csh
=== Diff
-encoding utf8
-syntax java
- === Joe Syntax File
+ === JOE Syntax File
*.jsf
-syntax conf
- === flex
-*.l
--syntax lex
-
=== LISP
*.lisp
-syntax lisp
*.el
-syntax lisp
- === M4
-*.m4
--syntax m4
-
=== Make
*akefile
-syntax conf
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/perl
++#!\+\[ ]\+\[/a-z0-9._-]/perl
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]perl
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]perl
-syntax perl
=== PHP
-spaces
*
-+#!\+\[ ]\+\[a-z/]/python
++#!\+\[ ]\+\[/a-z0-9._-]/python
-encoding utf8
-syntax python
-tab 4
-spaces
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]python
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]python
-encoding utf8
-syntax python
-tab 4
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
=== TCL
-encoding utf8
-syntax xml
- === yacc
-*.y
--syntax yacc
-
=== Text (except in jupp)
*.asc
-wordwrap
THIRD SECTION: Named help screens:
- Use \i to turn on/off inverse video
- Use \u to turn on/off underline
- Use \b to turn on/off bold
- Use \d to turn on/off dim
- Use \f to turn on/off flash
-
Use \| to insert a spring: all springs in a given line are set to the same
- width such that the entire line exactly fits in the width of the screen (if
- it's not an exact multiple so that there are N spaces remaining, the
- rightmost N springs each get one extra space). Hint: if you want vertical
+ width such that the entire line exactly fits in the width of the screen
+ (if it's not an exact multiple so that there are N spaces remaining, the
+ rightmost N springs each get one extra space). Hint: if you want vertical
alignment, each line should have the same number of springs.
{Basic
Section names you must provide:
- :main For editing window
- :prompt For prompt lines
- :query For single-character query lines
- :querya Singe-character query for quote
- :querysr Search & Replace single-character query
+ :main editing window
+ :prompt prompt lines
+ :query single-character query lines
+ :querya singe-character query for quote
+ :querysr search-and-replace single-character query
- Other sections may be given as well for organization purposes or for
+ Other sections may be given as well for organisation purposes or for
use with the '-keymap' option.
Use:
Keys:
- Use ^@ through ^_ and ^? for Ctrl chars
+ Use ^@ through ^_ and ^? for C0 control characters and DEL
Use SP for space
Use a TO b to generate a range of characters
- You can also use termcap string capability names. For example:
+ You can also use termcap string capability names. For example:
.ku Up
.kd Down
Macros:
- Simple macros can be made by comma seperating 2 or more command names. For
- example:
+ Simple macros can be made by comma seperating two or more command names.
+ For example:
eof,bol ^T Z Goto beginning of last line
- Also quoted matter is typed in literally:
+ Also quoted matter is typed in literally (backslashes escape):
bol,">",dnarw .k1 Quote news article line
- Macros may cross lines if they end with ,
-
- Commands or named macros may be created with :def. For example, you can
- use:
+ Macros may cross lines if they end with a comma.
+ Commands or named macros may be created with :def.
+ For example, you can use...
:def foo eof,bol
- To define a command foo which will goto the beginning of the last line.
+ ... to define a command foo which will go to the beginning of the last line.
:windows Bindings common to all windows
#HOOK#4 common keybindings
-type ^@ TO ÿ Type a character
+type ^@ TO ÿ
abort ^C Abort window
abort ^K Q
abort ^K ^Q
explode ^K I Show all windows or show only one window
explode ^K ^I
explode ^K i
+help .k1
help ^K H Help menu
help ^K ^H
help ^K h
+help ^[ [ 1 1 ~
hnext ^[ . Next help window
hprev ^[ , Previous help window
math ^[ m Calculator
pgdn .kN Screen down
pgdn ^V
pgdn ^[ [ 6 ~
+pgdn ^[ [ G SCO
pgup .kP Screen up
pgup ^U
pgup ^[ [ 5 ~
+pgup ^[ [ I SCO
play ^K 0 TO 9 Execute macro
prevw ^K P Goto previous window
prevw ^K ^P
:main Text editing window
:inherit windows
-helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
-nop ^[ [ 2 0 1 ~
-
- #HOOK#5 main keybindings
-
- Spell-check macros
+ compile
+ :def compile switch,"*Build-Log*",rtn,markb,eof," ",markk,blkdel,filt,query,parserr
+:def compile querysave,query,scratch,"* Build Log *",rtn,bof,markb,eof," ",markk,blkdel,build
- Ispell
+ spell check
+:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
+:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
:def ispellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
:def ispellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
- Aspell
-:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
-:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
+ #HOOK#5 main keybindings
@SPELL@file ^[ l
@SPELL@word ^[ n
- Compile
-
- :def compile switch,"*Build-Log*",rtn,markb,eof," ",markk,blkdel,filt,query,parserr
-
-:def compile querysave,query,scratch,"* Build Log *",rtn,bof,markb,eof," ",markk,blkdel,build
-
- Here we guess some common key sequences which either do not have termcap
- sequences or which are frequently wrong. Note that if the termcap entry is
- correct, it will override these later on.
-
-insc ^[ [ 2 ~
-insc ^[ [ L SCO
-
-delch ^[ [ 3 ~
-
-pgup ^[ [ I SCO
-
-pgdn ^[ [ G SCO
-
-home ^[ [ 1 ~ Putty, Linux, Cygwin
-home ^[ [ H Xterm, Konsole, SCO
-home ^[ O H gnome-terminal
-home ^[ [ 7 ~ RxVT
-
-eol ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eol ^[ [ F Xterm, Konsole, SCO
-eol ^[ O F gnome-terminal
-eol ^[ [ 8 ~ RxVT
-
-begin_marking,rtarw,toggle_marking ^[ [ 1 ; 5 C Mark right Xterm
-begin_marking,rtarw,toggle_marking ^[ [ 5 C Mark right Gnome-terminal
- (Almost all termcap entries have ^[ O C as an arrow key).
- begin_marking,rtarw,toggle_marking ^[ O C Mark right Putty Ctrl-rtarw
-begin_marking,rtarw,toggle_marking ^[ O c Mark right RxVT Ctrl-rtarw
-
-begin_marking,ltarw,toggle_marking ^[ [ 1 ; 5 D Mark left
-begin_marking,ltarw,toggle_marking ^[ [ 5 D Mark left
- begin_marking,ltarw,toggle_marking ^[ O D Mark left Putty Ctrl-ltarw
-begin_marking,ltarw,toggle_marking ^[ O d Mark left RxVT Ctrl-ltarw
-
-begin_marking,uparw,toggle_marking ^[ [ 1 ; 5 A Mark up
-begin_marking,uparw,toggle_marking ^[ [ 5 A Mark up
- begin_marking,uparw,toggle_marking ^[ O A Mark up Putty Ctrl-uparw
-begin_marking,uparw,toggle_marking ^[ O a Mark up RxVT Ctrl-uparw
-
-begin_marking,dnarw,toggle_marking ^[ [ 1 ; 5 B Mark down
-begin_marking,dnarw,toggle_marking ^[ [ 5 B Mark down
- begin_marking,dnarw,toggle_marking ^[ O B Mark down Putty Ctrl-dnarw
-begin_marking,dnarw,toggle_marking ^[ O b Mark down RxVT Ctrl-dnarw
-
-blkdel,nmark ^[ [ 3 ; 5 - Gnome-terminal Ctrl-Del
-blkdel,nmark ^[ [ 3 ; 5 ~ Xterm Ctrl-Del
-
-yank ^[ [ 2 ; 5 - Gnome-terminal Ctrl-Ins
-yank ^[ [ 2 ; 5 ~ Xterm Ctrl-Ins
+helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
+nop ^[ [ 2 0 1 ~
begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A xterm shift-up mark
begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B xterm shift-down mark
begin_marking,bof,toggle_marking ^[ [ 1 ; 6 H xterm shift-ctrl-home
begin_marking,eof,toggle_marking ^[ [ 1 ; 6 F xterm shift-ctrl-end
- Extra functions not really part of JOE user interface:
+ Here we guess some common key sequences which either do not have termcap
+ sequences or which are frequently wrong. Note that if the termcap entry is
+ correct, it will override these later on.
+
+blkdel,nmark ^[ [ 3 ; 5 - Gnome-terminal Ctrl-Del
+blkdel,nmark ^[ [ 3 ; 5 ~ Xterm Ctrl-Del
+
+yank ^[ [ 2 ; 5 - Gnome-terminal Ctrl-Ins
+yank ^[ [ 2 ; 5 ~ Xterm Ctrl-Ins
+
+ Extra functions not really part of Joe user interface:
delbol ^[ o Delete to beginning of line
delbol ^[ ^O Delete to beginning of line
yank ^[ ^Y Undelete previous text
yapp ^[ w Append next delete to previous yank
- Standard JOE user interface
+ Standard Joe user interface
quote8 ^\ Enter Meta chars
quote ` Enter Ctrl chars
bof ^K U Goto beginning of file
bof ^K ^U
bof ^K u
- bol .kh Goto beginning of line
- bol ^A
+bof ^[ [ 1 ; 5 H
+home ^A Goto beginning of line
home .kh
-home ^A
+home ^[ [ 1 ~
+home ^[ [ 7 ~
+home ^[ [ H
center ^K A Center line
center ^K ^A
center ^K a
crawlr ^K > Pan right
delch .kD Delete character
delch ^D
+delch ^[ [ 3 ~
deleol ^J Delete to end of line
dellin ^Y Delete entire line
delw ^W Delete word to right
eof ^K V Go to end of file
eof ^K ^V
eof ^K v
-eol .kH Go to end of line
+eof ^[ [ 1 ; 5 F
eol .@7
+eol .kH Go to end of line
eol ^E
+eol ^[ [ 4 ~
+eol ^[ [ 8 ~
+eol ^[ [ F
exsave ^K X Save and exit
exsave ^K ^X
exsave ^K x
filt ^K / Filter block
finish ^K ^M Complete text under cursor
fnext ^L Find next
+fnext .k3
+fnext ^[ [ 1 3 ~
fmtblk ^K J Format paragraphs in block
fmtblk ^K ^J
fmtblk ^K j
groww ^K ^G
groww ^K g
insc .kI Insert a space
- insc ^@
+insc ^[ [ 2 ~
+insc ^[ [ L SCO
insf ^K R Insert a file
insf ^K ^R
insf ^K r
lindent ^K , Indent to left
-line ^K L Goto line no.
+line ^K L Goto line number
line ^K ^L
line ^K l
ltarw .kl Go left
mode ^T Options menu
nextpos ^K = Goto next position in position history
nextword ^X Goto next word
+nextword ^[ [ 1 ; 5 C
open ^] Split line
prevpos ^K - Previous position in history
prevword ^Z Previous word
+prevword ^[ [ 1 ; 5 D
redo ^^ Redo changes
rindent ^K . Indent to right
rtarw .kr Go right
:menu Selection menus
:inherit windows
-
-pgupmenu ^[ [ I
-
-pgdnmenu ^[ [ G
-
-bolmenu ^[ [ 1 ~ Putty, Linux, Cygwin
-bolmenu ^[ [ H Xterm, Konsole
-bolmenu ^[ O H gnome-terminal
-bolmenu ^[ [ 7 ~ RxVT
-
-eolmenu ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eolmenu ^[ [ F Xterm, Konsole
-eolmenu ^[ O F gnome-terminal
-eolmenu ^[ [ 8 ~ RxVT
-
abort ^[ ^[
backsmenu ^?
backsmenu ^H
bofmenu ^K U
bofmenu ^K ^U
bofmenu ^K u
-bolmenu .kh
+bofmenu ^[ [ 1 ; 5 H
bolmenu ^A
+bolmenu .kh
+bolmenu ^[ [ 1 ~
+bolmenu ^[ [ 7 ~
+bolmenu ^[ [ H
dnarwmenu .kd
dnarwmenu ^N
dnarwmenu ^[ [ B
eofmenu ^K V
eofmenu ^K ^V
eofmenu ^K v
+eofmenu ^[ [ 1 ; 5 F
+eolmenu .@7
eolmenu .kH
eolmenu ^E
+eolmenu ^[ [ 4 ~
+eolmenu ^[ [ 8 ~
+eolmenu ^[ [ F
ltarwmenu .kl
ltarwmenu ^B
ltarwmenu ^[ [ D
ltarwmenu ^[ O D
-pgdnmenu .kN Screen down
+pgdnmenu .kN
pgdnmenu ^V
pgdnmenu ^[ [ 6 ~
-pgupmenu .kP Screen up
+pgdnmenu ^[ [ G
+pgupmenu .kP
pgupmenu ^U
pgupmenu ^[ [ 5 ~
+pgupmenu ^[ [ I
rtarwmenu .kr
rtarwmenu ^F
rtarwmenu ^[ [ C
:cua Undo/Cut/Copy/Paste, CUA style
:inherit main
#HOOK#6 extra keybindings in CUA mode
+:def pastecua helpcard,"Paste",rtn,keymap,"Pastecua",rtn
undo ^Z
blkdel,nmark ^X
copy ^C
yank ^V
-helpcard,"Paste",rtn,keymap,"Pastecua",rtn ^[ P
-helpcard,"Paste",rtn,keymap,"Pastecua",rtn ^[ p
-helpcard,"Paste",rtn,keymap,"Pastecua",rtn ^[ [ 2 0 0 ~
+pastecua ^[ P
+pastecua ^[ p
+pastecua ^[ [ 2 0 0 ~
- $MirOS: contrib/code/jupp/jpicorc.in,v 1.24 2017/12/06 23:17:33 tg Exp $
+ $MirOS: contrib/code/jupp/jpicorc.in,v 1.31 2018/02/01 02:33:46 tg Exp $
- Initialization file for JOE
+ Initialisation file for JOE
Super Pico
+ This file must be written in the 8-bit encoding, not UTF-8.
+
JOE looks for this file in:
1 - $HOME/.jpicorc
2 - @jrcbefore@jpicorc@jrcafter@
This file can include other files by placing the following include command
- in the first column:
+ in the first column (comment lines start with space or tab):
:include filename
FIRST SECTION: Default global options (these options can also be specified
- on the command line. Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
+ on the command line. Also, the NOXON, LINES, COLUMNS, DOPADDING and BAUD
options can be specified in environment variables):
Put each option you want set in the first column:
-option Sets the option
--option Clears the option
- -mid Cursor is recentered when scrolling is necessary
-
- -marking Text between ^KB and cursor is highlighted (use with -lightoff)
-
+ -mid Cursor is recentred when scrolling is necessary
+-marking Text between ^KB and cursor is highlighted; use with:
+-lightoff Turn off highlighting after block copy or move
+ -autoswap Swap markb with markk when necessary
-asis Characters 128 - 255 shown as-is
-
--force Force final newline when files are saved
-
+ -hex Hex editing mode
-nobackups If you don't want backup files to be created
-
--lightoff Turn off highlighting after block copy or move
-
+ -backpath path
+ Where to store backup files (do not quote, no comment after)
+-force Force final newline when files are saved
-exask ^KX always confirms file name
-
-beep Beep on errors and when cursor goes past extremes
-
-nosta Disable top-most status line
-
-keepup %k and %c status line escape sequences updated frequently
-
-pg nnn No. lines to keep for PgUp/PgDn
-
-csmode ^KF after a pervious search does a ^L instead
-
- -backpath path Directory to store backup files
- (do not use quotes, and remove the comment after path)
-
-nonotice Disable copyright notice
-
-noxon Attempt to turn off ^S/^Q processing
-
-orphan Put extra files given on command line in orphaned buffers
instead of in windows
-
-dopadding Output pad characters (for when there is no tty handshaking)
-
-lines nnn Set no. screen lines
-
- -baud nnn Set baud rate for terminal optimizations
-
+ -baud nnn Set baud rate for terminal optimisations
-columns nnn Set no. screen columns
-
-help Start with help on
-
-skiptop nnn Don't use top nnn lines of the screen
--notite Don't send terminal initialization and termination strings: prevents
- restoration of screen on exit.
+-notite Don't send terminal initialisation and termination strings:
+ prevents restoration of screen on exit
-pastetite Enter bracketed paste mode automatically for TERM=xterm-xfree86
- -usetabs Use tabs to help optimize screen update.
-
--assume_color Assume terminal has ANSI color support even if termcap/terminfo entry
- says that it doesn't. This only applies if the terminal otherwise
- looks like an ANSI terminal (support bold and capability starts with
- ESC [).
+ -usetabs Use tabs to help optimise screen update
--guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
+-assume_color Assume terminal has ANSI colour support even if its termcap
+ or terminfo entry says that it doesn't. This only applies if
+ the terminal otherwise looks like an ANSI terminal (supports
+ bold and capability starts with ESC [).
--guess_indent Guess indent character (tab or space).
+-guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
--menu_explorer Stay in menu system when a directory is selected (otherwise
- directory is added to path and menu is closed).
+-guess_indent Guess indent character (tab or space)
- -icase Search is case insensitive by default.
+-menu_explorer Stay in menu system when a directory is selected (otherwise
+ directory is added to path and menu is closed)
- -wrap Search wraps
+ -icase Search is case-insensitive by default
+ -wrap Search wraps
- Status line definition strings. -lmsg defines the left-justified string,
+ Status line definition strings. -lmsg defines the left-justified string,
and -rmsg defines the right-justified string. The first character of -rmsg
- is the background fill character. -hmsg (3.1jupp15) defines the help hint
+ is the background fill character. -hmsg (3.1jupp15) defines the help hint
(only about a dozen chars) displayed next to the copyright notice in the
- initial status line. The following escape sequences can be used in these
- strings:
-
- %t 12 hour time
- %u 24 hour time
- %T O for overtype mode, I for insert mode
- %W W if wordwrap is enabled
- %I A if autoindent is enabled
- %X Rectangle mode indicator
- %n File name
- %m '(Modified)' if file has been changed
- %* '*' if file has been changed
- %R Read-only indicator
- %r Row (line) number
- %c Column number
- %o Byte offset into file
- %O Byte offset into file in hex
- %a Ascii value of character under cursor
- %A Ascii value of character under cursor in hex
- %p Percent of file cursor is at
- %l No. lines in file
- %k Entered prefix keys
- %S '*SHELL*' if there is a shell running in window
- %M Macro recording message
- %y Syntax
+ initial status line (inverted by default, unless starting with exactly \i).
+ The following escape sequences can be used in these strings:
+
+ %t 12-hour time
+ %u 24-hour time
+ %T O for overtype mode, I for insert mode
+ %W W if wordwrap is enabled
+ %I A if autoindent is enabled
+ %X rectangle mode indicator
+ %n file name
+ %m '(Modified)' if file has been changed
+ %* '*' if file has been changed
+ %R read-only indicator
+ %r row (line) number
+ %c column number
+ %o byte offset into file (decimal)
+ %O byte offset into file in hex
+ %a ASCII value of character under cursor (decimal)
+ %A ASCII value of character under cursor in hex
+ %p percent of file cursor is at
+ %l number of lines in file
+ %k entered prefix keys
+ %S '*SHELL*' if there is a shell running in window
+ %M macro recording message
+ %y syntax
+ %x context (first non-indented line going backwards)
These formatting escape sequences may also be given:
- \i Inverse
- \u Underline
- \b Bold
- \d Dim
- \f Blink
+ \i Inverse
+ \u Underline
+ \b Bold
+ \d Dim
+ \f Blink
-lmsg \i%k%T%W%I%X %n %m%y%R %M
-rmsg %S Row %r Col %c %t Ctrl-G for help
--hmsg Help: ^G
+-hmsg \i\f\bHelp: ^G\b\f
- SECOND SECTION: File name dependant local option settings:
+ SECOND SECTION: filename-dependent local option settings:
Each line with '*' in the first column indicates the modes which should be
- set for files which match the regular expression. If more than one regular
- expression matches the file name, then the last matching one is chosen.
-
- Here are the modes which can be set:
-
- -utf8 File is UTF-8 coded
-
- -syntax name Specify syntax (syntax file called
- 'name.jsf' will be loaded)
-
- -highlight Enable highlighting
-
- -smarthome Home key first moves cursor to beginning of line,
- then if hit again, to first non-blank character.
-
- -indentfirst Smart home goes to first non-blank character first,
- instead of going the beginning of line first.
-
- -smartbacks Backspace key deletes 'istep' number of
- 'indentc's if cursor is at first non-space
- character.
-
- -tab nnn Tab width
-
- -indentc nnn Indentation character (32 for space, 9 for tab)
-
- -istep nnn Number of indentation columns
-
- -spaces TAB inserts spaces instead of tabs.
-
- -purify Fix indentation if necessary for rindent, lindent and backs
- (for example if indentation uses a mix of tabs and spaces,
- and indentc is space, indentation will be converted to all
- spaces).
-
- -crlf File uses CR-LF at ends of lines
-
- -wordwrap Wordwrap
-
- -autoindent Auto indent
-
- -overwrite Overtype mode
-
- -picture Picture mode (right arrow can go past end of lines)
-
- -lmargin nnn Left margin
-
- -rmargin nnn Right margin
-
-
- -french One space after '.', '?' and '!' for wordwrap
- and paragraph reformat instead of two. Joe
- does not change the spacing you give, but
- sometimes it must put spacing in itself. This
- selects how much is inserted.
-
- -linums Enable line numbers on each line
-
- -rdonly File is read-only
-
- -keymap name Keymap to use if not 'main'
-
- -lmsg Status line definition strings-
- -rmsg see previous section for more info.
-
- -mnew macro Macro to execute when new files are loaded
- -mold macro Macro to execute when existing files are loaded
- -msnew macro Macro to execute when new files are saved
- -msold macro Macro to execute when existing files are saved
-
- -square Rectangular block mode
-
- Macros for the above options are in the same format as in the key
- binding section below- but without the key name strings.
-
- Default local options
+ set for files whose name matches the regular expression. If more than one
+ regular expression matches the file name, then the last matching one is
+ chosen.
+
+ A file contents regular expression may also be specified on a separate line
+ with '+regex'. If this regular expresssion is given, then both the file name
+ regex and the file contents regex must match for the options to apply.
+
+ Here is a list of modes which can be set:
+
+ -keymap name Keymap to use if not 'main'
+ -square Rectangular block mode
+ -overwrite Overtype mode
+ -picture Picture mode (cursor right can go past end of line)
+ -linums Show line numbers in front of each line
+ -rdonly File is read-only
+ -crlf File uses CR-LF at end of lines
+ -encoding utf8 File is UTF-8 encoded
+ -syntax name Specify syntax (syntax file called
+ 'name.jsf' will be loaded)
+ -highlight Enable syntax highlighting
+
+ -french One space after '.', '?' and '!' for wordwrap and
+ paragraph reformat instead of two. JOE does not
+ change the spacing you give, but sometimes it must
+ put spacing in itself. This selects how much is
+ inserted in those cases.
+ -purify Fixup indentation if necessary for rindent, lindent
+ and backs (for example if indentation uses a mix of
+ tabs and spaces, and indentc is space, indentation
+ will be converted to all spaces)
+
+ -lmargin nnn Left margin
+ -rmargin nnn Right margin
+ -tab nnn Tab width
+ -indentc nnn Indentation character (32 = space, 9 = tab)
+ -istep nnn Amount of 'indentc's per indentation level
+ -spaces Tab key inserts spaces instead of tabs
+ -wordwrap Wordwrap
+ -autoindent Auto indent
+ -smartbacks Backspace key deletes 'istep' number of 'indentc's
+ if cursor is at first non-space character
+ -smarthome Home key first moves cursor to beginning of line,
+ then if hit again, to first non-blank character
+ -indentfirst Smart home goes to first non-blank character first,
+ instead of to the beginning of the line first
+
+ -lmsg Status line definition strings;
+ -rmsg see previous section for more info
+
+ -mnew macro Macro to execute when new files are loaded
+ -mold macro Macro to execute when existing files are loaded
+ -msnew macro Macro to execute when new files are saved
+ -msold macro Macro to execute when existing files are saved
+
+ Macros for the above options are in the same format as in the key
+ binding section below but without the key name strings.
+
+ Default local options:
-highlight
-french
-indentc 9
-highlight
-syntax diff
+*
++Only in[ ]
+-highlight
+-syntax diff
+
+*
++Nur in[ ]
+-highlight
+-syntax diff
+
+*
++\[1-9]\+\[0-9]\[cda]
+-highlight
+-syntax diff
+
*.sh*
-syntax sh
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+tcsh\>
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+tcsh\>
-syntax csh
=== Diff
-encoding utf8
-syntax java
- === Joe Syntax File
+ === JOE Syntax File
*.jsf
-syntax conf
- === flex
-*.l
--syntax lex
-
=== LISP
*.lisp
-syntax lisp
*.el
-syntax lisp
- === M4
-*.m4
--syntax m4
-
=== Make
*akefile
-syntax conf
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/perl
++#!\+\[ ]\+\[/a-z0-9._-]/perl
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]perl
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]perl
-syntax perl
=== PHP
-spaces
*
-+#!\+\[ ]\+\[a-z/]/python
++#!\+\[ ]\+\[/a-z0-9._-]/python
-encoding utf8
-syntax python
-tab 4
-spaces
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]python
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]python
-encoding utf8
-syntax python
-tab 4
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
=== TCL
-encoding utf8
-syntax xml
- === yacc
-*.y
--syntax yacc
-
=== Text (except in jupp)
*.asc
-wordwrap
THIRD SECTION: Named help screens:
- Use \i to turn on/off inverse video
- Use \u to turn on/off underline
- Use \b to turn on/off bold
- Use \d to turn on/off dim
- Use \f to turn on/off flash
+ Use \| to insert a spring: all springs in a given line are set to the same
+ width such that the entire line exactly fits in the width of the screen
+ (if it's not an exact multiple so that there are N spaces remaining, the
+ rightmost N springs each get one extra space). Hint: if you want vertical
+ alignment, each line should have the same number of springs.
{Basic
\|\b^K\b cut line \| \b^W\b find first \|\b^J\b justify \| \b^X\b save or discard, exit \|
Section names you must provide:
- :main For editing window
- :prompt For prompt lines
- :query For single-character query lines
- :querya Singe-character query for quote
- :querysr Search & Replace single-character query
+ :main editing window
+ :prompt prompt lines
+ :query single-character query lines
+ :querya singe-character query for quote
+ :querysr search-and-replace single-character query
- Other sections may be given as well for organization purposes or for
+ Other sections may be given as well for organisation purposes or for
use with the '-keymap' option.
Use:
Keys:
- Use ^@ through ^_ and ^? for Ctrl chars
+ Use ^@ through ^_ and ^? for C0 control characters and DEL
Use SP for space
Use a TO b to generate a range of characters
- You can also use termcap string capability names. For example:
+ You can also use termcap string capability names. For example:
.ku Up
.kd Down
Macros:
- Simple macros can be made by comma seperating 2 or more command names. For
- example:
+ Simple macros can be made by comma seperating two or more command names.
+ For example:
eof,bol ^T Z Goto beginning of last line
- Also quoted matter is typed in literally:
+ Also quoted matter is typed in literally (backslashes escape):
bol,">",dnarw .k1 Quote news article line
- Macros may cross lines if they end with ,
-
- Commands or named macros may be created with :def. For example, you can
- use:
+ Macros may cross lines if they end with a comma.
+ Commands or named macros may be created with :def.
+ For example, you can use...
:def foo eof,bol
- To define a command foo which will goto the beginning of the last line.
+ ... to define a command foo which will go to the beginning of the last line.
:windows Bindings common to all windows
#HOOK#4 common keybindings
-type ^@ TO ÿ Type a character
+type ^@ TO ÿ
abort ^C Abort window
arg ^[ \ Repeat next command
explode ^[ I Show all windows or show only one window
explode ^[ ^I
explode ^[ i
-help ^G Help menu
help .k1
+help ^G Help menu
+help ^[ [ 1 1 ~
hnext ^[ . Next help window
hprev ^[ , Previous help window
math ^[ m Calculator
pgdn .kN Screen down
pgdn ^V
pgdn ^[ [ 6 ~
+pgdn ^[ [ G SCO
pgup .kP Screen up
pgup ^Y
pgup ^[ [ 5 ~
+pgup ^[ [ I SCO
play ^[ 0 TO 9 Execute macro
prevw ^[ P Goto previous window
prevw ^[ ^P
:main Text editing window
:inherit windows
-helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
-nop ^[ [ 2 0 1 ~
+ compile
+ :def compile switch,"*Build-Log*",rtn,markb,eof," ",markk,blkdel,filt,query,parserr
+:def compile querysave,query,scratch,"* Build Log *",rtn,bof,markb,eof," ",markk,blkdel,build
+
+ spell check
+:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
+:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
+:def ispellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
+:def ispellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
#HOOK#5 main keybindings
+@SPELL@file ^[ T
+@SPELL@file ^[ t
+@SPELL@file ^[ ^T
+@SPELL@word ^T Spell check word
+
+helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
+nop ^[ [ 2 0 1 ~
+
begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A xterm shift-up mark
begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B xterm shift-down mark
begin_marking,rtarw,toggle_marking ^[ [ 1 ; 2 C xterm shift-right mark
begin_marking,bof,toggle_marking ^[ [ 1 ; 6 H xterm shift-ctrl-home
begin_marking,eof,toggle_marking ^[ [ 1 ; 6 F xterm shift-ctrl-end
- Spell-check macros
-
- Ispell
-:def ispellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
-:def ispellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
-
- Aspell
-:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
-:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
-
-@SPELL@word ^T
-@SPELL@file ^[ T Spell check word
-@SPELL@file ^[ t
-@SPELL@file ^[ ^T
-
-insc ^[ [ 2 ~
-insc ^[ [ L SCO
-
-delch ^[ [ 3 ~
-
-pgup ^[ [ I SCO
-
-pgdn ^[ [ G SCO
-
-home ^[ [ 1 ~ Putty, Linux, Cygwin
-home ^[ [ H Xterm, Konsole, SCO
-home ^[ O H gnome-terminal
-home ^[ [ 7 ~ RxVT
-
-eol ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eol ^[ [ F Xterm, Konsole, SCO
-eol ^[ O F gnome-terminal
-eol ^[ [ 8 ~ RxVT
-
ask,query,lose,query,abortbuf ^X Exit after many questions
ask,query,exsave ^X Exit
backs ^? Backspace
bof ^[ Y Goto beginning of file
bof ^[ ^Y
bof ^[ y
-home .kh Goto beginning of line
-home ^A
-home ^[ [ H
+bof ^[ [ 1 ; 5 H
+home ^A Goto beginning of line
+home .kh
home ^[ [ 1 ~
+home ^[ [ 7 ~
+home ^[ [ H
center ^[ ^C Center line
center ^[ c
delch .kD Delete character
delch ^D
+delch ^[ [ 3 ~
deleol ^[ K Delete to end of line
deleol ^[ ^K
deleol ^[ k
eof ^[ V Go to end of file
eof ^[ ^V
eof ^[ v
-eol .kH Go to end of line
+eof ^[ [ 1 ; 5 F
eol .@7
+eol .kH Go to end of line
eol ^E
-eol ^[ [ F
eol ^[ [ 4 ~
+eol ^[ [ 8 ~
+eol ^[ [ F
execmd ^[ X Prompt for command to execute
execmd ^[ ^X Prompt for command to execute
execmd ^[ x Prompt for command to execute
ffirst ^W Find first
fnext ^[ w
fnext ^[ W
+fnext .k3
+fnext ^[ [ 1 3 ~
filt ^[ / Filter block though file
fmtblk ^J Format paragraphs in block
groww ^[ G Grow window
groww ^[ ^G
groww ^[ g
insc .kI Insert a space
+insc ^[ [ 2 ~
+insc ^[ [ L SCO
insf ^R Insert a file
isrch ^[ S Forward incremental search
isrch ^[ ^S Forward incremental search
ltarw ^[ [ D
mode ^[ ^[ Options menu
nextword ^@ Goto next word
+nextword ^[ [ 1 ; 5 C
open ^] Split line
prevword ^Z Previous word
+prevword ^[ [ 1 ; 5 D
picokill ^K Pico kill function
quote ` Enter Ctrl chars
quote8 ^\ Enter Meta chars
rtarw ^[ O C
rtarw ^[ [ C
run ^[ ! Run a program in a window
-stat ^C Cursor position status
+stat ^C Cursor position status
blksave ^O Save file
crawll ^[ < Pan left
crawlr ^[ > Pan right
:menu Selection menus
:inherit windows
-
-pgupmenu ^[ [ I
-
-pgdnmenu ^[ [ G
-
-bolmenu ^[ [ 1 ~ Putty, Linux, Cygwin
-bolmenu ^[ [ H Xterm, Konsole
-bolmenu ^[ O H gnome-terminal
-bolmenu ^[ [ 7 ~ RxVT
-
-eolmenu ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eolmenu ^[ [ F Xterm, Konsole
-eolmenu ^[ O F gnome-terminal
-eolmenu ^[ [ 8 ~ RxVT
-
abort ^[ ^[
backsmenu ^?
backsmenu ^H
bofmenu ^K U
bofmenu ^K ^U
bofmenu ^K u
-bolmenu .kh
+bofmenu ^[ [ 1 ; 5 H
bolmenu ^A
+bolmenu .kh
+bolmenu ^[ [ 1 ~
+bolmenu ^[ [ 7 ~
+bolmenu ^[ [ H
dnarwmenu .kd
dnarwmenu ^N
dnarwmenu ^[ [ B
eofmenu ^K V
eofmenu ^K ^V
eofmenu ^K v
+eofmenu ^[ [ 1 ; 5 F
+eolmenu .@7
eolmenu .kH
eolmenu ^E
+eolmenu ^[ [ 4 ~
+eolmenu ^[ [ 8 ~
+eolmenu ^[ [ F
ltarwmenu .kl
ltarwmenu ^B
ltarwmenu ^[ [ D
ltarwmenu ^[ O D
-pgdnmenu .kN Screen down
+pgdnmenu .kN
pgdnmenu ^V
pgdnmenu ^[ [ 6 ~
-pgupmenu .kP Screen up
+pgdnmenu ^[ [ G
+pgupmenu .kP
pgupmenu ^Y
pgupmenu ^[ [ 5 ~
+pgupmenu ^[ [ I
rtarwmenu .kr
rtarwmenu ^F
rtarwmenu ^[ [ C
- $MirOS: contrib/code/jupp/jstarrc.in,v 1.26 2017/12/06 23:17:34 tg Exp $
+ $MirOS: contrib/code/jupp/jstarrc.in,v 1.31 2018/02/01 02:33:46 tg Exp $
- Initialization file for JOE
+ Initialisation file for JOE
WordStar / Turbo-C Joe
+ This file must be written in the 8-bit encoding, not UTF-8.
+
JOE looks for this file in:
1 - $HOME/.jstarrc
2 - @jrcbefore@jstarrc@jrcafter@
This file can include other files by placing the following include command
- in the first column:
+ in the first column (comment lines start with space or tab):
:include filename
FIRST SECTION: Default global options (these options can also be specified
- on the command line. Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
+ on the command line. Also, the NOXON, LINES, COLUMNS, DOPADDING and BAUD
options can be specified in environment variables):
Put each option you want set in the first column:
-option Sets the option
--option Clears the option
- -mid Cursor is recentered when scrolling is necessary
- -marking Text between ^KB and cursor is highlighted (use with -lightoff)
+ -mid Cursor is recentred when scrolling is necessary
+ -marking Text between ^KB and cursor is highlighted; use with:
+ -lightoff Turn off highlighting after block copy or move
+ -autoswap Swap markb with markk when necessary
-asis Characters 128 - 255 shown as-is
- -force Force final newline when files are saved
+ -hex Hex editing mode
-nobackups If you don't want backup files to be created
- -lightoff Turn off highlighting after block copy or move
+ -backpath path
+ Where to store backup files (do not quote, no comment after)
+ -force Force final newline when files are saved
-exask ^KX always confirms file name
-beep Beep on errors and when cursor goes past extremes
-nosta Disable top-most status line
-keepup %k and %c status line escape sequences updated frequently
-pg nnn No. lines to keep for PgUp/PgDn
-csmode ^KF after a pervious search does a ^L instead
- -backpath path Directory to store backup files
- (do not use quotes, and remove the comment after path)
-nonotice Disable copyright notice
-noxon Attempt to turn off ^S/^Q processing
-orphan Put extra files given on command line in orphaned buffers
instead of in windows
-dopadding Output pad characters (for when there is no tty handshaking)
-lines nnn Set no. screen lines
- -baud nnn Set baud rate for terminal optimizations
+ -baud nnn Set baud rate for terminal optimisations
-columns nnn Set no. screen columns
-help Start with help on
-skiptop nnn Don't use top nnn lines of the screen
--notite Don't send terminal initialization and termination strings: prevents
- restoration of screen on exit.
+-notite Don't send terminal initialisation and termination strings:
+ prevents restoration of screen on exit
-pastetite Enter bracketed paste mode automatically for TERM=xterm-xfree86
- -usetabs Use tabs to help optimize screen update.
-
--assume_color Assume terminal has ANSI color support even if termcap/terminfo entry
- says that it doesn't. This only applies if the terminal otherwise
- looks like an ANSI terminal (support bold and capability starts with
- ESC [).
+ -usetabs Use tabs to help optimise screen update
--guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
+-assume_color Assume terminal has ANSI colour support even if its termcap
+ or terminfo entry says that it doesn't. This only applies if
+ the terminal otherwise looks like an ANSI terminal (supports
+ bold and capability starts with ESC [).
--guess_indent Guess indent character (tab or space).
+-guess_crlf Automatically detect MS-DOS files and set -crlf appropriately
--menu_explorer Stay in menu system when a directory is selected (otherwise
- directory is added to path and menu is closed).
+-guess_indent Guess indent character (tab or space)
- -icase Search is case insensitive by default.
+-menu_explorer Stay in menu system when a directory is selected (otherwise
+ directory is added to path and menu is closed)
- -wrap Search wraps
+ -icase Search is case-insensitive by default
+ -wrap Search wraps
- Status line definition strings. -lmsg defines the left-justified string,
+ Status line definition strings. -lmsg defines the left-justified string,
and -rmsg defines the right-justified string. The first character of -rmsg
- is the background fill character. -hmsg (3.1jupp15) defines the help hint
+ is the background fill character. -hmsg (3.1jupp15) defines the help hint
(only about a dozen chars) displayed next to the copyright notice in the
- initial status line. The following escape sequences can be used in these
- strings:
-
- %t 12 hour time
- %u 24 hour time
- %T O for overtype mode, I for insert mode
- %W W if wordwrap is enabled
- %I A if autoindent is enabled
- %X Rectangle mode indicator
- %n File name
- %m '(Modified)' if file has been changed
- %* '*' if file has been changed
- %R Read-only indicator
- %r Row (line) number
- %c Column number
- %o Byte offset into file
- %O Byte offset into file in hex
- %a Ascii value of character under cursor
- %A Ascii value of character under cursor in hex
- %p Percent of file cursor is at
- %l No. lines in file
- %k Entered prefix keys
- %S '*SHELL*' if there is a shell running in window
- %M Macro recording message
- %y Syntax
-
- The formatting escape sequences may also be given:
-
- \i Inverse
- \u Underline
- \b Bold
- \d Dim
- \f Blink
+ initial status line (inverted by default, unless starting with exactly \i).
+ The following escape sequences can be used in these strings:
+
+ %t 12-hour time
+ %u 24-hour time
+ %T O for overtype mode, I for insert mode
+ %W W if wordwrap is enabled
+ %I A if autoindent is enabled
+ %X rectangle mode indicator
+ %n file name
+ %m '(Modified)' if file has been changed
+ %* '*' if file has been changed
+ %R read-only indicator
+ %r row (line) number
+ %c column number
+ %o byte offset into file (decimal)
+ %O byte offset into file in hex
+ %a ASCII value of character under cursor (decimal)
+ %A ASCII value of character under cursor in hex
+ %p percent of file cursor is at
+ %l number of lines in file
+ %k entered prefix keys
+ %S '*SHELL*' if there is a shell running in window
+ %M macro recording message
+ %y syntax
+ %x context (first non-indented line going backwards)
+
+ These formatting escape sequences may also be given:
+
+ \i Inverse
+ \u Underline
+ \b Bold
+ \d Dim
+ \f Blink
-lmsg \i%k%T%W%I%X %n %m%y%R %M
-rmsg %S Row %r Col %c %t Ctrl-J for help
--hmsg Help: ^J
+-hmsg \i\f\bHelp: ^J\b\f
- SECOND SECTION: File name dependant local option settings:
+ SECOND SECTION: filename-dependent local option settings:
Each line with '*' in the first column indicates the modes which should be
- files which match the regular expression. If more than one regular
- expression matches the file name, than the last matching one is chosen.
-
- Here is a list of modes which can be set:
-
- -utf8 File is UTF-8 coded
-
- -syntax name Specify syntax (syntax file called
- 'name.jsf' will be loaded)
-
- -highlight Enable highlighting
-
- -smarthome Home key first moves cursor to beginning of line,
- then if hit again, to first non-blank character.
-
- -indentfirst Smart home goes to first non-blank character first,
- instead of going the beginning of line first.
-
- -smartbacks Backspace key deletes 'istep' number of
- 'indentc's if cursor is at first non-space
- character.
-
- -tab nnn Tab width
-
- -indentc nnn Indentation character (32 for space, 9 for tab)
-
- -istep nnn Number of indentation columns
-
- -spaces TAB inserts spaces instead of tabs.
-
- -purify Fix indentation if necessary for rindent, lindent and backs
- (for example if indentation uses a mix of tabs and spaces,
- and indentc is space, indentation will be converted to all
- spaces).
-
- -crlf File uses CR-LF at ends of lines
-
- -wordwrap Wordwrap
-
- -autoindent Auto indent
-
- -overwrite Overtype mode
-
- -picture Picture mode (right arrow can go past end of lines)
-
- -lmargin nnn Left margin
-
- -rmargin nnn Right margin
+ set for files whose name matches the regular expression. If more than one
+ regular expression matches the file name, then the last matching one is
+ chosen.
+ A file contents regular expression may also be specified on a separate line
+ with '+regex'. If this regular expresssion is given, then both the file name
+ regex and the file contents regex must match for the options to apply.
- -french One space after '.', '?' and '!' for wordwrap
- and paragraph reformat instead of two. Joe
- does not change the spacing you give, but
- sometimes it must put spacing in itself. This
- selects how much is inserted.
-
- -linums Enable line numbers on each line
-
- -rdonly File is read-only
-
- -keymap name Keymap to use if not 'main'
-
- -lmsg Status line definition strings-
- -rmsg see previous section for more info.
-
- -mnew macro Macro to execute when new files are loaded
- -mold macro Macro to execute when existing files are loaded
- -msnew macro Macro to execute when new files are saved
- -msold macro Macro to execute when existing files are saved
-
- -square Rectangular block mode
-
- Macros for the above options are in the same format as in the key
- binding section below- but without the key name strings.
+ Here is a list of modes which can be set:
- Default local options
+ -keymap name Keymap to use if not 'main'
+ -square Rectangular block mode
+ -overwrite Overtype mode
+ -picture Picture mode (cursor right can go past end of line)
+ -linums Show line numbers in front of each line
+ -rdonly File is read-only
+ -crlf File uses CR-LF at end of lines
+ -encoding utf8 File is UTF-8 encoded
+ -syntax name Specify syntax (syntax file called
+ 'name.jsf' will be loaded)
+ -highlight Enable syntax highlighting
+
+ -french One space after '.', '?' and '!' for wordwrap and
+ paragraph reformat instead of two. JOE does not
+ change the spacing you give, but sometimes it must
+ put spacing in itself. This selects how much is
+ inserted in those cases.
+ -purify Fixup indentation if necessary for rindent, lindent
+ and backs (for example if indentation uses a mix of
+ tabs and spaces, and indentc is space, indentation
+ will be converted to all spaces)
+
+ -lmargin nnn Left margin
+ -rmargin nnn Right margin
+ -tab nnn Tab width
+ -indentc nnn Indentation character (32 = space, 9 = tab)
+ -istep nnn Amount of 'indentc's per indentation level
+ -spaces Tab key inserts spaces instead of tabs
+ -wordwrap Wordwrap
+ -autoindent Auto indent
+ -smartbacks Backspace key deletes 'istep' number of 'indentc's
+ if cursor is at first non-space character
+ -smarthome Home key first moves cursor to beginning of line,
+ then if hit again, to first non-blank character
+ -indentfirst Smart home goes to first non-blank character first,
+ instead of to the beginning of the line first
+
+ -lmsg Status line definition strings;
+ -rmsg see previous section for more info
+
+ -mnew macro Macro to execute when new files are loaded
+ -mold macro Macro to execute when existing files are loaded
+ -msnew macro Macro to execute when new files are saved
+ -msold macro Macro to execute when existing files are saved
+
+ Macros for the above options are in the same format as in the key
+ binding section below but without the key name strings.
+
+ Default local options:
-highlight
-french
-indentc 9
-highlight
-syntax diff
+*
++Only in[ ]
+-highlight
+-syntax diff
+
+*
++Nur in[ ]
+-highlight
+-syntax diff
+
+*
++\[1-9]\+\[0-9]\[cda]
+-highlight
+-syntax diff
+
*.sh*
-syntax sh
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+tcsh\>
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+tcsh\>
-syntax csh
=== Diff
-encoding utf8
-syntax java
- === Joe Syntax File
+ === JOE Syntax File
*.jsf
-syntax conf
- === flex
-*.l
--syntax lex
-
=== LISP
*.lisp
-syntax lisp
*.el
-syntax lisp
- === M4
-*.m4
--syntax m4
-
=== Make
*akefile
-syntax conf
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/perl
++#!\+\[ ]\+\[/a-z0-9._-]/perl
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]perl
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]perl
-syntax perl
=== PHP
-spaces
*
-+#!\+\[ ]\+\[a-z/]/python
++#!\+\[ ]\+\[/a-z0-9._-]/python
-encoding utf8
-syntax python
-tab 4
-spaces
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]python
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]python
-encoding utf8
-syntax python
-tab 4
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
=== TCL
-encoding utf8
-syntax xml
- === yacc
-*.y
--syntax yacc
-
=== Text (except in jupp)
*.asc
-wordwrap
THIRD SECTION: Named help screens:
- Use \i to turn on/off inverse video
- Use \u to turn on/off underline
- Use \b to turn on/off bold
- Use \d to turn on/off dim
- Use \f to turn on/off flash
+ Use \| to insert a spring: all springs in a given line are set to the same
+ width such that the entire line exactly fits in the width of the screen
+ (if it's not an exact multiple so that there are N spaces remaining, the
+ rightmost N springs each get one extra space). Hint: if you want vertical
+ alignment, each line should have the same number of springs.
{Basic
\i Help Screen \|turn off with ^J more help with ESC . (^[.) \i
Section names you must provide:
- :main For editing window
- :prompt For prompt lines
- :query For single-character query lines
- :querya Singe-character query for quote
- :querysr Search & Replace single-character query
+ :main editing window
+ :prompt prompt lines
+ :query single-character query lines
+ :querya singe-character query for quote
+ :querysr search-and-replace single-character query
- Other sections may be given as well for organization purposes or for
+ Other sections may be given as well for organisation purposes or for
use with the '-keymap' option.
Use:
Keys:
- Use ^@ through ^_ and ^? for Ctrl chars
+ Use ^@ through ^_ and ^? for C0 control characters and DEL
Use SP for space
Use a TO b to generate a range of characters
- You can also use termcap string capability names. For example:
+ You can also use termcap string capability names. For example:
.ku Up
.kd Down
Macros:
- Simple macros can be made by comma seperating 2 or more command names. For
- example:
+ Simple macros can be made by comma seperating two or more command names.
+ For example:
eof,bol ^T Z Goto beginning of last line
- Also quoted matter is typed in literally:
+ Also quoted matter is typed in literally (backslashes escape):
bol,">",dnarw .k1 Quote news article line
- Macros may cross lines if they end with ,
+ Macros may cross lines if they end with a comma.
+ Commands or named macros may be created with :def.
+ For example, you can use...
+
+ :def foo eof,bol
+
+ ... to define a command foo which will go to the beginning of the last line.
:windows Bindings common to all windows
#HOOK#4 common keybindings
explode ^K I
explode ^K ^I
explode ^K i
+help .k1
help ^J
+help ^[ [ 1 1 ~
nmark ^K H
nmark ^K ^H
nmark ^K h
nextw ^K n
pgdn .kN Screen down
pgdn ^[ [ 6 ~
+pgdn ^[ [ G SCO
pgup .kP Screen up
pgup ^[ [ 5 ~
+pgup ^[ [ I SCO
play ^[ 0 TO 9
prevw ^K P
prevw ^K ^P
:main Text editing window
:inherit windows
-helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
-nop ^[ [ 2 0 1 ~
-
- #HOOK#5 main keybindings
+ compile
+ :def compile switch,"*Build-Log*",rtn,markb,eof," ",markk,blkdel,filt,query,parserr
+:def compile querysave,query,scratch,"* Build Log *",rtn,bof,markb,eof," ",markk,blkdel,build
-begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A xterm shift-up mark
-begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B xterm shift-down mark
-begin_marking,rtarw,toggle_marking ^[ [ 1 ; 2 C xterm shift-right mark
-begin_marking,ltarw,toggle_marking ^[ [ 1 ; 2 D xterm shift-left mark
-begin_marking,bol,toggle_marking ^[ [ 1 ; 2 H xterm shift-home
-begin_marking,eol,toggle_marking ^[ [ 1 ; 2 F xterm shift-end
-begin_marking,bof,toggle_marking ^[ [ 1 ; 6 H xterm shift-ctrl-home
-begin_marking,eof,toggle_marking ^[ [ 1 ; 6 F xterm shift-ctrl-end
-
- Ispell
+ spell check
+:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
+:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
:def ispellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
:def ispellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
- Aspell
-:def aspellfile filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;cat $SPLTMP;/bin/rm $SPLTMP",rtn,retype
-:def aspellword psh,nextword,markk,prevword,markb,filt,"SPLTMP=ispell.tmp;cat >$SPLTMP;aspell -x -c $SPLTMP </dev/tty >/dev/tty;tr -d <$SPLTMP '\\012';/bin/rm $SPLTMP",rtn,retype,nextword
+ #HOOK#5 main keybindings
@SPELL@file ^Q l
@SPELL@file ^Q L
@SPELL@word ^Q N
@SPELL@word ^Q ^N
- Compile macro
-:def compile querysave,query,scratch,"* Build Log *",rtn,markb,eof," ",markk,blkdel,build
-
-insc ^[ [ 2 ~
-insc ^[ [ L SCO
-
-delch ^[ [ 3 ~
-
-pgup ^[ [ I SCO
-
-pgdn ^[ [ G SCO
-
-home ^[ [ 1 ~ Putty, Linux, Cygwin
-home ^[ [ H Xterm, Konsole, SCO
-home ^[ O H gnome-terminal
-home ^[ [ 7 ~ RxVT
+helpcard,"Paste",rtn,keymap,"Paste",rtn ^[ [ 2 0 0 ~
+nop ^[ [ 2 0 1 ~
-eol ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eol ^[ [ F Xterm, Konsole, SCO
-eol ^[ O F gnome-terminal
-eol ^[ [ 8 ~ RxVT
+begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A xterm shift-up mark
+begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B xterm shift-down mark
+begin_marking,rtarw,toggle_marking ^[ [ 1 ; 2 C xterm shift-right mark
+begin_marking,ltarw,toggle_marking ^[ [ 1 ; 2 D xterm shift-left mark
+begin_marking,bol,toggle_marking ^[ [ 1 ; 2 H xterm shift-home
+begin_marking,eol,toggle_marking ^[ [ 1 ; 2 F xterm shift-end
+begin_marking,bof,toggle_marking ^[ [ 1 ; 6 H xterm shift-ctrl-home
+begin_marking,eof,toggle_marking ^[ [ 1 ; 6 F xterm shift-ctrl-end
rtarw,prevword,markb,nextword,markk ^K T
rtarw,prevword,markb,nextword,markk ^K ^T
compile ^[ c
compile ^[ C
-
insf,"!date '+%I:%M %p'",rtn ^[ !
insf,"!date '+%b %d, %Y'",rtn ^[ @
center ^[ c
psh,drop,fwrdc,query,markk,blkdel ^Q t Cut to char
psh,drop,fwrdc,query,markk,blkdel ^Q ^T Cut to char
-
quote8 ^\ Quote Meta chars
quote ^P Quote Ctrl chars
bof ^Q ^R
bof ^Q r
bof ^Q .kP
-home .kh Goto beginning of line
-home ^[ [ H
-home ^[ [ 1 ~
-home ^Q S
+bof ^[ [ 1 ; 5 H
+home ^Q S Goto beginning of line
home ^Q ^S
home ^Q s
home ^Q .kl
+home .kh
+home ^[ [ 1 ~
+home ^[ [ 7 ~
+home ^[ [ H
crawll ^Q ,
crawlr ^Q .
-tos,bol ^Q E
-tos,bol ^Q ^E
-tos,bol ^Q e
+tos ^Q E
+tos ^Q ^E
+tos ^Q e
tos,bol ^Q .ku
center ^K A Center line
center ^K ^A
delbol ^Q .kD
delch .kD Delete character
delch ^G
+delch ^[ [ 3 ~
deleol ^Q Y Delete to end of line
deleol ^Q ^Y
deleol ^Q y
eof ^Q ^C
eof ^Q c
eof ^Q .kN
-eol .kH Go to end of line
+eof ^[ [ 1 ; 5 F
eol .@7
-eol ^[ [ F
-eol ^[ [ 4 ~
+eol .kH Go to end of line
eol ^Q D
eol ^Q ^D
eol ^Q d
eol ^Q .kr
-bos,eol ^Q X
-bos,eol ^Q ^X
-bos,eol ^Q x
+eol ^[ [ 4 ~
+eol ^[ [ 8 ~
+eol ^[ [ F
+bos ^Q X
+bos ^Q ^X
+bos ^Q x
bos,eol ^Q .kd
execmd ^[ x Prompt for command to execute
execmd ^[ X Prompt for command to execute
qrepl ^Q a
filt ^K / Filter block
fnext ^L Find next
+fnext .k3
+fnext ^[ [ 1 3 ~
format ^B Format paragraph
fwrdc ^Q G ^@ TO ÿ
fwrdc ^Q ^G ^@ TO ÿ
insf ^K r
macros ^[ d Dump macros
macros ^[ ^D
-mode,"T" ^V Insert/Overtype
mode,"T" .kI
+mode,"T" ^V Insert/Overtype
+mode,"T" ^[ [ 2 ~
+mode,"T" ^[ [ L SCO
lindent ^K , Indent to left
line ^Q I Goto line no.
line ^Q ^I
mode ^O
nextpos ^K = Goto next position in position history
nextword ^F Goto next word
+nextword ^[ [ 1 ; 5 C
open ^N Split line
pgdn ^C
pgup ^R
prevpos ^Q ^P
prevpos ^Q p
prevword ^A Previous word
+prevword ^[ [ 1 ; 5 D
redo ^^ Redo changes
rindent ^K . Indent to right
rtarw .kr Go right
:menu Selection menus
:inherit windows
-pgupmenu ^[ [ I
-
-pgdnmenu ^[ [ G
-
-bolmenu ^[ [ 1 ~ Putty, Linux, Cygwin
-bolmenu ^[ [ H Xterm, Konsole
-bolmenu ^[ O H gnome-terminal
-bolmenu ^[ [ 7 ~ RxVT
-
-eolmenu ^[ [ 4 ~ Putty, Linux, Cygwin, ssh
-eolmenu ^[ [ F Xterm, Konsole
-eolmenu ^[ O F gnome-terminal
-eolmenu ^[ [ 8 ~ RxVT
-
abort ^[ ^[
backsmenu ^?
backsmenu ^H
bofmenu ^Q R
bofmenu ^Q ^R
-bofmenu ^K r
-bolmenu .kh
+bofmenu ^Q r
+bofmenu ^[ [ 1 ; 5 H
bolmenu ^Q S
bolmenu ^Q ^S
bolmenu ^Q s
+bolmenu .kh
+bolmenu ^[ [ 1 ~
+bolmenu ^[ [ 7 ~
+bolmenu ^[ [ H
dnarwmenu .kd
dnarwmenu ^X
dnarwmenu ^[ [ B
eofmenu ^Q C
eofmenu ^Q ^C
eofmenu ^Q c
+eofmenu ^[ [ 1 ; 5 F
+eolmenu .@7
eolmenu .kH
eolmenu ^Q D
eolmenu ^Q ^D
eolmenu ^Q d
+eolmenu ^Q .kr
+eolmenu ^[ [ 4 ~
+eolmenu ^[ [ 8 ~
+eolmenu ^[ [ F
ltarwmenu .kl
ltarwmenu ^S
ltarwmenu ^[ [ D
ltarwmenu ^[ O D
-pgdnmenu .kN Screen down
+pgdnmenu .kN
pgdnmenu ^C
pgdnmenu ^[ [ 6 ~
-pgupmenu .kP Screen up
+pgdnmenu ^[ [ G
+pgupmenu .kP
pgupmenu ^R
pgupmenu ^[ [ 5 ~
+pgupmenu ^[ [ I
rtarwmenu .kr
rtarwmenu ^D
rtarwmenu ^[ [ C
rtarwmenu ^[ O C
rtn SP
-rtn ^I
-rtn ^K H
-rtn ^K h
-rtn ^K ^H
rtn ^J
tabmenu ^I
uparwmenu .ku
:cua Undo/Cut/Copy/Paste, CUA style
:inherit main
#HOOK#6 extra keybindings in CUA mode
+:def pastecua helpcard,"Paste",rtn,keymap,"Pastecua",rtn
undo ^Z
blkdel,nmark ^X
copy ^C
yank ^V
-helpcard,"Paste",rtn,keymap,"Pastecua",rtn ^[ P
-helpcard,"Paste",rtn,keymap,"Pastecua",rtn ^[ p
-helpcard,"Paste",rtn,keymap,"Pastecua",rtn ^[ [ 2 0 0 ~
+pastecua ^[ P
+pastecua ^[ p
+pastecua ^[ [ 2 0 0 ~
- "jupp" resource file for Jupp3.1*nix (c) 1997-2017 Thorsten Glaser
+ "jupp" resource file for Jupp3.1*nix (c) 1997-2018 Thorsten Glaser
Provided that these terms and disclaimer and all copyright notices
are retained or reproduced in an accompanying document, permission
is granted to deal in this work without restriction, including un-
-pg 2
-lmsg \i%k%T%*\b%n\b%R
-rmsg R%r<%l C%c\u%o|%O\i\b%a|%A\b\i\u %u
--hmsg ^J = Help
+-hmsg \i\f\b^J = Help\b\f
--crlf
-guess_crlf
-french
-tab 8
--wordwrap
- #HOOK#3101 global/default flags
+ #HOOK#1 global/default flags
=== Generic files
No '.' in filename?
-highlight
-syntax diff
+*
++Only in[ ]
+-highlight
+-syntax diff
+
+*
++Nur in[ ]
+-highlight
+-syntax diff
+
+*
++\[1-9]\+\[0-9]\[cda]
+-highlight
+-syntax diff
+
*.sh*
-syntax sh
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+tcsh\>
-syntax csh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+tcsh\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+tcsh\>
-syntax csh
=== Diff
-encoding utf8
-syntax java
- === Joe Syntax File
+ === JOE Syntax File
*.jsf
-syntax conf
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/perl
++#!\+\[ ]\+\[/a-z0-9._-]/perl
-syntax perl
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]perl
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]perl
-syntax perl
=== PHP
-spaces
*
-+#!\+\[ ]\+\[a-z/]/python
++#!\+\[ ]\+\[/a-z0-9._-]/python
-encoding utf8
-syntax python
-tab 4
-spaces
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]python
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]python
-encoding utf8
-syntax python
-tab 4
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[bd]\+ash\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[bda]sh\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
*
-+#!\+\[ ]\+\[a-z/]/env\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
++#!\+\[ ]\+\[/a-z0-9._-]/env\[ ]\+\[ ]\+\[a-z]ksh\+\[0-9._-]\>
-syntax sh
=== TCL
-encoding utf8
-syntax xml
- #HOOK#3102 filename matching
+ #HOOK#2 filename matching
{Basic
\i Help Screen turn off with ^J more help with Esc+. (^[.) \i
\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \i
\i \i\u\bMACROS\b\u \u\bMISC\b\u \u\bSCROLL\b\u \u\bSHELL\b\u \u\bGOTO\b\u \u\bI-SEARCH\b\u \i \i
\i \i^[( record ^Q? status ^Q. right ^K' window ^QB to ^KB ^[R backwards \i \i
-\i \i^[) stop ^QQ repeat ^Q, left ^[! command ^QK to ^KK ^[S forwards \i \i
-\i \i^[? query ^QM math \u\bCharSEARCH\b\u \u\bQUOTE\b\u \u\bDELETE\b\u \u\bBOOKMARKS\b\u \i \i
-\i \i^[D dump ^[H message ^QH forwrd ` Ctrl- ^[Y yank ^K 0-9 define \i \i
+\i \i^[) stop ^QQ repeat ^Q, left ^[' command ^QK to ^KK ^[S forwards \i \i
+\i \i^[/ query ^QM math \u\bCharSEARCH\b\u \u\bQUOTE\b\u \u\bDELETE\b\u \u\bBOOKMARKS\b\u \i \i
+\i \i^[? lst def ^[H message ^QH forwrd ` Ctrl- ^[Y yank ^K 0-9 define \i \i
\i \i^[ 0-9 play ^N play #0 ^QG backwd ^P Meta- ^[O word< ^Q 0-9 goto \i \i
\i \i \u\bIn math mode,\b\u use 0xCAFE for hex. All ops are floating point internally. \i \i
\i \i \u\bPredefined variables:\b\u byte col height line lines top width \i \i
{Programs
\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \i
-\i \i\u\bGOTO\b\u \u\bCOMPILING\b\u \u\bSLIDING\b\u \i \i
+\i \i\u\bGOTO\b\u ^QV start of last search \u\bCOMPILING\b\u \u\bSLIDING\b\u \i \i
\i \i^Q= next merge conflict marker ^[C compile & parse errors ^W up \i \i
\i \i^Q] next matching brace ^[E parse errors ^Z down \i \i
\i \i^Q[ previous " " \u\bINDENT\b\u ^KF save, compile & upload to NXT brick \i \i
\i \i go to \uhttp://sf.net/projects/joe-editor/\u for upstream bug reports. JUPP 2.8 \i \i
\i \i for DOS compiled by A. Totlis, packed with LHarc 2.13; JUPP 3.x for UNIX\d(R)\d \i \i
\i \i at \uhttp://mirbsd.de/jupp\u and by \bThorsten "\dmirabilos\d" Glaser <\utg@mirbsd.org\u>\b \i \i
-\i \i @(#) jupprc 2017-12-06; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \i \i
+\i \i @(#) jupprc 2018-02-01; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \i \i
}
- #HOOK#3103 additional help screens
+ #HOOK#3 additional help screens
{CharTable
\i Help Screen turn off with ^J prev. screen ^[, \uCharacter Map\u \i
}
:windows
- #HOOK#3104 common keybindings
+ #HOOK#4 common keybindings
type ^@ TO ÿ
abort ^K Q
abort ^K ^Q
arg ^Q ^Q
arg ^Q q
arg ^[ q q
+explode .k6
explode ^K I
explode ^K ^I
explode ^K i
explode ^[ [ 1 7 ~
-explode .k6
+help .k1
help ^J
help ^[ [ 1 1 ~
-help .k1
hnext ^[ .
hprev ^[ ,
math ^Q M
mathres ^[ =
msg ^[ H
msg ^[ h
+nextw .k8
nextw ^K N
nextw ^K ^N
nextw ^K n
nextw ^[ [ 1 9 ~
-nextw .k8
play ^[ 0 TO 9
+prevw .k7
prevw ^K P
prevw ^K ^P
prevw ^K p
prevw ^[ [ 1 8 ~
-prevw .k7
-query ^[ ?
+query ^[ /
quote `
quote8 ^P
record ^[ (
:main
:inherit windows
+:def dosrch setmark,":",ffirst
+:def dorepl setmark,":",qrepl
:def pastemain helpcard,"Paste",rtn,keymap,"Paste",rtn
-:def conflictmarker ffirst,"\\^\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[ \\n]",rtn,rtn,ltarw
+:def conflictmarker dosrch,"\\^\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[ \\n]",rtn,rtn,ltarw
:def fixwhitespace eof," ",bof,"a",qrepl,"\\[",quote,"i",quote,"k",quote,"l",quote,"m ]\\+\\[",quote,"i",quote,"k",quote,"l",quote,"m ]\\$",rtn,rtn,rtn,"r",eof,rtn,ffirst,"\\^\\[^\\n]",rtn,"b",rtn,eol,markb,bof,delch,eof,markk,blkdel,ffirst,"\\?",rtn,"b",rtn,eol,rtn
:def freedroidz splitw,prevw,scratch,"nbc-Output",rtn,nextw,save,markk,bol,markb,prevw,prevw,blkcpy,nextw,nextw,rtn,prevw,eol,"'",bol,qrepl,"'",rtn,rtn,"'\\\\''",rtn,"r",backs,backs,backs,bol,"LC_ALL=C; export LC_ALL; fn='",eol,"; p=--posix; sed $p -e q </dev/null >/dev/null 2>&1 || p=; r=$(sed $p -e 's\ 1[^^]\ 1[&]\ 1g; s\ 1\\^\ 1\\\\^\ 1g' <<EOF",rtn,"$fn",rtn,"EOF",rtn,"); (case $fn in *.nxc) ;; *) echo '==> Error: filename not *.nxc'; exit ;; esac; echo \"Compiling $fn\"; nbc -sm- -d \"$fn\" 2>&1; x=$?; if test $x = 0; then echo '==> OK'; else echo '==> Error code:' $x; fi) | tr '\\n' '\ 1' | sed $p -e 's!\ 1# *\\([^\ 1]*\\)\ 1File \"[^\"]*/\\('\"$r\"'\\)\" ; line \\([0-9]*\\)\ 1!\ 1\\2:\\3: \\1\ 1!g' -e 's!\ 1#\\([^\ 1]*\\)\ 1File \"\\([^\"]*\\)\" ; line \\([0-9]*\\)\ 1!\ 1\\2:\\3: \\1\ 1!g' | tr '\ 1' '\\n'",rtn,nmark,filt,"sh",rtn,rtn,"Press ^KQ to close this window!",rtn,parserr
:def docompile edit,rtn,filt,query,parserr
- #HOOK#3105 main keybindings
+:def filtall nmark,filt,uparw
+:def pvsrch prevpos,gomark,":"
+:def inscurdate insf,"!date '+%Y-%m-%d'",rtn,eol,delch
+:def inscurtime insf,"!date '+%H:%M:%S'",rtn,eol,delch
+ #HOOK#5 main keybindings
begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A