home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / trn_12.zip / patches.os2 next >
Text File  |  1993-03-01  |  18KB  |  366 lines

  1. *******************************************************001***
  2. The shell script "Configure" was run on
  3. a Sun Sparc under SunOS 4.0.
  4.   A lot of changed had to be made to the
  5.   script "config.sh". Mostly path-variables
  6.   for the location of specific programs,
  7.   library-files ... had to be changed.
  8.   "#define TERMIO" had to be used in config.sh
  9.   and config.h, to enable the correct
  10.   function calls.
  11. *******************************************************002***
  12. The function "getwd" is not included
  13. in emx 0.8d (but under SunOS).
  14.   So the variables for getwd and getcwd in
  15.   config.sh and config.h hat to be changed.
  16. *******************************************************003***
  17. strftime not yet implemented in emx 0.8d
  18.   use strftime in util.c by changing the
  19.   corresponding defines in config.sh and
  20.   config.h. But comment out strftime in
  21.   emx/include/time.h. Is is defined there,
  22.   although it is not in the library and
  23.   cannot be linked.
  24. *******************************************************004***
  25. strftime in util.c looks for conditional
  26. define "TM_ZONE". If TM_ZONE is not set,
  27. the function "timezone" will be called,
  28. which is not implemented in emx 0.8d.
  29.   set TM_ZONE in config.h
  30.  
  31.   sorry, but this will cause compiler
  32.   warnings if util.h is included without
  33.   including time.h before, because the
  34.   "struct tm" is now used in util.h.
  35.   But this doesn't matter, if strftime
  36.   is not used in the c-source, which
  37.   includes util.h.
  38.   perhaps time.h can be included to avoid
  39.   the compiler warnings, but that's not
  40.   really necessary.
  41. *******************************************************005***
  42. if TM_ZONE is set, the function strftime
  43. looks for the component tm_zone in the
  44. "struct tm" defined in emx/include/time.h.
  45. But this component does not exist, because
  46. timezones are not implemented in emx 0.8d
  47.   so we use a default "GMT" instead of the component
  48. *******************************************************006***
  49. Because util.h needs the "struct tm", which
  50. is defined in time.h, to make the function
  51. strftime in util.c available, we include
  52. time.h in util.h
  53. *******************************************************007***
  54. The function chown is not available in
  55. emx 0.8d. It can't have any function in
  56. the OS/2 filesystems.
  57.   commented out in rcstuff.c
  58. *******************************************************008***
  59. The OS/2 filesystems don't support file-links,
  60. so we try to replace them with a copy.
  61.   replaced link with DosCopy in rcstuff.c
  62. *******************************************************009***
  63. Sorry, but fork is not yet implemented
  64. in emx 0.8d. But we can try to avoid a
  65. combination of fork/exec with the spawn-
  66. function. spawn returns the pid like fork
  67. and you can use parameters like in the
  68. exec-call  (execl->spawnl).
  69. There are additional parameters in spawn
  70. to make the program running parallel to the
  71. current process. See Develop.Doc for
  72. further information. (patch in util.c)
  73. *******************************************************010***
  74. link is not supported in OS/2 filesystems.
  75.   let's hope that the DosCopy will work
  76.   in this context (in mt-misc.c).
  77. *******************************************************011***
  78. The fullname is not extracted out of the
  79. passwd-file. We use the .fullname-file
  80. in the users home directory. This was changed
  81. via the "PASSNAMES"-define in config.h
  82. *******************************************************012***
  83. We want to read a single character from
  84. the keyboard via the read_tty-function. But
  85. the function can also read continuous strings
  86. with a max. length.
  87.   in term.c _read_kbd is used in a while-loop
  88.   to do this.
  89. *******************************************************013***
  90. The "makedir"-function, declared in util.c
  91. did not work correctly. It used the "doshell"
  92. function to call a mkdir command with an
  93. appropriate directory string.
  94.   replaced doshell with DosCreateDir
  95.   in util.c
  96. *******************************************************014***
  97. In init.c and rn.c additional pairs of
  98. "un_standout()/clear()"   "termlib_reset()/clear()"
  99. were inserted, to initialize the screen
  100. on startup and when the programs is quit.
  101. *******************************************************015***
  102. The types BYTE and LONG are defined in OS2.H
  103. and in threads.h.
  104.   If threads.h BYTE and LONG are only defined,
  105.   if they are not already defined before.
  106. *******************************************************016***
  107. In getdate.y and getdate.c "NULL" is defined.
  108. This is a problem, if Null was already defined
  109. before. So we test this, and define NULL in
  110. getdate.c only, if it wasn't defined before.
  111. *******************************************************017***
  112. fork is net yet implemented in emx o.8d. So
  113. we avoid the fork/exec-combinations by
  114. using the spawn-function. This is done in
  115. mt-write.c similar like before in utils.c
  116. *******************************************************018***
  117. There are problems with the daemon-mode
  118. in mthreads.c. In daemon mode the following
  119. function calls are used:
  120.      fork, setpgrp, pause
  121. We don't need the daemon mode in a first try,
  122. so we disable this mode and patch out the
  123. functions which produce a problem.
  124. *******************************************************019***
  125. In mthreads, that builds up the thread-files and the
  126. active2-files, the active2-file is opened two times
  127. simultaneously. Two separate streams are created, one
  128. only for reading and one for reading and writing.
  129. So can not be done so simple under OS/2. The second
  130. fopen will fail. With native OS/2-calls it would be
  131. possible, but then we can't use the normal fprintf
  132. and fputs-functions, because the DosOpen does not
  133. return the appropriate FILE-handle. So we try to copy
  134. the active2-file, and use the copy (which is called
  135. active2.old) for the read-only accesses.
  136. *******************************************************020***
  137. In the original source of TRN, the information about
  138. directories, files and misc. settings are hardcoded
  139. into the header file config.h (and several shell-scripts).
  140. So we defined a routine, which extracts these settings
  141. out of the uupc-rc-files and out of an additional
  142. rc-file, which can be user-defined via the environment-
  143. variable UUPCTRNRC.
  144.    the code and the definitions to do this
  145.    are in os2patch.c and os2patch.h
  146.    a sample rc-file is trn.rc
  147. *******************************************************021***
  148. In intrp.c and mt-misc.c some global variables are
  149. set using coditional defines and the filexp (btw file_exp)
  150. function. Some of these variables are now taken out of
  151. the uupc-rc-files, so we don't need to expand them via
  152. the filexp (file_exp) -function.
  153. *******************************************************022***
  154. If there is no .newsrc-file to open, the shell-script
  155. newsetup was called. New a new written function will
  156. be used, which will create a .newsrc-file out of the
  157. active-file.
  158.   the code for this routine in in os2patch.c
  159. *******************************************************023***
  160. If we want to use the ACTIVE.TIMES-file, we need
  161. the program acttimes.exe, so we have to change a
  162. few settings in the source of acttimes.c (there
  163. is no header file). This settings are some definitions
  164. of our system (TERMIO...) and some previously hardcoded
  165. information about the file system, which are now
  166. taken out of the uupc-rc-files.
  167. *******************************************************024***
  168. If we use the daemon mode in acttimes.exe, we need
  169. forks, which we don't have. So we disable the daemon
  170. mode and patch out the forks and the pause-command.
  171. *******************************************************025***
  172. There are links used in acttimes. The first one is
  173. a bit difficult, but we use a DosCopy to avoid it.
  174. I think, if we avoid to start two acttimes-sessions
  175. simultaneously, this should do. The second and third
  176. are not much of a problem, they are save renames of
  177. files, so we can either use DosCopy or a rename-command,
  178. we used DosCopy for this first time.
  179. *******************************************************026***
  180. Because we define some variables via uupc-rc-files,
  181. we don't need to expand the corresponding filenames
  182. via filexp or file_exp-functions.
  183.   acttimes.c addng.c mthreads.c ngdata.c
  184. *******************************************************027***
  185. Problem in mthreads, updating of .thread file does not
  186. work correctly, the new file is called .new and not
  187. renamed to .thread. The file .new is renamed by the
  188. rename-systemcall. This systemcall seams to work like
  189. mv under unix, so if the destination already exists,
  190. it is simply overwritten. But our rename fails if the
  191. target already exists.
  192.    There are several possible solutions, but let's
  193.    try the following: we add the systemcall unlink
  194.    before every rename-command, wo we can be quite
  195.    sure that the destination does not exist.
  196. *******************************************************028***
  197. In intrp.c and mt-misc.c the homedirectory for the
  198. user is located. But they look only for the environment-
  199. variable HOME and then LOGDIR. Now we look for HOME,
  200. and if the env-variable is not set, we take the
  201. setting out of the uupc-rc-files, where it is must
  202. be set.
  203. *******************************************************029***
  204. In intrp.c the users login-name is searches. They look
  205. for an appropriate environmanevariable USER or LOGNAME.
  206. Now we look for USER and if this is not set, we take
  207. the uupc-variable Mailbox, which is located in the
  208. users personal.rc.
  209. *******************************************************030***
  210. The emx 0.8d chdir-call does not change the working
  211. drive when a drive is specified in the destinationstring.
  212. This is exact the behaviour of the unixcall, where
  213. no drives can be specified. but some of the chdir-calls
  214. need to change the drive, so we use the new emx-function
  215. _chdir2, which does what we need. This change is done
  216. via #define in extern.h, intern.h and acttimes.c.
  217. *******************************************************031***
  218. In common.h, there is a definition for the parameters
  219. which are needed to call a shell-script which will
  220. save an article. Unter OS/2 we will use a simple
  221. C-function to do this, so this definitions are not
  222. longer neede. We do some hardcoding and ask for the
  223. parameter one after another in the function.
  224. *******************************************************032***
  225. The test if the given file or directoryname is a bit
  226. more difficult under OS/2. First it can be a / or \,
  227. although emx will return a / in getcwd-commands. But
  228. to be sure, we test also for \. The next thing is,
  229. that our getcwd (we use _getcwd2) returns the drive-name
  230. in the string, so that we have to test the third and
  231. not the first character of the string.
  232. *******************************************************033***
  233. Undefine BACKTICK in common.h. This allows to execute
  234. programs and store the resulting string in a variable.
  235. But this can cause too big problems, for example if
  236. the program calls "date", which doesn't work like under
  237. UNIX.
  238. *******************************************************034***
  239. See also fix 013. The makedir routine creates a string
  240. like "mkdir c:\usr\user\comp c:\usr\user\comp\os c:\usr\user\comp\os\os2"
  241. or even longer if the directory c:\usr\user\comp\os\os2\misc
  242. is to be made, but c:\usr\user\comp does not exist.
  243. Then three directories must be created one after another.
  244. So we can't use a single API-call, we must create
  245. every single directory one after another.
  246. *******************************************************035***
  247. In the function doshell in util.c, they try to
  248. find out what shell is to be called. This seams
  249. to be a bit easier under OS/2, we take the setting
  250. uupc_rc_settings.prefshell, which is derived from
  251. the environment-variable COMSPEC.
  252. *******************************************************036***
  253. There's something really strange in the killfile
  254. handling. In the function setthru, they use the
  255. global defined file handle localkfp. Then (while
  256. the file is opened (localkfp)) they UNLINK the
  257. local killfile. Hmmm,... . Then they create a new
  258. one with the same name but use a new handle for
  259. this file (newkfp). If this does work, they copy
  260. localkfp to newkfp, although they unlinked localkfp.
  261. I cannot help, but this is very strange. What can
  262. we do? The best seams to be: we define a new glocal
  263. #define called KILLLOCALOLD, we first close localkfp
  264. then copy KILLLOCAL to KILLLOCALOLD open localkfp
  265. again but use the file KILLLOCALOLD. At the end of the
  266. routine we UNLINK(filexp(KILLLOCALOLD));
  267. *******************************************************037***
  268. We have to do some work because of the fseek/ftell
  269. problem. We normally open the articles in binary
  270. mode, except for the output routines, where we need
  271. to have textmode (the \n\r Problem on the output).
  272. So we define a new function in artio.c which is called
  273. artopentext(...).
  274. *******************************************************038***
  275. there is no longer an artopentext(). We open articles
  276. now only in binary-mode. We use "CTRL-M-killers" where
  277. we read article lines or display them on the screen
  278. or copy them to other files. sorry.
  279. *******************************************************039***
  280. reply by mail is no longer done with a shell-script,
  281. we wrote our own little function to do what we think
  282. is necessary. See os2trn.c  mail_reply
  283. *******************************************************040***
  284. the posting routine was done by a shell-script in
  285. the original program. This shell-script was also
  286. used to post new articles without using TRN. We
  287. now use our own function, so new articles have
  288. to be posted out of TRN by pressing f in the
  289. appropriate group. You will then be asked if you
  290. want to start an unrelated topic. The posting sequence
  291. is done like in SNEWS (thanks to John McCombs).
  292. He said in his SNEWS-distribution, that his posting
  293. stuff is a horrible kludge, and ,sorry, it is.
  294. *******************************************************041***
  295. The shell script newsgroups is called when the user
  296. wants to search for unsubscribed newsgroups (containing
  297. a specific pattern). We had to rewrite it in C. The
  298. shell script feeded the .newsrc twice into an sed, to
  299. prevent bogus newsgroups from showing up as unsubscribed.
  300. We will not do that, we simply look for a ! behind the
  301. newsgroup-name in the .newsrc and say that this group
  302. is unsubscribed. sorry.
  303. *******************************************************042***
  304. In the original software they sometimes tested, of a
  305. given filename is fully qualified. This was done by
  306. testing the first character for '/'. This is a bit more
  307. difficult under OS/2 or other operating systems, where
  308. there are perhaps drivenames in the filename. So we have
  309. to test 4 different situations: the first or third chacter
  310. a '/' btw '\\'. (artio.c intrp.c mt-misc.c respond.c util.c ...)
  311. *******************************************************043***
  312. We had a problem with ^M in the uudecoder (uudecode.c).
  313. We assume that a \r\n is at the end of the line and
  314. if we find it, we shorten it to only \n. This problems
  315. also occurs in unship.c and in respond.c.
  316. *******************************************************044***
  317. Disabled the a-command in the newsgroup-selection
  318. level, because it core-dumpled. Please implement later.
  319.   (in module rn.c)
  320. *******************************************************045***
  321. When editing the kill-file, the editor was unable to
  322. write back the new contents, because the file was opened
  323. by TRN. Now we close the kill-file in kfile.c
  324. before we call the editor. When the editor returns,
  325. the open_kfile procedure is called the open the file.
  326. (The opening was also done in the original Unix-version)
  327. *******************************************************046***
  328. Added functions (change_bsl2sl(...), change_sl2bsl(...))
  329. that change all '\' characters to '/' characters (btw. the
  330. other way round) in the specified string. This is used to
  331. fix the problems with missing directory separators many
  332. people reported when configuring TRN first.
  333. *******************************************************047***
  334. Added the change-slash-functions after each extraction
  335. command, that will get a setting out of the uupc-rc-files.
  336. Additionally functions calls are inserted in several
  337. places in the source, where filenames are prepared.
  338. So internally all filenames will only contain '/'
  339. characters. Only when calling an external function
  340. (via doshell() mostly) the directory separators are
  341. changed again to '\', so that non-Unix compatible
  342. programs can also handle the filenames.
  343. *******************************************************048***
  344. changed the terminal capabilities so that one column
  345. less than possible is used for screen output. This is
  346. done, so that no automatic word wrap takes place when
  347. the string that is written to the screen is exact as long 
  348. the possible screen witdh. So word wrap can now be
  349. turned on in the termcap file. The string "ti" in
  350. termcap.dat must than contain "\E[=7h" instead of
  351. "\E[=7l".
  352. *******************************************************049***
  353. 01/03/93 :  changed command detection in ngstuff.c line 489.
  354.  
  355.    It is now no longer possible to enter the following
  356.    type of commands when extracting or saving an article:
  357.  
  358.       range{,range}:command{:command}
  359.  
  360.    Under OS/2 it is not possible to determine correctly, if
  361.    a ':' is part of a filename that was entered for the 
  362.    previous command, or if the ':' is signalling the next
  363.    command.
  364. *******************************************************050***
  365. *******************************************************051***
  366.