gregg@a.cs.okstate.edu (Gregg Wonderly) (11/06/88)
Below are diffs to help convert the TPUVI for V5.0 of VMS (that I posted) to work under TPU with V4.x. These diffs should help you to fix the problems related to incompatabilities between versions of TPU. You will need to apply these by hand, and the line numbers for the VI_V4.TPU file will NOT BE correct when the diffs are applied. Good luck Gregg Wonderly ************ ************ File VI_V4.TPU;1 111 vi$next_blank := "" & LINE_BEGIN & LINE_END; 112 vi$para_str := "P "; 113 vi$para_pat := "" & LINE_BEGIN & (".P"); 114 vi$sect_str := "CHHLPG+c"; 115 vi$sect_pat := "" & LINE_BEGIN & (".CH"| ".HL"| ".PG"| "{"); 116 vi$last_cmd := 0; ****** File VI.TPU;631 112 vi$para_str := "P "; 113 vi$para_pat := LINE_BEGIN & ((".P")|LINE_END); 114 vi$sect_str := "CHHLPG+c"; 115 vi$sect_pat := LINE_BEGIN & ((".CH"| ".HL"| ".PG"| "{")|LINE_END); 116 vi$last_cmd := 0; ************ ************ File VI_V4.TPU;1 683 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 683 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 688 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 688 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 813 prog := LOOKUP_KEY (KEY_NAME (key), PROGRAM, vi$cmd_keys); ****** File VI.TPU;631 813 prog := LOOKUP_KEY (key, PROGRAM, vi$cmd_keys); ************ ************ File VI_V4.TPU;1 941 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 941 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 946 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 946 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 1203 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 1203 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 1666 MOVE_HORIZONTAL (LENGTH (CURRENT_LINE) - CURRENT_OFFSET); ****** File VI.TPU;631 1666 POSITION (LINE_END); ************ ************ File VI_V4.TPU;1 1820 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 1820 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 1826 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 1826 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 1997 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 1998 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 2014 MOVE_HORIZONTAL (LENGTH (vi$current_line) - 1); ****** File VI.TPU;631 2015 POSITION (LINE_END); 2016 MOVE_HORIZONTAL (-1); ************ ************ File VI_V4.TPU;1 2615 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 2617 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 2626 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 2628 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 2753 MOVE_HORIZONTAL (-CURRENT_OFFSET); 2754 MOVE_HORIZONTAL (LENGTH(vi$current_line) + 1); ****** File VI.TPU;631 2755 POSITION (LINE_END); ************ ************ File VI_V4.TPU;1 2767 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 2768 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 3376 cur_pat := "''&(span(vi$pch)|'')"; 3377 ELSE 3378 cur_pat := "(span('"+cur_char+"')|"""")"; 3379 ENDIF; 3380 tstr := tstr+'"'+"&"+cur_pat+"&"+'"'; ****** File VI.TPU;631 3386 cur_pat := "span(vi$pch)"; 3387 ELSE 3388 cur_pat := "span('"+cur_char+"')"; 3389 ENDIF; 3390 tstr := tstr+'"&'+cur_pat+'&"'; ************ ************ File VI_V4.TPU;1 3699 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 3709 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 3709 MOVE_HORIZONTAL (LENGTH (vi$current_line)); ****** File VI.TPU;631 3719 POSITION (LINE_END); ************ ************ File VI_V4.TPU;1 3736 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 3746 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 3960 IF (ch <= KEY_NAME (ASCII (31))) AND (ch >= CTRL_A_KEY) THEN ****** File VI.TPU;631 3970 IF (INT(ch) <= INT(KEY_NAME (ASCII (31)))) AND 3971 (INT (ch) >= INT(CTRL_A_KEY)) THEN ************ ************ File VI_V4.TPU;1 3965 addch := ((ch - CTRL_A_KEY) / 256) + 1; ****** File VI.TPU;631 3976 addch := ((INT(ch) - INT(CTRL_A_KEY)) / 256) + 1; ************ ************ File VI_V4.TPU;1 4036 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 4047 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 4045 MOVE_HORIZONTAL (LENGTH (CURRENT_LINE)); ****** File VI.TPU;631 4056 POSITION (LINE_END); ************ ************ File VI_V4.TPU;1 4782 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 4792 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 4802 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 4812 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 4813 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 4823 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 4886 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 4896 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 5338 vi$check_length (olen); ****** File VI.TPU;631 5349 vi$info ("Fill complete!"); 5350 sleep (1); 5351 vi$check_length (olen); ************ ************ File VI_V4.TPU;1 5576 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 5589 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 5605 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 5618 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 6299 IF (key < 32) THEN 6300 key := ((CTRL_B_KEY - CTRL_A_KEY) * (key - 1)) + CTRL_A_KEY; ****** File VI.TPU;631 6313 key := INT (key); 6314 IF (key < 32) THEN 6315 key := ((INT(CTRL_B_KEY) - INT(CTRL_A_KEY)) * 6316 (key - 1)) + INT(CTRL_A_KEY); ************ ************ File VI_V4.TPU;1 6393 COPY_TEXT (STR (KEY_NAME (SUBSTR (cmd, i, 1)))); ****** File VI.TPU;631 6409 COPY_TEXT (STR (INT (KEY_NAME (SUBSTR (cmd, i, 1))))); ************ ************ File VI_V4.TPU;1 6406 map_type + ")', " + STR(key) + ", 'active_macro', vi$edit_keys);")); 6407 ELSE 6408 EXECUTE (COMPILE ("DEFINE_KEY ('vi$do_macro (vi$$key_map_buf_" + keyn + 6409 map_type + ", 1)', " + STR(key) + 6410 ", 'active_macro', vi$cmd_keys);")); ****** File VI.TPU;631 6422 map_type + ")', KEY_NAME(" + STR(key) + "), 'active_macro', vi$edit_keys);")); 6423 ELSE 6424 EXECUTE (COMPILE ("DEFINE_KEY ('vi$do_macro (vi$$key_map_buf_" + keyn + 6425 map_type + ", 1)', KEY_NAME(" + STR(key) + 6426 "), 'active_macro', vi$cmd_keys);")); ************ ************ File VI_V4.TPU;1 6452 keyn := vi$key_map_name (key); ****** File VI.TPU;631 6468 key := INT (key); 6469 IF (key < 32) THEN 6470 key := ((INT(CTRL_B_KEY) - INT(CTRL_A_KEY)) * 6471 (key - 1)) + INT(CTRL_A_KEY); 6472 ENDIF; 6473 6474 keyn := vi$key_map_name (key); ************ ************ File VI_V4.TPU;1 6559 RETURN (SUBSTR(FAO("!XL", key),1,6)); ****** File VI.TPU;631 6581 LOCAL 6582 k; 6583 6584 k := key; 6585 IF (GET_INFO (key, "TYPE") = KEYWORD) THEN 6586 k := INT (key); 6587 ENDIF; ! BUG.... 'key' on the next line should be 'k'. 6588 RETURN (SUBSTR(FAO("!XL", key),1,6)); ************ ************ File VI_V4.TPU;1 6981 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 7011 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 6985 MOVE_HORIZONTAL (LENGTH (CURRENT_LINE)); ****** File VI.TPU;631 7015 POSITION (LINE_END); ************ ************ File VI_V4.TPU;1 7096 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 7126 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 7483 vi$para_str := "P p "; 7484 vi$para_pat := line_begin & ( 7485 (".P" | ".p") | 7486 (LINE_END)); 7487 IF (token_1 = "sections") OR (token_1 = "sect") THEN 7488 pstr := "LINE_BEGIN&("; ****** File VI.TPU;631 7513 IF (token_1 = "sections") OR (token_1 = "sect") THEN 7514 pstr := "LINE_BEGIN&(("; ************ ************ File VI_V4.TPU;1 7518 pstr := '""&(("FUNCTION"|"SUBROUTINE")|('+ pstr + "))"; 7519 ELSE 7520 pstr := '""&'+pstr; ****** File VI.TPU;631 7544 pstr := '("FUNCTION"|"SUBROUTINE")|('+ pstr + "))|LINE_END)"; ************ ************ File VI_V4.TPU;1 7527 pstr := '""&LINE_BEGIN&('; ****** File VI.TPU;631 7551 pstr := 'LINE_BEGIN&(('; ************ ************ File VI_V4.TPU;1 7541 pstr := pstr + ")"; ****** File VI.TPU;631 7565 pstr := pstr + ")|LINE_END)"; ************ ************ File VI_V4.TPU;1 8125 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 8157 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 8253 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 8285 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 8308 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 8340 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 8338 MOVE_HORIZONTAL (- CURRENT_OFFSET); ****** File VI.TPU;631 8370 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 8667 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 8690 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 8681 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 8704 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 8735 MOVE_HORIZONTAL (- CURRENT_OFFSET); ****** File VI.TPU;631 8758 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 8922 MOVE_HORIZONTAL (- CURRENT_OFFSET); ****** File VI.TPU;631 8945 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 9228 IF (in_char <= CTRL_Z_KEY) AND (in_char >= CTRL_A_KEY) THEN 9229 in_char := (in_char - CTRL_A_KEY) / 9230 (CTRL_B_KEY - CTRL_A_KEY) + 1; ****** File VI.TPU;631 9251 in_char := INT (in_char); 9252 IF (in_char <= INT(CTRL_Z_KEY)) AND 9253 (in_char >= INT(CTRL_A_KEY)) THEN 9254 in_char := (in_char - INT(CTRL_A_KEY)) / 9255 (INT(CTRL_B_KEY) - INT(CTRL_A_KEY)) + 1; ************ ************ File VI_V4.TPU;1 9510 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 9535 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 9688 key := (key_n - CTRL_A_KEY) / (CTRL_B_KEY - CTRL_A_KEY); ****** File VI.TPU;631 9713 key := key_n; 9714 IF (GET_INFO (key, "TYPE") = KEYWORD) THEN 9715 key := INT (key); 9716 ENDIF; 9717 key := (key - INT(CTRL_A_KEY)) / (INT(CTRL_B_KEY) - INT(CTRL_A_KEY)); ************ ************ File VI_V4.TPU;1 9801 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 9830 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10259 MOVE_HORIZONTAL (- CURRENT_OFFSET); ****** File VI.TPU;631 10288 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10359 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 10389 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10378 MOVE_HORIZONTAL (LENGTH (vi$current_line)); ****** File VI.TPU;631 10408 POSITION (LINE_END); ************ ************ File VI_V4.TPU;1 10406 MOVE_HORIZONTAL (-CURRENT_OFFSET); 10407 vi$undo_start := MARK (NONE); 10408 MOVE_HORIZONTAL (LENGTH (vi$current_line)); ****** File VI.TPU;631 10436 POSITION (LINE_BEGIN); 10437 vi$undo_start := MARK (NONE); 10438 POSITION (LINE_END); ************ ************ File VI_V4.TPU;1 10443 MOVE_HORIZONTAL (-CURRENT_OFFSET); 10444 vi$endpos := MARK (NONE); 10445 POSITION (vi$start_pos); 10446 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 10473 POSITION (LINE_BEGIN); 10474 vi$endpos := MARK (NONE); 10475 POSITION (vi$start_pos); 10476 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10465 MOVE_HORIZONTAL (- CURRENT_OFFSET); ****** File VI.TPU;631 10495 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10632 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 10662 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10636 MOVE_HORIZONTAL (-CURRENT_OFFSET); ****** File VI.TPU;631 10666 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10655 MOVE_HORIZONTAL (- CURRENT_OFFSET); ****** File VI.TPU;631 10685 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10705 MOVE_HORIZONTAL (- CURRENT_OFFSET); ****** File VI.TPU;631 10735 POSITION (LINE_BEGIN); ************ ************ File VI_V4.TPU;1 10884 COPY_TEXT (STR (KEY_NAME (SUBSTR (tstring, idx, 1)))); ****** File VI.TPU;631 10914 COPY_TEXT (STR (INT (KEY_NAME (SUBSTR (tstring, idx, 1))))); ************ ************ File VI_V4.TPU;1 10910 COPY_TEXT (STR (ch)); ****** File VI.TPU;631 10940 COPY_TEXT (STR (INT (ch))); ************ ************ File VI_V4.TPU;1 11045 ELSE 11046 ch := KEY_NAME (ch); 11047 ENDIF; ****** File VI.TPU;631 11075 ENDIF; ************ ************ File VI_V4.TPU;1 11050 ! If a key was read from the keyboard, then push it back. ****** File VI.TPU;631 11078 ch := KEY_NAME (ch); 11079 11080 ! If a key was read from the keyboard, then push it back. ************ DIFFERENCES /IGNORE=()/MERGED=1- VI_V4.TPU;1- VI.TPU;631