This program parses your code and indent each line properly. The comments at the end of lines are nicely aligned to improve readability and comments that start too far to the right are places alone on the previous line instead. All you need to do is call the program with the filename(s) in the parameters.
Examplecode for the macro system in GLBasic v7 is included. It won't destroy your original file, it just creates two more files, one called "filename.gbas.new" and the second called "filename.gbas.rem". The first one is the first pass, only indenting each line correctly. The second has also aligned the comments on the end of all lines. (you do comment your code, right? :-)
If you run the macro it will open up both files in notepad, one after the other, just edit the macro so you get the file you want. Copy/paste into your original file if you feel happy with what he did.
Please try this and leave comments here, it is not fully tested yet so please don't paste over your original code before reviewing it with some program that can compare lines for similarities. PSPad is great for this, it doesn't complain on indentation differences, only real characters so you can be sure that the code is intact.
I also try to leave INLINE/ENDINLINE blocks untouched since I can't be bothered to figure all different ways of indenting c++ code...
Beautify your code!Have fun!