ADDCOPYRIGHT adds or modifies the copyright info to an M-file or all M-files in a designated folder as well as subfolders.
This program was originally written by Raymond Norris and has been modified to add additional features summarized below.
The copyright line that is built up looks like the following:
% Copyright <YEAR> <ORGANIZATION>
The copyright info is placed directly above the Revision line(containing "$Revision") or after the first blank line that is not commented after the first commented section.
The program may be invoked in a variety of ways and options, please see the comment section for details. For example one common syntax is
ADDCOPYRIGHT '' T
which calls up a dialog box to select the directory and updates the copyright info in the selected folder and all subfolders.
The following summarizes some of the differences between the original version and this version.
1. Argument list order is changed, and number of arguments is reduced.
2. Command line syntax is supported.
3. If folder argument is empty, a dialog box selects the folder.
4. Copyright info may be added to a single file.
5. Copyright info is added either before $Revision keyword or after a blank line.
6. Number of spaces between % and Copyright are now immaterial.
7. The organization is checked and if different a new copyright line is added.
8. A Def_organization constant is added.
9. Will not attempt to add copyright info to contents.m or files that are not M-files.
10. If copyright_string is blank and update is true then copyright line is deleted.
11. The correct eol character for the OS is used to rewrite the files.
12. More file checks are performed to prevent leaving temporary files.
13. Summary output to command line has been changed to be easier to read.
14. Added features to work with range of years as specified by year1-year2.
Please send me an email if you find this program useful, find bugs, or have recommendations.