1 10/16/87  abbrev_
  2 
  3 The abbrev_ subroutine provides a means of expanding abbreviations in
  4 command lines and changing data in and extracting data from the profile
  5 segments used by the abbrev command.  All of the features of the
  6 command itself are available and a simple expand entry point is
  7 provided for returning expanded command lines.
  8 
  9 
 10 Entry points in abbrev_:
 11    (List is generated by the help command)
 12 
 13 
 14 :Entry: abbrev_: 02/07/84 abbrev_
 15 
 16 Function: The main entry point is used to expand and execute a command
 17 line.  The command line can be an abbrev request line, as recognized
 18 by the abbrev command.  An abbrev request line can be used to add and
 19 delete abbreviations and change the modes of operation of abbrev.  The
 20 abbrev command need not be invoked in the process before the abbrev_
 21 subroutine can be called.
 22 
 23 
 24 Syntax:
 25 declare abbrev_ entry (ptr, fixed bin(21), fixed bin(35));
 26 call abbrev_ (line_ptr, line_len, code);
 27 
 28 
 29 Arguments:
 30 line_ptr
 31    is a pointer to a character string to be interpreted as a command
 32    line or an abbrev request line.  (Input)
 33 line_len
 34    is the number of characters in the input line.  (Input)
 35 code
 36    is a standard status code returned by the command processor.
 37    (Output)
 38 
 39 
 40 :Entry:  expand_line:  10/16/87 abbrev_$expand_line
 41 
 42 Function:  This entry point returns an expanded abbreviation of an
 43 input string that is of the type specified by the input parameter
 44 "abbrev_type".  See the description of the abbrev command for a
 45 discussion of abbrev expansion.
 46 
 47 
 48 Syntax:
 49 declare abbrev_$expand_line entry (fixed bin, ptr, fixed bin(21), ptr,
 50      fixed bin(21), ptr, fixed bin(35));
 51 call abbrev_$expand_line (abbrev_type, in_ptr, in_len, space_ptr,
 52      space_len, out_ptr, out_len);
 53 
 54 
 55 Arguments:
 56 abbrev_type
 57    defines the types of abbreviations to expand.  Defined values are:
 58    EXPAND_BOL_ONLY (1), or EXPAND_INTERNAL_ONLY (2), or
 59    EXPAND_BOTH (3).  (Input)
 60 
 61 
 62 in_ptr
 63    is a pointer to a character string to be expanded.  (Input)
 64 in_len
 65    is the number of characters in the input string.  (Input)
 66 space_ptr
 67    is a pointer to a work space where the expanded character string can
 68    be placed.  (Input)
 69 space_len
 70    is the number of characters available in the work space.  (Input)
 71 out_ptr
 72    points to the expanded string.  (Output)
 73 out_len
 74    is the number of characters in the expanded string.  (Output)
 75 
 76 
 77 Notes:  If the length of the expanded string exceeds the length of the
 78 work space provided, the expanded line is allocated in the system free
 79 area (see the get_system_free_area_ subroutine), It is the user's
 80 responsibility to free this storage when it is no longer needed.
 81 
 82 The space_ptr pointer should not point to the same string as in_ptr
 83 since expansion is done directly into the work space.
 84 
 85 
 86 :Entry:  expanded_line:  02/07/84 abbrev_$expanded_line
 87 
 88 
 89 Function:  This entry point returns an expanded version of an input
 90 string.  See the description of the abbrev command for a discussion of
 91 abbrev expansion.
 92 
 93 
 94 Syntax:
 95 declare abbrev_$expanded_line entry (ptr, fixed bin(21), ptr,
 96      fixed bin(21), ptr, fixed bin(35));
 97 call abbrev_$expanded_line (in_ptr, in_len, space_ptr, space_len,
 98      out_ptr, out_len);
 99 
100 
101 Arguments:
102 in_ptr
103    is a pointer to a character string to be expanded.  (Input)
104 in_len
105    is the number of characters in the input string.  (Input)
106 space_ptr
107    is a pointer to a work space where the expanded character string can
108    be placed.  (Input)
109 space_len
110    is the number of characters available in the work space.  (Input)
111 out_ptr
112    points to the expanded string.  (Output)
113 out_len
114    is the number of characters in the expanded string.  (Output)
115 
116 
117 Notes:  If the length of the expanded string exceeds the length of the
118 work space provided, the expanded line is allocated in the system free
119 area (see the get_system_free_area_ subroutine), It is the user's
120 responsibility to free this storage when it is no longer needed.
121 
122 The space_ptr pointer should not point to the same string as in_ptr
123 since expansion is done directly into the work space.
124 
125 
126 :Entry:  set_cp:  02/07/84 abbrev_$set_cp
127 
128 
129 Function:  This entry point sets up a different command processor to be
130 called by the abbrev_ subroutine after a command line is expanded.  Its
131 argument is an entry.  If the first pointer in the entry is null, the
132 command processor to be called is command_processor_.
133 
134 
135 Syntax:
136 declare abbrev_$set_cp entry (entry);
137 call abbrev_$set_cp (cp_entry);
138 
139 
140 Arguments:
141 cp_entry
142    is a command processor entry point.