1 Just some tips if you're going to help with xchat code (patches etc):
3 * Use tabs, not spaces, to indent code.
5 * Use a tab size of 3 (most editors will let you choose this).
6 Type :set ts=3 in vim/gvim.
8 * Try to stick to the same consistant coding style:
13 if (function (a, b, c))
19 (vertically aligned braces, a space after if, while, functions etc).
21 * Don't use "//" C++ style comments, some compilers don't like them.
23 * When opening a file with unix level functions (open, read/write, close)
24 as opposed to the C-level functions (fopen, fwrite/fread, fclose), use
25 the OFLAGS macro. This makes sure it'll work on Win32 aswell as unix e.g:
27 fh = open ("file", OFLAGS | O_RDONLY);
29 * Use closesocket() for sockets, and close() for normal files.
31 * Don't read() from sockets, instead use recv().
33 * Please provide unified format diffs (run diff -u).
35 * Call your patch something more meaningfull than xchat.diff (I get a
36 million of these files!).
38 * To make a really nice and clean patch, do something like this:
40 Have two directories, unpacked from the original archive:
43 Then edit/compile the xchat-2.0.0p1 directory. When you're done, make
49 diff -urN xchat-2.0.0 xchat-2.0.0p1 > xchat-something.diff
51 If using nmake (Windows) replace "make distclean" with "nmake -f makefile.msc clean"