Tabs are evil. Partially because they are usually set to something like 8 spaces, and indents are typically 2 or 4 spaces. So how to automatically rid a program of tabs and replace them with spaces? One way is by using the Unix command expand, which expands tabs to spaces (specified as 4 in this case):
expand -t 4 input.c > output.c
Another way is using Perl (here replacing the tabs with 4 spaces):
perl -p -e 's/\t/ /g' input.c > output.c
This command replaces all tabs with 4 spaces. A third option is the use of sed (here replacing the tabs with 4 spaces):
sed $'s/\t/ /g' input.c > output.c
All three of these methods deal with getting rid of tabs.