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

  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. 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. Bob
    Replies:
    4
    Views:
    680
  2. Martin
    Replies:
    3
    Views:
    377
    Martin
    Mar 3, 2004
  3. =?Utf-8?B?RGFuaWVs?=

    copyright?

    =?Utf-8?B?RGFuaWVs?=, Sep 12, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,611
    Alvin Bruney - ASP.NET MVP
    Sep 12, 2005
  4. =?Utf-8?B?bW9XaGl0ZQ==?=

    copyright symbol in web.config

    =?Utf-8?B?bW9XaGl0ZQ==?=, Mar 7, 2006, in forum: ASP .Net
    Replies:
    10
    Views:
    6,449
    ankyeez
    Aug 22, 2012
  5. lareds
    Replies:
    4
    Views:
    1,304
    Tor Iver Wilhelmsen
    Nov 18, 2003
Loading...

Share This Page