1 /* ***********************************************************
 2    *                                                         *
 3    * Copyright, (C) Honeywell Information Systems Inc., 1984 *
 4    *                                                         *
 5    *********************************************************** */
 6 /* add_fnp.pl1 command interface (perhaps interim) to FNP reconfiguration */
 7 /* format: style2 */
 8 
 9 add_fnp:
10      procedure options (variable);
11 
12           declare cu_$arg_count          entry (fixed bin, fixed bin (35));
13           declare cu_$arg_ptr            entry (fixed bin, ptr, fixed bin (21), fixed bin (35));
14           declare com_err_               entry () options (variable);
15           declare parse_fnp_name_        entry (character (*), fixed binary);
16           declare hphcs_$configure_fnp   entry (fixed bin, fixed bin (35));
17           declare ioa_                   entry () options (variable);
18 
19           declare ap                     ptr;
20           declare al                     fixed bin (21);
21           declare argument               char (al) based (ap);
22           declare code                   fixed bin (35);
23           declare fnp_no                 fixed bin;
24           declare n_args                 fixed bin;
25           declare error_table_$bad_channel
26                                          fixed bin (35) ext static;
27           declare ME                     char (32) init ("add_fnp") int static options (constant);
28 ^L
29 
30           call cu_$arg_count (n_args, code);
31           if code ^= 0
32           then do;
33                     call com_err_ (code, ME);
34                     return;
35                end;
36 
37           if n_args ^= 1
38           then do;
39                     call com_err_ (0, ME, "Usage: add_fnp FNP_TAG");
40                     return;
41                end;
42 
43           call cu_$arg_ptr (1, ap, al, (0));
44           call parse_fnp_name_ (argument, fnp_no);
45           if fnp_no ^> 0
46           then do;
47                     call com_err_ (error_table_$bad_channel, ME, "Invalid FNP name ^a.", argument);
48                     return;
49                end;
50           call hphcs_$configure_fnp (fnp_no, code);
51           if code = 0
52           then call ioa_ ("FNP ^a added to configuration.", argument);
53           else call com_err_ (code, ME, "Could not add FNP ^a to configuration");
54           return;
55      end add_fnp;
56 
57