[comp.sys.apollo] Kermit & sr10

dbfunk@ICAEN.UIOWA.EDU (David B. Funk) (04/07/89)

In posting <8903202127.AA00223@icaen.uiowa.edu>, I anounced
a new version of Pascal Kermit for Aegis. It was developed under
sr9.6 & 9.7 and in that environment works just fine. I was
adapting it to also work under sr10 & thought I was almost done.
That was before I found out about the sr10.1 vt100 emulator
and the spmio manager. The code that does the neat things in
a sr9.7 crp or vt100 window, for connect mode, makes a real
mess in sr10 versions. So I have 2 alternatives: make up seperate
versions for each OS rev, or make one program that is capable
of detecting which OS its being run in and take appropriate
action. I would like to do the latter but that leads me to
a problem; how to detect which OS rev the program is running
in, with out resorting to unreleased system calls.
    I can think of a couple of ways to do this but they are
either unreliable or messy. I could read the "SYSTYPE" environment
variable ("bsd4.2" vs "bsd4.3") but that's unreliable (the user
could have messed it up). I could look for file name case sensitivity
(IE does "/SYS" work) but due to the "DOWNCASE" tool, that's
unreliable. There are other things, like testing to see if
"init" or "dm" are PID #1 but that gets messy.

So, does anybody know a neat way a program can determine if it is
in a pre vs post sr10 environment?

Thanks,
Dave Funk