I thought that since I had changed my coding style (4 space indents instead of 8-space tab indents), I'd cheat and have Indent update all my code automatically instead of doing it all myself (it's like 7,000 LOC). Never again. I made sure not to use it's retarded built-in settings, but it just ignored them. I said unto Indent "Do not use tabs in your indentation, but use spaces instead, for my name is the USER." But lo and behold, tabs. And spaces. 4 spaces for 1 level of indentation, 1 (8-space) tab for two levels of indentation, 1 tab and 4 spaces for 3 and so on. I even tested it beforehand on a single file, thinking "If it doesn't work, I can just manually fix this one file". It worked. It was fine. It was only when I applied it to my entire project directory thinking "this is surely a good idea" that it decided to break everything. In some files, it just deleted all the indentation and added a bunch of random blank lines. Because Indent is evil. It doesn't like K&R style, you see. It resents me for not using GNU style, the brace style of the devil, by whom Indent was sent to fulfil evil prophecies.
So, lesson learned, never use GNU Indent. I was hoping A-Style would be able to fix everything but it throws a std::bad_alloc exception for some reason.
I do for some of the projects, but even if I restore them, I'll have to re-format all the code anyway. If I could get A-Style to do it, it would be better.
Because I'd have to do it to about 300 files. Also, with some of them, it actually completely removed the indentation and just added blank lines in between every line of code. It also changed the pointers so that the asterisk is with the variable name instead of the type (minor annoyance), indented conditional extern"C" blocks, broke up all the lines above 80 chars (which I do manually, but it did it in a completely retarded way), broke some comments, and I'm pretty sure it even broke some code so that it doesn't compile any more.
Also my whole projects directory is actually about 11,000 LOC, about 8,000 lines of comments, (and 1500 blank lines).
directory Projects/*
errno message: No such file or directory
Simple enough. It doesn't support wildcards. You have to issue one command per file. I recommend generating a listing and then processing it with a regex.