problem about sovling definition conflict when porting

Discussion in 'C Programming' started by Zhenhuan Du, Dec 16, 2006.

  1. Zhenhuan Du

    Zhenhuan Du Guest

    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.
    Zhenhuan Du, Dec 16, 2006
    #1
    1. Advertising

  2. Zhenhuan Du

    Dead Loop Guest

    Re: problem about sovling definition conflict when porting

    "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. :)
    Dead Loop, Dec 16, 2006
    #2
    1. Advertising

  3. Zhenhuan Du

    CBFalconer Guest

    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>
    CBFalconer, Dec 16, 2006
    #3
  4. Zhenhuan Du

    Zhenhuan Du Guest

    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?
    Zhenhuan Du, Dec 17, 2006
    #4
  5. Zhenhuan Du

    CBFalconer Guest

    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>
    CBFalconer, Dec 17, 2006
    #5
  6. Zhenhuan Du

    Zhenhuan Du Guest

    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.
    Zhenhuan Du, Dec 17, 2006
    #6
  7. 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.
    Richard Heathfield, Dec 17, 2006
    #7
  8. 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.
    Richard Heathfield, Dec 17, 2006
    #8
  9. Zhenhuan Du

    Dead Loop Guest

    Re: problem about sovling definition conflict when porting

    "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. :)
    Dead Loop, Dec 17, 2006
    #9
  10. Zhenhuan Du

    Zhenhuan Du Guest

    Re: problem about sovling definition conflict when porting

    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 :(
    Zhenhuan Du, Dec 17, 2006
    #10
  11. Zhenhuan Du

    Zhenhuan Du Guest

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


    thanks for your help .Using a proxy works fine now.
    Zhenhuan Du, Dec 17, 2006
    #11
  12. Zhenhuan Du

    Zhenhuan Du Guest

    Richard Heathfield wrote:
    > 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.
    >


    ok ,Access using an proxy worked .
    Zhenhuan Du, Dec 17, 2006
    #12
  13. Zhenhuan Du

    CBFalconer Guest

    Zhenhuan Du wrote:
    > Richard Heathfield wrote:
    >> 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.

    >
    > ok ,Access using an proxy worked .
    >
    > -------------------------------------------------------------------
    > Name: duzhenhuan.vcf
    > duzhenhuan.vcf Type: VCard (text/x-vcard)
    > Encoding: base64


    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.

    --
    Chuck F (cbfalconer at maineline dot net)
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net>
    CBFalconer, Dec 17, 2006
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jianli Shen
    Replies:
    1
    Views:
    565
    Victor Bazarov
    Mar 13, 2005
  2. Ark
    Replies:
    1
    Views:
    404
    Chris Torek
    Aug 7, 2004
  3. charles cashion

    css conflict (or html conflict)

    charles cashion, Feb 18, 2009, in forum: HTML
    Replies:
    2
    Views:
    776
    charles cashion
    Feb 18, 2009
  4. Alessandro [AkiRoss] Re
    Replies:
    3
    Views:
    422
    Michael Doubez
    May 13, 2009
  5. hqin
    Replies:
    24
    Views:
    2,815
    Keith Thompson
    Jan 17, 2011
Loading...

Share This Page