Contributing to DUMB

If you modify DUMB, please send your changes to me at <tosi@stekt.oulu.fi>. I'll then (try to) add them in the main distribution.

Of course, DUMB being free software, nothing prevents you from maintaining a version of your own and uploading it to FTP sites all over the world without telling me. But let's try to cooperate.

Requirements

Your changes must be distributable under the GNU General Public License.

If you add new files or change much in existing files, please write a copyright notice at the beginning of the file. I want many people to have copyrights to parts of DUMB. Then no one alone can turn it to a propietary product.

The Free Software Foundation has another approach. They ask people to transfer the copyrights to them. You can transfer the copyrights of your code to FSF if you want. But not to me.

Recommendations

Please keep the *_SOURCES lists in Makefile.am in alphabetical order. That gives the person installing DUMB some hints on how much is still uncompiled.

C++ complications

Because DUMB is compiled as C++ on big-endian processors, the source code must be C++ compatible.

Do not define types inside a struct. If the file is compiled as C++, the nested definition won't be visible outside the struct. So, instead of this:

struct op_node {
   enum operation {
      OP_STATISTICS,
      OP_SECTOR_SIDES,
      OP_OUTPUT_DOOM,
      OP_SET_NAME,
      OP_SET_LONGNAME
   } operation;
   int sector;			/* for OP_SECTOR_SIDES */
   const char *name;	/* for OP_OUTPUT_DOOM, OP_SET_NAME, OP_SET_LONGNAME */
   struct op_node *next;
};

do this:

enum operation {
   OP_STATISTICS,
   OP_SECTOR_SIDES,
   OP_OUTPUT_DOOM,
   OP_SET_NAME,
   OP_SET_LONGNAME
};
struct op_node {
   enum operation operation;
   int sector;			/* for OP_SECTOR_SIDES */
   const char *name;	/* for OP_OUTPUT_DOOM, OP_SET_NAME, OP_SET_LONGNAME */
   struct op_node *next;
};

Using the identifier "operation" for both the member and the type works even in C++.

Do not use the C++ keywords as identifiers: asm, bool, catch, class, const_cast, delete, dynamic_cast, explicit, false, friend, inline, mutable, namespace, new, operator, overload, private, protected, public, reinterpret_cast, static_cast, template, this, throw, true, try, typeid, typename, using, virtual, wchar_t.

Don't use the C++ alternative operators: and, and_eq, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq.

File formats and email attachments

I prefer unified-format diffs, as they are compact and easy to read. If you can't produce those, I can take other kind of diffs too. If you don't have the diff program or the files are binary, you can send them as whole.

Please compress your contribution with gzip unless it's trivial enough to be included verbatim in email. If you don't have gzip, you can use zip.

If your contribution is less than 500k or so when compressed (it probably is, as dumb-0.12.tar.gz was just 340k :), you can send it to me as an email attachment without warning. If it is bigger than that, please write to me first.

I can decode MIME, BinHex and uuencode formats.

Consequences

I will put your name and email address in some files in the DUMB package (probably AUTHORS, THANKS, NEWS and/or ChangeLog) and may mention them in postings to dumb-list and comp.os.linux.announce. If you don't want me to do that, please write so.
Kalle O. Niemitalo