home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / wp / be310a.zip / CINDENT1.CHS < prev    next >
Text File  |  1993-08-01  |  988b  |  26 lines

  1. /* CHESS FUNCTION(S): CINDENT1.CHS
  2. /*              DATE: 5/15/93
  3. /*            AUTHOR: C. Schanck
  4. /*
  5. /*       DESCRIPTION: This program file will convert from C mode
  6. /* indention #2 to C mode indention #1.  It is very useful when
  7. /* used in conjunction with 'global' to change a whole set of files
  8. /* to a uniform indention style.
  9. {           
  10.    int i;                           
  11.    set_display(0);
  12.    while(Search("~[ ]*[{][ ]*$~ ~fr~ "))  /* find a line ending
  13.                                           /* in a bracket...
  14.    {  
  15.       if(ask("file_column")!=1)     /* if it is not the beginning
  16.                                     /* of a line, del_bol.
  17.          Del_bol();
  18.       Back_space();                 /* join to prev line
  19.       End_line();                   /* go the the end
  20.       i=i+1;
  21.       if((i%25)==0)                 /* keep the user on top
  22.          msg("%ld instances changed...",i);
  23.    }            
  24.    update_display();
  25.    set_display(1);
  26. }