README.QNX 9.6 KB

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