Clean menu -- made to use GNOME standart menu items, so that e.g. GNOME
[midnight-commander.git] / README.QNX
blobe9ead5f579e1e982afcdd7e02073f4df64b5777a
1 Midnight Commander for QNX
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 can not 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 erranously 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 adviced 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 adviced 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 can not 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 can not 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>: }" contruct ("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:
144   mc.menu.qnx.diff:
146     QNX: modified 'mc.ext.in'. [tar -t: output to stderr,...]
147     QNX: modified 'mc.menu'. [tar is not GNU tar: doesn't know '-z',...]
149     Support for '*.tar.F': 'freeze'-compressed tar files...
150     
151     (No automatic install implemented: patches must be applied before
152     running 'configure' [->mc.ext.in.qnx.diff!]; this patch can be not
153     only QNX-specific...) 
155   Makefile.in:
157     'mc.ext.in.qnx.diff' and 'mc.menu.qnx.diff' added to DISTLIB.
159 slang/
161   sldisply.c:
163     SLTT_TRANSP_ACS_PATCH dependant code:
165     The problem: some terminals (e.g. QNX/qansi*) map the whole upper half of
166     the ASCII table to the lower half, when alt-char-set is activated with
167     the smacs/as string-sequence. This means, that if 0 <= ch < 128 written
168     to the terminal, it will be translated to (ch+128) automatically by the
169     terminal: so not only the line-drawing characters can be written, when
170     the alt-char-set is activated. It implicitly means, that space, NL, CR,
171     etc. characters (exactly: anything besides the "standard" line drawing
172     characters) can not be written directly to the terminal, when the
173     alt-char-set is activated, because writing these characters doesn't cause
174     an implicit/temporary switching-back to the standard char-set!
175    
176     The original code in SLang assumes that space, NL, CR, etc. can be
177     printed when alt-char-set is activated. If SLTT_TRANSP_ACS_PATCH is
178     defined, the modified code will not use this assumption.
179     [Remark: the patch-code is not the most exact solution, but works...]
181     QNX_QANSI_SLANG_COMPAT_ACS_PATCH dependant code:
183     A more OS/terminal-specific solution for the problem mentioned above
184     (->SLTT_TRANSP_ACS_PATCH).
185   
186     If QNX_QANSI_SLANG_COMPAT_ACS is defined, the default smacs/sa, rmacs/ae,
187     acsc/ac [and sgr/sa, if it would be used!] command sequences will be
188     replaced internally with the "old style" (pre-QNX 4.23) sequences in case
189     of QNX/qansi terminals. Using these optional command sequences the terminal
190     remains compatible with the original SLang code (without using the
191     workaround-code enabled by defining SLTT_TRANSP_ACS_PATCH).
192    
193     Remark:
195     Currently SLTT_TRANSP_ACS_PATCH is not auto-configured by 'configure'.
196     (Must be manually defined...)
198     There is some (QNX-specific) auto-configuration hand-coded in the source:
200         #ifdef SLTT_TRANSP_ACS_PATCH
201         # if defined(__QNX__) && defined(QNX_QANSI_SLANG_COMPAT_ACS)
202         #  undef SLTT_TRANSP_ACS_PATCH
203         # endif
204         #else
205         # if defined(__QNX__) && !defined(QNX_QANSI_SLANG_COMPAT_ACS)
206         #  define QNX_QANSI_SLANG_COMPAT_ACS 1
207         # endif
208         #endif
210   slutty.c:
212     "newtty.c_iflag &= ~(ECHO | INLCR | ICRNL);"
214     ECHO(0x08) is a c_lflag bit, it means PARMRK(0x08) in c_iflag. (!?!)
216 src/
218   file.c:
220     'do_reget' can be extern if (USE_VFS && USE_NETCODE), not if (USE_VFS).
222   find.c:
224     search_content():
225     
226     variable 'i' "must be" 'int', not 'char'. ["i == -1": (buggy?) WCC 10.6
227     doesn't convert automatically (int)(-1) to (char)(-1) (GCC does), so
228     "comparison result always 0" warning produced. It is cleaner to define
229     'i' as 'int', than cast '-1' to 'char', because 'read()' returns 'int'.]
230     
231   key.c:
233     init_key():
235     Call load_xtra_key_defines() and clear 'use_8th_bit_as_meta' by default
236     under QNX, if a 'qnx*' terminal detected. (A saved config file (mc.ini)
237     can override it later...)
239   key.h:
241     Declare load_xtra_key_defines().
243   keyxdef.c:
245     Provides a method to define some platform-specific additional key
246     mappings. (e.g. QNX terminals can handle most of META-? combinations as
247     ALT-?...)
248     
249     (Currently not listed in doc/FILES...)
251   layout.c:
253     TIOCGWINSZ must be available (<sys/ioctl.h> included), because window-
254     resizing code doesn't work, if not defined.
256   main.c:
258     print_usage(): reserved name in the QNX run-time library!
259     print_usage() -> print_mc_usage()
261   mouse.c:
263     QNX: ncurses 1.9.8a ported to QNX doesn't provide the 'SP' pointer as a
264     global symbol in the library, so the keyok() emulation currently can not
265     be used under QNX (4.24 & Watcom C 10.6 release version).
267   slint.c:
269     QNX: 'qansi*' terminals added to the color_terminals[] list.
270     
271   subshell.c:
272   utilunix.c:
274     QNX: include <unix.h> to get prototype for exec*()!!!
275     [See README.QNX/Section 1.4!]
276     
277   Makefile.in:
279     'keyxdef' module added to SRCS and OBJS.
281 vfs/
283   Makefile.in:
285     'install' target: 'mcserv' not installed, if net-code not enabled
286     by 'configure'.
288 <mc-src-root>/
290   README.QNX:
292     QNX-specific notes...
293   
294   configure (line 3369):
295   configure.in (line 88):
297     (mc-4.1.34 only)
298     'test x$CCOPTS = x;' => 'test "x$CCOPTS" = x;'
300   Makefile.in:
302     README.QNX added to DISTMAIN.
303     
304 4. TODO
305 -------
307 Because of limited time and resources now I can define a 'wish list' only:
308 (maybe somebody in the QNX community can help...)
310 subshell support with panel switch on/off ?
311 mouse under Photon (with qnxm, qansi-m terminals) ?
314 5. Contact information
315 ----------------------
317 Please report QNX-specific bugs and comments via e-mail to: gt_cosy@usa.net
320 -------------
321 Tamasi Gyorgy
322 -------------