From 4f76c2b80c6b3fe320be6651540c1e86c373c379 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 14 Jul 2007 21:28:02 +0000 Subject: [PATCH] Metion the current code style in the new file called HACKING. In this, we could also add descriptions on how to send us patches and bug reports etc... --- HACKING | 32 ++++++++++++++++++++++++++++++++ Makefile.am | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 HACKING diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..4d20724 --- /dev/null +++ b/HACKING @@ -0,0 +1,32 @@ + +libssh2 source code style guide: + + - 4 level indent + - spaces-only (no tabs) + - open braces on the if/for line: + + if (banana) { + go_nuts(); + } + + - write both braces on the else line: + + if (banana) { + go_nuts(); + } else { + stay_calm(); + } + + - use braces even for single-statement blocks + + - keep source lines shorter than 80 columns + +------------ + + Older libssh2 code that still hasn't quite transitioned to the above + mentioned style, used a different style: + + - indented with tabs (only) + + - no line length limits + diff --git a/Makefile.am b/Makefile.am index a0a98a3..0f92e69 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ NETWAREFILES = nw/keepscreen.c \ nw/nwlibc.c \ nw/test/Makefile.netware -EXTRA_DIST = win32 buildconf $(NETWAREFILES) get_ver.awk +EXTRA_DIST = win32 buildconf $(NETWAREFILES) get_ver.awk HACKING ACLOCAL_AMFLAGS = -I m4