Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Tree [ef8441] master /
History



File Date Author Commit
doc 2013-01-27 Håkon Løvdal Håkon Løvdal [a7ee63] Added GPLv3 document
test 2013-01-27 Håkon Løvdal Håkon Løvdal [33d0bf] vim settings
.gitignore 2013-01-27 Håkon Løvdal Håkon Løvdal [bb60a4] .gitignore: vim swap files
README 2013-01-27 Håkon Løvdal Håkon Løvdal [2acbb0] Added README file
changelog.txt 2013-01-27 Håkon Løvdal Håkon Løvdal [ef8441] Added changelog file
git-resolve.sh 2013-01-27 Håkon Løvdal Håkon Løvdal [f3ae18] git-resolve.sh
tisa.pl 2013-01-27 Håkon Løvdal Håkon Løvdal [9a9eb5] Added --version option

Read Me

         _______ _____  _____         
        |__   __|_   _|/ ____|  /\    
           | |    | | | (___   /  \   
           | |    | |  \___ \ / /\ \  
           | |   _| |_ ____) / ____ \ 
           |_|  |_____|_____/_/    \_\

            tab indent - space align

This program will correct source code so that tabs that incorrectly are
used for alignment are replaced with a correct number og spaces as well
as replacing spaces that are used for indentation with tabs.

Example:

Let's say the following is the input (where tabs are written as <----->
(or shorter))

int main(int argc, char *argv[])
{
  int<-><------>i;
  const int *<->p;
  puts("Hello world");
  return 0;
}

Here tabs are used to align the comments and that is incorrect since the
source code then looks wrong if viewed with a different tab setting than
the origial editor. Also forcing a fixed number of spaces for indentation
is wrong; each editor should be able to view the source code with his/her
personal preference.

Running the above program through tisa.pl would give the following result
(again with tabs written as <------>):

int main(int argc, char *argv[])
{
<------>int           i;
<------>const int *   p;
<------>puts("Hello world");
<------>return 0;
}

There is no specific installation needed, just copy tisa.pl to somewhere
in your $PATH.