Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > problem about sovling definition conflict when porting

Reply
Thread Tools

problem about sovling definition conflict when porting

 
 
Zhenhuan Du
Guest
Posts: n/a
 
      12-16-2006
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.




 
Reply With Quote
 
 
 
 
Dead Loop
Guest
Posts: n/a
 
      12-16-2006
"Zhenhuan Du wrote:
>
> 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.

 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      12-16-2006
Zhenhuan Du wrote:
>
> 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 :


Download id2id-20.zip from:

<http://cbfalconer.home.att.net/download/>

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

 
Reply With Quote
 
Zhenhuan Du
Guest
Posts: n/a
 
      12-17-2006
CBFalconer wrote:
> Zhenhuan Du wrote:
>> 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 :

>
> Download id2id-20.zip from:
>
> <http://cbfalconer.home.att.net/download/>
>



The link given above seems dead , I couldn't access it .
Could you mail me a copy?

 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      12-17-2006
Zhenhuan Du wrote:
> CBFalconer wrote:
>> Zhenhuan Du wrote:

>
>>> 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 :

>>
>> Download id2id-20.zip from:
>>
>> <http://cbfalconer.home.att.net/download/>

>
> The link given above seems dead , I couldn't access it .
> Could you mail me a copy?


Works fine from here. Try it again. Let me know.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>


 
Reply With Quote
 
Zhenhuan Du
Guest
Posts: n/a
 
      12-17-2006
CBFalconer wrote:
> Zhenhuan Du wrote:
>> CBFalconer wrote:
>>> Zhenhuan Du wrote:
>>>> 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 :
>>> Download id2id-20.zip from:
>>>
>>> <http://cbfalconer.home.att.net/download/>

>> The link given above seems dead , I couldn't access it .
>> Could you mail me a copy?

>
> 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.


 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      12-17-2006
Zhenhuan Du said:

> CBFalconer wrote:
>>
>> <http://cbfalconer.home.att.net/download/>

>
> The link given above seems dead , I couldn't access it .


Works fine here. Give it another go.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      12-17-2006
Zhenhuan Du said:

> CBFalconer wrote:
>> Zhenhuan Du wrote:
>>> CBFalconer wrote:
>>>> Zhenhuan Du wrote:
>>>>> 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 :
>>>> Download id2id-20.zip from:
>>>>
>>>> <http://cbfalconer.home.att.net/download/>
>>> The link given above seems dead , I couldn't access it .
>>> Could you mail me a copy?

>>
>> Works fine from here. Try it again. Let me know.
>>

> Hi, I failed again to access "http://cbfalconer.home.att.net/download ".


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

> I was using firefox 2.0 and got following message:


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

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
 
Reply With Quote
 
Dead Loop
Guest
Posts: n/a
 
      12-17-2006
"Richard Heathfield wrote:
"
> Zhenhuan Du said:
>
> > CBFalconer wrote:
> >> Zhenhuan Du wrote:
> >>> CBFalconer wrote:
> >>>> Zhenhuan Du wrote:
> >>>>> 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 :
> >>>> Download id2id-20.zip from:
> >>>>
> >>>> <http://cbfalconer.home.att.net/download/>
> >>> The link given above seems dead , I couldn't access it .
> >>> Could you mail me a copy?
> >>
> >> Works fine from here. Try it again. Let me know.
> >>

> > Hi, I failed again to access "http://cbfalconer.home.att.net/download ".

>
> And I just succeeded again. Sounds like a problem at your end.
>
> > I was using firefox 2.0 and got following message:

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


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

 
Reply With Quote
 
Zhenhuan Du
Guest
Posts: n/a
 
      12-17-2006
Dead Loop wrote:
> "Richard Heathfield wrote:
> "
>> Zhenhuan Du said:
>>
>>> CBFalconer wrote:
>>>> Zhenhuan Du wrote:
>>>>> CBFalconer wrote:
>>>>>> Zhenhuan Du wrote:
>>>>>>> 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 :
>>>>>> Download id2id-20.zip from:
>>>>>>
>>>>>> <http://cbfalconer.home.att.net/download/>
>>>>> The link given above seems dead , I couldn't access it .
>>>>> Could you mail me a copy?
>>>> Works fine from here. Try it again. Let me know.
>>>>
>>> Hi, I failed again to access "http://cbfalconer.home.att.net/download ".

>> And I just succeeded again. Sounds like a problem at your end.
>>
>>> I was using firefox 2.0 and got following message:

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

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


Maybe
But I can access www.att.net without problem.
So i just hope cbfalconer can send me a copy

 
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
conflict function definition with stdlib.h hqin C Programming 24 01-17-2011 05:28 AM
Template instantiation conflict with function definition Alessandro [AkiRoss] Re C++ 3 05-13-2009 10:08 AM
css conflict (or html conflict) charles cashion HTML 2 02-18-2009 09:41 PM
can a class definition inside another class's definition Jianli Shen C++ 1 03-13-2005 06:02 PM
help?: incomplete definition with complete definition in scope Ark C Programming 1 08-07-2004 04:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57