I want to reuse some code licensed under a BSD license but I don't know how to make it clear what I wrote, what I have reused and what I have modified.
Say the project I want to reuse code from has the following directory structure:
project/
|-- LICENSE.txt
|-- module1/
| |-- file1.c
| |-- file2.c
| `-- file3.c
|-- module2/
`-- module3/
and the contents of LICENSE.txt is a BSD license, i.e. its contents are:
Copyright (c) <year>, <copyright holder>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
[...]
(See wikipedia for a template of the full text.)
Also, the copyright is only stated in the LICENSE.txt file and not in every individual source code file.
If I now copy everything under project/module1/ to my own project:
my_project/
|-- module1/
| |-- file1.c
| |-- file2.c
| `-- file3.c
|-- my_file1.c
|-- my_file2.c
|-- my_source_code1/
`-- my_source_code2/
How should I state that I am not the copyright holder of the files under module1? Would it be enough to copy the original LICENSE.txt, with the original copyright holder in it's header, to the module1 subdirectory? Or should I add a copyright header to each individual file?
What if I modify any of the files under module1? Should I then somehow add myself as an additional copyright holder for the files I modified?
Note: I am perfectly fine with using the same (or a compatible) license for the code I wrote.
Copy LICENSE.txt
in your module1
dir, and mention in your docs (README, LICENSE, etc.) that you use this part of the project. BSD style license is very liberal: as long as you give due credit and respect its requirements (this usually involves providing the unmodified license and copyright notices), you can do whatever you want with the code.
If you modify any file, a good practice is to mention it in the file header, around your changes, and in your global docs. If the modified files had no copyright notice, just add one describing your changes. That way users can known which files were modified, who did it, why and how.
It's that simple: do it in a very descriptive way. There is no formal procedure to follow, contrary to GPL style licenses. This is more documentation than legal work.