Debian Codegraph @

HINTS

raw
1 This documentation should go elsewhere, but I haven't gotten around to it
2 yet.
3
4 GCC
5 ---
6
7 Disable the following warnings; the code doesn't cope with it:
8 -Wno-pointer-sign
9 -Wno-unused-parameter
10 -Wno-strict-prototypes
11
12 Useful tricks
13 -------------
14
15 $ diff -u filea fileb | jupp -mold notmod -
16 or mc: diff -up %D/%F %f | jupp -mold notmod -
17 also: diff -up %f %D/%F | jupp -mold notmod - %f
18
19 UTF-8
20 -----
21
22 Do note that the joerc files must be written using the 8-bit encoding,
23 not in UTF-8. Syntax files, on the other hand, absolutely must be
24 written in UTF-8 since jupp29.
25
26 JOE now handles two classes of character sets: UTF-8 and byte coded (like
27 ISO-8859-1). It can not yet handle other major classes such as UTF-16 or
28 GB2312. There are other restrictions: character sets must use LF (0x0A) or
29 CR-LF (0x0D - 0x0A) as line terminators, space must be 0x20 and tab must be
30 0x09. Basically, the files must be UNIX or MS-DOS compatible text files.
31
32 This means EBCDIC will not work properly (but you would need to handle fixed
33 record length lines anyway) and character sets which use CR terminated lines
34 (MACs) will not yet work.
35
36 The terminal and the file can have different encodings. JOE will translate
37 between the two. Currently, one of the two must be UTF-8 for translation to
38 work.
39
40 The character set for the terminal and the default character set assumed for
41 files is determined by the 'LC_ALL' environment variable (and if that's not
42 set, LC_CTYPE and LANG are also checked). 'JOECHARMAP' overrides this value.
43
44 For example, if LC_ALL is set to:
45
46 de_DE
47
48 Then the character set will be ISO-8859-1.
49
50 If LC_ALL is set to:
51
52 de_DE.UTF-8
53
54 The character set will UTF-8.
55
56 Hit ^T E to change the coding for the file. Hit <tab> <tab> at this prompt
57 to get a list of available codings. There are a number of built-in
58 character sets, plus you can install character sets in the ~/.jupp/charmaps
59 and /usr/local/etc/joe/charmaps directories.
60
61 Check: /usr/share/i18n/charmaps for example character set files. Only
62 byte oriented character sets will work. Also, the file should not be
63 gzipped (all of the charmap file in /usr/share/i18n/charmaps on my computer
64 were compressed). The parser is very bad, so basically the file has to look
65 exactly like the example one in /usr/local/etc/joe/charmaps.
66
67 You can hit ^K <space> to see the current character set.
68
69 You can hit ` x to enter a UCS character if the file coding is UTF-8.
70
71 Programming
72 -----------
73
74 Try ^K , and ^K . These keys select the current block (based on
75 indentation) and shift it left or right by the -istep and -indentc.
76
77 Selecting blocks
78 ----------------
79
80 The "classic" way is to hit ^K B at the beginning and ^K K at the
81 end. These set pointers called markb and markk. Once these are set you
82 can jump to markb with ^[ b and jump to markk with ^[ k.
83
84 New way no.1: hit Ctrl-space to start selecting, move the cursor,
85 then hit Ctrl-space to complete the block. Hit Ctrl-space in the block to
86 cancel it. Hit Ctrl-space outside of the block to start selecting a new
87 one. This uses the "toggle_marking" function. Also any block command will
88 complete the block. (joe flavour only)
89
90 New way no.2: hit Ctrl-rtarw to start selecting rightward. Each
91 time you hit Ctrl-rtarw, the block is extended one more to the right. This
92 uses a simple macro: "begin_marking,rtarw,toggle_marking". Unfortunately,
93 there is no standard way to get the keysequence given by the terminal
94 emulator when you hit Ctrl-rtarw. Instead you have to determine this
95 sequence yourself and enter it directly in the joerc file. Some examples
96 are given for xterm and gnome-terminal. Hit ` rtarw to have the sequence
97 shown on your screen. Note that Putty uses ^[ ^[ [ C which will not appear
98 with ` rtarw (also ^[ ^[ is set book mark, so you need to unbind it to do
99 this in Putty). (joe flavour only)
100
101 Also you can hit Ctrl-delete to cut and Ctrl-insert to paste if the
102 sequence for these keys are known. (joe flavour only)
103
104 New way No.3: press down shift, then move the cursor with the
105 arrow keys or, optionally with ctrl, the Home and End keys; release the
106 shift key when done and remember that the cursor indicator on screen is
107 not part of the selection. (all flavours)
108
109 Also, you can pass "-keymap cua" on the command line to change
110 the key bindings for ^Z (Undo), ^X (Cut), ^C (Copy), ^V (Paste) as in
111 contemporary GUI editors. (joe, rjoe, jstar, jupp flavours only)
112
113 Using Picture mode and Rectangle mode may help with that.
114
115 Hex edit mode
116 -------------
117
118 When this mode is selected (either put -hex on the command line, or look for
119 "Hex edit mode" after hitting ^T), the buffer is displayed as a hex dump,
120 but all of the editing commands operate the same way. It is most useful to
121 select overtype mode in conjunction with hex dump (hit ^T T). Then typing
122 will not insert.
123
124 - To enter the hex byte 0xF8 type ` x F 8
125
126 - You can use ^KC to copy a block as usual. If overtype mode is selected,
127 the block will overwrite the destination data without changing the size of
128 the file. Otherwise it inserts.
129
130 - Hit ESC x byte <Enter>, to jump to a particular byte offset. Hex values
131 can be entered into this prompt like this: 0x2000.
132
133 - Search, incremental search, and search & replace all operate as usual.
134
135 Licences (binary package summary)
136 ---------------------------------
137
138 joe is Copyright
139 © 1992, 2004 Joseph H. Allen
140 © 2001 Marek 'Marx' Grac
141 © 2004, 2006, 2011, 2013, 2014, 2017, 2018, 2020 mirabilos
142 jupp is Copyright
143 © 1997–2022 Thorsten Glaser
144
145 * jupp is free software; you can redistribute and/or modify it, deal
146 * in the work, etc. under the terms of the GNU General Public Licen-
147 * se, version 1 (of February 1989) as published by the Free Software
148 * Foundation, reproduced in the file COPYING in the jupp source code
149 * distribution. If jupp is combined with other independent work, for
150 * example libraries or when using crunchgen, into a combined binary,
151 * that may be conveyed under any version of the GPL, as published by
152 * the Free Software Foundation, and any compatible licence permitted
153 * by any version of the GPL, as above.
154
155 jupp is also:
156 * Copyright © 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
157 * 2013, 2014, 2016, 2017, 2018, 2020, 2022
158 * mirabilos <[email protected]>
159 *
160 * Provided that these terms and disclaimer and all copyright notices
161 * are retained or reproduced in an accompanying document, permission
162 * is granted to deal in this work without restriction, including un‐
163 * limited rights to use, publicly perform, distribute, sell, modify,
164 * merge, give away, or sublicence.
165 *
166 * This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
167 * the utmost extent permitted by applicable law, neither express nor
168 * implied; without malicious intent or gross negligence. In no event
169 * may a licensor, author or contributor be held liable for indirect,
170 * direct, other damage, loss, or other issues arising in any way out
171 * of dealing in the work, even if advised of the possibility of such
172 * damage or existence of a defect, except proven that it results out
173 * of said person’s immediate fault when using the work as intended.
174
175 strlfun.inc (optional) additionally is:
176 * Copyright (c) 1998 Todd C. Miller <[email protected]>
177 *
178 * Permission to use, copy, modify, and distribute this software for any
179 * purpose with or without fee is hereby granted, provided that the above
180 * copyright notice and this permission notice appear in all copies.
181 *
182 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
183 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
184 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
185 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
186 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
187 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
188 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
189
190 I18N data is:
191 * Parts Copyright © 1991–2022 Unicode, Inc. All rights reserved.
192 * Distributed under the Terms of Use in:
193 * https://www.unicode.org/copyright.html
194 *
195 * Permission is hereby granted, free of charge, to any person obtaining
196 * a copy of the Unicode data files and any associated documentation
197 * (the "Data Files") or Unicode software and any associated documentation
198 * (the "Software") to deal in the Data Files or Software
199 * without restriction, including without limitation the rights to use,
200 * copy, modify, merge, publish, distribute, and/or sell copies of
201 * the Data Files or Software, and to permit persons to whom the Data Files
202 * or Software are furnished to do so, provided that either
203 * (a) this copyright and permission notice appear with all copies
204 * of the Data Files or Software, or
205 * (b) this copyright and permission notice appear in associated
206 * Documentation.
207 *
208 * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
209 * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
210 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
211 * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
212 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
213 * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
214 * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
215 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
216 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
217 * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
218 *
219 * Except as contained in this notice, the name of a copyright holder
220 * shall not be used in advertising or otherwise to promote the sale,
221 * use or other dealings in these Data Files or Software without prior
222 * written authorization of the copyright holder.
223
224 popen.inc (optional) is:
225 * Copyright (c) 1988, 1993
226 * The Regents of the University of California. All rights reserved.
227 *
228 * This code is derived from software written by Ken Arnold and
229 * published in UNIX Review, Vol. 6, No. 8.
230 *
231 * Redistribution and use in source and binary forms, with or without
232 * modification, are permitted provided that the following conditions
233 * are met:
234 * 1. Redistributions of source code must retain the above copyright
235 * notice, this list of conditions and the following disclaimer.
236 * 2. Redistributions in binary form must reproduce the above copyright
237 * notice, this list of conditions and the following disclaimer in the
238 * documentation and/or other materials provided with the distribution.
239 * 3. Neither the name of the University nor the names of its contributors
240 * may be used to endorse or promote products derived from this software
241 * without specific prior written permission.
242 *
243 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
244 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
245 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
246 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
247 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
248 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
249 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
250 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
252 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
253 * SUCH DAMAGE.
254
255 ___________________________________________________________________
256 $MirOS: contrib/code/jupp/HINTS,v 1.22 2022/09/28 21:10:16 tg Exp $