4 LC_ALL=C grep -ve $'^[\t ]' -e '^-syntax' jupprc | sed \
5 -e '/^:cua/,$d' -e '/^:Pastecua/,/^$/d' -e 1d \
6 -e 's/@(#) jupprc/@(#) blt_in/' | cat -s | while IFS= read -r x; do
7 x=${x//\\/\\\\}; print -r -- $'\t\t'\""${x//\"/\\\"}\n"\";
8 done | perl -pe 's/[^\ca-~]/sprintf "\\x%02X", unpack("U", $&)/eg'
14 __RCSID("$MirOS: contrib/code/jupp/builtins.c,v 1.26 2017/12/02 02:07:24 tg Exp $");
16 #ifndef JUPPRC_BUILTIN_NAME
17 #define JUPPRC_BUILTIN_NAME "jupprc"
20 const unsigned char * const builtins[] = {
21 US JUPPRC_BUILTIN_NAME, US
32 "-lmsg \\i%k%T%*\\b%n\\b%R\n"
33 "-rmsg R%r<%l C%c\\u%o|%O\\i\\b%a|%A\\b\\i\\u %u\n"
60 "+#!\\+\\[ ]\\+\\[a-z/]/python\n"
68 "+#!\\+\\[ ]\\+\\[a-z/]/env\\+\\[ ]python\n"
76 "\\i Help Screen turn off with ^J more help with ESC . (^[.) \\i\n"
77 "\\i \\i\\u\\bCURSOR\\b\\u \\u\\bGOTO\\b\\u \\u\\bBLOCK\\b\\u \\u\\bDELETE\\b\\u \\u\\bMISC\\b\\u \\u\\bEXIT\\b\\u \\i \\i\n"
78 "\\i \\i^S left ^D right ^R prev. screen ^KV move ^G char ^B reformat ^KX save \\i \\i\n"
79 "\\i \\i^E up ^X down ^C next screen ^KC copy ^Y line ^V overtype ^KQ abort \\i \\i\n"
80 "\\i \\i^A previous word ^QS beg. of line ^KY kill ^T >word ^QL refresh ^KZ shell \\i \\i\n"
81 "\\i \\i^F next word ^QD end of line ^K/ pipe ^QY >line ^O options \\u\\bFILE\\b\\u \\i \\i\n"
82 "\\i \\i\\u\\bSEARCH\\b\\u ^QR top of file ^KB begin \\u\\bBUFFER\\b\\u ^KE new \\i \\i\n"
83 "\\i \\i^QF find first ^QC end of file ^KK end ^U undo ^KR import \\i \\i\n"
84 "\\i \\i^L find next ^QO byte offset ^KD reformat ^^ redo ^KW export \\i \\i\n"
88 "\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
89 "\\i \\i^KO Split the window in half ^KE Load file into new window \\i \\i\n"
90 "\\i \\i^KG Make current window bigger ^KT Make current window smaller \\i \\i\n"
91 "\\i \\i^KN Go to the window below ^KP Go to the window above \\i \\i\n"
92 "\\i \\i^KQ Eliminate the current window ^KI Show all windows / Show one window \\i \\i\n"
93 "\\i \\i^K; Run a ctags search ^K- Edit scratch buffer in new window \\i \\i\n"
94 "\\i \\i Note: some commands (^KE ^K; ^K-) hide the current window; use ^KI/^KN then \\i \\i\n"
95 "\\i \\i\\u\\bSpecial help for XON/XOFF aware terminals:\\b\\u \\i \\i\n"
96 "\\i \\i You can use \\b^[q\\b and \\b^[s\\b instead of \\b^Q\\b and \\b^S\\b to initiate a command. \\i \\i\n"
100 "\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
101 "\\i \\i\\u\\bMACROS\\b\\u \\u\\bMISC\\b\\u \\u\\bSCROLL\\b\\u \\u\\bSHELL\\b\\u \\u\\bGOTO\\b\\u \\u\\bI-SEARCH\\b\\u \\i \\i\n"
102 "\\i \\i^[( Record ^Q? status ^Q. Right ^K' Window ^QB to ^KB ^[R Backwards \\i \\i\n"
103 "\\i \\i^[) Stop ^QQ repeat ^Q, Left ^[! Command ^QK to ^KK ^[S Forwards \\i \\i\n"
104 "\\i \\i^[? Query ^QM Math \\u\\bCharSEARCH\\b\\u \\u\\bQUOTE\\b\\u \\u\\bDELETE\\b\\u \\u\\bBOOKMARKS\\b\\u \\i \\i\n"
105 "\\i \\i^[D Dump ^[H Message ^QH forwrd ` Ctrl- ^[Y yank ^K 0-9 Set \\i \\i\n"
106 "\\i \\i^[ 0-9 Play ^N Play #0 ^QG backwd ^P Meta- ^[O word< ^Q 0-9 Goto \\i \\i\n"
107 "\\i \\i \\u\\bIn math mode,\\b\\u use 0xCAFE for hex. All ops are floating point internally. \\i \\i\n"
108 "\\i \\i \\u\\bPredefined variables:\\b\\u byte col height line lines top width \\i \\i\n"
112 "\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
113 "\\i \\i\\u\\bGOTO\\b\\u \\u\\bCOMPILING\\b\\u \\u\\bSLIDING\\b\\u \\i \\i\n"
114 "\\i \\i^Q] matching brace, ^Q[ reverse ^[C compile & parse errors ^W up \\i \\i\n"
115 "\\i \\i^Q= merge conflict marker ^[E parse errors ^Z down \\i \\i\n"
116 "\\i \\i^Q- to column number \\u\\bINDENT\\b\\u ^KF save, compile & upload to NXT brick \\i \\i\n"
117 "\\i \\i^QI to line number ^K. more \\u\\bGOTO AFTER COMPILING\\b\\u \\u\\bINSERT MATH\\b\\u \\i \\i\n"
118 "\\i \\i^QP previous place ^K, less ^[N previous error ^[# equation \\i \\i\n"
119 "\\i \\i^K= next place ^KA centre ^[M next error \\u\\bSPECIAL\\b\\u ^[= result \\i \\i\n"
120 "\\i \\i ^K] kill whitespace at EOL ^[- jupp command line \\i \\i\n"
124 "\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
125 "\\i \\i\\u\\bSpecial search sequences:\\b\\u \\i \\i\n"
126 "\\i \\i \\\\^ \\\\$ matches beg./end of line \\\\? match any single char \\i \\i\n"
127 "\\i \\i \\\\< \\\\> matches beg./end of word \\\\* match 0 or more chars \\i \\i\n"
128 "\\i \\i \\\\c matches balanced C expression \\\\\\\\ matches a \\\\ \\i \\i\n"
129 "\\i \\i \\\\[..] matches one of a set \\\\n matches a newline \\i \\i\n"
130 "\\i \\i \\\\+ matches 0 or more of the character which follows the \\\\+ \\i \\i\n"
131 "\\i \\i\\u\\bSpecial replace sequences:\\b\\u \\i \\i\n"
132 "\\i \\i \\\\& replaced with text which matched search string \\i \\i\n"
133 "\\i \\i \\\\0 - 9 replaced with text which matched \\bN\\bth \\\\*, \\\\?, \\\\c, \\\\+, or \\\\[..] \\i \\i\n"
134 "\\i \\i \\\\\\\\ replaced with \\\\ \\\\n replaced with newline \\i \\i\n"
138 "\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
139 "\\i \\i At file name prompts use the cursor up/down keys to access a history of \\i \\i\n"
140 "\\i \\i recently used files or the tab key to complete them. \\bSpecial file names:\\b \\i \\i\n"
141 "\\i \\i !command Pipe in/out of a shell command \\i \\i\n"
142 "\\i \\i >>filename Append to a file \\i \\i\n"
143 "\\i \\i - Read/Write to/from standard I/O \\i \\i\n"
144 "\\i \\i filename,START,SIZE Read/Write a part of a file/device \\i \\i\n"
145 "\\i \\i Give START/SIZE in decimal (255), octal (0377) or hex (0xFF) \\i \\i\n"
146 "\\i \\i \\u\\bPresentation mode:\\b\\u F6=fullscreen; F7=previous, F8=next win; F9=filter/again \\i \\i\n"
150 "\\i Help Screen turn off with ^J prev. screen ^[, next screen ^[. \\i\n"
151 "\\i \\i \\bJUPP\\b is based upon JOE (Joe's Own Editor) 2.8/3.x \\d(GPL v1)\\d by Joe H. Allen; \\i \\i\n"
152 "\\i \\i go to \\uhttp://sf.net/projects/joe-editor/\\u for upstream bug reports. JUPP 2.8 \\i \\i\n"
153 "\\i \\i for DOS compiled by A. Totlis, packed with LHarc 2.13; JUPP 3.x for UNIX\\d(R)\\d \\i \\i\n"
154 "\\i \\i at \\uhttp://mirbsd.de/jupp\\u and by \\bThorsten \"\\dmirabilos\\d\" Glaser <\\utg@mirbsd.org\\u>\\b \\i \\i\n"
155 "\\i \\i @(#) blt_in 2017-08-08; 3.1; autoCR-LF; UTF-8 via locale; per-file encoding \\i \\i\n"
159 "\\i Help Screen turn off with ^J prev. screen ^[, \\uCharacter Map\\u \\i\n"
160 "\\i \\i Dec Hex \\u 0123 4567 89AB CDEF 0123 4567 89AB CDEF \\u Hex Dec \\i \\i\n"
161 "\\i \\i | | \\i \\i\n"
162 "\\i \\i 0 00 | \\u@ABC\\u \\uDEFG\\u \\uHIJK\\u \\uLMNO\\u \x80\x81\x82\x83 \x84\x85\x86\x87 \x88\x89\x8A\x8B \x8C\x8D\x8E\x8F | 80 128 \\i \\i\n"
163 "\\i \\i 16 10 | \\uPQRS\\u \\uTUVW\\u \\uXYZ[\\u \\u\\\\]^_\\u \x90\x91\x92\x93 \x94\x95\x96\x97 \x98\x99\x9A\x9B \x9C\x9D\x9E\x9F | 90 144 \\i \\i\n"
164 "\\i \\i 32 20 | !\"# $%&' ()*+ ,-./ \xA0\xA1\xA2\xA3 \xA4\xA5\xA6\xA7 \xA8\xA9\xAA\xAB \xAC\xAD\xAE\xAF | A0 160 \\i \\i\n"
165 "\\i \\i 48 30 | 0123 4567 89:; <=>? \xB0\xB1\xB2\xB3 \xB4\xB5\xB6\xB7 \xB8\xB9\xBA\xBB \xBC\xBD\xBE\xBF | B0 176 \\i \\i\n"
166 "\\i \\i 64 40 | @ABC DEFG HIJK LMNO \xC0\xC1\xC2\xC3 \xC4\xC5\xC6\xC7 \xC8\xC9\xCA\xCB \xCC\xCD\xCE\xCF | C0 192 \\i \\i\n"
167 "\\i \\i 80 50 | PQRS TUVW XYZ[ \\\\]^_ \xD0\xD1\xD2\xD3 \xD4\xD5\xD6\xD7 \xD8\xD9\xDA\xDB \xDC\xDD\xDE\xDF | D0 208 \\i \\i\n"
168 "\\i \\i 96 60 | `abc defg hijk lmno \xE0\xE1\xE2\xE3 \xE4\xE5\xE6\xE7 \xE8\xE9\xEA\xEB \xEC\xED\xEE\xEF | E0 224 \\i \\i\n"
169 "\\i \\i 112 70 | pqrs tuvw xyz{ |}~\x7F \xF0\xF1\xF2\xF3 \xF4\xF5\xF6\xF7 \xF8\xF9\xFA\xFB \xFC\xFD\xFE\xFF | F0 240 \\i \\i\n"
174 "\\i \\i \\u\\bPaste Mode\\b\\u turn off with \\b^D\\b or \\b^[[201~\\b \\i \\i\n"
189 "explode ^[ [ 1 7 ~\n"
228 "msg,\"Entered bracketed paste mode\",rtn ^[ [ 2 0 0 ~\n"
229 "helpcard,rtn,keymap,\"main\",rtn,msg,rtn ^[ [ 2 0 1 ~\n"
230 "helpcard,rtn,keymap,\"main\",rtn ^D\n"
235 "keymap,\"prompt\",rtn,msg,rtn,rtn ^M\n"
236 "msg,\"Entered bracketed paste mode\",rtn ^[ [ 2 0 0 ~\n"
237 "keymap,\"prompt\",rtn,msg,rtn ^[ [ 2 0 1 ~\n"
238 "keymap,\"prompt\",rtn ^D\n"
242 ":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,rtn,\"p=--posix; sed $p -e q </dev/null >/dev/null 2>&1 || p=; fns=$(echo \\\"$fn\\\" | sed $p -e 's
\ 1[^^]
\ 1[&]
\ 1g; s
\ 1\\\\^
\ 1\\\\\\\\^
\ 1g'); (case $fn in\",rtn,\"*.nxc) ;;\",rtn,\"*) echo '==> Error: filename not *.nxc'; exit ;;\",rtn,\"esac\",rtn,\"echo \\\"Compiling $fn\\\"\",rtn,\"nbc -sm- -d \\\"$fn\\\" 2>&1; x=$?\",rtn,\"if test $x = 0; then echo '==> OK'; else echo '==> Error code:' $x; fi\",rtn,\") | tr '\\\\n' '
\ 1' | sed $p -e 's!
\ 1# *\\\\([^
\ 1]*\\\\)
\ 1File \\\"[^\\\"]*/\\\\('\\\"$fns\\\"'\\\\)\\\" ; 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"
243 ":def docompile edit,rtn,filt,query,parserr\n"
244 "bof,qrepl,\"\\\\[\",quote,\"i\",quote,\"k\",quote,\"l\",quote,\"m ]\\\\+\\\\[\",quote,\"i\",quote,\"k\",quote,\"l\",quote,\"m ]\\\\$\",rtn,rtn,rtn,\"r\",eof ^K ]\n"
245 "ffirst,\"\\\\^\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[<>=]\\\\[ \\\\n]\",rtn,rtn,ltarw ^Q =\n"
246 "begin_marking,uparw,toggle_marking ^[ [ 1 ; 2 A\n"
247 "begin_marking,dnarw,toggle_marking ^[ [ 1 ; 2 B\n"
248 "begin_marking,rtarw,toggle_marking ^[ [ 1 ; 2 C\n"
249 "begin_marking,ltarw,toggle_marking ^[ [ 1 ; 2 D\n"
250 "begin_marking,bol,toggle_marking ^[ [ 1 ; 2 H\n"
251 "begin_marking,eol,toggle_marking ^[ [ 1 ; 2 F\n"
252 "begin_marking,bof,toggle_marking ^[ [ 1 ; 6 H\n"
253 "begin_marking,eof,toggle_marking ^[ [ 1 ; 6 F\n"
254 ":def pastemain helpcard,\"Paste\",rtn,keymap,\"Paste\",rtn\n"
257 "pastemain ^[ [ 2 0 0 ~\n"
263 "bkwdc ^Q G ^@ TO \xFF\n"
264 "bkwdc ^Q ^G ^@ TO \xFF\n"
265 "bkwdc ^Q g ^@ TO \xFF\n"
266 "bkwdc ^[ q g ^@ TO \xFF\n"
352 "nmark,filt,uparw ^[ [ 2 0 ~\n"
360 "fwrdc ^Q H ^@ TO \xFF\n"
361 "fwrdc ^Q ^H ^@ TO \xFF\n"
362 "fwrdc ^Q h ^@ TO \xFF\n"
363 "fwrdc ^[ q h ^@ TO \xFF\n"
365 "gomark ^[ q 0 TO 9\n"
400 "nextword ^[ [ 1 ; 5 C\n"
426 "prevword ^[ [ 1 ; 5 D\n"
445 "scratch,\"(S) \" ^K -\n"
446 "setmark ^K 0 TO 9\n"
486 ":def pasteprompt keymap,\"Pasteprompt\",rtn,msg,\"Entered bracketed paste mode\",rtn\n"
492 "pasteprompt ^[ [ 2 0 0 ~\n"
502 "bofmenu ^[ [ 1 ; 5 H\n"