1 /****^  ***********************************************************
  2         *                                                         *
  3         * Copyright, (C) Honeywell Bull Inc., 1987                *
  4         *                                                         *
  5         * Copyright, (C) Honeywell Information Systems Inc., 1982 *
  6         *                                                         *
  7         * Copyright (c) 1972 by Massachusetts Institute of        *
  8         * Technology and Honeywell Information Systems, Inc.      *
  9         *                                                         *
 10         *********************************************************** */
 11 
 12 
 13 debug_check: proc (a_name, a_sw);
 14 
 15 /*        Last Modified and Reason
 16 
 17    2/14/76 by S. Webber to convert to using PARM cards
 18    01/22/76 by TVV for NSS
 19    10/08/74 by Bernard Greenberg for AST name table
 20    3/15/74 by A. Kobziar to remove references to tty_buf$ in salvager case
 21    10/01/73 by RE Mullen to convert to v2pl1
 22    12/27/73 by R.B.Snyder to make copy_card entry set values in sst etc. from debg card
 23    84-01-08 BIM to use sst and tc_data definitions, and to handle multiple
 24                 cards, and not to store numerics in whd.
 25    10/19/84 by Keith Loepere so that dirw works (one more time). */
 26 
 27 dcl  a_name char (4) aligned;
 28 dcl  a_sw bit (1);
 29 
 30 declare sst$ast_track bit (1) aligned external static;
 31 declare sst$double_write fixed bin (35) external static;
 32 declare sst$dirlock_writebehind fixed bin (35) external static;
 33 
 34 declare tc_data$time_out_severity fixed bin (35) external static;
 35 declare tc_data$notify_check fixed bin (35) external static;
 36 
 37 dcl  addwordno builtin;
 38 dcl  bin builtin;
 39 dcl  null builtin;
 40 
 41 dcl  i fixed bin;
 42 dcl  searching bit (1) aligned;
 43 dcl  next_opt fixed bin;
 44 
 45 dcl  config_$find entry (character (4) aligned, pointer);
 46 dcl  config_$find_parm entry (character (4) aligned, pointer);
 47 dcl  syserr entry options (variable);
 48 
 49 dcl 1 wired_hardcore_data$debug_check_options external,
 50     2 count fixed bin,
 51     2 opt (14) char (4) aligned;
 52 
 53 %include config_parm_card;
 54 
 55 ^L
 56 
 57           a_sw = "0"b;
 58           do i = 1 to wired_hardcore_data$debug_check_options.count;
 59                if wired_hardcore_data$debug_check_options.opt (i) = a_name then do;
 60                     a_sw = "1"b;
 61                     return;
 62                end;
 63           end;
 64           return;
 65 
 66 copy_card: entry;
 67 
 68           tc_data$time_out_severity = 3;                              /* default timeout severity is 3 */
 69           tc_data$notify_check = 0;                         /* don't perform notify checking as default */
 70 
 71           next_opt = 0;
 72           searching = "1"b;
 73           parm_cardp = null ();
 74           do while (searching);                             /* search until no more parm cards */
 75                call config_$find (PARM_CARD_WORD, parm_cardp);
 76                if parm_cardp = null then searching = "0"b;  /* no more */
 77                else do;
 78                     do i = 1 to parm_card.n_fields;
 79                          if parm_card.type_word.field_type (i)
 80                               = CONFIG_STRING_TYPE
 81                               & (i = parm_card.n_fields | (i < parm_card.n_fields & parm_card.field_type (i + 1) = CONFIG_STRING_TYPE))
 82                               then do; /* no value following */
 83                               next_opt = next_opt + 1;
 84                               if next_opt > 14 then call syserr (ANNOUNCE, "debug_check: too many parameters on parm cards");
 85                               wired_hardcore_data$debug_check_options.opt (next_opt) = parm_card.options (i);
 86                          end;
 87                     end;
 88                end;
 89           end;
 90 
 91           wired_hardcore_data$debug_check_options.count = next_opt;
 92 
 93           parm_ptr = null ();
 94           call config_$find_parm ("dblw", parm_ptr);
 95           if parm_ptr ^= null ()
 96           then sst$double_write = numeric_parm.value;
 97 
 98           parm_ptr = null ();
 99           call config_$find_parm ("ntfy", parm_ptr);
100           if parm_ptr ^= null ()
101           then do;
102                tc_data$time_out_severity = numeric_parm.value;
103                parm_ptr = addwordno (parm_ptr, 1);
104                tc_data$notify_check = numeric_parm.value;
105           end;
106 
107           parm_ptr = null ();
108           call config_$find_parm ("astk", parm_ptr);
109           sst$ast_track = (parm_ptr ^= null ());
110 
111           parm_ptr = null ();
112           call config_$find_parm ("dirw", parm_ptr);
113           sst$dirlock_writebehind = bin ((parm_ptr ^= null ()), 1);
114 
115           return;
116 
117 ^L
118 
119 /* BEGIN MESSAGE DOCUMENTATION
120 
121    Message:
122    debug_check: too many parameters on parm cards
123 
124    S:     $info
125 
126    T:     $init
127 
128    M:     A total of 14 options may be specified on PARM cards.
129    This limit has been exceeded.
130    Options after the 14th will be ignored.
131 
132    A:     Correct the configuration deck
133    before the next bootload.
134 
135 
136    END MESSAGE DOCUMENTATION */
137 
138 %include config_deck;
139 %include syserr_constants;
140 
141      end debug_check;