home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / obero / oberon-a / source / misc / nothere.mod < prev    next >
Encoding:
Text File  |  1995-07-02  |  1.8 KB  |  66 lines

  1. (*************************************************************************
  2.  
  3.      $RCSfile: NotHere.mod $
  4.   Description: Program to take the place of a program that has moved
  5.                elsewhere.
  6.  
  7.    Created by: fjc (Frank Copeland)
  8.     $Revision: 1.1 $
  9.       $Author: fjc $
  10.         $Date: 1995/01/26 01:05:15 $
  11.  
  12.   Copyright © 1995, Frank Copeland.
  13.   This file is part of Oberon-A.
  14.   See Oberon-A.doc for conditions of use and distribution.
  15.  
  16.   Log entries are at the end of the file.
  17.  
  18. *************************************************************************)
  19.  
  20. <* STANDARD- *>
  21.  
  22. MODULE NotHere;
  23.  
  24. IMPORT SYS := SYSTEM, Kernel, wb := Workbench, i := Intuition, d := Dos;
  25.  
  26. CONST
  27.   VersionTag = "$VER: NotHere 1.1 (10.1.95)";
  28.  
  29. VAR
  30.   progName : ARRAY 32 OF CHAR;
  31.   dirName : ARRAY 256 OF CHAR;
  32.   wbStartup : wb.WBStartupPtr;
  33.   es : i.EasyStruct;
  34.   lock : d.FileLockPtr;
  35.   a1, a2 : SYS.ADDRESS;
  36.  
  37. BEGIN
  38.   IF Kernel.fromWorkbench THEN
  39.     wbStartup := SYS.VAL (wb.WBStartupPtr, Kernel.WBenchMsg);
  40.     ASSERT
  41.       (d.NameFromLock (wbStartup.argList[0].lock, dirName, LEN (dirName)));
  42.     COPY (wbStartup.argList [0].name^, progName);
  43.   ELSE
  44.     lock := d.GetProgramDir ();
  45.     ASSERT (d.NameFromLock (lock, dirName, LEN (dirName)));
  46.     ASSERT (d.GetProgramName (progName, LEN (progName)));
  47.   END;
  48.  
  49.   es.structSize := SIZE (i.EasyStruct);
  50.   es.flags := {};
  51.   es.title := SYS.ADR ("Not Here :-(");
  52.   es.gadgetFormat := SYS.ADR ("Oh well...");
  53.   es.textFormat :=
  54.     SYS.ADR ("'%s' doesn't live in directory\n'%s' any more");
  55.   a1 := SYS.ADR (progName); a2 := SYS.ADR (dirName);
  56.   ASSERT (i.EasyRequest ( NIL, SYS.ADR (es), NIL, a1, a2, NIL ) # 0)
  57. END NotHere.
  58.  
  59. (*************************************************************************
  60.  
  61.   $Log: NotHere.mod $
  62. # Revision 1.1  1995/01/26  01:05:15  fjc
  63. # - Release 1.5
  64. #
  65. *************************************************************************)
  66.