Building a Copyright statement

C

Charles

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

James Kanze

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
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top