DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦b986e53b5⟧ TextFile

    Length: 9090 (0x2382)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦bb25a46d4⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦bb25a46d4⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦bb25a46d4⟧ 
            └─⟦this⟧ 

TextFile

with PARAMETER_PARSER;
with STRING_UTILITIES;
with SWITCH_IMPLEMENTATION;
separate (ASA_DEFINITIONS)
package body SWITCHES is

   package SI renames SWITCH_IMPLEMENTATION;

   type OPTION_ID is range 0 .. 1;


   --                    ---------------------------
   --                    ( ) Action when out-of-date
   --                    ---------------------------


   package ACTION_WHEN_OUT_OF_DATE_FORMALS is
      new SI.DISCRETE_SWITCH_FORMALS (ACTION);

   function ACTION_WHEN_OUT_OF_DATE_IMAGE
               (VALUE : in ACTION) return SI.SWITCH_VALUE_IMAGE is
   begin
      return STRING_UTILITIES.CAPITALIZE (ACTION'IMAGE (VALUE));
   end ACTION_WHEN_OUT_OF_DATE_IMAGE;

   function ACTION_WHEN_OUT_OF_DATE return ACTION is
      THE_HANDLE : SI.HANDLE;
   begin
      SI.SWITCH_FILE.OPEN_SESSION_SWITCHES (THE_HANDLE);

      declare  
         VALUE : constant ACTION :=
            ACTION'VALUE
               (SI.IMAGE (THE_HANDLE,
                          NAME => ASA & '.' & ACTION_WHEN_OUT_OF_DATE_N));
      begin
         SI.SWITCH_FILE.CLOSE (THE_HANDLE);
         return VALUE;
      end;

   end ACTION_WHEN_OUT_OF_DATE;


   --                    -------------------
   --                    ( ) Bin directories
   --                    -------------------


   package PP is new PARAMETER_PARSER (OPTION_ID => OPTION_ID);

   function BIN_DIRECTORY (HOST : in STRING) return STRING is
      ITER : PP.ITERATOR;
      S : BOOLEAN;
      THE_HANDLE : SI.HANDLE;
   begin
      SI.SWITCH_FILE.OPEN_SESSION_SWITCHES (THE_HANDLE);
      PP.DEFINE (OPTION => OPTION_ID'LAST,
                 NAME => HOST,
                 KIND => PP.UNSPECIFIED,
                 DEFAULT_VALUE => "",
                 ALLOW_NAME_PREFIX => FALSE);
      PP.PARSE (PARAMETER =>
                   SI.VALUE (THE_HANDLE, NAME => ASA & '.' & BIN_DIRECTORIES_N),
                OPTIONS => ITER,
                SUCCESS => S);
      SI.SWITCH_FILE.CLOSE (THE_HANDLE);
      return PP.GET_IMAGE (ITER, NAME => OPTION_ID'LAST);
   end BIN_DIRECTORY;


   --                    -----------------
   --                    ( ) Control level
   --                    -----------------


   package CMVC_CONTROL_LEVEL_FORMALS is
      new SI.DISCRETE_SWITCH_FORMALS (CONTROL_LEVEL);

   function CMVC_CONTROL_LEVEL_IMAGE
               (VALUE : in CONTROL_LEVEL) return SI.SWITCH_VALUE_IMAGE is
   begin
      return STRING_UTILITIES.CAPITALIZE (CONTROL_LEVEL'IMAGE (VALUE));
   end CMVC_CONTROL_LEVEL_IMAGE;

   function CMVC_CONTROL_LEVEL return CONTROL_LEVEL is
      THE_HANDLE : SI.HANDLE;
   begin
      SI.SWITCH_FILE.OPEN_SESSION_SWITCHES (THE_HANDLE);

      declare  
         VALUE : constant CONTROL_LEVEL :=
            CONTROL_LEVEL'VALUE
               (SI.IMAGE (THE_HANDLE,
                          NAME => ASA & '.' & CMVC_CONTROL_LEVEL_N));
      begin
         SI.SWITCH_FILE.CLOSE (THE_HANDLE);
         return VALUE;
      end;

   end CMVC_CONTROL_LEVEL;


   --                    ------------------
   --                    ( ) Remote display
   --                    ------------------


   function REMOTE_DISPLAY return STRING is  
      THE_HANDLE : SI.HANDLE;
   begin
      SI.SWITCH_FILE.OPEN_SESSION_SWITCHES (THE_HANDLE);

      declare
         VALUE : constant STRING :=
            SI.VALUE (THE_HANDLE, NAME => ASA & '.' & REMOTE_DISPLAY_N);
      begin
         SI.SWITCH_FILE.CLOSE (THE_HANDLE);
         return VALUE;
      end;

   end REMOTE_DISPLAY;


   --                    -----------------------
   --                    ( ) Switch registration
   --                    -----------------------


   task body REGISTER is

      package ASA_SWITCHES is
         new SI.REGISTERED_CLASS (CLASS_NAME => ASA,  
                                  ALLOW_REDEFINITION => TRUE);


      --                 -----------------------------
      --                 ( . ) Action when out-of-date
      --                 -----------------------------


      function ACTION_WHEN_OUT_OF_DATE_HELP
                  (NAME : SI.SWITCH_VALUE_NAME;  
                   IMAGE : SI.SWITCH_VALUE_IMAGE) return STRING is
      begin
         return "One of the literals " & ACTION'IMAGE (ABANDON) &
                   ", " & ACTION'IMAGE (ACCEPT_CHANGES) & " or " &
                   ACTION'IMAGE (CONTINUE) & ".  Specifies what " &
                   "must be the bevahiour of gateway operations when " &
                   "the information contained in a gateway is " &
                   "suspected to be obsolete";
      end ACTION_WHEN_OUT_OF_DATE_HELP;

      package ASA_GENERIC_ACTION_WHEN_OUT_OF_DATE is
         new ASA_SWITCHES.GENERIC_SWITCH
                (SWITCH_TYPE => ACTION,
                 SWITCH_TYPE_ACCESS =>
                    ACTION_WHEN_OUT_OF_DATE_FORMALS.ACCESS_TYPE,
                 IMAGE => ACTION_WHEN_OUT_OF_DATE_IMAGE,
                 VALUE => ACTION_WHEN_OUT_OF_DATE_FORMALS.VALUE,
                 DIAGNOSIS => ACTION_WHEN_OUT_OF_DATE_FORMALS.DIAGNOSIS,
                 TYPE_NAME => "Asa_Action",
                 KIND => SI.GENERIC_VALUE);

      package ASA_ACTION_WHEN_OUT_OF_DATE is
         new ASA_GENERIC_ACTION_WHEN_OUT_OF_DATE.SWITCH
                (CATEGORY => 'S',
                 SWITCH_NAME => ACTION_WHEN_OUT_OF_DATE_N,
                 DEFAULT_VALUE => ABANDON,
                 HELP => ACTION_WHEN_OUT_OF_DATE_HELP,
                 ASSIGNED => SI.NOT_INTERESTING);


      --                 ---------------------
      --                 ( . ) Bin directories
      --                 ---------------------


      function BIN_DIRECTORIES_HELP
                  (NAME : SI.SWITCH_VALUE_NAME;  
                   IMAGE : SI.SWITCH_VALUE_IMAGE) return STRING is
      begin
         return "A comma separated list of pairs HOST => PATHNAME " &
                   "specifying, for each remote host, the directory " &
                   "holding the ASA executables";
      end BIN_DIRECTORIES_HELP;

      procedure BIN_DIRECTORIES_ASSIGNED
                   (FILE : STRING; IMAGE : SI.SWITCH_VALUE_IMAGE) is
      begin
         null;
         --[improve]
         -- Should be improved some day to check and normalize the
         -- switch value.
         --
      end BIN_DIRECTORIES_ASSIGNED;

      package ASA_BIN_DIRECTORIES is
         new ASA_SWITCHES.TEXT_SWITCH (CATEGORY => 'S',
                                       SWITCH_NAME => BIN_DIRECTORIES_N,
                                       DEFAULT_VALUE => "",
                                       HELP => BIN_DIRECTORIES_HELP,
                                       ASSIGNED => BIN_DIRECTORIES_ASSIGNED);


      --                    ----------------------
      --                    ( ) CMVC control level
      --                    ----------------------


      function CMVC_CONTROL_LEVEL_HELP
                  (NAME : SI.SWITCH_VALUE_NAME;  
                   IMAGE : SI.SWITCH_VALUE_IMAGE) return STRING is
      begin
         return "One of the literals " & CONTROL_LEVEL'IMAGE (CONTROL_NONE) &
                   ", " & CONTROL_LEVEL'IMAGE (CONTROL_MODEL) & ", " &
                   CONTROL_LEVEL'IMAGE (CONTROL_MODULES) & " or " &
                   CONTROL_LEVEL'IMAGE (CONTROL_ALL) & ".  Specifies what " &
                   "gateway objects are to be made controlled at creation";
      end CMVC_CONTROL_LEVEL_HELP;

      package ASA_GENERIC_CMVC_CONTROL_LEVEL is
         new ASA_SWITCHES.GENERIC_SWITCH
                (SWITCH_TYPE => CONTROL_LEVEL,
                 SWITCH_TYPE_ACCESS => CMVC_CONTROL_LEVEL_FORMALS.ACCESS_TYPE,
                 IMAGE => CMVC_CONTROL_LEVEL_IMAGE,
                 VALUE => CMVC_CONTROL_LEVEL_FORMALS.VALUE,
                 DIAGNOSIS => CMVC_CONTROL_LEVEL_FORMALS.DIAGNOSIS,
                 TYPE_NAME => "Asa_Control_Level",
                 KIND => SI.GENERIC_VALUE);

      package ASA_CMVC_CONTROL_LEVEL is
         new ASA_GENERIC_CMVC_CONTROL_LEVEL.SWITCH
                (CATEGORY => 'S',
                 SWITCH_NAME => CMVC_CONTROL_LEVEL_N,
                 DEFAULT_VALUE => CONTROL_NONE,
                 HELP => CMVC_CONTROL_LEVEL_HELP,
                 ASSIGNED => SI.NOT_INTERESTING);


      --                 --------------------
      --                 ( . ) Remote display
      --                 --------------------


      function REMOTE_DISPLAY_HELP
                  (NAME : SI.SWITCH_VALUE_NAME;  
                   IMAGE : SI.SWITCH_VALUE_IMAGE) return STRING is
      begin
         return "Indicate on what X Window display the ASAEDIT editor is " &
                   "to show its images.";
      end REMOTE_DISPLAY_HELP;

      package ASA_REMOTE_DISPLAY is
         new ASA_SWITCHES.TEXT_SWITCH (CATEGORY => 'S',
                                       SWITCH_NAME => REMOTE_DISPLAY_N,
                                       DEFAULT_VALUE => "",
                                       HELP => REMOTE_DISPLAY_HELP,
                                       ASSIGNED => SI.NOT_INTERESTING);

   begin
      accept STOP;
   end REGISTER;

end SWITCHES;