!+ ! TABS.TPU - Routine to remove tabs !-! ! History: ! 3-Apr-1986 Denny Thury ! a. Modified to NOT assume tabs every 8 characters ! procedure eve_eliminate_tabs ! Turn TABs to spaces local target,n1,blanks, saved_pos, n; on_error position(saved_pos); return; endon_error; blanks := ! building a 160 character blank string, in increments of 40 " " + ! blank character strings " " + " " + " " ; saved_pos := mark(none); position(beginning_of(current_buffer)); loop target := search(ascii(9), FORWARD); exitif (target = 0); position(beginning_of(target)); n := get_info(current_buffer,"offset_column"); move_horizontal(+1); n1 := get_info(current_buffer,"offset_column"); erase_character(-1); eveplus_insert_text(substr(blanks, 1, (n1-n))); endloop; position(saved_pos); endprocedure