README.QNX 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. Midnight Commander for QNX
  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. can not 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 erranously 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 adviced 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 adviced 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 can not 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 can not 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>: }" contruct ("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. mc.menu.qnx.diff:
  102. QNX: modified 'mc.ext.in'. [tar -t: output to stderr,...]
  103. QNX: modified 'mc.menu'. [tar is not GNU tar: doesn't know '-z',...]
  104. Support for '*.tar.F': 'freeze'-compressed tar files...
  105. (No automatic install implemented: patches must be applied before
  106. running 'configure' [->mc.ext.in.qnx.diff!]; this patch can be not
  107. only QNX-specific...)
  108. Makefile.in:
  109. 'mc.ext.in.qnx.diff' and 'mc.menu.qnx.diff' added to DISTLIB.
  110. slang/
  111. sldisply.c:
  112. SLTT_TRANSP_ACS_PATCH dependant code:
  113. The problem: some terminals (e.g. QNX/qansi*) map the whole upper half of
  114. the ASCII table to the lower half, when alt-char-set is activated with
  115. the smacs/as string-sequence. This means, that if 0 <= ch < 128 written
  116. to the terminal, it will be translated to (ch+128) automatically by the
  117. terminal: so not only the line-drawing characters can be written, when
  118. the alt-char-set is activated. It implicitly means, that space, NL, CR,
  119. etc. characters (exactly: anything besides the "standard" line drawing
  120. characters) can not be written directly to the terminal, when the
  121. alt-char-set is activated, because writing these characters doesn't cause
  122. an implicit/temporary switching-back to the standard char-set!
  123. The original code in SLang assumes that space, NL, CR, etc. can be
  124. printed when alt-char-set is activated. If SLTT_TRANSP_ACS_PATCH is
  125. defined, the modified code will not use this assumption.
  126. [Remark: the patch-code is not the most exact solution, but works...]
  127. QNX_QANSI_SLANG_COMPAT_ACS_PATCH dependant code:
  128. A more OS/terminal-specific solution for the problem mentioned above
  129. (->SLTT_TRANSP_ACS_PATCH).
  130. If QNX_QANSI_SLANG_COMPAT_ACS is defined, the default smacs/sa, rmacs/ae,
  131. acsc/ac [and sgr/sa, if it would be used!] command sequences will be
  132. replaced internally with the "old style" (pre-QNX 4.23) sequences in case
  133. of QNX/qansi terminals. Using these optional command sequences the terminal
  134. remains compatible with the original SLang code (without using the
  135. workaround-code enabled by defining SLTT_TRANSP_ACS_PATCH).
  136. Remark:
  137. Currently SLTT_TRANSP_ACS_PATCH is not auto-configured by 'configure'.
  138. (Must be manually defined...)
  139. There is some (QNX-specific) auto-configuration hand-coded in the source:
  140. #ifdef SLTT_TRANSP_ACS_PATCH
  141. # if defined(__QNX__) && defined(QNX_QANSI_SLANG_COMPAT_ACS)
  142. # undef SLTT_TRANSP_ACS_PATCH
  143. # endif
  144. #else
  145. # if defined(__QNX__) && !defined(QNX_QANSI_SLANG_COMPAT_ACS)
  146. # define QNX_QANSI_SLANG_COMPAT_ACS 1
  147. # endif
  148. #endif
  149. slutty.c:
  150. "newtty.c_iflag &= ~(ECHO | INLCR | ICRNL);"
  151. ECHO(0x08) is a c_lflag bit, it means PARMRK(0x08) in c_iflag. (!?!)
  152. src/
  153. file.c:
  154. 'do_reget' can be extern if (USE_VFS && USE_NETCODE), not if (USE_VFS).
  155. find.c:
  156. search_content():
  157. variable 'i' "must be" 'int', not 'char'. ["i == -1": (buggy?) WCC 10.6
  158. doesn't convert automatically (int)(-1) to (char)(-1) (GCC does), so
  159. "comparison result always 0" warning produced. It is cleaner to define
  160. 'i' as 'int', than cast '-1' to 'char', because 'read()' returns 'int'.]
  161. key.c:
  162. init_key():
  163. Call load_xtra_key_defines() and clear 'use_8th_bit_as_meta' by default
  164. under QNX, if a 'qnx*' terminal detected. (A saved config file (mc.ini)
  165. can override it later...)
  166. key.h:
  167. Declare load_xtra_key_defines().
  168. keyxdef.c:
  169. Provides a method to define some platform-specific additional key
  170. mappings. (e.g. QNX terminals can handle most of META-? combinations as
  171. ALT-?...)
  172. (Currently not listed in doc/FILES...)
  173. layout.c:
  174. TIOCGWINSZ must be available (<sys/ioctl.h> included), because window-
  175. resizing code doesn't work, if not defined.
  176. main.c:
  177. print_usage(): reserved name in the QNX run-time library!
  178. print_usage() -> print_mc_usage()
  179. mouse.c:
  180. QNX: ncurses 1.9.8a ported to QNX doesn't provide the 'SP' pointer as a
  181. global symbol in the library, so the keyok() emulation currently can not
  182. be used under QNX (4.24 & Watcom C 10.6 release version).
  183. slint.c:
  184. QNX: 'qansi*' terminals added to the color_terminals[] list.
  185. subshell.c:
  186. utilunix.c:
  187. QNX: include <unix.h> to get prototype for exec*()!!!
  188. [See README.QNX/Section 1.4!]
  189. Makefile.in:
  190. 'keyxdef' module added to SRCS and OBJS.
  191. vfs/
  192. Makefile.in:
  193. 'install' target: 'mcserv' not installed, if net-code not enabled
  194. by 'configure'.
  195. <mc-src-root>/
  196. README.QNX:
  197. QNX-specific notes...
  198. configure (line 3369):
  199. configure.in (line 88):
  200. (mc-4.1.34 only)
  201. 'test x$CCOPTS = x;' => 'test "x$CCOPTS" = x;'
  202. Makefile.in:
  203. README.QNX added to DISTMAIN.
  204. 4. TODO
  205. -------
  206. Because of limited time and resources now I can define a 'wish list' only:
  207. (maybe somebody in the QNX community can help...)
  208. subshell support with panel switch on/off ?
  209. mouse under Photon (with qnxm, qansi-m terminals) ?
  210. ...
  211. 5. Contact information
  212. ----------------------
  213. Please report QNX-specific bugs and comments via e-mail to: gt_cosy@usa.net
  214. -------------
  215. Tamasi Gyorgy
  216. -------------