/*******************************************************************************
                             MULTI-EDIT MACRO FILE

Name:         TAB2SPC

Author:       Jake Colman    11-12-92 09:34pm

Description:  Converts embedded tab characters to spaces. Text formatting
              is preserved.

*******************************************************************************/

macro tab2spc dump
{
  str tstr[2048];
  int tint = 0,
      tm   = system_timer;

  working;
  refresh = FALSE;
  push_undo;

  mark_pos;
  tof;
  goto_col(1);

  while (!at_eof) 
  {
    make_message("Converting line " + str(++tint));
    tstr = get_line;
    tabs_to_spaces(tstr);
    put_line(tstr);
    down;
  }

  goto_mark;
  refresh = TRUE;
  pop_undo;
  make_message('TAB2SPC conversion took ' + str(((system_timer - tm) * 10) / 182) + ' seconds.');
}
