joe-3.1jupp37.tgz jupp-3_1_37
authormirabilos <m@mirbsd.org>
Sat, 20 Oct 2018 19:28:36 +0000 (21:28 +0200)
committermirabilos <mirabilos@evolvis.org>
Sat, 20 Oct 2018 19:28:36 +0000 (21:28 +0200)
40 files changed:
HINTS
Makefile.am
Makefile.bsd-wrapper
Makefile.in
NEWS
README
TODO
b.c
builtins.c
bw-lgen.inc [new file with mode: 0644]
bw.c
charmap.c
compat.c
configure
configure.ac
docs/jmacs.png [new file with mode: 0644]
docs/joe.png [new file with mode: 0644]
docs/jpico.png [new file with mode: 0644]
docs/jstar.png [new file with mode: 0644]
docs/jupp.png [new file with mode: 0644]
i18n.c
jmacsrc.in
joe.1.in
joe.txt
joerc.in
jpicorc.in
jstarrc.in
jupprc
rjoerc.in
scrn.c
strlfun.inc
syntax/asm.jsf.in
syntax/java.jsf.in
syntax/sh.jsf.in
syntax/xml.jsf.in
tw.c
uedit.c
usearch.c
utf8.c
utf8.h

diff --git a/HINTS b/HINTS
index 64cf96a..b276b3a 100644 (file)
--- a/HINTS
+++ b/HINTS
@@ -58,7 +58,7 @@ exactly like the example one in /usr/local/etc/joe/charmaps.
 
 You can hit ^K <space> to see the current character set.
 
-You can hit ` x to enter a Unicode character if the file coding is UTF-8.
+You can hit ` x to enter a UCS character if the file coding is UTF-8.
 
 Programming
 -----------
@@ -125,4 +125,4 @@ will not insert.
 - Search, incremental search, and search & replace all operate as usual.
 
 ___________________________________________________________________
-$MirOS: contrib/code/jupp/HINTS,v 1.16 2017/12/07 01:00:30 tg Exp $
+$MirOS: contrib/code/jupp/HINTS,v 1.17 2018/08/10 02:53:42 tg Exp $
index 65c42d2..9795e09 100644 (file)
@@ -1,18 +1,12 @@
-# $MirOS: contrib/code/jupp/Makefile.am,v 1.21 2018/03/15 23:07:46 tg Exp $
+# $MirOS: contrib/code/jupp/Makefile.am,v 1.22 2018/06/28 02:03:45 tg Exp $
 
 AUTOMAKE_OPTIONS = foreign
 
 EXTRA_DIST = \
-       COPYING HINTS INFO LIST NEWS README README.cvs TODO \
-       charmaps/klingon.in dir.c docs/help-system.html jmacsrc.in \
-       joe.1.in joerc.in jpicorc.in jstarrc.in jupprc rjoerc.in \
-       syntax/asm.jsf.in syntax/c.jsf.in syntax/conf.jsf.in \
-       syntax/csh.jsf.in syntax/diff.jsf.in syntax/fortran.jsf.in \
-       syntax/html.jsf.in syntax/java.jsf.in syntax/lisp.jsf.in \
-       syntax/mail.jsf.in syntax/mason.jsf.in syntax/pascal.jsf.in \
-       syntax/perl.jsf.in syntax/php.jsf.in syntax/python.jsf.in \
-       syntax/sh.jsf.in syntax/tcl.jsf.in syntax/tex.jsf.in \
-       syntax/verilog.jsf.in syntax/vhdl.jsf.in syntax/xml.jsf.in
+       HINTS INFO LIST Make-w32.sh autogen.sh bw-lgen.inc dir.c \
+       docs/help-system.html jmacsrc.in joe.1.in joe.txt joerc.in \
+       jpicorc.in jstarrc.in jupprc popen.inc rjoerc.in setup.inf \
+       strlfun.inc
 
 JOE_ALIASES = jmacs jpico jstar jupp rjoe
 JOE_RCFILES = jmacsrc joerc jpicorc jstarrc jupprc rjoerc
index 3a3b343..15ef885 100644 (file)
@@ -1,4 +1,4 @@
-# $MirOS: contrib/code/jupp/Makefile.bsd-wrapper,v 1.17 2018/03/15 23:15:40 tg Exp $
+# $MirOS: contrib/code/jupp/Makefile.bsd-wrapper,v 1.18 2018/10/20 15:43:58 tg Exp $
 #-
 # make -f Makefile.bsd-wrapper CFPREFIX=/usr/mpkg sysconfjoesubdir=/joe
 
@@ -79,4 +79,11 @@ cats: joe.cat1 joe.ps1
            /Keywords '('${CATS_KW:Q}')' /DOCINFO pdfmark \
            -f joe.ps1
 
+alljupps:
+       cd ${.CURDIR:Q} && r=$$(<CVS/Root) && cd .. && rm -rf j28 j37 j44 && \
+           cvs -Rqd "$$r" co -d j28 -r joe-2_8-msdos jupp && \
+           cvs -Rqd "$$r" co -d j37 -r jupprc-for-joe-3_7 jupp && \
+           cvs -Rqd "$$r" co -d j44 -r jupprc-for-joe-4_4 jupp && \
+           cd jupp && exec cvs -Rqd "$$r" up -PAd
+
 .include <bsd.cfwrap.mk>
index 7088020..1f6c50c 100644 (file)
@@ -14,8 +14,8 @@
 
 @SET_MAKE@
 
-# $MirOS: contrib/code/jupp/Makefile.in,v 1.19 2018/03/15 23:15:40 tg Exp $
-# $miros: contrib/code/jupp/Makefile.am,v 1.21 2018/03/15 23:07:46 tg Exp $
+# $MirOS: contrib/code/jupp/Makefile.in,v 1.20 2018/10/20 16:25:46 tg Exp $
+# $miros: contrib/code/jupp/Makefile.am,v 1.22 2018/06/28 02:03:45 tg Exp $
 
 
 
@@ -253,16 +253,10 @@ target_os = @target_os@
 target_vendor = @target_vendor@
 AUTOMAKE_OPTIONS = foreign
 EXTRA_DIST = \
-       COPYING HINTS INFO LIST NEWS README README.cvs TODO \
-       charmaps/klingon.in dir.c docs/help-system.html jmacsrc.in \
-       joe.1.in joerc.in jpicorc.in jstarrc.in jupprc rjoerc.in \
-       syntax/asm.jsf.in syntax/c.jsf.in syntax/conf.jsf.in \
-       syntax/csh.jsf.in syntax/diff.jsf.in syntax/fortran.jsf.in \
-       syntax/html.jsf.in syntax/java.jsf.in syntax/lisp.jsf.in \
-       syntax/mail.jsf.in syntax/mason.jsf.in syntax/pascal.jsf.in \
-       syntax/perl.jsf.in syntax/php.jsf.in syntax/python.jsf.in \
-       syntax/sh.jsf.in syntax/tcl.jsf.in syntax/tex.jsf.in \
-       syntax/verilog.jsf.in syntax/vhdl.jsf.in syntax/xml.jsf.in
+       HINTS INFO LIST Make-w32.sh autogen.sh bw-lgen.inc dir.c \
+       docs/help-system.html jmacsrc.in joe.1.in joe.txt joerc.in \
+       jpicorc.in jstarrc.in jupprc popen.inc rjoerc.in setup.inf \
+       strlfun.inc
 
 JOE_ALIASES = jmacs jpico jstar jupp rjoe
 JOE_RCFILES = jmacsrc joerc jpicorc jstarrc jupprc rjoerc
diff --git a/NEWS b/NEWS
index ddc0f25..645b267 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,15 +1,25 @@
-$MirOS: contrib/code/jupp/NEWS,v 1.124 2018/03/15 23:28:56 tg Exp $
+$MirOS: contrib/code/jupp/NEWS,v 1.129 2018/10/20 16:19:00 tg Exp $
 -------------------------------------------------------------------
 
-jupp-current
+JOE 3.1jupp37
 
-- …
+- fix syntax highlighting for Assembly and Java™: string termination
+- unbreak reformat block when raw octets are present
+- update to UCD 11.0.0
+- improve line generation / screen output code wrt. UTF-8
+- make UTF-8 decoding more robust
+- fix Makefile.am EXTRA_DIST
+- highlight .def and .dtx files as Tₑχ/LᴬTᴇΧ, .xsl (XSLT) as XML
+- handle .bin files as binary (no CRLF, hex editing)
+- improve shell grammar a little wrt. syntax highlighting
+- fix occasionally stuck CUA marking (LP#1677671)
+- do not lose the mark during some macros
 
 JOE 3.1jupp36
 
 - fix too-wide prompt for ` command (needs only 73 columns now)
 - make ^QV/^QP after ^K] work
-- fix Teχ/LᴬTᴇX highlighting on black-on-white terminals
+- fix Tₑχ/LᴬTᴇΧ highlighting on black-on-white terminals
 - don’t forcibly disable -highlight for NXC files
 - fix substitution of paths into generated files
 
diff --git a/README b/README
index a85046c..03e7903 100644 (file)
--- a/README
+++ b/README
@@ -3,8 +3,8 @@ This is Joe's Own Editor.  See the INFO file if you don't know what this is.
 Well actually, this is jupp, Programmers' Editor, the Editor which sucks less.
 It's got a Launchpad page, too: https://launchpad.net/jupp
 Although, you’re encouraged to ask stuff on IRC in #MirBSD on irc.freenode.net
-(Port 6697 SSL, 6667 insecure) or on miros-discuss@mirbsd.org (public mailing
-list, but do not send mail to junk@mirbsd.org, that's a spamtrap).
+(Port 6697 SSL, 6667 insecure) or on the miros-discuss public mailing list,
+see http://www.mirbsd.org/rss.htm#lists for details.
 
 =-=-=-=-=-=-=-=-=-=-=-=
 Installation procedure
@@ -431,4 +431,4 @@ joe's stdin/stdout to /dev/tty:
        joe filename  </dev/tty >/dev/tty
 
 ___________________________________________________________________
-$MirOS: contrib/code/jupp/README,v 1.7 2018/02/01 02:33:44 tg Exp $
+$MirOS: contrib/code/jupp/README,v 1.8 2018/07/15 13:41:23 tg Exp $
diff --git a/TODO b/TODO
index 73f2de9..f5d5058 100644 (file)
--- a/TODO
+++ b/TODO
@@ -386,7 +386,7 @@ regex: character classes? a-z matches any letter?
 New features:
 -----------------------
 
-  check all instances of 'chars': use unicode to locale symbols instead.
+  check all instances of 'chars': use UCS to locale symbols instead.
   EBCDIC ?
     - we assume '\n' is line terminator.
     - there are many references to '\t' and ' '.
@@ -584,7 +584,7 @@ Other requests:
   ⇒ would need to hide the ANSI chars, yet enable backspacing
 • 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)
+  handle 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?
@@ -594,11 +594,11 @@ Other requests:
   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
+  UCS (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.48 2018/01/07 20:32:45 tg Exp $
+$MirOS: contrib/code/jupp/TODO,v 1.49 2018/10/20 16:19:00 tg Exp $
diff --git a/b.c b/b.c
index e49684e..2d598ad 100644 (file)
--- a/b.c
+++ b/b.c
@@ -9,7 +9,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/b.c,v 1.35 2018/01/08 02:01:18 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/b.c,v 1.39 2018/06/28 01:18:32 tg Exp $");
 
 #include <unistd.h>
 #include <sys/stat.h>
@@ -55,6 +55,8 @@ int error;
 int force = 0;
 VFILE *vmem;
 
+static int brch_u8(P *);
+
 const unsigned char *msgs[] = {
        UC "No error",
        UC "New File",
@@ -557,108 +559,75 @@ int pgetb(P *p)
        } else {
                p->valcol = 0;
        }
-       return c;
+       return (int)((unsigned int)c);
 }
 
-/* return current character and move p to the next character.  column will be updated if it was valid. */
-int pgetc(P *p)
+/*
+ * return current character and move p to the next character.
+ * column will be updated if it was valid.
+ */
+int
+pgetc(P *p)
 {
-       if (p->b->o.charmap->type) {
-               int val, c, n, wid;
-               /* int m, oc; */
-
-               val = p->valcol;        /* Remember if column number was valid */
-               c = pgetb(p);           /* Get first byte */
-               /* oc = c; */
-
-               if (c==NO_MORE_DATA)
-                       return c;
-
-               if ((c&0xE0)==0xC0) { /* Two bytes */
-                       n = 1;
-                       c &= 0x1F;
-               } else if ((c&0xF0)==0xE0) { /* Three bytes */
-                       n = 2;
-                       c &= 0x0F;
-               } else if ((c&0xF8)==0xF0) { /* Four bytes */
-                       n = 3;
-                       c &= 0x07;
-               } else if ((c&0xFC)==0xF8) { /* Five bytes */
-                       n = 4;
-                       c &= 0x03;
-               } else if ((c&0xFE)==0xFC) { /* Six bytes */
-                       n = 5;
-                       c &= 0x01;
-               } else if ((c&0x80)==0x00) { /* One byte */
-                       n = 0;
-               } else { /* 128-191, 254, 255: Not a valid UTF-8 start character */
-                       n = 0;
-                       c = 0x1000FFFE;
-                       /* c -= 384; */
-               }
+       int c, b, w, valcol;
 
-               /* m = n; */
+       /* remember whether column number was valid */
+       valcol = p->valcol;
 
-               if (n) {
-                       int d;
+       /* get first byte */
+       if ((b = pgetb(p)) == NO_MORE_DATA)
+               return (b);
 
-                       do {
-                               d = brc(p);
-                               if (d == NO_MORE_DATA || (d&0xC0)!=0x80)
-                                       break;
+       if (p->b->o.charmap->type) {
+               struct utf8_sm utf8_sm;
+
+               utf8_init(&utf8_sm);
+ decode:
+               switch ((c = utf8_decode(&utf8_sm, b))) {
+               case -1:
+                       if ((b = brc(p)) != NO_MORE_DATA &&
+                           /* due to pgetb() interpreting control chars */
+                           (b & 0x80)) {
                                pgetb(p);
-                               c = ((c<<6)|(d&0x3F));
-                       } while (--n);
-                       if (n) { /* FIXME: there was a bad UTF-8 sequence */
-                               /* How to represent this? */
-                               /* pbkwd(p,m-n);
-                               c = oc - 384; */
-                               c = d == NO_MORE_DATA ? 0x1000FFFF : 0x1000FFFE;
-                               wid = 1;
-                       } else if (val)
-                               wid = joe_wcwidth(c);
-               } else {
-                       wid = 1;
-               }
-
-               if (val) { /* Update column no. if it was valid to start with */
-                       p->valcol = 1;
-                       if (c=='\t')
-                               p->col += (p->b->o.tab) - (p->col) % (p->b->o.tab);
-                       else if (c=='\n')
-                               p->col = 0;
-                       else
-                               p->col += wid;
+                               goto decode;
+                       }
+                       --utf8_sm.ptr;
+                       /* FALLTHROUGH */
+               case -2:
+                       pbkwd(p, utf8_sm.ptr);
+                       c = 0x80000000 | (int)((unsigned int)utf8_sm.buf[0]);
+                       w = 1;
+                       break;
+               case -3:
+                       c = 0x80000000 | b;
+                       w = 1;
+                       break;
+               default:
+                       w = joe_wcwidth(c);
+                       break;
                }
-
-               return c;
        } else {
-               unsigned char c;
-
-               if (p->ofst == GSIZE(p->hdr))
-                       return NO_MORE_DATA;
-               c = GCHAR(p);
-               if (++p->ofst == GSIZE(p->hdr))
-                       pnext(p);
-               ++p->byte;
+               c = b;
+               w = 1;
+       }
 
-               if (c == '\n') {
-                       ++(p->line);
+       /* update column number if it was valid to start with */
+       if (valcol) {
+               p->valcol = 1;
+               switch (c) {
+               case '\t':
+                       p->col += p->b->o.tab - p->col % p->b->o.tab;
+                       break;
+               case '\n':
                        p->col = 0;
-                       p->valcol = 1;
-               } else if (p->b->o.crlf && c == '\r') {
-                       if (brc(p) == '\n')
-                               return pgetc(p);
-                       else
-                               ++p->col;
-               } else {
-                       if (c == '\t')
-                               p->col += (p->b->o.tab) - (p->col) % (p->b->o.tab);
-                       else
-                               ++(p->col);
+                       break;
+               default:
+                       p->col += w;
+                       break;
                }
-               return c;
        }
+
+       return (c);
 }
 
 /* move p n characters forward */
@@ -722,73 +691,25 @@ int prgetb(P *p)
 }
 
 /* move p to the previous character (try to keep col updated) */
-int prgetc(P *p)
+int
+prgetc(P *p)
 {
-       if (p->b->o.charmap->type) {
-
-               if (pisbol(p))
-                       return prgetb(p);
-               else {
-                       P *q = pdup(p);
-                       P *r;
-                       p_goto_bol(q);
-                       r = pdup(q);
-                       while (q->byte<p->byte) {
-                               pset(r, q);
-                               pgetc(q);
-                       }
-                       pset(p,r);
-                       prm(r);
-                       prm(q);
-                       return brch(p);
-               }
+       P *q, *r;
 
-#if 0
-               int d = 0;
-               int c;
-               int n = 0;
-               int val = p->valcol;
-               for(;;) {
-                       c = prgetb(p);
-                       if (c == NO_MORE_DATA)
-                               return NO_MORE_DATA;
-                       else if ((c&0xC0)==0x80) {
-                               d |= ((c&0x3F)<<n);
-                               n += 6;
-                       } else if ((c&0x80)==0x00) { /* One char */
-                               d = c;
-                               break;
-                       } else if ((c&0xE0)==0xC0) { /* Two chars */
-                               d |= ((c&0x1F)<<n);
-                               break;
-                       } else if ((c&0xF0)==0xE0) { /* Three chars */
-                               d |= ((c&0x0F)<<n);
-                               break;
-                       } else if ((c&0xF8)==0xF0) { /* Four chars */
-                               d |= ((c&0x07)<<n);
-                               break;
-                       } else if ((c&0xFC)==0xF8) { /* Five chars */
-                               d |= ((c&0x03)<<n);
-                               break;
-                       } else if ((c&0xFE)==0xFC) { /* Six chars */
-                               d |= ((c&0x01)<<n);
-                               break;
-                       } else { /* FIXME: Invalid (0xFE or 0xFF found) */
-                               break;
-                       }
-               }
+       if (!p->b->o.charmap->type || pisbol(p))
+               return (prgetb(p));
 
-               if (val && c!='\t' && c!='\n') {
-                       p->valcol = 1;
-                       p->col -= joe_wcwidth(d);
-               }
-
-               return d;
-#endif
-       }
-       else {
-               return prgetb(p);
+       q = pdup(p);
+       p_goto_bol(q);
+       r = pdup(q);
+       while (q->byte < p->byte) {
+               pset(r, q);
+               pgetc(q);
        }
+       pset(p, r);
+       prm(r);
+       prm(q);
+       return (brch_u8(p));
 }
 
 /* move p n characters backwards */
@@ -970,7 +891,7 @@ P *pcol(P *p, long goalcol)
                        int c;
                        int wid;
 
-                       c = brch(p);
+                       c = brch_u8(p);
 
                        if (c == NO_MORE_DATA)
                                break;
@@ -2503,21 +2424,24 @@ int brc(P *p)
 {
        if (p->ofst == GSIZE(p->hdr))
                return NO_MORE_DATA;
-       return GCHAR(p);
+       return ((int)((unsigned int)(unsigned char)GCHAR(p)));
 }
 
 /* Return character at p */
 
-int brch(P *p)
+int
+brch(P *p)
 {
-       if (p->b->o.charmap->type) {
-               P *q = pdup(p);
-               int c = pgetc(q);
-               prm(q);
-               return c;
-       } else {
-               return brc(p);
-       }
+       return (p->b->o.charmap->type ? brch_u8(p) : brc(p));
+}
+
+static int
+brch_u8(P *p)
+{
+       P *q = pdup(p);
+       int c = pgetc(q);
+       prm(q);
+       return (c);
 }
 
 unsigned char *brmem(P *p, unsigned char *blk, int size)
index fd84faa..4e06bee 100644 (file)
@@ -11,7 +11,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/builtins.c,v 1.31 2018/03/15 23:28:56 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/builtins.c,v 1.32 2018/10/20 16:25:47 tg Exp $");
 
 #ifndef JUPPRC_BUILTIN_NAME
 #define JUPPRC_BUILTIN_NAME "jupprc"
@@ -49,6 +49,12 @@ const unsigned char * const builtins[] = {
                "-tab 8\n"
                "--wordwrap\n"
                "\n"
+               "*.bin\n"
+               "--crlf\n"
+               "--guess_crlf\n"
+               "-encoding ascii\n"
+               "-hex\n"
+               "\n"
                "*.py\n"
                "-encoding utf8\n"
                "-tab 4\n"
@@ -164,7 +170,7 @@ const unsigned char * const builtins[] = {
                "\\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 2018-03-15; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \\i \\i\n"
+               "\\i \\i @(#) blt_in 2018-10-20; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \\i \\i\n"
                "}\n"
                "\n"
                "{CharTable\n"
@@ -259,21 +265,21 @@ const unsigned char * const builtins[] = {
                ":def dorepl setmark,\":\",qrepl\n"
                ":def pastemain helpcard,\"Paste\",rtn,keymap,\"Paste\",rtn\n"
                ":def conflictmarker dosrch,\"\\\\^\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[ \\\\n]\",rtn,rtn,ltarw\n"
-               ":def fixwhitespace setmark,\":\",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,gomark,\":\",eof\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 fixwhitespace psh,setmark,\":\",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,gomark,\":\",eof\n"
+               ":def freedroidz psh,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"
-               "begin_marking,ltarw,toggle_marking     ^[ [ 1 ; 2 D\n"
-               "begin_marking,bol,toggle_marking       ^[ [ 1 ; 2 H\n"
-               "begin_marking,eol,toggle_marking       ^[ [ 1 ; 2 F\n"
-               "begin_marking,bof,toggle_marking       ^[ [ 1 ; 6 H\n"
-               "begin_marking,eof,toggle_marking       ^[ [ 1 ; 6 F\n"
+               "setmark,\":\",uparw,gomark,\":\",begin_marking,uparw,toggle_marking    ^[ [ 1 ; 2 A\n"
+               "setmark,\":\",dnarw,gomark,\":\",begin_marking,dnarw,toggle_marking    ^[ [ 1 ; 2 B\n"
+               "setmark,\":\",rtarw,gomark,\":\",begin_marking,rtarw,toggle_marking    ^[ [ 1 ; 2 C\n"
+               "setmark,\":\",ltarw,gomark,\":\",begin_marking,ltarw,toggle_marking    ^[ [ 1 ; 2 D\n"
+               "setmark,\":\",bol,gomark,\":\",begin_marking,bol,toggle_marking        ^[ [ 1 ; 2 H\n"
+               "setmark,\":\",eol,gomark,\":\",begin_marking,eol,toggle_marking        ^[ [ 1 ; 2 F\n"
+               "setmark,\":\",bof,gomark,\":\",begin_marking,bof,toggle_marking        ^[ [ 1 ; 6 H\n"
+               "setmark,\":\",eof,gomark,\":\",begin_marking,eof,toggle_marking        ^[ [ 1 ; 6 F\n"
                "pastemain      ^[ P\n"
                "pastemain      ^[ p\n"
                "pastemain      ^[ [ 2 0 0 ~\n"
diff --git a/bw-lgen.inc b/bw-lgen.inc
new file mode 100644 (file)
index 0000000..724ee55
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+ *     Edit buffer single line update core loop (twice)
+ *     Copyright © 1992 Joseph H. Allen
+ *     Copyright © 2018 mirabilos
+ *
+ *     This file is part of jupp (Joe’s Own Editor fork)
+ */
+
+#ifdef LGEN_Q
+__IDSTRING(rcsid_bw_lgen_inc, "$MirOS: contrib/code/jupp/bw-lgen.inc,v 1.5 2018/06/28 03:11:18 tg Exp $");
+#define XCOL col
+#else
+#define XCOL (scr + x - ox)
+#endif
+
+ LGEN_LABEL(loop):
+       /* Display next character */
+       if (!amnt)
+               goto LGEN_LABEL(noamnt);
+       do {
+               if (ungetit == -1)
+                       bc = *bp++;
+               else {
+                       bc = ungetit;
+                       ungetit = -1;
+               }
+               if (st != -1)
+                       atr = syn[idx++];
+               if (utf8_sm.state && !(bc & 0x80))
+                       goto LGEN_LABEL(ilseq);
+               if (p->b->o.crlf && bc == '\r') {
+                       ++byte;
+                       if (!--amnt) {
+ LGEN_LABEL(pl):
+                               if (bp == p->ptr + SEGSIZ) {
+                                       if (pnext(p)) {
+                                               bp = p->ptr;
+                                               amnt = p->hdr->hole;
+                                       } else
+                                               goto LGEN_LABEL(nl);
+                               } else {
+                                       bp = p->ptr + p->hdr->ehole;
+                                       amnt = SEGSIZ - p->hdr->ehole;
+                                       if (!amnt)
+                                               goto LGEN_LABEL(pl);
+                               }
+                       }
+                       if (*bp == '\n') {
+                               ++bp;
+                               ++byte;
+                               ++amnt;
+                               goto eobl;
+                       }
+ LGEN_LABEL(nl):
+                       --byte;
+                       ++amnt;
+               }
+               if (square)
+                       if (bc == '\t') {
+                               long tcol = XCOL + p->b->o.tab -
+                                   (XCOL % p->b->o.tab);
+
+                               if (tcol > from && tcol <= to)
+                                       c1 = INVERSE;
+                               else
+                                       c1 = 0;
+                       } else if (XCOL >= from && XCOL < to)
+                               c1 = INVERSE;
+                       else
+                               c1 = 0;
+               else if (byte >= from && byte < to)
+                       c1 = INVERSE;
+               else
+                       c1 = 0;
+               ++byte;
+               if (bc == '\t') {
+                       ta = p->b->o.tab - (XCOL % p->b->o.tab);
+#ifdef LGEN_Q
+                       if (ta + col > scr) {
+                               ta -= scr - col;
+                               goto dota_tab;
+                       }
+                       if ((col += ta) == scr) {
+                               --amnt;
+                               goto v_loop;
+                       }
+#else
+ dota_tab:
+                       tach1 = tach = ' ';
+                       if (bw->o.vispace)
+                               tach = 0x2192;
+                       goto dota_gen;
+ dota_loop:
+                       tach = tach1;
+ dota_gen:
+                       outatr(utf8_map, t, screen + x, attr + x,
+                           x, y, tach, c1 | atr);
+                       if (have)
+                               goto bye;
+                       if (++x == w)
+                               goto eosl;
+                       if (--ta)
+                               goto dota_loop;
+#endif
+               } else if (bc == '\n') {
+                       goto eobl;
+               } else {
+                       int wid = -1;
+
+                       /*
+                        * should be p->b->o.charmap->type logically
+                        * but they are identical here, and it helps
+                        * static analysers like Coverity
+                        */
+                       if (bw->b->o.charmap->type) {
+                               /* UTF-8 */
+                               c = utf8_decode(&utf8_sm, bc);
+
+                               if (c >= 0) {
+                                       /* Normal decoded character */
+                                       wid = joe_wcwidth(c);
+                               } else if (c == -1) {
+                                       /* Character taken */
+                                       wid = -1;
+                               } else if (c == -2) {
+                                       /* Incomplete sequence */
+                                       --byte;
+ LGEN_LABEL(ilseq):
+                                       ++amnt;
+                                       ungetit = bc;
+                                       c = 0x1000FFFE;
+                                       wid = utf8_sm.ptr;
+                                       utf8_init(&utf8_sm);
+                               } else if (c == -3) {
+                                       /* Invalid byte */
+                                       c = 0x1000FFFE;
+                                       wid = 1;
+                               }
+                       } else {
+                               /* 8-bit charmap */
+                               c = bc;
+                               wid = 1;
+                       }
+
+                       if (wid >= 0) {
+#ifdef LGEN_Q
+                               col += wid;
+                               if (col == scr) {
+                                       --amnt;
+                                       goto v_loop;
+                               } else if (col > scr) {
+                                       ta = col - scr;
+                                       tach1 = tach = '<';
+                                       goto dota_gen;
+                               }
+#else
+                               if (x + wid > w) {
+                                       /* Character hits rightmost column */
+                                       while (x < w) {
+                                               /* Display offscreen marker */
+                                               outatr(bw->b->o.charmap,
+                                                   t, screen + x, attr + x,
+                                                   x, y, '>', c1 | atr);
+                                               x++;
+                                       }
+                               } else if (c == 0x1000FFFE) while (wid--) {
+                                       outatr(bw->b->o.charmap, t,
+                                           screen + x, attr + x,
+                                           x, y, 0xFFFD,
+                                           (c1 | atr | UNDERLINE) ^ INVERSE);
+                                       x++;
+                               } else if (c == 0x20 && bw->o.vispace) {
+                                       outatr(utf8_map, t,
+                                           screen + x, attr + x,
+                                           x, y, 0xB7, c1 | atr);
+                                       x++;
+                               } else {
+                                       outatr(bw->b->o.charmap, t,
+                                           screen + x, attr + x,
+                                           x, y, c, c1 | atr);
+                                       x += wid;
+                               }
+#endif
+                       } else
+                               /* Get highlighting character again */
+                               --idx;
+#ifndef LGEN_Q
+                       if (have)
+                               goto bye;
+                       if (x >= w)
+                               goto eosl;
+#endif
+               }
+       } while (--amnt);
+ LGEN_LABEL(noamnt):
+       if (bp == p->ptr + SEGSIZ) {
+               if (pnext(p)) {
+                       bp = p->ptr;
+                       amnt = p->hdr->hole;
+                       goto LGEN_LABEL(loop);
+               }
+       } else {
+               bp = p->ptr + p->hdr->ehole;
+               amnt = SEGSIZ - p->hdr->ehole;
+               goto LGEN_LABEL(loop);
+       }
+       if (utf8_sm.state)
+               goto LGEN_LABEL(ilseq);
+       goto eof;
+
+#undef XCOL
diff --git a/bw.c b/bw.c
index f7451f2..47cf62e 100644 (file)
--- a/bw.c
+++ b/bw.c
@@ -8,7 +8,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/bw.c,v 1.37 2018/01/08 02:01:19 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/bw.c,v 1.39 2018/10/20 16:32:24 tg Exp $");
 
 #include <string.h>
 #include <stdlib.h>
@@ -333,8 +333,8 @@ lgen(SCRN *t, int y,
        long byte = p->byte;
        unsigned char *bp;      /* Buffer pointer, 0 if not set */
        int amnt;               /* Amount left in this segment of the buffer */
-       int c, ta, c1;
-       unsigned char bc;
+       int c, ta, c1 = 0;
+       unsigned char bc = 0;
        int ungetit = -1;
 
        struct utf8_sm utf8_sm;
@@ -354,7 +354,7 @@ lgen(SCRN *t, int y,
                prm(tmp);
        }
 
-/* Initialize bp and amnt from p */
+       /* Initialise bp and amnt from p */
        if (p->ofst >= p->hdr->hole) {
                bp = p->ptr + p->hdr->ehole + p->ofst - p->hdr->hole;
                amnt = SEGSIZ - p->hdr->ehole - (p->ofst - p->hdr->hole);
@@ -364,296 +364,37 @@ lgen(SCRN *t, int y,
        }
 
        if (col == scr)
-               goto loop;
- lp:
-       /* Display next character */
-       if (amnt)
-               do {
-                       if (ungetit== -1)
-                               bc = *bp++;
-                       else {
-                               bc = ungetit;
-                               ungetit = -1;
-                       }
-                       if(st!=-1)
-                               atr = syn[idx++];
-                       if (p->b->o.crlf && bc == '\r') {
-                               ++byte;
-                               if (!--amnt) {
- pppl:
-                                       if (bp == p->ptr + SEGSIZ) {
-                                               if (pnext(p)) {
-                                                       bp = p->ptr;
-                                                       amnt = p->hdr->hole;
-                                               } else
-                                                       goto nnnl;
-                                       } else {
-                                               bp = p->ptr + p->hdr->ehole;
-                                               amnt = SEGSIZ - p->hdr->ehole;
-                                               if (!amnt)
-                                                       goto pppl;
-                                       }
-                               }
-                               if (*bp == '\n') {
-                                       ++bp;
-                                       ++byte;
-                                       ++amnt;
-                                       goto eobl;
-                               }
- nnnl:
-                               --byte;
-                               ++amnt;
-                       }
-                       if (square)
-                               if (bc == '\t') {
-                                       long tcol = col + p->b->o.tab - col % p->b->o.tab;
-
-                                       if (tcol > from && tcol <= to)
-                                               c1 = INVERSE;
-                                       else
-                                               c1 = 0;
-                               } else if (col >= from && col < to)
-                                       c1 = INVERSE;
-                               else
-                                       c1 = 0;
-                       else if (byte >= from && byte < to)
-                               c1 = INVERSE;
-                       else
-                               c1 = 0;
-                       ++byte;
-                       if (bc == '\t') {
-                               ta = p->b->o.tab - col % p->b->o.tab;
-                               if (ta + col > scr) {
-                                       ta -= scr - col;
-                                       goto dota_tab;
-                               }
-                               if ((col += ta) == scr) {
-                                       --amnt;
-                                       goto loop;
-                               }
-                       } else if (bc == '\n')
-                               goto eobl;
-                       else {
-                               int wid = 1;
-
-                               /* 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(c);
-                                       else if(c== -1) /* Character taken */
-                                               wid = -1;
-                                       else if(c== -2) { /* Incomplete sequence */
-                                               wid = 1;
-                                               ungetit = c;
-                                               ++amnt;
-                                               --byte;
-                                       }
-                                       else if(c== -3) /* Control character 128-191, 254, 255 */
-                                               wid = 1;
-                               }
-
-                               if (wid >= 0) {
-                                       col += wid;
-                                       if (col == scr) {
-                                               --amnt;
-                                               goto loop;
-                                       } else if (col > scr) {
-                                               ta = col - scr;
-                                               tach1 = tach = '<';
-                                               goto dota_gen;
-                                       }
-                               } else
-                                       --idx;  /* Get highlighting character again.. */
-                       }
-               } while (--amnt);
-       if (bp == p->ptr + SEGSIZ) {
-               if (pnext(p)) {
-                       bp = p->ptr;
-                       amnt = p->hdr->hole;
-                       goto lp;
-               }
-       } else {
-               bp = p->ptr + p->hdr->ehole;
-               amnt = SEGSIZ - p->hdr->ehole;
-               goto lp;
-       }
-       goto eof;
- loop:
-       /* Display next character */
-       if (amnt)
-               do {
-                       if (ungetit== -1)
-                               bc = *bp++;
-                       else {
-                               bc = ungetit;
-                               ungetit = -1;
-                       }
-                       if(st!=-1)
-                               atr=syn[idx++];
-                       if (p->b->o.crlf && bc == '\r') {
-                               ++byte;
-                               if (!--amnt) {
- ppl:
-                                       if (bp == p->ptr + SEGSIZ) {
-                                               if (pnext(p)) {
-                                                       bp = p->ptr;
-                                                       amnt = p->hdr->hole;
-                                               } else
-                                                       goto nnl;
-                                       } else {
-                                               bp = p->ptr + p->hdr->ehole;
-                                               amnt = SEGSIZ - p->hdr->ehole;
-                                               if (!amnt)
-                                                       goto ppl;
-                                       }
-                               }
-                               if (*bp == '\n') {
-                                       ++bp;
-                                       ++byte;
-                                       ++amnt;
-                                       goto eobl;
-                               }
- nnl:
-                               --byte;
-                               ++amnt;
-                       }
-                       if (square)
-                               if (bc == '\t') {
-                                       long tcol = scr + x - ox + p->b->o.tab - (scr + x - ox) % p->b->o.tab;
+               goto v_loop;
 
-                                       if (tcol > from && tcol <= to)
-                                               c1 = INVERSE;
-                                       else
-                                               c1 = 0;
-                               } else if (scr + x - ox >= from && scr + x - ox < to)
-                                       c1 = INVERSE;
-                               else
-                                       c1 = 0;
-                       else if (byte >= from && byte < to)
-                               c1 = INVERSE;
-                       else
-                               c1 = 0;
-                       ++byte;
-                       if (bc == '\t') {
-                               ta = p->b->o.tab - ((x - ox + scr) % p->b->o.tab);
- dota_tab:
-                               tach1 = tach = ' ';
-                               if (bw->o.vispace)
-                                       tach = 0x2192;
- dota_gen:
-                               do {
-                                       outatr(utf8_map, t, screen + x, attr + x, x, y, tach, c1|atr);
-                                       tach = tach1;
-                                       if (have)
-                                               goto bye;
-                                       if (++x == w)
-                                               goto eosl;
-                               } while (--ta);
-                       } else if (bc == '\n') {
-                               if (utf8_sm.state)
-                                       goto unget_cch;
-                               goto eobl;
-                       } else {
-                               int wid = -1;
-                               int utf8_char;
-
-                               /* 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(utf8_char);
-                                       } else if (utf8_char == -1) {
-                                               /* Character taken */
-                                               wid = -1;
-                                       } else if (utf8_char == -2) {
-                                               /* Incomplete sequence (FIXME: do something better here) */
- unget_cch:
-                                               ungetit = bc;
-                                               ++amnt;
-                                               --byte;
-                                               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 */
-                                               /* Show as control character */
-                                               wid = 1;
-                                               utf8_char = 0x1000FFFE;
-                                       }
-                               } else { /* Regular */
-                                       utf8_char = bc;
-                                       wid = 1;
-                               }
+#define LGEN_Q
+#define LGEN_LABEL(x) q_ ## x
+#include "bw-lgen.inc"
+#undef LGEN_LABEL
 
-                               if(wid>=0) {
-                                       if (x+wid > w) {
-                                               /* If character hits right most column, don't display it */
-                                               while (x < w) {
-                                                       outatr(bw->b->o.charmap, t, screen + x, attr + x, x, y, '>', c1|atr);
-                                                       x++;
-                                               }
-                                       } else if (utf8_char == 0x1000FFFE) while (wid--) {
-                                               outatr(bw->b->o.charmap, t, screen + x, attr + x, x, y, 0xFFFD, (c1|atr|UNDERLINE)^INVERSE);
-                                               x++;
-                                       } else if (bw->o.vispace && (utf8_char == 0x20)) {
-                                               outatr(utf8_map, t, screen + x, attr + x, x, y, 0xB7, c1|atr);
-                                               x += wid;
-                                       } else {
-                                               outatr(bw->b->o.charmap, t, screen + x, attr + x, x, y, utf8_char, c1|atr);
-                                               x += wid;
-                                       }
-                               } else
-                                       --idx;
+#undef LGEN_Q
+#define LGEN_LABEL(x) v_ ## x
+#include "bw-lgen.inc"
+#undef LGEN_LABEL
 
-                               if (have)
-                                       goto bye;
-                               if (x >= w)
-                                       goto eosl;
-                       }
-               } while (--amnt);
-       if (bp == p->ptr + SEGSIZ) {
-               if (pnext(p)) {
-                       bp = p->ptr;
-                       amnt = p->hdr->hole;
-                       goto loop;
-               }
-       } else {
-               bp = p->ptr + p->hdr->ehole;
-               amnt = SEGSIZ - p->hdr->ehole;
-               goto loop;
-       }
-       goto eof;
  eobl:
        /* End of buffer line found.  Erase to end of screen line */
        ++p->line;
  eof:
-       if (x != w)
-               done = eraeol(t, x, y);
-       else
-               done = 0;
-
-/* Set p to bp/amnt */
+       done = x == w ? 0 : eraeol(t, x, y);
  bye:
-       if (bp - p->ptr <= p->hdr->hole)
-               p->ofst = bp - p->ptr;
-       else
-               p->ofst = bp - p->ptr - (p->hdr->ehole - p->hdr->hole);
-       p->byte = byte;
-       return done;
-
+       c = 1;
+       if (0)
+               /* FALLTHROUGH */
  eosl:
-       if (bp - p->ptr <= p->hdr->hole)
-               p->ofst = bp - p->ptr;
-       else
-               p->ofst = bp - p->ptr - (p->hdr->ehole - p->hdr->hole);
+         done = c = 0; /* End of screen line */
+
+       /* Set p to bp/amnt */
+       if ((p->ofst = bp - p->ptr) > p->hdr->hole)
+               p->ofst -= p->hdr->ehole - p->hdr->hole;
        p->byte = byte;
-       pnextl(p);
-       return 0;
+       if (!c)
+               pnextl(p);
+       return (done);
 }
 
 static void gennum(BW *w, int *screen, int *attr, SCRN *t, int y, int *comp)
index b820f1e..4275b56 100644 (file)
--- a/charmap.c
+++ b/charmap.c
@@ -2,7 +2,7 @@
 .if "0" == "1"
 #endif
 /*
- *     UNICODE/ISO-10646 conversion utilities
+ *     Universal Coded Character Set/ISO-10646 conversion utilities
  *     Copyright
  *             (C) 2004 Joseph H. Allen
  *
@@ -12,7 +12,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/charmap.c,v 1.30 2018/01/06 00:28:30 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/charmap.c,v 1.31 2018/08/10 02:53:42 tg Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -22,7 +22,7 @@ __RCSID("$MirOS: contrib/code/jupp/charmap.c,v 1.30 2018/01/06 00:28:30 tg Exp $
 #include "path.h"
 #include "charmap.h"
 
-/* Convert from byte code to unicode.  Returns -1 for unknown. */
+/* Convert from byte code to UCS.  Returns -1 for unknown. */
 
 int
 to_uni(struct charmap *cset, int c)
@@ -30,7 +30,7 @@ to_uni(struct charmap *cset, int c)
        return (cset->to_map[c]);
 }
 
-/* Convert from unicode to byte code.  Returns -1 for unknown. */
+/* Convert from UCS to byte code.  Returns -1 for unknown. */
 
 int
 from_uni(struct charmap *cset, int c)
@@ -1143,7 +1143,7 @@ rtn_arg(struct charmap *map, int c)
 static struct charmap *charmaps = NULL;
 
 /* Process a byte-oriented character map and add it to database.
-   Consults unicode database "i18n.c" to determine which characters are
+   Consults database "i18n.c" to determine which characters are
    uppercase, etc. */
 
 static struct charmap *
@@ -1318,7 +1318,7 @@ parse_charmap(const unsigned char *name, FILE *f)
        return (b);
 }
 
-/* Byte wide character map to unicode conversion */
+/* Byte wide character map to UCS conversion */
 
 /*
  * Compare character map names.
@@ -1429,7 +1429,7 @@ main(int argc, char *argv[])
                return (1);
        }
        u = ustol(argv[2], NULL, USTOL_TRIM | USTOL_EOS);
-       printf("Unicode=%X\n", uni = to_uni(map, u));
+       printf("UCS=%X\n", uni = to_uni(map, u));
        printf("Local=%X\n", from_uni(map, uni));
        return (0);
 }
index 973cea1..e972b94 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -32,7 +32,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/compat.c,v 1.10 2018/01/07 20:32:46 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/compat.c,v 1.11 2018/06/26 20:49:33 tg Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -63,7 +63,11 @@ abrt(Sabrt)
 #ifdef DEBUG
        fputs(emsg, stderr);
 #endif
+#ifdef TEST
+       write(2, "memory allocation error\n", 24);
+#else
        ttabrt(0, "memory allocation error");
+#endif
        /* try to get a coredump */
        abort();
 }
index 6896b51..0d7b5d5 100644 (file)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61-MirPorts-2 for joe 3.1jupp36.
+# Generated by GNU Autoconf 2.61-MirPorts-2 for joe 3.1jupp37.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -572,8 +572,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='joe'
 PACKAGE_TARNAME='joe'
-PACKAGE_VERSION='3.1jupp36'
-PACKAGE_STRING='joe 3.1jupp36'
+PACKAGE_VERSION='3.1jupp37'
+PACKAGE_STRING='joe 3.1jupp37'
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="b.c"
@@ -1229,7 +1229,7 @@ if test "$ac_init_help" = "long"; then
   # 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.1jupp36 to adapt to many kinds of systems.
+\`configure' configures joe 3.1jupp37 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1300,7 +1300,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of joe 3.1jupp36:";;
+     short | recursive ) echo "Configuration of joe 3.1jupp37:";;
    esac
   cat <<\_ACEOF
 
@@ -1398,7 +1398,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-joe configure 3.1jupp36
+joe configure 3.1jupp37
 generated by GNU Autoconf 2.61-MirPorts-2
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1412,7 +1412,7 @@ cat >config.log <<_ACEOF
 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.1jupp36, which was
+It was created by joe $as_me 3.1jupp37, which was
 generated by GNU Autoconf 2.61-MirPorts-2.  Invocation command line was
 
   $ $0 $@
@@ -2213,7 +2213,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='joe'
- VERSION='3.1jupp36'
+ VERSION='3.1jupp37'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -11062,7 +11062,7 @@ exec 6>&1
 # 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.1jupp36, which was
+This file was extended by joe $as_me 3.1jupp37, which was
 generated by GNU Autoconf 2.61-MirPorts-2.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11115,7 +11115,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-joe config.status 3.1jupp36
+joe config.status 3.1jupp37
 configured by $0, generated by GNU Autoconf 2.61-MirPorts-2,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index da275d8..ee833b3 100644 (file)
@@ -1,4 +1,4 @@
-# $MirOS: contrib/code/jupp/configure.ac,v 1.72 2018/03/15 22:48:00 tg Exp $
+# $MirOS: contrib/code/jupp/configure.ac,v 1.73 2018/10/20 16:19:00 tg Exp $
 #-
 # Process this file with autoconf to produce a configure script.
 
@@ -6,7 +6,7 @@
 AC_PREREQ(2.54)
 
 #### Here's the only place where to change version number ####
-AC_INIT(joe, 3.1jupp36)
+AC_INIT(joe, 3.1jupp37)
 #### But see main.c for the Copyright (c) owner and year! ####
 AC_CONFIG_SRCDIR([b.c])
 
diff --git a/docs/jmacs.png b/docs/jmacs.png
new file mode 100644 (file)
index 0000000..4311841
Binary files /dev/null and b/docs/jmacs.png differ
diff --git a/docs/joe.png b/docs/joe.png
new file mode 100644 (file)
index 0000000..1fbed32
Binary files /dev/null and b/docs/joe.png differ
diff --git a/docs/jpico.png b/docs/jpico.png
new file mode 100644 (file)
index 0000000..861d5b0
Binary files /dev/null and b/docs/jpico.png differ
diff --git a/docs/jstar.png b/docs/jstar.png
new file mode 100644 (file)
index 0000000..259fdcd
Binary files /dev/null and b/docs/jstar.png differ
diff --git a/docs/jupp.png b/docs/jupp.png
new file mode 100644 (file)
index 0000000..a47b4dc
Binary files /dev/null and b/docs/jupp.png differ
diff --git a/i18n.c b/i18n.c
index 6b3966c..3efc7f8 100644 (file)
--- a/i18n.c
+++ b/i18n.c
@@ -2,7 +2,7 @@
 .if "0" == "1"
 #endif
 /*
- *     UNICODE/ISO-10646 functions for JOE
+ *     Universal Coded Character Set/ISO-10646 functions for JOE
  *     Copyright
  *             (C) 1992 Joseph H. Allen
  *     Copyright © 2014, 2017
@@ -19,7 +19,7 @@
 #include "config.h"
 #include <stdlib.h>
 
-__RCSID("$MirOS: contrib/code/jupp/i18n.c,v 1.33 2018/01/08 02:01:19 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/i18n.c,v 1.36 2018/08/10 02:53:43 tg Exp $");
 
 #include "charmap.h"
 #include "utils.h"
@@ -35,7 +35,7 @@ static size_t mb_ucsbsearch(const struct mb_ucsrange arr[], size_t elems,
     unsigned int val);
 
 /*
- * Generated from the Unicode Character Database, Version 10.0.0, by
+ * Generated from the UCD 11.0.0 by
  * MirOS: contrib/code/Snippets/eawparse,v 1.12 2017/09/06 16:05:45 tg Exp $
  */
 
@@ -59,12 +59,13 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x0730, 0x074A },
        { 0x07A6, 0x07B0 },
        { 0x07EB, 0x07F3 },
+       { 0x07FD, 0x07FD },
        { 0x0816, 0x0819 },
        { 0x081B, 0x0823 },
        { 0x0825, 0x0827 },
        { 0x0829, 0x082D },
        { 0x0859, 0x085B },
-       { 0x08D4, 0x08E1 },
+       { 0x08D3, 0x08E1 },
        { 0x08E3, 0x0902 },
        { 0x093A, 0x093A },
        { 0x093C, 0x093C },
@@ -77,6 +78,7 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x09C1, 0x09C4 },
        { 0x09CD, 0x09CD },
        { 0x09E2, 0x09E3 },
+       { 0x09FE, 0x09FE },
        { 0x0A01, 0x0A02 },
        { 0x0A3C, 0x0A3C },
        { 0x0A41, 0x0A42 },
@@ -103,6 +105,7 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x0BC0, 0x0BC0 },
        { 0x0BCD, 0x0BCD },
        { 0x0C00, 0x0C00 },
+       { 0x0C04, 0x0C04 },
        { 0x0C3E, 0x0C40 },
        { 0x0C46, 0x0C48 },
        { 0x0C4A, 0x0C4D },
@@ -222,6 +225,7 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0xA825, 0xA826 },
        { 0xA8C4, 0xA8C5 },
        { 0xA8E0, 0xA8F1 },
+       { 0xA8FF, 0xA8FF },
        { 0xA926, 0xA92D },
        { 0xA947, 0xA951 },
        { 0xA980, 0xA982 },
@@ -259,6 +263,8 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x10A38, 0x10A3A },
        { 0x10A3F, 0x10A3F },
        { 0x10AE5, 0x10AE6 },
+       { 0x10D24, 0x10D27 },
+       { 0x10F46, 0x10F50 },
        { 0x11001, 0x11001 },
        { 0x11038, 0x11046 },
        { 0x1107F, 0x11081 },
@@ -270,7 +276,7 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x11173, 0x11173 },
        { 0x11180, 0x11181 },
        { 0x111B6, 0x111BE },
-       { 0x111CA, 0x111CC },
+       { 0x111C9, 0x111CC },
        { 0x1122F, 0x11231 },
        { 0x11234, 0x11234 },
        { 0x11236, 0x11237 },
@@ -278,13 +284,14 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x112DF, 0x112DF },
        { 0x112E3, 0x112EA },
        { 0x11300, 0x11301 },
-       { 0x1133C, 0x1133C },
+       { 0x1133B, 0x1133C },
        { 0x11340, 0x11340 },
        { 0x11366, 0x1136C },
        { 0x11370, 0x11374 },
        { 0x11438, 0x1143F },
        { 0x11442, 0x11444 },
        { 0x11446, 0x11446 },
+       { 0x1145E, 0x1145E },
        { 0x114B3, 0x114B8 },
        { 0x114BA, 0x114BA },
        { 0x114BF, 0x114C0 },
@@ -303,8 +310,9 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x1171D, 0x1171F },
        { 0x11722, 0x11725 },
        { 0x11727, 0x1172B },
-       { 0x11A01, 0x11A06 },
-       { 0x11A09, 0x11A0A },
+       { 0x1182F, 0x11837 },
+       { 0x11839, 0x1183A },
+       { 0x11A01, 0x11A0A },
        { 0x11A33, 0x11A38 },
        { 0x11A3B, 0x11A3E },
        { 0x11A47, 0x11A47 },
@@ -324,6 +332,10 @@ static const struct mb_ucsrange mb_ucs_combining[] = {
        { 0x11D3C, 0x11D3D },
        { 0x11D3F, 0x11D45 },
        { 0x11D47, 0x11D47 },
+       { 0x11D90, 0x11D91 },
+       { 0x11D95, 0x11D95 },
+       { 0x11D97, 0x11D97 },
+       { 0x11EF3, 0x11EF4 },
        { 0x16AF0, 0x16AF4 },
        { 0x16B30, 0x16B36 },
        { 0x16F8F, 0x16F92 },
@@ -400,7 +412,7 @@ static const struct mb_ucsrange mb_ucs_fullwidth[] = {
        { 0xFF01, 0xFF60 },
        { 0xFFE0, 0xFFE6 },
        { 0x16FE0, 0x16FE1 },
-       { 0x17000, 0x187EC },
+       { 0x17000, 0x187F1 },
        { 0x18800, 0x18AF2 },
        { 0x1B000, 0x1B11E },
        { 0x1B170, 0x1B2FB },
@@ -435,13 +447,15 @@ static const struct mb_ucsrange mb_ucs_fullwidth[] = {
        { 0x1F6CC, 0x1F6CC },
        { 0x1F6D0, 0x1F6D2 },
        { 0x1F6EB, 0x1F6EC },
-       { 0x1F6F4, 0x1F6F8 },
+       { 0x1F6F4, 0x1F6F9 },
        { 0x1F910, 0x1F93E },
-       { 0x1F940, 0x1F94C },
-       { 0x1F950, 0x1F96B },
-       { 0x1F980, 0x1F997 },
-       { 0x1F9C0, 0x1F9C0 },
-       { 0x1F9D0, 0x1F9E6 },
+       { 0x1F940, 0x1F970 },
+       { 0x1F973, 0x1F976 },
+       { 0x1F97A, 0x1F97A },
+       { 0x1F97C, 0x1F9A2 },
+       { 0x1F9B0, 0x1F9B9 },
+       { 0x1F9C0, 0x1F9C2 },
+       { 0x1F9D0, 0x1F9FF },
        { 0x20000, 0x2FFFD },
        { 0x30000, 0x3FFFD }
 };
@@ -490,8 +504,8 @@ int unictrl(unsigned int ucs)
 {
        *unictrlbuf = 0;
 
-       /* ASCII control characters use one screen column */
-       if (ucs < 32 || ucs == 0x7F)
+       /* C0 control characters and raw octets use one screen column */
+       if (ucs < 32 || ucs == 0x7F || (ucs & 0x80000000))
                return (1);
 
        /* not a control or noncharacter? */
@@ -819,6 +833,8 @@ static const struct mb_ucsrange data_wctype_upper[] = {
        { 0x10C7, 0x10C7 },
        { 0x10CD, 0x10CD },
        { 0x13A0, 0x13F5 },
+       { 0x1C90, 0x1CBA },
+       { 0x1CBD, 0x1CBF },
        { 0x1E00, 0x1E00 },
        { 0x1E02, 0x1E02 },
        { 0x1E04, 0x1E04 },
@@ -1128,11 +1144,13 @@ static const struct mb_ucsrange data_wctype_upper[] = {
        { 0xA7AA, 0xA7AE },
        { 0xA7B0, 0xA7B4 },
        { 0xA7B6, 0xA7B6 },
+       { 0xA7B8, 0xA7B8 },
        { 0xFF21, 0xFF3A },
        { 0x10400, 0x10427 },
        { 0x104B0, 0x104D3 },
        { 0x10C80, 0x10CB2 },
        { 0x118A0, 0x118BF },
+       { 0x16E40, 0x16E5F },
        { 0x1E900, 0x1E921 }
 };
 
@@ -1424,6 +1442,8 @@ static const struct mb_ucsrange data_wctype_lower[] = {
        { 0x052D, 0x052D },
        { 0x052F, 0x052F },
        { 0x0561, 0x0586 },
+       { 0x10D0, 0x10FA },
+       { 0x10FD, 0x10FF },
        { 0x13F8, 0x13FD },
        { 0x1C80, 0x1C88 },
        { 0x1D79, 0x1D79 },
@@ -1738,6 +1758,7 @@ static const struct mb_ucsrange data_wctype_lower[] = {
        { 0xA7A9, 0xA7A9 },
        { 0xA7B5, 0xA7B5 },
        { 0xA7B7, 0xA7B7 },
+       { 0xA7B9, 0xA7B9 },
        { 0xAB53, 0xAB53 },
        { 0xAB70, 0xABBF },
        { 0xFF41, 0xFF5A },
@@ -1745,6 +1766,7 @@ static const struct mb_ucsrange data_wctype_lower[] = {
        { 0x104D8, 0x104FB },
        { 0x10CC0, 0x10CF2 },
        { 0x118C0, 0x118DF },
+       { 0x16E60, 0x16E7F },
        { 0x1E922, 0x1E943 }
 };
 
@@ -1779,9 +1801,9 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x048A, 0x052F },
        { 0x0531, 0x0556 },
        { 0x0559, 0x0559 },
-       { 0x0561, 0x0587 },
+       { 0x0560, 0x0588 },
        { 0x05D0, 0x05EA },
-       { 0x05F0, 0x05F2 },
+       { 0x05EF, 0x05F2 },
        { 0x0620, 0x064A },
        { 0x066E, 0x066F },
        { 0x0671, 0x06D3 },
@@ -1963,7 +1985,7 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x1780, 0x17B3 },
        { 0x17D7, 0x17D7 },
        { 0x17DC, 0x17DC },
-       { 0x1820, 0x1877 },
+       { 0x1820, 0x1878 },
        { 0x1880, 0x1884 },
        { 0x1887, 0x18A8 },
        { 0x18AA, 0x18AA },
@@ -1985,6 +2007,8 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x1C4D, 0x1C4F },
        { 0x1C5A, 0x1C7D },
        { 0x1C80, 0x1C88 },
+       { 0x1C90, 0x1CBA },
+       { 0x1CBD, 0x1CBF },
        { 0x1CE9, 0x1CEC },
        { 0x1CEE, 0x1CF1 },
        { 0x1CF5, 0x1CF6 },
@@ -2054,12 +2078,12 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x309D, 0x309F },
        { 0x30A1, 0x30FA },
        { 0x30FC, 0x30FF },
-       { 0x3105, 0x312E },
+       { 0x3105, 0x312F },
        { 0x3131, 0x318E },
        { 0x31A0, 0x31BA },
        { 0x31F0, 0x31FF },
        { 0x3400, 0x4DB5 },
-       { 0x4E00, 0x9FEA },
+       { 0x4E00, 0x9FEF },
        { 0xA000, 0xA48C },
        { 0xA4D0, 0xA4FD },
        { 0xA500, 0xA60C },
@@ -2070,8 +2094,7 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0xA6A0, 0xA6E5 },
        { 0xA717, 0xA71F },
        { 0xA722, 0xA788 },
-       { 0xA78B, 0xA7AE },
-       { 0xA7B0, 0xA7B7 },
+       { 0xA78B, 0xA7B9 },
        { 0xA7F7, 0xA801 },
        { 0xA803, 0xA805 },
        { 0xA807, 0xA80A },
@@ -2080,7 +2103,7 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0xA882, 0xA8B3 },
        { 0xA8F2, 0xA8F7 },
        { 0xA8FB, 0xA8FB },
-       { 0xA8FD, 0xA8FD },
+       { 0xA8FD, 0xA8FE },
        { 0xA90A, 0xA925 },
        { 0xA930, 0xA946 },
        { 0xA960, 0xA97C },
@@ -2180,7 +2203,7 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x10A00, 0x10A00 },
        { 0x10A10, 0x10A13 },
        { 0x10A15, 0x10A17 },
-       { 0x10A19, 0x10A33 },
+       { 0x10A19, 0x10A35 },
        { 0x10A60, 0x10A7C },
        { 0x10A80, 0x10A9C },
        { 0x10AC0, 0x10AC7 },
@@ -2192,10 +2215,15 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x10C00, 0x10C48 },
        { 0x10C80, 0x10CB2 },
        { 0x10CC0, 0x10CF2 },
+       { 0x10D00, 0x10D23 },
+       { 0x10F00, 0x10F1C },
+       { 0x10F27, 0x10F27 },
+       { 0x10F30, 0x10F45 },
        { 0x11003, 0x11037 },
        { 0x11083, 0x110AF },
        { 0x110D0, 0x110E8 },
        { 0x11103, 0x11126 },
+       { 0x11144, 0x11144 },
        { 0x11150, 0x11172 },
        { 0x11176, 0x11176 },
        { 0x11183, 0x111B2 },
@@ -2229,7 +2257,8 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x11600, 0x1162F },
        { 0x11644, 0x11644 },
        { 0x11680, 0x116AA },
-       { 0x11700, 0x11719 },
+       { 0x11700, 0x1171A },
+       { 0x11800, 0x1182B },
        { 0x118A0, 0x118DF },
        { 0x118FF, 0x118FF },
        { 0x11A00, 0x11A00 },
@@ -2238,6 +2267,7 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x11A50, 0x11A50 },
        { 0x11A5C, 0x11A83 },
        { 0x11A86, 0x11A89 },
+       { 0x11A9D, 0x11A9D },
        { 0x11AC0, 0x11AF8 },
        { 0x11C00, 0x11C08 },
        { 0x11C0A, 0x11C2E },
@@ -2247,6 +2277,11 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x11D08, 0x11D09 },
        { 0x11D0B, 0x11D30 },
        { 0x11D46, 0x11D46 },
+       { 0x11D60, 0x11D65 },
+       { 0x11D67, 0x11D68 },
+       { 0x11D6A, 0x11D89 },
+       { 0x11D98, 0x11D98 },
+       { 0x11EE0, 0x11EF2 },
        { 0x12000, 0x12399 },
        { 0x12480, 0x12543 },
        { 0x13000, 0x1342E },
@@ -2258,11 +2293,12 @@ static const struct mb_ucsrange data_wctype_alpha[] = {
        { 0x16B40, 0x16B43 },
        { 0x16B63, 0x16B77 },
        { 0x16B7D, 0x16B8F },
+       { 0x16E40, 0x16E7F },
        { 0x16F00, 0x16F44 },
        { 0x16F50, 0x16F50 },
        { 0x16F93, 0x16F9F },
        { 0x16FE0, 0x16FE1 },
-       { 0x17000, 0x187EC },
+       { 0x17000, 0x187F1 },
        { 0x18800, 0x18AF2 },
        { 0x1B000, 0x1B11E },
        { 0x1B170, 0x1B2FB },
@@ -2423,6 +2459,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x07C0, 0x07C9 },
        { 0x07EB, 0x07F3 },
        { 0x07F6, 0x07F9 },
+       { 0x07FD, 0x07FF },
        { 0x0816, 0x0819 },
        { 0x081B, 0x0823 },
        { 0x0825, 0x0827 },
@@ -2430,7 +2467,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x0830, 0x083E },
        { 0x0859, 0x085B },
        { 0x085E, 0x085E },
-       { 0x08D4, 0x0903 },
+       { 0x08D3, 0x0903 },
        { 0x093A, 0x093C },
        { 0x093E, 0x094F },
        { 0x0951, 0x0957 },
@@ -2444,7 +2481,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x09E2, 0x09E3 },
        { 0x09E6, 0x09EF },
        { 0x09F2, 0x09FB },
-       { 0x09FD, 0x09FD },
+       { 0x09FD, 0x09FE },
        { 0x0A01, 0x0A03 },
        { 0x0A3C, 0x0A3C },
        { 0x0A3E, 0x0A42 },
@@ -2452,7 +2489,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x0A4B, 0x0A4D },
        { 0x0A51, 0x0A51 },
        { 0x0A66, 0x0A71 },
-       { 0x0A75, 0x0A75 },
+       { 0x0A75, 0x0A76 },
        { 0x0A81, 0x0A83 },
        { 0x0ABC, 0x0ABC },
        { 0x0ABE, 0x0AC5 },
@@ -2476,7 +2513,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x0BCA, 0x0BCD },
        { 0x0BD7, 0x0BD7 },
        { 0x0BE6, 0x0BFA },
-       { 0x0C00, 0x0C03 },
+       { 0x0C00, 0x0C04 },
        { 0x0C3E, 0x0C44 },
        { 0x0C46, 0x0C48 },
        { 0x0C4A, 0x0C4D },
@@ -2484,7 +2521,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x0C62, 0x0C63 },
        { 0x0C66, 0x0C6F },
        { 0x0C78, 0x0C7F },
-       { 0x0C81, 0x0C83 },
+       { 0x0C81, 0x0C84 },
        { 0x0CBC, 0x0CBC },
        { 0x0CBE, 0x0CC4 },
        { 0x0CC6, 0x0CC8 },
@@ -2620,17 +2657,15 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x2460, 0x24B5 },
        { 0x24EA, 0x2B73 },
        { 0x2B76, 0x2B95 },
-       { 0x2B98, 0x2BB9 },
-       { 0x2BBD, 0x2BC8 },
-       { 0x2BCA, 0x2BD2 },
-       { 0x2BEC, 0x2BEF },
+       { 0x2B98, 0x2BC8 },
+       { 0x2BCA, 0x2BFE },
        { 0x2CE5, 0x2CEA },
        { 0x2CEF, 0x2CF1 },
        { 0x2CF9, 0x2CFF },
        { 0x2D70, 0x2D70 },
        { 0x2D7F, 0x2D7F },
        { 0x2DE0, 0x2E2E },
-       { 0x2E30, 0x2E49 },
+       { 0x2E30, 0x2E4E },
        { 0x2E80, 0x2E99 },
        { 0x2E9B, 0x2EF3 },
        { 0x2F00, 0x2FD5 },
@@ -2670,7 +2705,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0xA8E0, 0xA8F1 },
        { 0xA8F8, 0xA8FA },
        { 0xA8FC, 0xA8FC },
-       { 0xA900, 0xA909 },
+       { 0xA8FF, 0xA909 },
        { 0xA926, 0xA92F },
        { 0xA947, 0xA953 },
        { 0xA95F, 0xA95F },
@@ -2744,7 +2779,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x10A05, 0x10A06 },
        { 0x10A0C, 0x10A0F },
        { 0x10A38, 0x10A3A },
-       { 0x10A3F, 0x10A47 },
+       { 0x10A3F, 0x10A48 },
        { 0x10A50, 0x10A58 },
        { 0x10A7D, 0x10A7F },
        { 0x10A9D, 0x10A9F },
@@ -2757,16 +2792,22 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x10B99, 0x10B9C },
        { 0x10BA9, 0x10BAF },
        { 0x10CFA, 0x10CFF },
+       { 0x10D24, 0x10D27 },
+       { 0x10D30, 0x10D39 },
        { 0x10E60, 0x10E7E },
+       { 0x10F1D, 0x10F26 },
+       { 0x10F46, 0x10F59 },
        { 0x11000, 0x11002 },
        { 0x11038, 0x1104D },
        { 0x11052, 0x1106F },
        { 0x1107F, 0x11082 },
        { 0x110B0, 0x110C1 },
+       { 0x110CD, 0x110CD },
        { 0x110F0, 0x110F9 },
        { 0x11100, 0x11102 },
        { 0x11127, 0x11134 },
        { 0x11136, 0x11143 },
+       { 0x11145, 0x11146 },
        { 0x11173, 0x11175 },
        { 0x11180, 0x11182 },
        { 0x111B3, 0x111C0 },
@@ -2780,7 +2821,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x112DF, 0x112EA },
        { 0x112F0, 0x112F9 },
        { 0x11300, 0x11303 },
-       { 0x1133C, 0x1133C },
+       { 0x1133B, 0x1133C },
        { 0x1133E, 0x11344 },
        { 0x11347, 0x11348 },
        { 0x1134B, 0x1134D },
@@ -2791,7 +2832,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x11435, 0x11446 },
        { 0x1144B, 0x11459 },
        { 0x1145B, 0x1145B },
-       { 0x1145D, 0x1145D },
+       { 0x1145D, 0x1145E },
        { 0x114B0, 0x114C3 },
        { 0x114C6, 0x114C6 },
        { 0x114D0, 0x114D9 },
@@ -2805,6 +2846,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x116C0, 0x116C9 },
        { 0x1171D, 0x1172B },
        { 0x11730, 0x1173F },
+       { 0x1182C, 0x1183B },
        { 0x118E0, 0x118F2 },
        { 0x11A01, 0x11A0A },
        { 0x11A33, 0x11A39 },
@@ -2825,6 +2867,11 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x11D3F, 0x11D45 },
        { 0x11D47, 0x11D47 },
        { 0x11D50, 0x11D59 },
+       { 0x11D8A, 0x11D8E },
+       { 0x11D90, 0x11D91 },
+       { 0x11D93, 0x11D97 },
+       { 0x11DA0, 0x11DA9 },
+       { 0x11EF3, 0x11EF8 },
        { 0x12400, 0x1246E },
        { 0x12470, 0x12474 },
        { 0x16A60, 0x16A69 },
@@ -2834,6 +2881,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x16B44, 0x16B45 },
        { 0x16B50, 0x16B59 },
        { 0x16B5B, 0x16B61 },
+       { 0x16E80, 0x16E9A },
        { 0x16F51, 0x16F7E },
        { 0x16F8F, 0x16F92 },
        { 0x1BC9C, 0x1BCA3 },
@@ -2841,8 +2889,9 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x1D100, 0x1D126 },
        { 0x1D129, 0x1D1E8 },
        { 0x1D200, 0x1D245 },
+       { 0x1D2E0, 0x1D2F3 },
        { 0x1D300, 0x1D356 },
-       { 0x1D360, 0x1D371 },
+       { 0x1D360, 0x1D378 },
        { 0x1D6C1, 0x1D6C1 },
        { 0x1D6DB, 0x1D6DB },
        { 0x1D6FB, 0x1D6FB },
@@ -2865,6 +2914,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x1E944, 0x1E94A },
        { 0x1E950, 0x1E959 },
        { 0x1E95E, 0x1E95F },
+       { 0x1EC71, 0x1ECB4 },
        { 0x1EEF0, 0x1EEF1 },
        { 0x1F000, 0x1F02B },
        { 0x1F030, 0x1F093 },
@@ -2873,8 +2923,7 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x1F0C1, 0x1F0CF },
        { 0x1F0D1, 0x1F0F5 },
        { 0x1F100, 0x1F10C },
-       { 0x1F110, 0x1F12E },
-       { 0x1F130, 0x1F16B },
+       { 0x1F110, 0x1F16B },
        { 0x1F170, 0x1F1AC },
        { 0x1F1E6, 0x1F202 },
        { 0x1F210, 0x1F23B },
@@ -2883,9 +2932,9 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x1F260, 0x1F265 },
        { 0x1F300, 0x1F6D4 },
        { 0x1F6E0, 0x1F6EC },
-       { 0x1F6F0, 0x1F6F8 },
+       { 0x1F6F0, 0x1F6F9 },
        { 0x1F700, 0x1F773 },
-       { 0x1F780, 0x1F7D4 },
+       { 0x1F780, 0x1F7D8 },
        { 0x1F800, 0x1F80B },
        { 0x1F810, 0x1F847 },
        { 0x1F850, 0x1F859 },
@@ -2893,11 +2942,14 @@ static const struct mb_ucsrange data_wctype_punct[] = {
        { 0x1F890, 0x1F8AD },
        { 0x1F900, 0x1F90B },
        { 0x1F910, 0x1F93E },
-       { 0x1F940, 0x1F94C },
-       { 0x1F950, 0x1F96B },
-       { 0x1F980, 0x1F997 },
-       { 0x1F9C0, 0x1F9C0 },
-       { 0x1F9D0, 0x1F9E6 },
+       { 0x1F940, 0x1F970 },
+       { 0x1F973, 0x1F976 },
+       { 0x1F97A, 0x1F97A },
+       { 0x1F97C, 0x1F9A2 },
+       { 0x1F9B0, 0x1F9B9 },
+       { 0x1F9C0, 0x1F9C2 },
+       { 0x1F9D0, 0x1F9FF },
+       { 0x1FA60, 0x1FA6D },
        { 0xE0001, 0xE0001 },
        { 0xE0020, 0xE007F },
        { 0xE0100, 0xE01EF },
@@ -2917,26 +2969,24 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x038E, 0x03A1 },
        { 0x03A3, 0x052F },
        { 0x0531, 0x0556 },
-       { 0x0559, 0x055F },
-       { 0x0561, 0x0587 },
-       { 0x0589, 0x058A },
+       { 0x0559, 0x058A },
        { 0x058D, 0x058F },
        { 0x0591, 0x05C7 },
        { 0x05D0, 0x05EA },
-       { 0x05F0, 0x05F4 },
+       { 0x05EF, 0x05F4 },
        { 0x0600, 0x061C },
        { 0x061E, 0x070D },
        { 0x070F, 0x074A },
        { 0x074D, 0x07B1 },
        { 0x07C0, 0x07FA },
-       { 0x0800, 0x082D },
+       { 0x07FD, 0x082D },
        { 0x0830, 0x083E },
        { 0x0840, 0x085B },
        { 0x085E, 0x085E },
        { 0x0860, 0x086A },
        { 0x08A0, 0x08B4 },
        { 0x08B6, 0x08BD },
-       { 0x08D4, 0x0983 },
+       { 0x08D3, 0x0983 },
        { 0x0985, 0x098C },
        { 0x098F, 0x0990 },
        { 0x0993, 0x09A8 },
@@ -2949,7 +2999,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x09D7, 0x09D7 },
        { 0x09DC, 0x09DD },
        { 0x09DF, 0x09E3 },
-       { 0x09E6, 0x09FD },
+       { 0x09E6, 0x09FE },
        { 0x0A01, 0x0A03 },
        { 0x0A05, 0x0A0A },
        { 0x0A0F, 0x0A10 },
@@ -2965,7 +3015,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x0A51, 0x0A51 },
        { 0x0A59, 0x0A5C },
        { 0x0A5E, 0x0A5E },
-       { 0x0A66, 0x0A75 },
+       { 0x0A66, 0x0A76 },
        { 0x0A81, 0x0A83 },
        { 0x0A85, 0x0A8D },
        { 0x0A8F, 0x0A91 },
@@ -3010,8 +3060,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x0BD0, 0x0BD0 },
        { 0x0BD7, 0x0BD7 },
        { 0x0BE6, 0x0BFA },
-       { 0x0C00, 0x0C03 },
-       { 0x0C05, 0x0C0C },
+       { 0x0C00, 0x0C0C },
        { 0x0C0E, 0x0C10 },
        { 0x0C12, 0x0C28 },
        { 0x0C2A, 0x0C39 },
@@ -3022,8 +3071,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x0C58, 0x0C5A },
        { 0x0C60, 0x0C63 },
        { 0x0C66, 0x0C6F },
-       { 0x0C78, 0x0C83 },
-       { 0x0C85, 0x0C8C },
+       { 0x0C78, 0x0C8C },
        { 0x0C8E, 0x0C90 },
        { 0x0C92, 0x0CA8 },
        { 0x0CAA, 0x0CB3 },
@@ -3119,7 +3167,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x17F0, 0x17F9 },
        { 0x1800, 0x180E },
        { 0x1810, 0x1819 },
-       { 0x1820, 0x1877 },
+       { 0x1820, 0x1878 },
        { 0x1880, 0x18AA },
        { 0x18B0, 0x18F5 },
        { 0x1900, 0x191E },
@@ -3144,7 +3192,8 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x1BFC, 0x1C37 },
        { 0x1C3B, 0x1C49 },
        { 0x1C4D, 0x1C88 },
-       { 0x1CC0, 0x1CC7 },
+       { 0x1C90, 0x1CBA },
+       { 0x1CBD, 0x1CC7 },
        { 0x1CD0, 0x1CF9 },
        { 0x1D00, 0x1DF9 },
        { 0x1DFB, 0x1F15 },
@@ -3174,10 +3223,8 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x2440, 0x244A },
        { 0x2460, 0x2B73 },
        { 0x2B76, 0x2B95 },
-       { 0x2B98, 0x2BB9 },
-       { 0x2BBD, 0x2BC8 },
-       { 0x2BCA, 0x2BD2 },
-       { 0x2BEC, 0x2BEF },
+       { 0x2B98, 0x2BC8 },
+       { 0x2BCA, 0x2BFE },
        { 0x2C00, 0x2C2E },
        { 0x2C30, 0x2C5E },
        { 0x2C60, 0x2CF3 },
@@ -3195,7 +3242,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x2DC8, 0x2DCE },
        { 0x2DD0, 0x2DD6 },
        { 0x2DD8, 0x2DDE },
-       { 0x2DE0, 0x2E49 },
+       { 0x2DE0, 0x2E4E },
        { 0x2E80, 0x2E99 },
        { 0x2E9B, 0x2EF3 },
        { 0x2F00, 0x2FD5 },
@@ -3203,27 +3250,25 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x3000, 0x303F },
        { 0x3041, 0x3096 },
        { 0x3099, 0x30FF },
-       { 0x3105, 0x312E },
+       { 0x3105, 0x312F },
        { 0x3131, 0x318E },
        { 0x3190, 0x31BA },
        { 0x31C0, 0x31E3 },
        { 0x31F0, 0x321E },
        { 0x3220, 0x32FE },
        { 0x3300, 0x4DB5 },
-       { 0x4DC0, 0x9FEA },
+       { 0x4DC0, 0x9FEF },
        { 0xA000, 0xA48C },
        { 0xA490, 0xA4C6 },
        { 0xA4D0, 0xA62B },
        { 0xA640, 0xA6F7 },
-       { 0xA700, 0xA7AE },
-       { 0xA7B0, 0xA7B7 },
+       { 0xA700, 0xA7B9 },
        { 0xA7F7, 0xA82B },
        { 0xA830, 0xA839 },
        { 0xA840, 0xA877 },
        { 0xA880, 0xA8C5 },
        { 0xA8CE, 0xA8D9 },
-       { 0xA8E0, 0xA8FD },
-       { 0xA900, 0xA953 },
+       { 0xA8E0, 0xA953 },
        { 0xA95F, 0xA97C },
        { 0xA980, 0xA9CD },
        { 0xA9CF, 0xA9D9 },
@@ -3324,9 +3369,9 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x10A05, 0x10A06 },
        { 0x10A0C, 0x10A13 },
        { 0x10A15, 0x10A17 },
-       { 0x10A19, 0x10A33 },
+       { 0x10A19, 0x10A35 },
        { 0x10A38, 0x10A3A },
-       { 0x10A3F, 0x10A47 },
+       { 0x10A3F, 0x10A48 },
        { 0x10A50, 0x10A58 },
        { 0x10A60, 0x10A9F },
        { 0x10AC0, 0x10AE6 },
@@ -3340,15 +3385,19 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x10C00, 0x10C48 },
        { 0x10C80, 0x10CB2 },
        { 0x10CC0, 0x10CF2 },
-       { 0x10CFA, 0x10CFF },
+       { 0x10CFA, 0x10D27 },
+       { 0x10D30, 0x10D39 },
        { 0x10E60, 0x10E7E },
+       { 0x10F00, 0x10F27 },
+       { 0x10F30, 0x10F59 },
        { 0x11000, 0x1104D },
        { 0x11052, 0x1106F },
        { 0x1107F, 0x110C1 },
+       { 0x110CD, 0x110CD },
        { 0x110D0, 0x110E8 },
        { 0x110F0, 0x110F9 },
        { 0x11100, 0x11134 },
-       { 0x11136, 0x11143 },
+       { 0x11136, 0x11146 },
        { 0x11150, 0x11176 },
        { 0x11180, 0x111CD },
        { 0x111D0, 0x111DF },
@@ -3369,7 +3418,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x1132A, 0x11330 },
        { 0x11332, 0x11333 },
        { 0x11335, 0x11339 },
-       { 0x1133C, 0x11344 },
+       { 0x1133B, 0x11344 },
        { 0x11347, 0x11348 },
        { 0x1134B, 0x1134D },
        { 0x11350, 0x11350 },
@@ -3379,7 +3428,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x11370, 0x11374 },
        { 0x11400, 0x11459 },
        { 0x1145B, 0x1145B },
-       { 0x1145D, 0x1145D },
+       { 0x1145D, 0x1145E },
        { 0x11480, 0x114C7 },
        { 0x114D0, 0x114D9 },
        { 0x11580, 0x115B5 },
@@ -3389,15 +3438,15 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x11660, 0x1166C },
        { 0x11680, 0x116B7 },
        { 0x116C0, 0x116C9 },
-       { 0x11700, 0x11719 },
+       { 0x11700, 0x1171A },
        { 0x1171D, 0x1172B },
        { 0x11730, 0x1173F },
+       { 0x11800, 0x1183B },
        { 0x118A0, 0x118F2 },
        { 0x118FF, 0x118FF },
        { 0x11A00, 0x11A47 },
        { 0x11A50, 0x11A83 },
-       { 0x11A86, 0x11A9C },
-       { 0x11A9E, 0x11AA2 },
+       { 0x11A86, 0x11AA2 },
        { 0x11AC0, 0x11AF8 },
        { 0x11C00, 0x11C08 },
        { 0x11C0A, 0x11C36 },
@@ -3413,6 +3462,13 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x11D3C, 0x11D3D },
        { 0x11D3F, 0x11D47 },
        { 0x11D50, 0x11D59 },
+       { 0x11D60, 0x11D65 },
+       { 0x11D67, 0x11D68 },
+       { 0x11D6A, 0x11D8E },
+       { 0x11D90, 0x11D91 },
+       { 0x11D93, 0x11D98 },
+       { 0x11DA0, 0x11DA9 },
+       { 0x11EE0, 0x11EF8 },
        { 0x12000, 0x12399 },
        { 0x12400, 0x1246E },
        { 0x12470, 0x12474 },
@@ -3430,11 +3486,12 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x16B5B, 0x16B61 },
        { 0x16B63, 0x16B77 },
        { 0x16B7D, 0x16B8F },
+       { 0x16E40, 0x16E9A },
        { 0x16F00, 0x16F44 },
        { 0x16F50, 0x16F7E },
        { 0x16F8F, 0x16F9F },
        { 0x16FE0, 0x16FE1 },
-       { 0x17000, 0x187EC },
+       { 0x17000, 0x187F1 },
        { 0x18800, 0x18AF2 },
        { 0x1B000, 0x1B11E },
        { 0x1B170, 0x1B2FB },
@@ -3447,8 +3504,9 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x1D100, 0x1D126 },
        { 0x1D129, 0x1D1E8 },
        { 0x1D200, 0x1D245 },
+       { 0x1D2E0, 0x1D2F3 },
        { 0x1D300, 0x1D356 },
-       { 0x1D360, 0x1D371 },
+       { 0x1D360, 0x1D378 },
        { 0x1D400, 0x1D454 },
        { 0x1D456, 0x1D49C },
        { 0x1D49E, 0x1D49F },
@@ -3482,6 +3540,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x1E900, 0x1E94A },
        { 0x1E950, 0x1E959 },
        { 0x1E95E, 0x1E95F },
+       { 0x1EC71, 0x1ECB4 },
        { 0x1EE00, 0x1EE03 },
        { 0x1EE05, 0x1EE1F },
        { 0x1EE21, 0x1EE22 },
@@ -3523,8 +3582,7 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x1F0C1, 0x1F0CF },
        { 0x1F0D1, 0x1F0F5 },
        { 0x1F100, 0x1F10C },
-       { 0x1F110, 0x1F12E },
-       { 0x1F130, 0x1F16B },
+       { 0x1F110, 0x1F16B },
        { 0x1F170, 0x1F1AC },
        { 0x1F1E6, 0x1F202 },
        { 0x1F210, 0x1F23B },
@@ -3533,9 +3591,9 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x1F260, 0x1F265 },
        { 0x1F300, 0x1F6D4 },
        { 0x1F6E0, 0x1F6EC },
-       { 0x1F6F0, 0x1F6F8 },
+       { 0x1F6F0, 0x1F6F9 },
        { 0x1F700, 0x1F773 },
-       { 0x1F780, 0x1F7D4 },
+       { 0x1F780, 0x1F7D8 },
        { 0x1F800, 0x1F80B },
        { 0x1F810, 0x1F847 },
        { 0x1F850, 0x1F859 },
@@ -3543,11 +3601,14 @@ static const struct mb_ucsrange data_wctype_graph[] = {
        { 0x1F890, 0x1F8AD },
        { 0x1F900, 0x1F90B },
        { 0x1F910, 0x1F93E },
-       { 0x1F940, 0x1F94C },
-       { 0x1F950, 0x1F96B },
-       { 0x1F980, 0x1F997 },
-       { 0x1F9C0, 0x1F9C0 },
-       { 0x1F9D0, 0x1F9E6 },
+       { 0x1F940, 0x1F970 },
+       { 0x1F973, 0x1F976 },
+       { 0x1F97A, 0x1F97A },
+       { 0x1F97C, 0x1F9A2 },
+       { 0x1F9B0, 0x1F9B9 },
+       { 0x1F9C0, 0x1F9C2 },
+       { 0x1F9D0, 0x1F9FF },
+       { 0x1FA60, 0x1FA6D },
        { 0x20000, 0x2A6D6 },
        { 0x2A700, 0x2B734 },
        { 0x2B740, 0x2B81D },
@@ -3573,26 +3634,24 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x038E, 0x03A1 },
        { 0x03A3, 0x052F },
        { 0x0531, 0x0556 },
-       { 0x0559, 0x055F },
-       { 0x0561, 0x0587 },
-       { 0x0589, 0x058A },
+       { 0x0559, 0x058A },
        { 0x058D, 0x058F },
        { 0x0591, 0x05C7 },
        { 0x05D0, 0x05EA },
-       { 0x05F0, 0x05F4 },
+       { 0x05EF, 0x05F4 },
        { 0x0600, 0x061C },
        { 0x061E, 0x070D },
        { 0x070F, 0x074A },
        { 0x074D, 0x07B1 },
        { 0x07C0, 0x07FA },
-       { 0x0800, 0x082D },
+       { 0x07FD, 0x082D },
        { 0x0830, 0x083E },
        { 0x0840, 0x085B },
        { 0x085E, 0x085E },
        { 0x0860, 0x086A },
        { 0x08A0, 0x08B4 },
        { 0x08B6, 0x08BD },
-       { 0x08D4, 0x0983 },
+       { 0x08D3, 0x0983 },
        { 0x0985, 0x098C },
        { 0x098F, 0x0990 },
        { 0x0993, 0x09A8 },
@@ -3605,7 +3664,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x09D7, 0x09D7 },
        { 0x09DC, 0x09DD },
        { 0x09DF, 0x09E3 },
-       { 0x09E6, 0x09FD },
+       { 0x09E6, 0x09FE },
        { 0x0A01, 0x0A03 },
        { 0x0A05, 0x0A0A },
        { 0x0A0F, 0x0A10 },
@@ -3621,7 +3680,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x0A51, 0x0A51 },
        { 0x0A59, 0x0A5C },
        { 0x0A5E, 0x0A5E },
-       { 0x0A66, 0x0A75 },
+       { 0x0A66, 0x0A76 },
        { 0x0A81, 0x0A83 },
        { 0x0A85, 0x0A8D },
        { 0x0A8F, 0x0A91 },
@@ -3666,8 +3725,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x0BD0, 0x0BD0 },
        { 0x0BD7, 0x0BD7 },
        { 0x0BE6, 0x0BFA },
-       { 0x0C00, 0x0C03 },
-       { 0x0C05, 0x0C0C },
+       { 0x0C00, 0x0C0C },
        { 0x0C0E, 0x0C10 },
        { 0x0C12, 0x0C28 },
        { 0x0C2A, 0x0C39 },
@@ -3678,8 +3736,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x0C58, 0x0C5A },
        { 0x0C60, 0x0C63 },
        { 0x0C66, 0x0C6F },
-       { 0x0C78, 0x0C83 },
-       { 0x0C85, 0x0C8C },
+       { 0x0C78, 0x0C8C },
        { 0x0C8E, 0x0C90 },
        { 0x0C92, 0x0CA8 },
        { 0x0CAA, 0x0CB3 },
@@ -3775,7 +3832,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x17F0, 0x17F9 },
        { 0x1800, 0x180E },
        { 0x1810, 0x1819 },
-       { 0x1820, 0x1877 },
+       { 0x1820, 0x1878 },
        { 0x1880, 0x18AA },
        { 0x18B0, 0x18F5 },
        { 0x1900, 0x191E },
@@ -3800,7 +3857,8 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x1BFC, 0x1C37 },
        { 0x1C3B, 0x1C49 },
        { 0x1C4D, 0x1C88 },
-       { 0x1CC0, 0x1CC7 },
+       { 0x1C90, 0x1CBA },
+       { 0x1CBD, 0x1CC7 },
        { 0x1CD0, 0x1CF9 },
        { 0x1D00, 0x1DF9 },
        { 0x1DFB, 0x1F15 },
@@ -3836,10 +3894,8 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x2440, 0x244A },
        { 0x2460, 0x2B73 },
        { 0x2B76, 0x2B95 },
-       { 0x2B98, 0x2BB9 },
-       { 0x2BBD, 0x2BC8 },
-       { 0x2BCA, 0x2BD2 },
-       { 0x2BEC, 0x2BEF },
+       { 0x2B98, 0x2BC8 },
+       { 0x2BCA, 0x2BFE },
        { 0x2C00, 0x2C2E },
        { 0x2C30, 0x2C5E },
        { 0x2C60, 0x2CF3 },
@@ -3857,7 +3913,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x2DC8, 0x2DCE },
        { 0x2DD0, 0x2DD6 },
        { 0x2DD8, 0x2DDE },
-       { 0x2DE0, 0x2E49 },
+       { 0x2DE0, 0x2E4E },
        { 0x2E80, 0x2E99 },
        { 0x2E9B, 0x2EF3 },
        { 0x2F00, 0x2FD5 },
@@ -3865,27 +3921,25 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x3000, 0x303F },
        { 0x3041, 0x3096 },
        { 0x3099, 0x30FF },
-       { 0x3105, 0x312E },
+       { 0x3105, 0x312F },
        { 0x3131, 0x318E },
        { 0x3190, 0x31BA },
        { 0x31C0, 0x31E3 },
        { 0x31F0, 0x321E },
        { 0x3220, 0x32FE },
        { 0x3300, 0x4DB5 },
-       { 0x4DC0, 0x9FEA },
+       { 0x4DC0, 0x9FEF },
        { 0xA000, 0xA48C },
        { 0xA490, 0xA4C6 },
        { 0xA4D0, 0xA62B },
        { 0xA640, 0xA6F7 },
-       { 0xA700, 0xA7AE },
-       { 0xA7B0, 0xA7B7 },
+       { 0xA700, 0xA7B9 },
        { 0xA7F7, 0xA82B },
        { 0xA830, 0xA839 },
        { 0xA840, 0xA877 },
        { 0xA880, 0xA8C5 },
        { 0xA8CE, 0xA8D9 },
-       { 0xA8E0, 0xA8FD },
-       { 0xA900, 0xA953 },
+       { 0xA8E0, 0xA953 },
        { 0xA95F, 0xA97C },
        { 0xA980, 0xA9CD },
        { 0xA9CF, 0xA9D9 },
@@ -3986,9 +4040,9 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x10A05, 0x10A06 },
        { 0x10A0C, 0x10A13 },
        { 0x10A15, 0x10A17 },
-       { 0x10A19, 0x10A33 },
+       { 0x10A19, 0x10A35 },
        { 0x10A38, 0x10A3A },
-       { 0x10A3F, 0x10A47 },
+       { 0x10A3F, 0x10A48 },
        { 0x10A50, 0x10A58 },
        { 0x10A60, 0x10A9F },
        { 0x10AC0, 0x10AE6 },
@@ -4002,15 +4056,19 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x10C00, 0x10C48 },
        { 0x10C80, 0x10CB2 },
        { 0x10CC0, 0x10CF2 },
-       { 0x10CFA, 0x10CFF },
+       { 0x10CFA, 0x10D27 },
+       { 0x10D30, 0x10D39 },
        { 0x10E60, 0x10E7E },
+       { 0x10F00, 0x10F27 },
+       { 0x10F30, 0x10F59 },
        { 0x11000, 0x1104D },
        { 0x11052, 0x1106F },
        { 0x1107F, 0x110C1 },
+       { 0x110CD, 0x110CD },
        { 0x110D0, 0x110E8 },
        { 0x110F0, 0x110F9 },
        { 0x11100, 0x11134 },
-       { 0x11136, 0x11143 },
+       { 0x11136, 0x11146 },
        { 0x11150, 0x11176 },
        { 0x11180, 0x111CD },
        { 0x111D0, 0x111DF },
@@ -4031,7 +4089,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x1132A, 0x11330 },
        { 0x11332, 0x11333 },
        { 0x11335, 0x11339 },
-       { 0x1133C, 0x11344 },
+       { 0x1133B, 0x11344 },
        { 0x11347, 0x11348 },
        { 0x1134B, 0x1134D },
        { 0x11350, 0x11350 },
@@ -4041,7 +4099,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x11370, 0x11374 },
        { 0x11400, 0x11459 },
        { 0x1145B, 0x1145B },
-       { 0x1145D, 0x1145D },
+       { 0x1145D, 0x1145E },
        { 0x11480, 0x114C7 },
        { 0x114D0, 0x114D9 },
        { 0x11580, 0x115B5 },
@@ -4051,15 +4109,15 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x11660, 0x1166C },
        { 0x11680, 0x116B7 },
        { 0x116C0, 0x116C9 },
-       { 0x11700, 0x11719 },
+       { 0x11700, 0x1171A },
        { 0x1171D, 0x1172B },
        { 0x11730, 0x1173F },
+       { 0x11800, 0x1183B },
        { 0x118A0, 0x118F2 },
        { 0x118FF, 0x118FF },
        { 0x11A00, 0x11A47 },
        { 0x11A50, 0x11A83 },
-       { 0x11A86, 0x11A9C },
-       { 0x11A9E, 0x11AA2 },
+       { 0x11A86, 0x11AA2 },
        { 0x11AC0, 0x11AF8 },
        { 0x11C00, 0x11C08 },
        { 0x11C0A, 0x11C36 },
@@ -4075,6 +4133,13 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x11D3C, 0x11D3D },
        { 0x11D3F, 0x11D47 },
        { 0x11D50, 0x11D59 },
+       { 0x11D60, 0x11D65 },
+       { 0x11D67, 0x11D68 },
+       { 0x11D6A, 0x11D8E },
+       { 0x11D90, 0x11D91 },
+       { 0x11D93, 0x11D98 },
+       { 0x11DA0, 0x11DA9 },
+       { 0x11EE0, 0x11EF8 },
        { 0x12000, 0x12399 },
        { 0x12400, 0x1246E },
        { 0x12470, 0x12474 },
@@ -4092,11 +4157,12 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x16B5B, 0x16B61 },
        { 0x16B63, 0x16B77 },
        { 0x16B7D, 0x16B8F },
+       { 0x16E40, 0x16E9A },
        { 0x16F00, 0x16F44 },
        { 0x16F50, 0x16F7E },
        { 0x16F8F, 0x16F9F },
        { 0x16FE0, 0x16FE1 },
-       { 0x17000, 0x187EC },
+       { 0x17000, 0x187F1 },
        { 0x18800, 0x18AF2 },
        { 0x1B000, 0x1B11E },
        { 0x1B170, 0x1B2FB },
@@ -4109,8 +4175,9 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x1D100, 0x1D126 },
        { 0x1D129, 0x1D1E8 },
        { 0x1D200, 0x1D245 },
+       { 0x1D2E0, 0x1D2F3 },
        { 0x1D300, 0x1D356 },
-       { 0x1D360, 0x1D371 },
+       { 0x1D360, 0x1D378 },
        { 0x1D400, 0x1D454 },
        { 0x1D456, 0x1D49C },
        { 0x1D49E, 0x1D49F },
@@ -4144,6 +4211,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x1E900, 0x1E94A },
        { 0x1E950, 0x1E959 },
        { 0x1E95E, 0x1E95F },
+       { 0x1EC71, 0x1ECB4 },
        { 0x1EE00, 0x1EE03 },
        { 0x1EE05, 0x1EE1F },
        { 0x1EE21, 0x1EE22 },
@@ -4185,8 +4253,7 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x1F0C1, 0x1F0CF },
        { 0x1F0D1, 0x1F0F5 },
        { 0x1F100, 0x1F10C },
-       { 0x1F110, 0x1F12E },
-       { 0x1F130, 0x1F16B },
+       { 0x1F110, 0x1F16B },
        { 0x1F170, 0x1F1AC },
        { 0x1F1E6, 0x1F202 },
        { 0x1F210, 0x1F23B },
@@ -4195,9 +4262,9 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x1F260, 0x1F265 },
        { 0x1F300, 0x1F6D4 },
        { 0x1F6E0, 0x1F6EC },
-       { 0x1F6F0, 0x1F6F8 },
+       { 0x1F6F0, 0x1F6F9 },
        { 0x1F700, 0x1F773 },
-       { 0x1F780, 0x1F7D4 },
+       { 0x1F780, 0x1F7D8 },
        { 0x1F800, 0x1F80B },
        { 0x1F810, 0x1F847 },
        { 0x1F850, 0x1F859 },
@@ -4205,11 +4272,14 @@ static const struct mb_ucsrange data_wctype_print[] = {
        { 0x1F890, 0x1F8AD },
        { 0x1F900, 0x1F90B },
        { 0x1F910, 0x1F93E },
-       { 0x1F940, 0x1F94C },
-       { 0x1F950, 0x1F96B },
-       { 0x1F980, 0x1F997 },
-       { 0x1F9C0, 0x1F9C0 },
-       { 0x1F9D0, 0x1F9E6 },
+       { 0x1F940, 0x1F970 },
+       { 0x1F973, 0x1F976 },
+       { 0x1F97A, 0x1F97A },
+       { 0x1F97C, 0x1F9A2 },
+       { 0x1F9B0, 0x1F9B9 },
+       { 0x1F9C0, 0x1F9C2 },
+       { 0x1F9D0, 0x1F9FF },
+       { 0x1FA60, 0x1FA6D },
        { 0x20000, 0x2A6D6 },
        { 0x2A700, 0x2B734 },
        { 0x2B740, 0x2B81D },
@@ -4576,6 +4646,8 @@ static const struct mb_ucsrange data_wcrange_toupper[] = {
        { 0x052D, 0x052D },
        { 0x052F, 0x052F },
        { 0x0561, 0x0586 },
+       { 0x10D0, 0x10FA },
+       { 0x10FD, 0x10FF },
        { 0x13F8, 0x13FD },
        { 0x1C80, 0x1C80 },
        { 0x1C81, 0x1C81 },
@@ -4904,6 +4976,7 @@ static const struct mb_ucsrange data_wcrange_toupper[] = {
        { 0xA7A9, 0xA7A9 },
        { 0xA7B5, 0xA7B5 },
        { 0xA7B7, 0xA7B7 },
+       { 0xA7B9, 0xA7B9 },
        { 0xAB53, 0xAB53 },
        { 0xAB70, 0xABBF },
        { 0xFF41, 0xFF5A },
@@ -4911,6 +4984,7 @@ static const struct mb_ucsrange data_wcrange_toupper[] = {
        { 0x104D8, 0x104FB },
        { 0x10CC0, 0x10CF2 },
        { 0x118C0, 0x118DF },
+       { 0x16E60, 0x16E7F },
        { 0x1E922, 0x1E943 }
 };
 
@@ -5241,6 +5315,8 @@ static const int data_wcdelta_toupper[] = {
        1,
        1,
        48,
+       -3008,
+       -3008,
        8,
        6254,
        6253,
@@ -5569,6 +5645,7 @@ static const int data_wcdelta_toupper[] = {
        1,
        1,
        1,
+       1,
        928,
        38864,
        32,
@@ -5576,6 +5653,7 @@ static const int data_wcdelta_toupper[] = {
        40,
        64,
        32,
+       32,
        34
 };
 
@@ -5897,6 +5975,8 @@ static const struct mb_ucsrange data_wcrange_tolower[] = {
        { 0x10CD, 0x10CD },
        { 0x13A0, 0x13EF },
        { 0x13F0, 0x13F5 },
+       { 0x1C90, 0x1CBA },
+       { 0x1CBD, 0x1CBF },
        { 0x1E00, 0x1E00 },
        { 0x1E02, 0x1E02 },
        { 0x1E04, 0x1E04 },
@@ -6230,11 +6310,13 @@ static const struct mb_ucsrange data_wcrange_tolower[] = {
        { 0xA7B3, 0xA7B3 },
        { 0xA7B4, 0xA7B4 },
        { 0xA7B6, 0xA7B6 },
+       { 0xA7B8, 0xA7B8 },
        { 0xFF21, 0xFF3A },
        { 0x10400, 0x10427 },
        { 0x104B0, 0x104D3 },
        { 0x10C80, 0x10CB2 },
        { 0x118A0, 0x118BF },
+       { 0x16E40, 0x16E5F },
        { 0x1E900, 0x1E921 }
 };
 
@@ -6546,6 +6628,8 @@ static const int data_wcdelta_tolower[] = {
        7264,
        38864,
        8,
+       -3008,
+       -3008,
        1,
        1,
        1,
@@ -6879,11 +6963,13 @@ static const int data_wcdelta_tolower[] = {
        928,
        1,
        1,
+       1,
        32,
        40,
        40,
        64,
        32,
+       32,
        34
 };
 
index d5831b9..6362ee1 100644 (file)
@@ -1,4 +1,4 @@
- $MirOS: contrib/code/jupp/jmacsrc.in,v 1.32 2018/03/15 23:28:56 tg Exp $
+ $MirOS: contrib/code/jupp/jmacsrc.in,v 1.35 2018/10/20 16:11:51 tg Exp $
 
                          Initialisation file for JOE
                                 GNU-Emacs Joe
  Filename with '.' is probably not a text file.
 *.*
 
+ Binary file
+*.bin
+--crlf
+--guess_crlf
+-encoding ascii
+-hex
+
  === Patterns with multiple wildcards
  Order is latest match wins, so...
 */patch-*
 *.cls
 -syntax tex
 
+*.def
+-syntax tex
+
+*.dtx
+-syntax tex
+
 *.sty
 -syntax tex
 
 -encoding utf8
 -syntax xml
 
+*.xsl
+-encoding utf8
+-syntax xml
+
  === Text (except in jupp)
 *.asc
 -wordwrap
@@ -792,14 +809,14 @@ keymap,"prompt",rtn                       ^D
 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,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
+setmark,":",uparw,gomark,":",begin_marking,uparw,toggle_marking        ^[ [ 1 ; 2 A
+setmark,":",dnarw,gomark,":",begin_marking,dnarw,toggle_marking        ^[ [ 1 ; 2 B
+setmark,":",rtarw,gomark,":",begin_marking,rtarw,toggle_marking        ^[ [ 1 ; 2 C
+setmark,":",ltarw,gomark,":",begin_marking,ltarw,toggle_marking        ^[ [ 1 ; 2 D
+setmark,":",bol,gomark,":",begin_marking,bol,toggle_marking    ^[ [ 1 ; 2 H
+setmark,":",eol,gomark,":",begin_marking,eol,toggle_marking    ^[ [ 1 ; 2 F
+setmark,":",bof,gomark,":",begin_marking,bof,toggle_marking    ^[ [ 1 ; 6 H
+setmark,":",eof,gomark,":",begin_marking,eof,toggle_marking    ^[ [ 1 ; 6 F
 
 ctrl           ^Q              Quote Ctrl chars
 ctrl           `               Quote Ctrl chars
index a0c995a..94fd78f 100644 (file)
--- a/joe.1.in
+++ b/joe.1.in
@@ -1,4 +1,4 @@
-.\" $MirOS: contrib/code/jupp/joe.1.in,v 1.25 2017/08/09 00:59:09 tg Exp $
+.\" $MirOS: contrib/code/jupp/joe.1.in,v 1.26 2018/08/10 02:53:44 tg Exp $
 .\"-
 .TH JOE 1
 .SH Name
@@ -777,7 +777,7 @@ The \fBJOETERM\fR environment variable may be set to override the regular
 
 JOE uses two character maps for its operation: the terminal I/O character
 map, which determines how characters are sent to the terminal and whether
-the %a/%A message specifiers use Unicode, and the file encoding, which can
+the %a/%A message specifiers use UCS, and the file encoding, which can
 be specified per file using the \fB\-encoding\fR option and changed with
 the \fB^T E\fR command, and which defaults to the terminal I/O character
 map, which, in turn, is determined from the current locale, if the system
diff --git a/joe.txt b/joe.txt
index 428a51a..3727700 100644 (file)
--- a/joe.txt
+++ b/joe.txt
@@ -852,16 +852,16 @@ Environment variables
      JOE uses two character maps for its operation: the terminal\r
      I/O character map, which determines how characters are sent\r
      to the terminal and whether the %a/%A message specifiers use\r
-     Unicode, and the file encoding, which can be specified per\r
-     file using the -encoding option and changed with the ^T E\r
-     command, and which defaults to the terminal I/O character\r
-     map, which, in turn, is determined from the current locale,\r
-     if the system supports such, otherwise the LC_ALL, LC_CTYPE\r
-     and LANG environment variables (if they contain a period,\r
-     only the part after it and before an optional "at sign" is\r
-     used); on cygwin32 before 1.7.2, the codepage is used\r
-     instead if the POSIX locale environment variables are empty;\r
-     the environment variable JOECHARMAP can be used to manually\r
+     UCS, and the file encoding, which can be specified per file\r
+     using the -encoding option and changed with the ^T E com-\r
+     mand, and which defaults to the terminal I/O character map,\r
+     which, in turn, is determined from the current locale, if\r
+     the system supports such, otherwise the LC_ALL, LC_CTYPE and\r
+     LANG environment variables (if they contain a period, only\r
+     the part after it and before an optional "at sign" is used);\r
+     on cygwin32 before 1.7.2, the codepage is used instead if\r
+     the POSIX locale environment variables are empty; the\r
+     environment variable JOECHARMAP can be used to manually\r
      force one overriding all methods described above, and can be\r
      used together with -encoding to specify a different default\r
      file character map.\r
index 2daa133..043d6e9 100644 (file)
--- a/joerc.in
+++ b/joerc.in
@@ -1,4 +1,4 @@
- $MirOS: contrib/code/jupp/joerc.in,v 1.32 2018/03/15 23:28:57 tg Exp $
+ $MirOS: contrib/code/jupp/joerc.in,v 1.35 2018/10/20 16:11:52 tg Exp $
 
                          Initialisation file for JOE
                                 Standard Joe
  Filename with '.' is probably not a text file.
 *.*
 
+ Binary file
+*.bin
+--crlf
+--guess_crlf
+-encoding ascii
+-hex
+
  === Patterns with multiple wildcards
  Order is latest match wins, so...
 */patch-*
 *.cls
 -syntax tex
 
+*.def
+-syntax tex
+
+*.dtx
+-syntax tex
+
 *.sty
 -syntax tex
 
 -encoding utf8
 -syntax xml
 
+*.xsl
+-encoding utf8
+-syntax xml
+
  === Text (except in jupp)
 *.asc
 -wordwrap
@@ -814,14 +831,14 @@ keymap,"prompt",rtn                       ^D
 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,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
+setmark,":",uparw,gomark,":",begin_marking,uparw,toggle_marking        ^[ [ 1 ; 2 A
+setmark,":",dnarw,gomark,":",begin_marking,dnarw,toggle_marking        ^[ [ 1 ; 2 B
+setmark,":",rtarw,gomark,":",begin_marking,rtarw,toggle_marking        ^[ [ 1 ; 2 C
+setmark,":",ltarw,gomark,":",begin_marking,ltarw,toggle_marking        ^[ [ 1 ; 2 D
+setmark,":",bol,gomark,":",begin_marking,bol,toggle_marking    ^[ [ 1 ; 2 H
+setmark,":",eol,gomark,":",begin_marking,eol,toggle_marking    ^[ [ 1 ; 2 F
+setmark,":",bof,gomark,":",begin_marking,bof,toggle_marking    ^[ [ 1 ; 6 H
+setmark,":",eof,gomark,":",begin_marking,eof,toggle_marking    ^[ [ 1 ; 6 F
 
  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
index e8b43f7..a91a9ba 100644 (file)
@@ -1,4 +1,4 @@
- $MirOS: contrib/code/jupp/jpicorc.in,v 1.32 2018/03/15 23:28:57 tg Exp $
+ $MirOS: contrib/code/jupp/jpicorc.in,v 1.35 2018/10/20 16:11:52 tg Exp $
 
                          Initialisation file for JOE
                                  Super Pico
  Filename with '.' is probably not a text file.
 *.*
 
+ Binary file
+*.bin
+--crlf
+--guess_crlf
+-encoding ascii
+-hex
+
  === Patterns with multiple wildcards
  Order is latest match wins, so...
 */patch-*
 *.cls
 -syntax tex
 
+*.def
+-syntax tex
+
+*.dtx
+-syntax tex
+
 *.sty
 -syntax tex
 
 -encoding utf8
 -syntax xml
 
+*.xsl
+-encoding utf8
+-syntax xml
+
  === Text (except in jupp)
 *.asc
 -wordwrap
@@ -788,14 +805,14 @@ keymap,"prompt",rtn                       ^D
 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,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
+setmark,":",uparw,gomark,":",begin_marking,uparw,toggle_marking        ^[ [ 1 ; 2 A
+setmark,":",dnarw,gomark,":",begin_marking,dnarw,toggle_marking        ^[ [ 1 ; 2 B
+setmark,":",rtarw,gomark,":",begin_marking,rtarw,toggle_marking        ^[ [ 1 ; 2 C
+setmark,":",ltarw,gomark,":",begin_marking,ltarw,toggle_marking        ^[ [ 1 ; 2 D
+setmark,":",bol,gomark,":",begin_marking,bol,toggle_marking    ^[ [ 1 ; 2 H
+setmark,":",eol,gomark,":",begin_marking,eol,toggle_marking    ^[ [ 1 ; 2 F
+setmark,":",bof,gomark,":",begin_marking,bof,toggle_marking    ^[ [ 1 ; 6 H
+setmark,":",eof,gomark,":",begin_marking,eof,toggle_marking    ^[ [ 1 ; 6 F
 
  ask,query,lose,query,abortbuf ^X      Exit after many questions
 ask,query,exsave       ^X              Exit
index e8c1d95..2460e5e 100644 (file)
@@ -1,4 +1,4 @@
- $MirOS: contrib/code/jupp/jstarrc.in,v 1.32 2018/03/15 23:28:57 tg Exp $
+ $MirOS: contrib/code/jupp/jstarrc.in,v 1.35 2018/10/20 16:11:52 tg Exp $
 
                          Initialisation file for JOE
                            WordStar / Turbo-C Joe
  Filename with '.' is probably not a text file.
 *.*
 
+ Binary file
+*.bin
+--crlf
+--guess_crlf
+-encoding ascii
+-hex
+
  === Patterns with multiple wildcards
  Order is latest match wins, so...
 */patch-*
 *.cls
 -syntax tex
 
+*.def
+-syntax tex
+
+*.dtx
+-syntax tex
+
 *.sty
 -syntax tex
 
 -encoding utf8
 -syntax xml
 
+*.xsl
+-encoding utf8
+-syntax xml
+
  === Text (except in jupp)
 *.asc
 -wordwrap
@@ -819,14 +836,14 @@ keymap,"prompt",rtn                       ^D
 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,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
+setmark,":",uparw,gomark,":",begin_marking,uparw,toggle_marking        ^[ [ 1 ; 2 A
+setmark,":",dnarw,gomark,":",begin_marking,dnarw,toggle_marking        ^[ [ 1 ; 2 B
+setmark,":",rtarw,gomark,":",begin_marking,rtarw,toggle_marking        ^[ [ 1 ; 2 C
+setmark,":",ltarw,gomark,":",begin_marking,ltarw,toggle_marking        ^[ [ 1 ; 2 D
+setmark,":",bol,gomark,":",begin_marking,bol,toggle_marking    ^[ [ 1 ; 2 H
+setmark,":",eol,gomark,":",begin_marking,eol,toggle_marking    ^[ [ 1 ; 2 F
+setmark,":",bof,gomark,":",begin_marking,bof,toggle_marking    ^[ [ 1 ; 6 H
+setmark,":",eof,gomark,":",begin_marking,eof,toggle_marking    ^[ [ 1 ; 6 F
 
 rtarw,prevword,markb,nextword,markk    ^K T
 rtarw,prevword,markb,nextword,markk    ^K ^T
diff --git a/jupprc b/jupprc
index dc0ef60..c1c00bc 100644 (file)
--- a/jupprc
+++ b/jupprc
  Filename with '.' is probably not a text file.
 *.*
 
+ Binary file
+*.bin
+--crlf
+--guess_crlf
+-encoding ascii
+-hex
+
  === Patterns with multiple wildcards
  Order is latest match wins, so...
 */patch-*
 *.cls
 -syntax tex
 
+*.def
+-syntax tex
+
+*.dtx
+-syntax tex
+
 *.sty
 -syntax tex
 
 -encoding utf8
 -syntax xml
 
+*.xsl
+-encoding utf8
+-syntax xml
+
  #HOOK#2 filename matching
 
 {General
 \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 2018-03-15; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \i \i
+\i \i @(#) jupprc 2018-10-20; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \i \i
 }
 
  #HOOK#3 additional help screens
@@ -614,22 +631,22 @@ keymap,"prompt",rtn                       ^D
 :def dorepl setmark,":",qrepl
 :def pastemain helpcard,"Paste",rtn,keymap,"Paste",rtn
 :def conflictmarker dosrch,"\\^\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[<>=]\\[ \\n]",rtn,rtn,ltarw
-:def fixwhitespace setmark,":",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,gomark,":",eof
-: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 fixwhitespace psh,setmark,":",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,gomark,":",eof
+:def freedroidz psh,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
 :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
-begin_marking,dnarw,toggle_marking     ^[ [ 1 ; 2 B
-begin_marking,rtarw,toggle_marking     ^[ [ 1 ; 2 C
-begin_marking,ltarw,toggle_marking     ^[ [ 1 ; 2 D
-begin_marking,bol,toggle_marking       ^[ [ 1 ; 2 H
-begin_marking,eol,toggle_marking       ^[ [ 1 ; 2 F
-begin_marking,bof,toggle_marking       ^[ [ 1 ; 6 H
-begin_marking,eof,toggle_marking       ^[ [ 1 ; 6 F
+setmark,":",uparw,gomark,":",begin_marking,uparw,toggle_marking        ^[ [ 1 ; 2 A
+setmark,":",dnarw,gomark,":",begin_marking,dnarw,toggle_marking        ^[ [ 1 ; 2 B
+setmark,":",rtarw,gomark,":",begin_marking,rtarw,toggle_marking        ^[ [ 1 ; 2 C
+setmark,":",ltarw,gomark,":",begin_marking,ltarw,toggle_marking        ^[ [ 1 ; 2 D
+setmark,":",bol,gomark,":",begin_marking,bol,toggle_marking    ^[ [ 1 ; 2 H
+setmark,":",eol,gomark,":",begin_marking,eol,toggle_marking    ^[ [ 1 ; 2 F
+setmark,":",bof,gomark,":",begin_marking,bof,toggle_marking    ^[ [ 1 ; 6 H
+setmark,":",eof,gomark,":",begin_marking,eof,toggle_marking    ^[ [ 1 ; 6 F
 pastemain      ^[ P
 pastemain      ^[ p
 pastemain      ^[ [ 2 0 0 ~
index e23695e..cd5bae5 100644 (file)
--- a/rjoerc.in
+++ b/rjoerc.in
@@ -1,4 +1,4 @@
- $MirOS: contrib/code/jupp/rjoerc.in,v 1.32 2018/03/15 23:28:57 tg Exp $
+ $MirOS: contrib/code/jupp/rjoerc.in,v 1.35 2018/10/20 16:11:53 tg Exp $
 
                          Initialisation file for JOE
                             restricted access Joe
  Filename with '.' is probably not a text file.
 *.*
 
+ Binary file
+*.bin
+--crlf
+--guess_crlf
+-encoding ascii
+-hex
+
  === Patterns with multiple wildcards
  Order is latest match wins, so...
 */patch-*
 *.cls
 -syntax tex
 
+*.def
+-syntax tex
+
+*.dtx
+-syntax tex
+
 *.sty
 -syntax tex
 
 -encoding utf8
 -syntax xml
 
+*.xsl
+-encoding utf8
+-syntax xml
+
  === Text (except in jupp)
 *.asc
 -wordwrap
@@ -801,14 +818,14 @@ keymap,"prompt",rtn                       ^D
 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,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
+setmark,":",uparw,gomark,":",begin_marking,uparw,toggle_marking        ^[ [ 1 ; 2 A
+setmark,":",dnarw,gomark,":",begin_marking,dnarw,toggle_marking        ^[ [ 1 ; 2 B
+setmark,":",rtarw,gomark,":",begin_marking,rtarw,toggle_marking        ^[ [ 1 ; 2 C
+setmark,":",ltarw,gomark,":",begin_marking,ltarw,toggle_marking        ^[ [ 1 ; 2 D
+setmark,":",bol,gomark,":",begin_marking,bol,toggle_marking    ^[ [ 1 ; 2 H
+setmark,":",eol,gomark,":",begin_marking,eol,toggle_marking    ^[ [ 1 ; 2 F
+setmark,":",bof,gomark,":",begin_marking,bof,toggle_marking    ^[ [ 1 ; 6 H
+setmark,":",eof,gomark,":",begin_marking,eof,toggle_marking    ^[ [ 1 ; 6 F
 
  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
diff --git a/scrn.c b/scrn.c
index 7f11e32..44218b4 100644 (file)
--- a/scrn.c
+++ b/scrn.c
@@ -8,7 +8,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/scrn.c,v 1.44 2018/01/08 04:07:56 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/scrn.c,v 1.45 2018/06/28 03:11:13 tg Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -140,7 +140,7 @@ outatr(struct charmap *map, SCRN *t, int *scrn, int *attrf, int xx, int yy, int
                        /* from SBCS file */
                        c = to_uni(map, xlat(1, c, &a, map));
                        if (c < 32 || (c >= 0x7F && c < 0xA0)) {
-                               c = 0x1000FFFE;
+                               c = 0xFFFD;
                                a = (a | UNDERLINE) ^ INVERSE;
                        }
                }
index 7aae75d..bdc16e7 100644 (file)
@@ -26,7 +26,7 @@ ifeq (0,gmake ignores from here)
  * ser write the following strlcat(3) implementation according to the
  * spec. Both functions below have been optimised according to sugge-
  * stions from Bodo Eggert. mirabilos merged the code with strxfrm(3)
- * (Unicode-only systems) and the wide character variants wcslcat(3),
+ * for UTF-8-only systems and the wide character variants wcslcat(3),
  * wcslcpy(3), and wcsxfrm(3).
  */
 
@@ -39,7 +39,7 @@ ifeq (0,gmake ignores from here)
 #define __RCSID(x)             static const char __rcsid[] = x
 #endif
 
-__RCSID("$MirOS: contrib/code/jupp/strlfun.inc,v 1.5 2016/03/06 13:47:13 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/strlfun.inc,v 1.6 2018/08/10 02:53:50 tg Exp $");
 
 #ifdef WIDEC
 #ifdef OUTSIDE_OF_LIBKERN
index 35d8d97..d7c1dc9 100644 (file)
@@ -1,4 +1,4 @@
-# $MirOS: contrib/code/jupp/syntax/asm.jsf.in,v 1.5 2017/12/06 23:17:37 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/asm.jsf.in,v 1.6 2018/06/26 19:49:59 tg Exp $
 #-
 # JOE syntax highlight file for assembly language
 
@@ -223,8 +223,9 @@ done
 
 :string_control Escape
        *               string_control
-       "\n"            reset
-       "diouxXeEfFgGaAcspn%SC" string
+       "\""            reset
+       "diouxXeEfFgGaAcspn%SC\n"       string
+       "\\"            string_escape   recolor=-1
 
 :char Constant
        *               char
index fa292b8..482983c 100644 (file)
@@ -1,4 +1,4 @@
-# $MirOS: contrib/code/jupp/syntax/java.jsf.in,v 1.4 2017/12/02 05:38:05 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/java.jsf.in,v 1.5 2018/06/26 19:49:59 tg Exp $
 #-
 # JOE syntax highlight file for JAVA
 
 
 :string_control Escape
        *               string_control
-       "\n"            reset
-       "diouxXeEfFgGaAcspn%SC" string
+       "\""            reset
+       "diouxXeEfFgGaAcspn%SC\n"       string
+       "\\"            string_escape   recolor=-1
 
 :char Constant
        *               char
index b0f3f1a..696594b 100644 (file)
@@ -1,4 +1,4 @@
-# $MirOS: contrib/code/jupp/syntax/sh.jsf.in,v 1.4 2012/09/02 14:46:52 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/sh.jsf.in,v 1.6 2018/10/20 15:26:35 tg Exp $
 #-
 # JOE syntax highlight file for sh/ksh/bash
 
 =Var           magenta
 =Parenthesis   yellow
 =Connect       bold green
+=Bad           bold red
 
 # Syntax
 
 :idle Idle
-       *               idle
+       *               idlew
+       " \t\n"         idle
        "#"             comment         recolor=-1
        "\\"            escape          recolor=-1
        "$"             subst           recolor=-1
        "\""            string_dq       recolor=-1
        "\`"            string_bq       recolor=-1
        "()"            paren           noeat
-       "a-zA-Z{}![].:" ident           buffer
+       "a-z{}![].:"    ident           buffer
+       "|&"            connector       recolor=-1
+       "<>"            redir           noeat
+       "0123456789"    redirnum        recolor=-1
+
+:idlew Idle
+       *               idlew
+       " \t\n"         idle
+       "\\"            escape          recolor=-1
+       "$"             subst           recolor=-1
+       "'"             string_sq       recolor=-1
+       "\""            string_dq       recolor=-1
+       "\`"            string_bq       recolor=-1
+       "()"            paren           noeat
+       "a-z{}![].:"    ident           buffer
        "|&"            connector       recolor=-1
        "<>"            redir           noeat
        "0123456789"    redirnum        recolor=-1
        *               idle
 
 :subst Var
-       *               idle
+       *               idlew
+       " \t\n"         idle
        "'"             string_sq       recolor=-2
        "\""            string_dq       recolor=-2
        "("             paren           noeat recolor=-2
        "{"             subst_brack
        "a-zA-Z_"       subst_name
-       "0-9*@?\-$_!"   idle
+       "0-9*@?\-$!"    idlew
 
 :subst_name Var
-       *               idle            noeat recolor=-1
+       *               idlew           noeat recolor=-1
+       " \t\n"         idle            noeat recolor=-1
        "a-zA-Z0-9_"    subst_name
 
 :subst_brack Var
        *               subst_brack
-       "}"             idle
+       "}"             idlew
 
 # Simplest case: no quoting allowed
 :string_sq Constant
        *               string_sq
-       "\'"            idle
-
+       "\'"            idlew
 
 # double-quote: quoting, backqoutes and substitution allowed
 :string_dq Constant
        *               string_dq
        "$"             string_dq_subst recolor=-1
-       "\""            idle
+       "\""            idlew
        "\\"            string_dq_esc   recolor=-1
        "`"             string_dq_bq    recolor=-1
 
 :string_dq_subst Var
        *               string_dq       noeat recolor=-2
+       "\""            idlew
        "$0-9!_\-?*@"   string_dq
        "a-zA-Z_"       string_dq_subst_name
        "{"             string_dq_subst_brack
 :string_bq Constant
        *               string_bq
        "$"             string_bq_subst recolor=-1
-       "\`"            idle
+       "\`"            idlew
        "\\"            string_bq_esc   recolor=-1
 
 # escape in backquote
        "("             paren
        ")"             paren
 
+:bad Bad
+       *               idle
+
 :ident Idle
-       *               idle            noeat strings
+       *               idlew           noeat
+       "()"            bad             noeat recolor=-1
+       "a-z{}![].:"    ident
+       " \t\n&|;<>"    idle            noeat strings
        "!"             kw
        "{"             kw
        "}"             kw
        "pushd"         kw
        "shopt"         kw
 done
-       "a-zA-Z0-9"     ident
 
 :kw Keyword
-       *               idle    noeat
+       *               idlew   noeat
 
 :connector Connect
        *               idle    noeat
        "|&"            connector
 
 :redirnum Connect
-       *               idle    noeat recolor=-2
+       *               idlew   noeat recolor=-2
        "<>"            redir
 
 :redir Connect
index 323df98..42b2281 100644 (file)
@@ -1,4 +1,4 @@
-# $MirOS: contrib/code/jupp/syntax/xml.jsf.in,v 1.4 2017/12/02 05:38:06 tg Exp $
+# $MirOS: contrib/code/jupp/syntax/xml.jsf.in,v 1.5 2018/08/10 02:53:46 tg Exp $
 #-
 # Improved XML highlighter by: Brian Candler <B.Candler@pobox.com>
 
 
 # http://www.w3.org/TR/2004/REC-xml-20040204/
 #
-# NOTE: For UNICODE compatibility, the ranges
+# NOTE: For UCS compatibility, the ranges
 #      "A-Za-z_:"              -- first character of Name
 #      "A-Za-z0-9._:-"         -- subsequent characters of Name
-# ought to be replaced with some appropriate Unicode character classes
+# ought to be replaced with some appropriate wide character classes
 
 :content Idle
        *               content
diff --git a/tw.c b/tw.c
index 1f5fea8..73b4afd 100644 (file)
--- a/tw.c
+++ b/tw.c
@@ -8,7 +8,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/tw.c,v 1.21 2018/01/06 00:28:33 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/tw.c,v 1.22 2018/06/26 20:23:35 tg Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -291,7 +291,7 @@ stagen(unsigned char *stalin, BW *bw, const unsigned char *s, int fill)
                                stalin = vsncpy(sv(stalin), sz(buf));
                                break;
                        case 'a':
-                               if (bw->b->o.charmap->type && !(special_aA && brch(bw->cursor) == 0x1000FFFE)) {
+                               if (bw->b->o.charmap->type && !(special_aA && (brch(bw->cursor) & 0x80000000))) {
                                        /* UTF-8: don't display decimal value */
                                        buf[0] = 'u';
                                        buf[1] = 0;
@@ -311,10 +311,8 @@ stagen(unsigned char *stalin, BW *bw, const unsigned char *s, int fill)
                                        /* UTF-8, display UCS-2 value */
                                        if (!piseof(bw->cursor)) {
                                                int uch = brch(bw->cursor);
-                                               if (uch == 0x1000FFFE)
-                                                       joe_snprintf_1((char *)buf, sizeof(buf), special_aA ? "%02X" : "  %02X", 255 & brc(bw->cursor));
-                                               else if (uch == 0x1000FFFF)
-                                                       joe_snprintf_0((char *)buf, sizeof(buf), "<-2>");
+                                               if (uch & 0x80000000)
+                                                       joe_snprintf_1((char *)buf, sizeof(buf), special_aA ? "%02X" : "  %02X", uch & 0xFF);
                                                else
                                                        joe_snprintf_1((char *)buf, sizeof(buf), "%04X", uch);
                                        } else
diff --git a/uedit.c b/uedit.c
index 1fbb354..a4ff750 100644 (file)
--- a/uedit.c
+++ b/uedit.c
@@ -8,7 +8,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/uedit.c,v 1.35 2018/02/15 01:18:57 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/uedit.c,v 1.36 2018/08/10 02:53:45 tg Exp $");
 
 #include <string.h>
 
@@ -1166,7 +1166,7 @@ int utypebw(jobject jO, int k)
 
 /* Quoting */
 
-static B *unicodehist = NULL;  /* History of previously entered unicode characters */
+static B *unicodehist = NULL;  /* History of previously entered UCS characters */
 
 static int dounicode(BW *bw, unsigned char *s, void *object, int *notify)
 {
@@ -1228,7 +1228,7 @@ doquote(BW *bw, int c, void *object, int *notify)
                        if (bw->b->o.charmap->type)
                                goto unopoo;
  uhex_uni:
-                       if (!wmkpw(bw->parent, UC "Unicode (ISO-10646) character in hex (^C to abort): ", &unicodehist, dounicode,
+                       if (!wmkpw(bw->parent, UC "UCS (ISO-10646) character in hex (^C to abort): ", &unicodehist, dounicode,
                                   NULL, NULL, NULL, NULL, NULL, locale_map))
                                return 0;
                        else
@@ -1343,7 +1343,7 @@ doquote(BW *bw, int c, void *object, int *notify)
 }
 
 static char uquote_txt[] =
-    "Ctrl- (or 0-9 for dec. o for octal, x hex, u Unicode)";
+    "Ctrl- (or 0-9 for dec. o for octal, x hex, u UCS)";
 int
 uquote(BW *bw)
 {
index b662bfb..f67f25a 100644 (file)
--- a/usearch.c
+++ b/usearch.c
@@ -8,7 +8,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/usearch.c,v 1.21 2017/12/16 22:10:55 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/usearch.c,v 1.22 2018/10/20 16:34:40 tg Exp $");
 
 #include <stdlib.h>
 
@@ -591,7 +591,7 @@ static int set_pattern(BW *bw, unsigned char *s, SRCH *srch, int *notify)
        vsrm(srch->pattern);
        srch->pattern = s;
        if ((pbw = wmkpw(bw->parent, p, NULL, set_options, srchstr, pfabort, utypebw, srch, notify, bw->b->o.charmap)) != NULL) {
-               unsigned char buf[10];
+               unsigned char buf[12];
 
                if (srch->ignore)
                        binsc(pbw->cursor, 'i');
@@ -599,8 +599,10 @@ static int set_pattern(BW *bw, unsigned char *s, SRCH *srch, int *notify)
                        binsc(pbw->cursor, 'r');
                if (srch->backwards)
                        binsc(pbw->cursor, 'b');
-               if (srch->repeat >= 0)
-                       joe_snprintf_1((char *)buf, sizeof(buf), "%d", srch->repeat), binss(pbw->cursor, buf);
+               if (srch->repeat >= 0) {
+                       joe_snprintf_1((char *)buf, sizeof(buf), "%d", srch->repeat);
+                       binss(pbw->cursor, buf);
+               }
                pset(pbw->cursor, pbw->b->eof);
                pbw->cursor->xcol = piscol(pbw->cursor);
                srch->ignore = 0;
diff --git a/utf8.c b/utf8.c
index 6b98c45..22a2e3f 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2,7 +2,7 @@
  *     UTF-8 Utilities
  *     Copyright
  *             (C) 2004 Joseph H. Allen
- *             (c) 2004, 2006, 2011, 2013, 2014, 2017 Thorsten Glaser
+ *             (c) 2004, 2006, 2011, 2013, 2014, 2017, 2018 mirabilos
  *
  *     This file is part of JOE (Joe's Own Editor)
  */
@@ -10,7 +10,7 @@
 #include "config.h"
 #include "types.h"
 
-__RCSID("$MirOS: contrib/code/jupp/utf8.c,v 1.23 2017/12/20 23:53:29 tg Exp $");
+__RCSID("$MirOS: contrib/code/jupp/utf8.c,v 1.25 2018/08/10 02:53:45 tg Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -63,8 +63,8 @@ __RCSID("$MirOS: contrib/code/jupp/utf8.c,v 1.23 2017/12/20 23:53:29 tg Exp $");
 
 /* UTF-8 Encoder
  *
- * c is unicode character.
- * buf is 7 byte buffer- utf-8 coded character is written to this followed by a 0 termination.
+ * c is a UCS character.
+ * buf is 7 byte buffer: UTF-8 encoded character is written to this followed by a NUL terminator
  * returns length (not including terminator).
  */
 
@@ -115,70 +115,68 @@ int utf8_encode(unsigned char *buf,int c)
 /* UTF-8 Decoder
  *
  * Returns 0 - 7FFFFFFF: decoded character
- *                   -1: character accepted, nothing decoded yet.
- *                   -2: incomplete sequence
- *                   -3: no sequence started, but character is between 128 - 191, 254 or 255
+ *                   -1: byte accepted, nothing decoded yet
+ *                   -2: illegal continuation byte or sequence
+ *                   -3: illegal start byte
  */
 
-int utf8_decode(struct utf8_sm *utf8_sm,unsigned char c)
+int
+utf8_decode(struct utf8_sm *utf8_sm, unsigned char c)
 {
        if (utf8_sm->state) {
-               if ((c&0xC0)==0x80) {
-                       utf8_sm->buf[utf8_sm->ptr++] = c;
-                       --utf8_sm->state;
-                       utf8_sm->accu = ((utf8_sm->accu<<6)|(c&0x3F));
-                       if(!utf8_sm->state)
-                               return utf8_sm->accu;
-               } else {
-                       utf8_sm->state = 0;
-                       return -2;
+               utf8_sm->buf[utf8_sm->ptr] = c;
+               if ((c ^= 0x80) < 0x40) {
+                       /* trail byte */
+                       ++utf8_sm->ptr;
+                       utf8_sm->accu = (utf8_sm->accu << 6) | c;
+                       if (--utf8_sm->state)
+                               return (-1);
+                       if (utf8_sm->accu >= utf8_sm->minv)
+                               return (utf8_sm->accu);
+                       /* reject non-minimal-encoded sequence */
+                       --utf8_sm->ptr;
                }
-       } else if ((c&0xE0)==0xC0) {
-               /* 192 - 223 */
-               utf8_sm->buf[0] = c;
-               utf8_sm->ptr = 1;
+               utf8_sm->state = 0;
+               return (-2);
+       } else if (c < 0x80) {
+               utf8_sm->accu = c; /* known to be in [0; 127] */
+               utf8_sm->state = 0;
+       } else if (c < 0xC2) {
+ ilchar:
+               utf8_init(utf8_sm);
+               return (-3);
+       } else if (c < 0xE0) {
+               utf8_sm->accu = c & 0x1F;
                utf8_sm->state = 1;
-               utf8_sm->accu = (c&0x1F);
-       } else if ((c&0xF0)==0xE0) {
-               /* 224 - 239 */
-               utf8_sm->buf[0] = c;
-               utf8_sm->ptr = 1;
+       } else if (c < 0xF0) {
+               utf8_sm->accu = c & 0x0F;
                utf8_sm->state = 2;
-               utf8_sm->accu = (c&0x0F);
-       } else if ((c&0xF8)==0xF0) {
-               /* 240 - 247 */
-               utf8_sm->buf[0] = c;
-               utf8_sm->ptr = 1;
+       } else if (c < 0xF8) {
+               utf8_sm->accu = c & 0x07;
                utf8_sm->state = 3;
-               utf8_sm->accu = (c&0x07);
-       } else if ((c&0xFC)==0xF8) {
-               /* 248 - 251 */
-               utf8_sm->buf[0] = c;
-               utf8_sm->ptr = 1;
+       } else if (c < 0xFC) {
+               utf8_sm->accu = c & 0x03;
                utf8_sm->state = 4;
-               utf8_sm->accu = (c&0x03);
-       } else if ((c&0xFE)==0xFC) {
-               /* 252 - 253 */
-               utf8_sm->buf[0] = c;
-               utf8_sm->ptr = 1;
+       } else if (c < 0xFE) {
+               utf8_sm->accu = c & 0x01;
                utf8_sm->state = 5;
-               utf8_sm->accu = (c&0x01);
-       } else if ((c&0x80)==0x00) {
-               /* 0 - 127 */
-               utf8_sm->buf[0] = c;
-               utf8_sm->ptr = 1;
-               utf8_sm->state = 0;
-               return c;
-       } else {
-               /* 128 - 191, 254, 255 */
-               utf8_sm->ptr = 0;
-               utf8_sm->state = 0;
-               return -3;
-       }
-       return -1;
+       } else
+               goto ilchar;
+
+       utf8_sm->minv = 1 << (5 * utf8_sm->state + 1);
+       utf8_sm->buf[0] = c;
+       utf8_sm->ptr = 1;
+
+       if (!utf8_sm->state)
+               /* ASCII */
+               return (utf8_sm->accu);
+
+       /* lead byte */
+       utf8_sm->minv = 1 << (5 * utf8_sm->state + 1);
+       return (-1);
 }
 
-/* Initialize state machine */
+/* Initialise state machine */
 
 void utf8_init(struct utf8_sm *utf8_sm)
 {
diff --git a/utf8.h b/utf8.h
index e65f3e7..614940d 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -9,14 +9,14 @@
 #define _Iutf8 1
 
 #ifdef EXTERN
-__IDSTRING(rcsid_utf8_h, "$MirOS: contrib/code/jupp/utf8.h,v 1.8 2017/12/06 23:02:08 tg Exp $");
+__IDSTRING(rcsid_utf8_h, "$MirOS: contrib/code/jupp/utf8.h,v 1.10 2018/08/10 02:53:45 tg Exp $");
 #endif
 
 #include "i18n.h"
 
 /* UTF-8 Encoder
  *
- * c is unicode character.
+ * c is a UCS character.
  * buf is 7 byte buffer- utf-8 coded character is written to this followed by a 0 termination.
  * returns length (not including terminator).
  */
@@ -30,6 +30,7 @@ struct utf8_sm {
        int ptr;                /* Record pointer */
        int state;              /* Current state.  0 = idle, anything else is no. of chars left in sequence */
        int accu;               /* Character accumulator */
+       int minv;               /* Minimum value, for decoder */
 };
 
 /* UTF-8 Decoder