Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Need script to fix C++ "#include" statements

Reply
Thread Tools

Need script to fix C++ "#include" statements

 
 
Ed J
Guest
Posts: n/a
 
      03-24-2005
I'm porting a large Windows C++ application to Linux and ran into a big
hassle because of the case-sensitivity of filenames.

Does anyone want to take a shot at writing a Perl script to fix filenames
used in "#include" statements?

1. Search a directory tree for all *.h files, and remember their names.
2. Scan the same directory tree for all *.[CcPpPp] files, and replace the
filenames in their "#include" statements with the case-insensitive matching
name. Include files are distributed in several folders. When not in the
same folder as the including source file, it uses the ".." conventions for
relative path traversing.
3. Also change any backslashes in the filenames to forward slashes.

I know a pro could write such a script in two minutes. I use Perl once a
year. It would take me two hours at least!

Thanks bunches!!
Ed


 
Reply With Quote
 
 
 
 
John Bokma
Guest
Posts: n/a
 
      03-24-2005
Ed J wrote:

> I know a pro could write such a script in two minutes.


I doubt you would find anyone who could do it in two minutes.

> I use Perl
> once a year. It would take me two hours at least!


I think it will take a pro at least one hour, maybe two including good
testing, getting your files, and making the invoice.

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      03-24-2005
Ed J wrote:
> I'm porting a large Windows C++ application to Linux and ran into a big
> hassle because of the case-sensitivity of filenames.
>
> Does anyone want to take a shot at writing a Perl script to fix filenames
> used in "#include" statements?
>
> 1. Search a directory tree for all *.h files, and remember their names.
> 2. Scan the same directory tree for all *.[CcPpPp] files, and replace the
> filenames in their "#include" statements with the case-insensitive matching
> name. Include files are distributed in several folders. When not in the
> same folder as the including source file, it uses the ".." conventions for
> relative path traversing.
> 3. Also change any backslashes in the filenames to forward slashes.
>
> I know a pro could write such a script in two minutes. I use Perl once a
> year. It would take me two hours at least!


I'm afraid you've posted to the wrong place. This group is for people
who want help writing their own Perl scripts, not for people to get
scripts written for them.

For the latter, you will have better luck at somewhere such as jobs.perl.org

For the former, please do feel free to make a stab at your task, and if
you encounter problems, let us know what they are so we can help you.

Paul Lalli
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      03-24-2005
Ed J <(E-Mail Removed)> wrote:

> Does anyone want to take a shot at writing a Perl script to fix filenames



> I know a pro could write such a script in two minutes. I use Perl once a
> year. It would take me two hours at least!



How much does this job pay?


--
Tad McClellan SGML consulting
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
robic@yahoo.com
Guest
Posts: n/a
 
      04-07-2005
On Thu, 24 Mar 2005 15:04:31 -0600, Tad McClellan
<(E-Mail Removed)> wrote:

>Ed J <(E-Mail Removed)> wrote:
>
>> Does anyone want to take a shot at writing a Perl script to fix filenames

>
>
>> I know a pro could write such a script in two minutes. I use Perl once a
>> year. It would take me two hours at least!

>
>
>How much does this job pay?


More than your newspaper route...

 
Reply With Quote
 
profmath.developers@gmail.com
Guest
Posts: n/a
 
      04-08-2005

Ed J wrote:
> I'm porting a large Windows C++ application to Linux and ran into a

big
> hassle because of the case-sensitivity of filenames.

....
> I know a pro could write such a script in two minutes. I use Perl

once a
> year. It would take me two hours at least!
>
> Thanks bunches!!
> Ed


It would probably take a lot less time for you to program it then for
you to just sit around waiting for someone to quickly send you an email
saying "Don't worry! I've made your program for nothing because I
really want to to succeed in life, and I want you to learn how to
program like a 'pro'!"

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
component statements within architecture statements Neil Zanella VHDL 8 10-20-2006 09:05 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Perl Misc 21 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Python 23 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Java 22 03-21-2006 07:02 AM
if statements with or w/o else statements Harry George Python 6 02-23-2004 06:48 PM



Advertisments