problem about sovling definition conflict when porting

Z

Zhenhuan Du

Hello!
I was porting some files writing by others in C language.
Due to bad naming ,I found many
typedefs disagreement and macro definition conflicts.
That was really annoying.

My first solutions are :

So for clearance and portability, I want to do following actions.
1)Add a prefix like "CCC_" before every macro definition ,typedef
,functions name and global variable.
2)Add a prefix like "CCC_" in every ".c" file name and ".h" file name.
I there any

For example:
file1.c contains
#define define1 0x0
becomes
CCC_file1.c
#define CCC_define1 0x0

But I can't find any software capable of doing this job.

I know this kind of work is more like common text batch processing .

But I'm not good at this kind of programming.Maybe someone has done a
good job like this. Can anybody give some advice here? Thanks !

Also, if any other kind of solution is available, share with me please.
 
D

Dead Loop

Zhenhuan Du said:
So for clearance and portability, I want to do following actions.
1)Add a prefix like "CCC_" before every macro definition ,typedef
,functions name and global variable.
2)Add a prefix like "CCC_" in every ".c" file name and ".h" file name.
I there any

For example:
file1.c contains
#define define1 0x0
becomes
CCC_file1.c
#define CCC_define1 0x0

But I can't find any software capable of doing this job.

I know this kind of work is more like common text batch processing .

But I'm not good at this kind of programming.Maybe someone has done a
good job like this. Can anybody give some advice here? Thanks !

Also, if any other kind of solution is available, share with me please.

Maybe you'd better goto some perl groups. :)
 
Z

Zhenhuan Du

CBFalconer said:
Works fine from here. Try it again. Let me know.
Hi, I failed again to access "http://cbfalconer.home.att.net/download ".
I was using firefox 2.0 and got following message:
"
The connection was reset
The connection to the server was reset while the page was loading.
* The site could be temporarily unavailable or too busy. Try
again in a few
moments.

* If you are unable to load any pages, check your computer's network
connection.

* If your computer or network is protected by a firewall or
proxy, make sure
that Firefox is permitted to access the Web.

"
My network connection is OK since I can access www.att.net without any
problem.
 
D

Dead Loop

"Richard Heathfield wrote:
"
Zhenhuan Du said:


And I just succeeded again. Sounds like a problem at your end.


Then try using Konqueror or Galeon or Netscape or lynx or Opera.

I guess the key point is -> Zhenhuan Du is in China. :)
 
Z

Zhenhuan Du

Richard said:
Zhenhuan Du said:


And I just succeeded again. Sounds like a problem at your end.


Then try using Konqueror or Galeon or Netscape or lynx or Opera.

thanks for your help .Using a proxy works fine now.
 
C

CBFalconer

Zhenhuan said:
ok ,Access using an proxy worked .

Glad to hear it. I just cancelled an e-mail to you. BTW, the
VCard thing is basically an attachment, and a nuisance in Usenet.
It may cause your articles to be destroyed in some usenet servers.

If your problems were due to some sort of regulatory interference
the email might have been intercepted also.

Let me know if id2id solves your original problem. Use the address
below, the one in the zip file is obsolete. Note that I have never
gotten around to incorporating various warnings, although the data
structure has provisions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top