!----------------------------+------------------------------------------+ ! Kurt Andersen | Jet Propulsion Laboratory | ! MIPL Applications | Mail Stop 168-427 | ! Software Engineer | 4800 Oak Grove Drive | ! Office: 169-425 | Pasadena, Calif. 91109 | !----------------------------+-------------------------+----------------+ ! NETWORKS: | | ! SPAN: Mipl3::KKA059 (5.153) | Does the verb | ! ARPA Internet: KKA059@Mipl3.Jpl.Nasa.Gov | `to flame' | ! Internet Address: [128.149.1.28] | come from the | ! ARPAnet->SPAN: KKA059%Mipl3@Star.Stanford.Edu | days of the | ! or: KKA059%Mipl3.Span@Jpl-Vlsi.Arpa | Inquisition? | ! Ma Bell (R.I.P.): (818) 354-1672 | | !------------------------------------------------------+----------------+ ! The following TPU procedures may be freely used and distributed. ! If any improvements are made, please communicate them back to me! ! Global argument declaration for eve$parse ! ! Add the following line to your personal ! tpu$local_init procedure if you have ! made one. ! procedure tpu$local_init ! To initialize my procedures eve$arg1_fix_line_no := "int"; endprocedure; ! Fix Line No ! This procedure change all remaining line numbers in a compiler ! error listing to accommadate changes in the source code and ! still reflect the correct relative location. ! ! Known Bugs: ! Negative line number changes cannot be entered on the command ! line. ! Work around: ! Enter negative line number changes at the prompt. ! ! Parameters: ! increment -- the amount to change the remaining line numbers procedure eve_fix_line_no (increment) local this_buffer, this_position, increment_value, line_number, count, found_range, old_mode, pat ; if not (eve$prompt_number (increment, increment_value, "Delta for line numbers: ", "No delta value given")) then return; endif; if increment_value = 0 then message ("Zero delta value -- no changes"); return; endif; this_buffer := current_buffer; this_position := mark (none); count := 0; old_mode := get_info(current_buffer, eve$kt_mode); set (INSERT, current_buffer); pat := 'At line number ' & span('01213456789'); loop found_range := search (pat, FORWARD, NO_EXACT); if found_range = 0 then if count = 0 then message ("No more errors found") ; else message (fao ("!UL line number!%S incremented", count)); endif; position (this_position); set(old_mode, current_buffer); return; else position (found_range); count := count + 1; found_range := search (span('0123456789'), FORWARD, NO_EXACT); position (found_range); line_number := int (substr (found_range, 1, length(found_range))); erase (found_range); copy_text (str (line_number + increment_value)); endif; endloop; endprocedure;