Update hacking.md
This commit is contained in:
parent
c7d1102c61
commit
3285934703
@ -9,14 +9,16 @@ Just some tips if you're going to help with HexChat code (patches etc):
|
||||
|
||||
* Try to stick to the same consistant coding style (vertically aligned braces, a space after if, while, functions etc.):
|
||||
|
||||
<pre>void
|
||||
routine (void)
|
||||
```C
|
||||
void
|
||||
routine (void)
|
||||
{
|
||||
if (function (a, b, c))
|
||||
{
|
||||
if (function (a, b, c))
|
||||
{
|
||||
x = a + 1;
|
||||
}
|
||||
}</pre>
|
||||
x = a + 1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* Don't use "//" C++ style comments, some compilers don't like them.
|
||||
|
||||
@ -30,28 +32,5 @@ Just some tips if you're going to help with HexChat code (patches etc):
|
||||
|
||||
* Don't read() from sockets, use recv() instead.
|
||||
|
||||
* Please provide unified format diffs (run diff -u).
|
||||
|
||||
* Call your patch something more meaningfull than hexchat.diff.
|
||||
|
||||
* To make a really nice and clean patch, do something like this:
|
||||
|
||||
* Have two directories, unpacked from the original archive:
|
||||
|
||||
<pre>hexchat-2.9.0/
|
||||
hexchat-2.9.0p1/</pre>
|
||||
|
||||
* Then edit/compile the hexchat-2.9.0p1 directory. To create a patch:
|
||||
|
||||
* Windows:
|
||||
|
||||
<pre>rmdir /q /s hexchat-2.9.0p1/win32/build
|
||||
rmdir /q /s hexchat-2.9.0p1/win32/build-xp
|
||||
diff -ruN --strip-trailing-cr hexchat-2.9.0 hexchat-2.9.0p1 > hexchat-something.diff
|
||||
</pre>
|
||||
|
||||
* Unix:
|
||||
|
||||
<pre>diff -ruN hexchat-2.9.0 hexchat-2.9.0p1 > hexchat-something.diff</pre>
|
||||
|
||||
* Patches are only accepted as a Github Pull request: https://help.github.com/articles/using-pull-requests
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user