1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00
wget/PATCHES

125 lines
4.9 KiB
Plaintext
Raw Normal View History

2000-11-08 12:11:25 -05:00
* Guidelines for patch submissions.
===================================
2000-11-06 05:56:49 -05:00
** Where to send the patches.
2000-11-08 12:11:25 -05:00
-----------------------------
2000-11-06 05:56:49 -05:00
Patches intended to be applied to Wget should be mailed to
<wget-patches@sunsite.auc.dk>. Each patch will be reviewed by the
developers, and will be acked and added to the distribution, or
rejected with an explanation.
If you want to discuss your patch with the community of Wget users and
developers, it is OK to send it to the general list at
2000-11-08 12:11:25 -05:00
<wget@sunsite.auc.dk>. If the patch is really huge (more than 100K or
so), you may want to put it on the web and post the URL.
2000-11-06 05:56:49 -05:00
2000-11-08 12:11:25 -05:00
EVERY patch should be accompanied by an explanation of what the patch
changes, and why the change is necessary. The explanation need not be
long, but please don't just send a patch without any text.
Normally, a patch can be just inserted into the message, after the
explanation and the ChangeLog entry. However, if your mail composer
or gateway is inclined to munge patches, e.g. by line-wrapping them,
please send them out as a MIME attachment. It is important that the
patch survives the travel so that we can feed it to the `patch'
utility after reviewing it.
2000-11-06 05:56:49 -05:00
** How to create patches.
2000-11-08 12:11:25 -05:00
-------------------------
2000-11-06 05:56:49 -05:00
Patches are created using the `diff' utility. When making patches,
please use the `-u' option, or if your diff doesn't support it, `-c'.
Using ordinary (context-free) diffs are notoriously prone to error,
since line numbers tend to change when others make changes to the same
source file.
An example of the `diff' usage:
diff -u OLDFILE NEWFILE
2000-11-08 12:11:25 -05:00
-or-
2000-11-06 05:56:49 -05:00
diff -c OLDFILE NEWFILE
Also, it is helpful if you create the patch in the top level of
the Wget source directory:
2000-11-08 12:11:25 -05:00
$ cp src/http.c src/http.c.orig
...hack, hack, hack....
$ diff -u src/http.c.orig src/http.c
2000-11-06 05:56:49 -05:00
If your patch changes more than one file, the output of all the diff
invocations should be concatenated to form a single patch.
Alternatively, you can use the `-r' option to compare entire
directories. If you do that, be careful not to include the
differences to automatically generated files, such as `.info*'.
If you run on Windows and don't have `diff' handy, please get one.
It's extremely hard to review changes to files unless they're in the
form of a patch. If you really cannot use a variant of `diff', then
mail us the whole new file and specify which version of Wget you
changed; that way we will be able to generate the diff ourselves.
2000-11-08 12:11:25 -05:00
Finally, if your changes introduce new files, or if they change the
old files past all recognition (e.g. by completely reimplementing the
old stuff), sending a patch obviously doesn't make sense. In that
case, just attach the files along with an explanation of what is being
changed.
2000-11-06 05:56:49 -05:00
** Standards and coding style.
2000-11-08 12:11:25 -05:00
------------------------------
2000-11-06 05:56:49 -05:00
Wget abides by the GNU coding standards, available at:
http://www.gnu.org/prep/standards.html
2000-11-08 12:11:25 -05:00
To me the most important single point in that entire document is "no
arbitrary limits". Even when Wget's coding is less than exemplary, it
respects that rule. There should be no exceptions.
Here is a short recap of the GNU formatting and naming conventions,
borrowed from XEmacs:
* Put a space after every comma.
* Put a space before the parenthesis that begins a function call,
macro call, function declaration or definition, or control
statement (if, while, switch, for). (DO NOT do this for macro
definitions; this is invalid preprocessor syntax.)
* The brace that begins a control statement (if, while, for, switch,
do) or a function definition should go on a line by itself.
* In function definitions, put the return type and all other
qualifiers on a line before the function name. Thus, the function
name is always at the beginning of a line.
* Indentation level is two spaces. (However, the first and
following statements of a while/for/if/etc. block are indented
four spaces from the while/for/if keyword. The opening and
closing braces are indented two spaces.)
* Variable and function names should be all lowercase, with
underscores separating words, except for a prefixing tag, which may
be in uppercase. Do not use the mixed-case convention (e.g.
SetVariableToValue ()) and *especially* do not use Microsoft
Hungarian notation (char **rgszRedundantTag).
* Preprocessor constants and enumerations should be all uppercase,
and should be prefixed with a tag that groups related constants
together.
2000-11-06 05:56:49 -05:00
** ChangeLog policy.
2000-11-08 12:11:25 -05:00
--------------------
2000-11-06 05:56:49 -05:00
Each patch should be accompanied by an update to the appropriate
ChangeLog file. Please don't mail patches to ChangeLog because they
have an extremely high rate of failure; just mail us the new part of
the ChangeLog you added. Patches without a ChangeLog entry will be
accepted, but this creates additional work for the maintainers, so
please do write the ChangeLog entries.
Guidelines for writing ChangeLog entries are also governed by the GNU
coding standards, under the "Change Logs" section.