[TriLUG] Case sensitivity

Kevin Kreamer kevin at kreamer.org
Sat May 31 18:16:14 EDT 2008


A helpful way to try to reverse the brain damage is to have the windows user
fix everything by hand.  Hopefully, a few hours of work will help him/her
avoid a lifetime of the same mistakes.

If that's not posible, see http://snippets.dzone.com/posts/show/630 .  Also,
you can use perl from the command line to look for #include and replace with
lower case by doing something like:

perl -p -i.bak -e '/^\#include / && tr/A-Z/a-z/g' <files>

Have a look at http://hell.org.ua/Docs/oreilly/perl/cookbook/ch07_08.htm .

Hope this helps,
Kevin

On Sat, May 31, 2008 at 2:04 PM, Brian Phelps <brphelps at ieee.org> wrote:

> I have a bunch of source code written by a windows user who is
> case-inconsistent between Makefiles, header declarations in source, and
> actual filenames in the directories.
>
> Anyone know of a script to fix some of this?  Particularly the case
> problems in the c source files like #include "FuBar.h"
>
> I just would like to convert all files to lower case as well as any
> references to them in the source files
>
> I was taught header files should always be lower case to avoid this in
> my first compsci class.  But we all know win32 causes brain damage.
> Especially in this <pun> case </pun>.
>
> Thanks
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
>



More information about the TriLUG mailing list