say "'Sit-O-CHIRARI' has been installed successfully."
say
say "Would you like to view User's Guide now?"
say " (required Netscape Navigator/Communicator)"
say "{ press Y key to view, N key to exit }"
if WaitKeyPress("YN") = "Y" then call SysOpenObject "<CHIRARI_README>", 0, 0
GlobalExit:
exit
WaitKeyPress: procedure
parse arg v; do forever; k = translate(SysGetKey("noecho")); if pos(k, v) <> 0 then return k; end
QueryWorkPath: procedure
ev.0 = 3; ev.1 = "TEMP"; ev.2 = "TMP"; ev.3 = "ETC"; do i = 1 to ev.0; p = value(ev.i, , "OS2ENVIRONMENT"); if p <> "" then do; if right(p, 1) = "\" then return p || "."; return p; end; end; m = SysDriveMap("A:", "LOCAL"); do forever; parse var m d m; if d = "" then leave; parse value SysDriveInfo(d) with . f .; if f = "" | f < 3145728 then iterate; t = SysTempFileName(d || "\??JJINST.???"); if stream(t, "c", "open write") = "READY:" then do; call stream t, "c", "close"; call SysFileDelete t; return d || "\."; end; end; return ""
parse arg d; r = SysMkDir(d); if r = 3 then do; r = MakePath(d || "\.."); if r = 0 then return SysMkDir(d); end; return r
ExtractAttachedFile: procedure
parse arg a; parse source . . s; do while lines(s); l = linein(s); if left(l, 21) = "Content-Disposition: " then do; call linein s; call SysFileDelete a; f = xrange("A", "Z") || xrange("a", "z") || "0123456789+/"; t = xrange("00"x, "3f"x); do while lines(s); l = linein(s); if left(l, 2) = "*/" then leave; v = translate(l, t, f); r = ""; c = length(v); do i = 1 to c; r = r || substr(x2b(c2x(substr(v, i, 1))), 3); end; call charout a, x2c(b2x(left(r, length(r) % 8 * 8))); end; call stream a, "c", "close"; call stream s, "c", "close"; return 1; end; end; call stream s, "c", "close"; return 0
ParseCatalogList: procedure
parse arg c, s, d; do while lines(c); parse value linein(c) with v t; if v = "COPY" then '@copy "' || s || '\' || t || '" "' || d || '\' || t || '" >nul 2>nul'; else if v = "UNLOCK" then '@"' || s || '\unlock" "' || d || '\' || t || '"'; else if v = "MKDIR" then call SysMkDir d || "\" || t; else if v = "DEL" then call SysFileDelete s || "\" || t; end; call stream c, "c", "close"; return