Fixups of SIGWINCH handling.
[midnight-commander.git] / doc / README.QNX
blobc4675d092549fd71f15fbb2f3883f763086518c1
1 Midnight Commander for QNX (not QNX Neutrino)
2 ---------------------------------------------
4 1. Compiling
5 2. Running 'mc' under QNX
6 3. List of modifications on mc-4.1.33
7 4. TODO
8 5. Contact information
10 1. Compiling
11 ------------
13 1.1 Make utility
14 ----------------
16 Use 'gmake'. (This is the default 'make' under QNX 4.23+). [The old 'qmake'
17 cannot handle the makefiles in the mc-source.]
19 1.2 Configuring
20 ---------------
22 If you don't have an installed TCP/IP development kit, you have to 'hide'
23 the library file 'socket3r.lib' (can be installed by e.g. Watcom C 10.6)
24 in /usr/lib or /usr/watcom/10.6/usr/lib, because the existence of this file
25 will confuse 'configure': it will erroneously assume you have the complete
26 TCP/IP development kit (with headers) and will enable compiling of the
27 network-related VFS code (not only tarfs).
28 [A patch would be required in the configure-script to check the existence
29 of the TCP/IP-related headers also...]
31 Use '--disable-nls' option, if you don't have the binary utilities of
32 GNU 'gettext' package (e.g. 'msgfmt'). ['--with-included-gettext' doesn't
33 really work in 4.1.33, there are configuration/compiling problems...]
35 1.3 Compiler
36 ------------
38 It is advised to use Watcom C 10.6+ to compile the source, because older
39 compilers (e.g. 9.52) do not support some convenient/required features.
40 [e.g. 'ar'-compatible 'wlib',...]
42 1.4 "No prototype found for '<function>'" warnings
43 --------------------------------------------------
45 It is advised to use high warning level (e.g. 'CFLAGS="-w4" ./configure'),
46 when compiling the source, because Watcom C uses a special parameter passing
47 convention for functions with fixed number of arguments only. So if the
48 compiler doesn't see the correct prototype of a function with variable
49 number of arguments (like printf()), it will produce a warning about the
50 missing prototype, but generates function call code according to the special
51 parameter passing convention, not the required CDECL convention (it is used
52 by default for functions with variable number of arguments). So the calling
53 convention of the function call code and the function code itself will not
54 match! So you MUST provide the correct prototype for function with variable
55 number of arguments! (Or you can force using the stack-based calling
56 convention as a default, if you have the stack-call-conv version of all of the
57 required libraries ('<name>3s.lib')...[Watcom C 10.6 required!])
59 [The latest release version (4.1.33/qnx) is checked against these types of
60 missing prototypes...]
62 1.5 Tested configuration
63 ------------------------
65 QNX 4.24
66 Watcom C 10.6 (release version, no newer beta patches)
67 Photon 1.12
68 no TCP/IP development kit (-> VFS: tarfs only!)
69 mc-4.1.33, mc-4.1.34
71 2. Running 'mc' under QNX
72 -------------------------
74 Using 'qnx*' terminals:
76   You cannot use your keyboard correctly, if you disable the "Full 8 bits
77   input" feature in the 'Options|Display bits...' dialog.
79   On 'qnx*' terminals 'mc' will run in black and white mode by default,
80   because these types of terminals use non-ANSI-compatible color sequences.
82 Accessing remote nodes via the native QNX-network:
84   [The problem exists under the older versions of 'mc' only...]
85   If directory panels cannot handle '//<node-id>' prefix in directory names,
86   use directory links in order to access remote nodes on the native QNX
87   network:
89         mkdir /net
90         ln -sf //1/ /net/1
91         ...
93 Extension and menu files:
95   Default 'tar' uses 'stderr' (and not 'stdout' as its 'normal' output with
96   '-t' option.
97   
98   Default 'tar' is not a GNU 'tar', so does not understand '-z' option.
100 Special key-mappings:
102   Restrictions of the META-? as Alt-? functionality:
103   [META-? as ESC-? will always work!!!]
105     Alt-TAB   -> Ctrl-TAB    (Alt-TAB reserved in Photon [1.12+])
106     Alt-ENTER -> Ctrl-ENTER  ('qnx*' terminals only)
107   
108     Alt-<uppercase letter>: doesn't work
110 'qansi*' terminals:
112   Problem [QNX 4.23+ only]: screen corruption (strange line-drawing character
113   set handling) on 'qansi*' terminals, if linked with mc/Slang/terminfo
114   terminal management. (Older versions of QNX and Slang/termcap not affected.)
116   This problem is solved, see the comments in slang/sldisply.c about
117   SLTT_TRANSP_ACS_PATCH and QNX_QANSI_SLANG_COMPAT_ACS!
119 other terminals:
121   I have tested 'mc' under QNX on 'qnx*' and 'qansi*' terminals only. 
122   
123 toggle panels on/off (CTRL-o):
125   Currently not supported, but could be implemented later...
127 3. List of modifications on mc-4.1.33/mc-4.1.34
128 -----------------------------------------------
130 edit/
132  syntax.c: (4.1.33 only, fixed in 4.1.34)
134    line 100,191: WCC 10.6 doesn't like "<label>: }" construct ("no statement
135    after the label"), modified to "<label>: /*nop*/; }".
137 lib/
139   mc.menu:
141     'Z' on 'tar.Z' and 'tar.z' files: '%f' -> '$1'.
143   mc.ext.in.qnx.diff:
145     QNX: modified 'mc.ext.in'. [tar -t: output to stderr,...]
146     
147     (No automatic install implemented: patch must be applied before
148     running 'configure' [->mc.ext.in.qnx.diff!]; this patch can be not
149     only QNX-specific...) 
151   Makefile.in:
153     'mc.ext.in.qnx.diff' added to DISTLIB.
155 slang/
157   sldisply.c:
159     SLTT_TRANSP_ACS_PATCH dependent code:
161     The problem: some terminals (e.g. QNX/qansi*) map the whole upper half of
162     the ASCII table to the lower half, when alt-char-set is activated with
163     the smacs/as string-sequence. This means, that if 0 <= ch < 128 written
164     to the terminal, it will be translated to (ch+128) automatically by the
165     terminal: so not only the line-drawing characters can be written, when
166     the alt-char-set is activated. It implicitly means, that space, NL, CR,
167     etc. characters (exactly: anything besides the "standard" line drawing
168     characters) cannot be written directly to the terminal, when the
169     alt-char-set is activated, because writing these characters doesn't cause
170     an implicit/temporary switching-back to the standard char-set!
171    
172     The original code in SLang assumes that space, NL, CR, etc. can be
173     printed when alt-char-set is activated. If SLTT_TRANSP_ACS_PATCH is
174     defined, the modified code will not use this assumption.
175     [Remark: the patch-code is not the most exact solution, but works...]
177     QNX_QANSI_SLANG_COMPAT_ACS_PATCH dependent code:
179     A more OS/terminal-specific solution for the problem mentioned above
180     (->SLTT_TRANSP_ACS_PATCH).
181   
182     If QNX_QANSI_SLANG_COMPAT_ACS is defined, the default smacs/sa, rmacs/ae,
183     acsc/ac [and sgr/sa, if it would be used!] command sequences will be
184     replaced internally with the "old style" (pre-QNX 4.23) sequences in case
185     of QNX/qansi terminals. Using these optional command sequences the terminal
186     remains compatible with the original SLang code (without using the
187     workaround-code enabled by defining SLTT_TRANSP_ACS_PATCH).
188    
189     Remark:
191     Currently SLTT_TRANSP_ACS_PATCH is not auto-configured by 'configure'.
192     (Must be manually defined...)
194     There is some (QNX-specific) auto-configuration hand-coded in the source:
196         #ifdef SLTT_TRANSP_ACS_PATCH
197         # if defined(__QNX__) && defined(QNX_QANSI_SLANG_COMPAT_ACS)
198         #  undef SLTT_TRANSP_ACS_PATCH
199         # endif
200         #else
201         # if defined(__QNX__) && !defined(QNX_QANSI_SLANG_COMPAT_ACS)
202         #  define QNX_QANSI_SLANG_COMPAT_ACS 1
203         # endif
204         #endif
206   slutty.c:
208     "newtty.c_iflag &= ~(ECHO | INLCR | ICRNL);"
210     ECHO(0x08) is a c_lflag bit, it means PARMRK(0x08) in c_iflag. (!?!)
212 src/
214   file.c:
216     'do_reget' can be extern if (ENABLE_VFS && USE_NETCODE), not if (ENABLE_VFS).
218   find.c:
220     search_content():
221     
222     variable 'i' "must be" 'int', not 'char'. ["i == -1": (buggy?) WCC 10.6
223     doesn't convert automatically (int)(-1) to (char)(-1) (GCC does), so
224     "comparison result always 0" warning produced. It is cleaner to define
225     'i' as 'int', than cast '-1' to 'char', because 'read()' returns 'int'.]
226     
227   key.c:
229     init_key():
231     Call load_xtra_key_defines() and clear 'use_8th_bit_as_meta' by default
232     under QNX, if a 'qnx*' terminal detected. (A saved config file (mc.ini)
233     can override it later...)
235   key.h:
237     Declare load_xtra_key_defines().
239   keyxdef.c:
241     Provides a method to define some platform-specific additional key
242     mappings. (e.g. QNX terminals can handle most of META-? combinations as
243     ALT-?...)
244     
245     (Currently not listed in doc/FILES...)
247   layout.c:
249     TIOCGWINSZ must be available (<sys/ioctl.h> included), because window-
250     resizing code doesn't work, if not defined.
252   main.c:
254     print_usage(): reserved name in the QNX run-time library!
255     print_usage() -> print_mc_usage()
257   mouse.c:
259     QNX: ncurses 1.9.8a ported to QNX doesn't provide the 'SP' pointer as a
260     global symbol in the library, so the keyok() emulation currently cannot
261     be used under QNX (4.24 & Watcom C 10.6 release version).
263   slint.c:
265     QNX: 'qansi*' terminals added to the color_terminals[] list.
266     
267   subshell.c:
268   utilunix.c:
270     QNX: include <unix.h> to get prototype for exec*()!!!
271     [See README.QNX/Section 1.4!]
272     
273   Makefile.in:
275     'keyxdef' module added to SRCS and OBJS.
277 vfs/
279 <mc-src-root>/
281   README.QNX:
283     QNX-specific notes...
284   
285   configure (line 3369):
286   configure.in (line 88):
288     (mc-4.1.34 only)
289     'test x$CCOPTS = x;' => 'test "x$CCOPTS" = x;'
291   Makefile.in:
293     README.QNX added to DISTMAIN.
294     
295 4. TODO
296 -------
298 Because of limited time and resources now I can define a 'wish list' only:
299 (maybe somebody in the QNX community can help...)
301 subshell support with panel switch on/off ?
302 mouse under Photon (with qnxm, qansi-m terminals) ?
305 5. Contact information
306 ----------------------
308 Please report QNX-specific bugs and comments via e-mail to: gt_cosy@usa.net
311 -------------
312 Tamasi Gyorgy
313 -------------