|
|
1.1 root 1: L Compiler and list interface (arg>1 file list), (arg<1 manual pages)
2:
3: C. Douglas Blewett (MH3-C-319) Version 4
4:
5: Interface routines
6:
7: ^XL - the main mono-lith - controls editing
8: lists of files
9: ^X^@ - Creates a stored "default" command
10: - like make or cc -o ...
11: ^X^_ - "default" command - returns the command
12: on the kill stack
13:
14: Compiler and list interface routine. This routine, ^XL,
15: prompts for a compiler command (i.e. cc or make), runs it,
16: and catches the output. If line numbers are present in
17: the output, the routine will position to the correct line.
18: Three formats can be handled by this routine.
19:
20: "filename.c", line 23: etc.
21: or
22: filename.c: 23: etc.
23: or
24: filename.c
25:
26: The last format is typical ls stuff.
27:
28: ^XL with an argument < 1 the routine prompts for a manual
29: page specification and searches the known directories for
30: manual pages.
31:
32: ^XL with an argument > 1 the routine prompts for a file
33: specification and searches using an "ls -d file_spec"
34:
35: SPECIAL STUFF FOR DEFAULT COMMANDS: WARNING creates a
36: new routine.
37:
38: This routine, ^XL, when used as a compiler interface
39: calls ^X^_ to detemine what command to issue. ^X^_
40: can be setup to return a default command (rather than
41: prompting the user) by running the ^X^@ command. ^X^@
42: actually creates a new macro for ^X^_. It isn't LISP,
43: but it works.
44:
45: The compiler interface (arg == 1) reads files in using
46: ^X^F. No attempt is made to garbage collect buffers.
47: This does not pose a real problem, because emacs places
48: the user in the buffer .list when this happens. At that
49: point the user can use ^X^K to remove un-needed buffers.
50: ^X^F is used instead of ^X^R because it is very likely
51: with compiles that the user already has the file in a
52: buffer and may want to keep it there (and current).
53:
54: The list (arg > 1) and manual page (arg < 1) facility
55: use the buffer .list to read files using ^X^R. These
56: routines more or less automatically garbage collect
57: buffer space.
58:
59: 1
60: 2�1 TRUE = 1
61: ^�4~20 Loop forever through execute requests
62: 2�0
63: B Get the stored or interactive string
64: |� Check for man
65: �2~1 Arg < 1 manual pages list
66: <List of manual pages ?
67: �
68: �3~1 Arg > 1 ls -d of files list
69: <List of files ?
70: �
71: � Arg == 1 compiler list
72:
73: �
74: �
75: 0><
76: |� Input Conditional
77: �& Check for Null string
78: -<
79: �0 Zero == FALSE
80: � Null Check End
81: � Default
82: <.exec
83: Move to .exec
84: 6�0=7�1= Current pos.
85: 8�0=9�1= Save the mark
86: � Meta Moon
87: 5�0= Save the eoB
88: |� Check for man
89: �3~1 Arg > 1 ls list
90: exec /bin/ls -d
91: <usilent
92: �
93: �
94: �2~1 Arg < 1 manual list
95: exec ls -d /usr/man/man?/.* /usr/man/local/man?/.*
96: <usilent
97: �
98: �
99: �
100:
101: �
102: �
103: -&� Execute the command
104: |�
105: �4~1 Arg != 1 ls list
106: <usilent
107:
108: �1 TRUE = 1
109: �
110: �
111: !�-<List: Enter "e" to edit the list, "x" to re-eXecute, or Press Return to Quit
112: �s Shell escape
113: s
114: 2�0
115: �0 Zero == FALSE
116: �
117: �x Execute
118: 2�1
119: �0 Zero == FALSE
120: �
121: �e Edit
122: �1 TRUE = 1
123: �
124: �� Quit
125: �0 Zero == FALSE
126: 2�0
127: �
128: � Edit End
129: �
130: �
131: |� Check for Edit
132: �4~1
133: 5�-��-6�7�
134: 8�9 Reset point
135:
136: �
137: �
138: 5�&
139: <:
140: |� Fix up plain lists
141: ��
142: �
143: �
144: �
145: 3�11~53
146: ^�5~0=3
147: : 1:
148:
149: �
150: �
151: �
152: <.list
153: 2 Begin processing
154: 5�&
155: �_LIST_EDIT
156: ^�4~0
157: &<:
158: ^�� Loop through filenames
159: &
160: 0<Wait
161: 0
162: & Type of error message
163: <"
164: |�
165: �& Standard
166: �<"
167: �
168: �
169: � Pre-processor?
170: �<:
171: �
172: �
173: �
174:
175: <:
176: ��� Get the Number
177: - 3�0
178: ^� Warren's TO_DECIMAL
179: 3�11~13~10312~�0 Next digit
180: -
181: �
182: -
183: &
184: 1
185: <.exec
186:
187: <.list
188: 2
189: |�
190: �3~33600
191: 3�0
192: �
193: �
194: |�
195: �5~31
196: |�
197: �4~1
198: Lists
199: �
200: �
201: Compiles
202: �
203: �
204: �3� Go to the line
205: 0<Editing a List: Enter ^Z to move to the next entry
206: 0 Print "List"
207: Edit the file
208: �
209: �
210: -
211: 0<Line number less than 1 or greater than 3600
212: 2
213: <.exec
214:
215:
216: �
217: �
218: 1
219: <.exec
220:
221: <.list
222: 2
223: Move back
224: &
225: �_LIST_EDIT
226: &<:
227: �
228: 5�&�0
229: !�-<End of List: Enter "r" to Rewind, "x" to re-eXecute, or Press Return to Quit
230: �r Rewind
231: 0<Rewinding
232: 0
233: �_LIST_EDIT
234: �
235: �s Shell escape
236: s
237: �_LIST_EDIT
238: �
239: �x Execute
240: 2�1
241: �0 Zero == FALSE
242: �
243: �� Quit
244: �0 Zero == FALSE
245: �
246: � Rewind End
247: � Forever End
248: 5�-��-6�7�
249: 8�9 Reset point and mark
250: Cleanup and Move back
251: <.list
252:
253: �
254: �
255: � Default End
256: � Input Conditional End
257: �
258: 0<
259: 0 Cleanup of messages
260:
261: _LIST_EDIT
262: �
263: 0
264: 0<Move the cursor to the line of interest and enter ^Z
265:
266:
267: Setup a stored command for the ^XL command
268:
269: This routine contructs a new ^X^_ routine. This allows the ^XL routine
270: to use a standard default - this is very helpful for repeated compiles.
271: If this routine, ^X^@, is given a null line no string is stored. Instead
272: the new routine will prompt for the input string.
273:
274: B<Command to be Stored (e.g. cc file.c, make, or ls) ?
275: 0>
276: <
277: |�
278: �&
279: -
280: <...
281: Insert the program ^X^_
282: 034�Compile_command_string012�
283: <Command (e.g. cc file.c, make, or ls) ?012�
284: 032�
285: 012�
286: �
287: �
288: <...
289: Insert the program ^X^_
290: 034�Compile_command_string012�
291: B<.exec012�012�
292: &--%032�
293: 012�
294: -�
295: <[ ]
296: ^��
297: 021�
298: <[ ]
299: �
300: �
301: � Null Check End
302: dB%
303:
304: Default string routine for ^XC
305:
306: This routine is re-constructed when ^X^@ is run
307:
308: <Command (e.g. cc file.c, make, or ls) ?
309:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.