Building a Copyright statement

Discussion in 'C++' started by Charles, May 26, 2008.

  1. Charles

    Charles Guest

    I'm a novice with C++ programming so please bear with me:

    I'm in the process of inserting multiline Copyright statements in some
    C++ code and I have many modules to update. The Copyright statements
    will be visible in the resulting load module after compilation.

    Is it possible to keep the Copyright source in a separate member and
    include that at compilation time instead of har coding a literal?

    I'd appreciate any simple suggestions and would like to benefit from
    the experience of the seasoned C++ Programmers out there.

    Many thanks,
    Charles.
     
    Charles, May 26, 2008
    #1
    1. Advertisements

  2. Charles

    James Kanze Guest

    On May 26, 9:15 am, Charles <> wrote:
    > I'm a novice with C++ programming so please bear with me:


    > I'm in the process of inserting multiline Copyright statements in some
    > C++ code and I have many modules to update. The Copyright statements
    > will be visible in the resulting load module after compilation.


    > Is it possible to keep the Copyright source in a separate member and
    > include that at compilation time instead of har coding a literal?


    Visible how? If all you're interested in is that it shows up in
    the output of strings, then just including a file with:
    static char const copyright[] = "..." ;
    should do the trick. You're compiler may even have an option
    which will force an include at the start of compilation.

    Beyond that, it's more a question of your development toolset.
    Just write a loop which invokes some sort of batch editor on
    each of the files. Something like:
    for x in ` find . -name '*.cc' `
    do cat copyright $x > /tmp/xxx && mv /tmp/xxx $x
    done

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
     
    James Kanze, May 26, 2008
    #2
    1. Advertisements

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. Replies:
    3
    Views:
    1,060
  2. Jay McGavren
    Replies:
    11
    Views:
    1,461
    Alan Krueger
    Jan 16, 2006
  3. tedsuzman
    Replies:
    2
    Views:
    7,574
    Michel Claveau, résurectionné d'outre-bombe inform
    Jul 21, 2004
  4. Midex
    Replies:
    24
    Views:
    1,264
  5. Jack
    Replies:
    2
    Views:
    208
  6. Jack

    Problems with building sql statement

    Jack, Mar 30, 2005, in forum: ASP General
    Replies:
    3
    Views:
    205
  7. Jack
    Replies:
    4
    Views:
    297
  8. Dave
    Replies:
    3
    Views:
    260
Loading...