mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-22 17:22:18 -05:00
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.):
|
* Try to stick to the same consistant coding style (vertically aligned braces, a space after if, while, functions etc.):
|
||||||
|
|
||||||
<pre>void
|
```C
|
||||||
routine (void)
|
void
|
||||||
|
routine (void)
|
||||||
|
{
|
||||||
|
if (function (a, b, c))
|
||||||
{
|
{
|
||||||
if (function (a, b, c))
|
x = a + 1;
|
||||||
{
|
}
|
||||||
x = a + 1;
|
}
|
||||||
}
|
```
|
||||||
}</pre>
|
|
||||||
|
|
||||||
* Don't use "//" C++ style comments, some compilers don't like them.
|
* 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.
|
* Don't read() from sockets, use recv() instead.
|
||||||
|
|
||||||
* Please provide unified format diffs (run diff -u).
|
* Patches are only accepted as a Github Pull request: https://help.github.com/articles/using-pull-requests
|
||||||
|
|
||||||
* 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>
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user