home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
com
/
utils
/
trn
/
patches.os2
next >
Wrap
Text File
|
1993-03-01
|
18KB
|
366 lines
*******************************************************001***
The shell script "Configure" was run on
a Sun Sparc under SunOS 4.0.
A lot of changed had to be made to the
script "config.sh". Mostly path-variables
for the location of specific programs,
library-files ... had to be changed.
"#define TERMIO" had to be used in config.sh
and config.h, to enable the correct
function calls.
*******************************************************002***
The function "getwd" is not included
in emx 0.8d (but under SunOS).
So the variables for getwd and getcwd in
config.sh and config.h hat to be changed.
*******************************************************003***
strftime not yet implemented in emx 0.8d
use strftime in util.c by changing the
corresponding defines in config.sh and
config.h. But comment out strftime in
emx/include/time.h. Is is defined there,
although it is not in the library and
cannot be linked.
*******************************************************004***
strftime in util.c looks for conditional
define "TM_ZONE". If TM_ZONE is not set,
the function "timezone" will be called,
which is not implemented in emx 0.8d.
set TM_ZONE in config.h
sorry, but this will cause compiler
warnings if util.h is included without
including time.h before, because the
"struct tm" is now used in util.h.
But this doesn't matter, if strftime
is not used in the c-source, which
includes util.h.
perhaps time.h can be included to avoid
the compiler warnings, but that's not
really necessary.
*******************************************************005***
if TM_ZONE is set, the function strftime
looks for the component tm_zone in the
"struct tm" defined in emx/include/time.h.
But this component does not exist, because
timezones are not implemented in emx 0.8d
so we use a default "GMT" instead of the component
*******************************************************006***
Because util.h needs the "struct tm", which
is defined in time.h, to make the function
strftime in util.c available, we include
time.h in util.h
*******************************************************007***
The function chown is not available in
emx 0.8d. It can't have any function in
the OS/2 filesystems.
commented out in rcstuff.c
*******************************************************008***
The OS/2 filesystems don't support file-links,
so we try to replace them with a copy.
replaced link with DosCopy in rcstuff.c
*******************************************************009***
Sorry, but fork is not yet implemented
in emx 0.8d. But we can try to avoid a
combination of fork/exec with the spawn-
function. spawn returns the pid like fork
and you can use parameters like in the
exec-call (execl->spawnl).
There are additional parameters in spawn
to make the program running parallel to the
current process. See Develop.Doc for
further information. (patch in util.c)
*******************************************************010***
link is not supported in OS/2 filesystems.
let's hope that the DosCopy will work
in this context (in mt-misc.c).
*******************************************************011***
The fullname is not extracted out of the
passwd-file. We use the .fullname-file
in the users home directory. This was changed
via the "PASSNAMES"-define in config.h
*******************************************************012***
We want to read a single character from
the keyboard via the read_tty-function. But
the function can also read continuous strings
with a max. length.
in term.c _read_kbd is used in a while-loop
to do this.
*******************************************************013***
The "makedir"-function, declared in util.c
did not work correctly. It used the "doshell"
function to call a mkdir command with an
appropriate directory string.
replaced doshell with DosCreateDir
in util.c
*******************************************************014***
In init.c and rn.c additional pairs of
"un_standout()/clear()" "termlib_reset()/clear()"
were inserted, to initialize the screen
on startup and when the programs is quit.
*******************************************************015***
The types BYTE and LONG are defined in OS2.H
and in threads.h.
If threads.h BYTE and LONG are only defined,
if they are not already defined before.
*******************************************************016***
In getdate.y and getdate.c "NULL" is defined.
This is a problem, if Null was already defined
before. So we test this, and define NULL in
getdate.c only, if it wasn't defined before.
*******************************************************017***
fork is net yet implemented in emx o.8d. So
we avoid the fork/exec-combinations by
using the spawn-function. This is done in
mt-write.c similar like before in utils.c
*******************************************************018***
There are problems with the daemon-mode
in mthreads.c. In daemon mode the following
function calls are used:
fork, setpgrp, pause
We don't need the daemon mode in a first try,
so we disable this mode and patch out the
functions which produce a problem.
*******************************************************019***
In mthreads, that builds up the thread-files and the
active2-files, the active2-file is opened two times
simultaneously. Two separate streams are created, one
only for reading and one for reading and writing.
So can not be done so simple under OS/2. The second
fopen will fail. With native OS/2-calls it would be
possible, but then we can't use the normal fprintf
and fputs-functions, because the DosOpen does not
return the appropriate FILE-handle. So we try to copy
the active2-file, and use the copy (which is called
active2.old) for the read-only accesses.
*******************************************************020***
In the original source of TRN, the information about
directories, files and misc. settings are hardcoded
into the header file config.h (and several shell-scripts).
So we defined a routine, which extracts these settings
out of the uupc-rc-files and out of an additional
rc-file, which can be user-defined via the environment-
variable UUPCTRNRC.
the code and the definitions to do this
are in os2patch.c and os2patch.h
a sample rc-file is trn.rc
*******************************************************021***
In intrp.c and mt-misc.c some global variables are
set using coditional defines and the filexp (btw file_exp)
function. Some of these variables are now taken out of
the uupc-rc-files, so we don't need to expand them via
the filexp (file_exp) -function.
*******************************************************022***
If there is no .newsrc-file to open, the shell-script
newsetup was called. New a new written function will
be used, which will create a .newsrc-file out of the
active-file.
the code for this routine in in os2patch.c
*******************************************************023***
If we want to use the ACTIVE.TIMES-file, we need
the program acttimes.exe, so we have to change a
few settings in the source of acttimes.c (there
is no header file). This settings are some definitions
of our system (TERMIO...) and some previously hardcoded
information about the file system, which are now
taken out of the uupc-rc-files.
*******************************************************024***
If we use the daemon mode in acttimes.exe, we need
forks, which we don't have. So we disable the daemon
mode and patch out the forks and the pause-command.
*******************************************************025***
There are links used in acttimes. The first one is
a bit difficult, but we use a DosCopy to avoid it.
I think, if we avoid to start two acttimes-sessions
simultaneously, this should do. The second and third
are not much of a problem, they are save renames of
files, so we can either use DosCopy or a rename-command,
we used DosCopy for this first time.
*******************************************************026***
Because we define some variables via uupc-rc-files,
we don't need to expand the corresponding filenames
via filexp or file_exp-functions.
acttimes.c addng.c mthreads.c ngdata.c
*******************************************************027***
Problem in mthreads, updating of .thread file does not
work correctly, the new file is called .new and not
renamed to .thread. The file .new is renamed by the
rename-systemcall. This systemcall seams to work like
mv under unix, so if the destination already exists,
it is simply overwritten. But our rename fails if the
target already exists.
There are several possible solutions, but let's
try the following: we add the systemcall unlink
before every rename-command, wo we can be quite
sure that the destination does not exist.
*******************************************************028***
In intrp.c and mt-misc.c the homedirectory for the
user is located. But they look only for the environment-
variable HOME and then LOGDIR. Now we look for HOME,
and if the env-variable is not set, we take the
setting out of the uupc-rc-files, where it is must
be set.
*******************************************************029***
In intrp.c the users login-name is searches. They look
for an appropriate environmanevariable USER or LOGNAME.
Now we look for USER and if this is not set, we take
the uupc-variable Mailbox, which is located in the
users personal.rc.
*******************************************************030***
The emx 0.8d chdir-call does not change the working
drive when a drive is specified in the destinationstring.
This is exact the behaviour of the unixcall, where
no drives can be specified. but some of the chdir-calls
need to change the drive, so we use the new emx-function
_chdir2, which does what we need. This change is done
via #define in extern.h, intern.h and acttimes.c.
*******************************************************031***
In common.h, there is a definition for the parameters
which are needed to call a shell-script which will
save an article. Unter OS/2 we will use a simple
C-function to do this, so this definitions are not
longer neede. We do some hardcoding and ask for the
parameter one after another in the function.
*******************************************************032***
The test if the given file or directoryname is a bit
more difficult under OS/2. First it can be a / or \,
although emx will return a / in getcwd-commands. But
to be sure, we test also for \. The next thing is,
that our getcwd (we use _getcwd2) returns the drive-name
in the string, so that we have to test the third and
not the first character of the string.
*******************************************************033***
Undefine BACKTICK in common.h. This allows to execute
programs and store the resulting string in a variable.
But this can cause too big problems, for example if
the program calls "date", which doesn't work like under
UNIX.
*******************************************************034***
See also fix 013. The makedir routine creates a string
like "mkdir c:\usr\user\comp c:\usr\user\comp\os c:\usr\user\comp\os\os2"
or even longer if the directory c:\usr\user\comp\os\os2\misc
is to be made, but c:\usr\user\comp does not exist.
Then three directories must be created one after another.
So we can't use a single API-call, we must create
every single directory one after another.
*******************************************************035***
In the function doshell in util.c, they try to
find out what shell is to be called. This seams
to be a bit easier under OS/2, we take the setting
uupc_rc_settings.prefshell, which is derived from
the environment-variable COMSPEC.
*******************************************************036***
There's something really strange in the killfile
handling. In the function setthru, they use the
global defined file handle localkfp. Then (while
the file is opened (localkfp)) they UNLINK the
local killfile. Hmmm,... . Then they create a new
one with the same name but use a new handle for
this file (newkfp). If this does work, they copy
localkfp to newkfp, although they unlinked localkfp.
I cannot help, but this is very strange. What can
we do? The best seams to be: we define a new glocal
#define called KILLLOCALOLD, we first close localkfp
then copy KILLLOCAL to KILLLOCALOLD open localkfp
again but use the file KILLLOCALOLD. At the end of the
routine we UNLINK(filexp(KILLLOCALOLD));
*******************************************************037***
We have to do some work because of the fseek/ftell
problem. We normally open the articles in binary
mode, except for the output routines, where we need
to have textmode (the \n\r Problem on the output).
So we define a new function in artio.c which is called
artopentext(...).
*******************************************************038***
there is no longer an artopentext(). We open articles
now only in binary-mode. We use "CTRL-M-killers" where
we read article lines or display them on the screen
or copy them to other files. sorry.
*******************************************************039***
reply by mail is no longer done with a shell-script,
we wrote our own little function to do what we think
is necessary. See os2trn.c mail_reply
*******************************************************040***
the posting routine was done by a shell-script in
the original program. This shell-script was also
used to post new articles without using TRN. We
now use our own function, so new articles have
to be posted out of TRN by pressing f in the
appropriate group. You will then be asked if you
want to start an unrelated topic. The posting sequence
is done like in SNEWS (thanks to John McCombs).
He said in his SNEWS-distribution, that his posting
stuff is a horrible kludge, and ,sorry, it is.
*******************************************************041***
The shell script newsgroups is called when the user
wants to search for unsubscribed newsgroups (containing
a specific pattern). We had to rewrite it in C. The
shell script feeded the .newsrc twice into an sed, to
prevent bogus newsgroups from showing up as unsubscribed.
We will not do that, we simply look for a ! behind the
newsgroup-name in the .newsrc and say that this group
is unsubscribed. sorry.
*******************************************************042***
In the original software they sometimes tested, of a
given filename is fully qualified. This was done by
testing the first character for '/'. This is a bit more
difficult under OS/2 or other operating systems, where
there are perhaps drivenames in the filename. So we have
to test 4 different situations: the first or third chacter
a '/' btw '\\'. (artio.c intrp.c mt-misc.c respond.c util.c ...)
*******************************************************043***
We had a problem with ^M in the uudecoder (uudecode.c).
We assume that a \r\n is at the end of the line and
if we find it, we shorten it to only \n. This problems
also occurs in unship.c and in respond.c.
*******************************************************044***
Disabled the a-command in the newsgroup-selection
level, because it core-dumpled. Please implement later.
(in module rn.c)
*******************************************************045***
When editing the kill-file, the editor was unable to
write back the new contents, because the file was opened
by TRN. Now we close the kill-file in kfile.c
before we call the editor. When the editor returns,
the open_kfile procedure is called the open the file.
(The opening was also done in the original Unix-version)
*******************************************************046***
Added functions (change_bsl2sl(...), change_sl2bsl(...))
that change all '\' characters to '/' characters (btw. the
other way round) in the specified string. This is used to
fix the problems with missing directory separators many
people reported when configuring TRN first.
*******************************************************047***
Added the change-slash-functions after each extraction
command, that will get a setting out of the uupc-rc-files.
Additionally functions calls are inserted in several
places in the source, where filenames are prepared.
So internally all filenames will only contain '/'
characters. Only when calling an external function
(via doshell() mostly) the directory separators are
changed again to '\', so that non-Unix compatible
programs can also handle the filenames.
*******************************************************048***
changed the terminal capabilities so that one column
less than possible is used for screen output. This is
done, so that no automatic word wrap takes place when
the string that is written to the screen is exact as long
the possible screen witdh. So word wrap can now be
turned on in the termcap file. The string "ti" in
termcap.dat must than contain "\E[=7h" instead of
"\E[=7l".
*******************************************************049***
01/03/93 : changed command detection in ngstuff.c line 489.
It is now no longer possible to enter the following
type of commands when extracting or saving an article:
range{,range}:command{:command}
Under OS/2 it is not possible to determine correctly, if
a ':' is part of a filename that was entered for the
previous command, or if the ':' is signalling the next
command.
*******************************************************050***
*******************************************************051***