home *** CD-ROM | disk | FTP | other *** search
- /* this macro will make *sure* HT has been started in resident mode. */
- /* it is basically a support routine for other higher level routines */
- /* to call on to make sure that they can send messages to HT */
-
- if ~show('L',"rexxsupport.library") then
- call addlib("rexxsupport.library", 10, -30, 0)
-
-
- /* You may want to change this stem variable to reflect where you have put
- * HT in your system. Basically what happens is that we check each of
- * these locations, and if HT exists, and it is not a directory, we try
- * to run. I'm sure this isn't 100% foolproof, but then you aren't a
- * fool, right ? :)
- */
- ht_name.1 = "df0:ht"
- ht_name.2 = "df0:c/ht"
- ht_name.3 = "df1:ht"
-
- if ~show(P, HT) then do
- select
- when Exists(ht_name.1) & Word(StateF(ht_name.1), 1) == FILE then id = 1
- when Exists(ht_name.2) & Word(StateF(ht_name.2), 1) == FILE then id = 2
- when Exists(ht_name.3) & Word(StateF(ht_name.3), 1) == FILE then id = 3
- otherwise id = 1
- end
- address command "run "ht_name.id "-r"
- end
- else do
- address HT RESIDENT
- exit 0
- end
-
-
- /* here we just loop waiting for HT to start. We bail out if it takes HT
- * too long to have started. This is basically just sanity checking, in
- * case something is acting weird
- */
- count = 0
- do until show(P, "HT")
- call Delay(10)
- count = count + 1
- if count > 70 then do
- say "Timed out waiting for HT to start up."
- exit 5
- end
- end
-
-