Merge prog_std.txt into coding_style.md

master
Pavel Roskin 8 years ago
parent c9108242cd
commit acdfc94511

@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
AM_DISTCHECK_CONFIGURE_FLAGS = --without-systemdsystemunitdir
EXTRA_DIST = bootstrap COPYING coding_style.md design.txt faq-compile.txt \
faq-general.txt file-loc.txt install.txt m4 prog_std.txt readme.txt
faq-general.txt file-loc.txt install.txt m4 readme.txt
if XRDP_NEUTRINORDP
NEUTRINORDPDIR = neutrinordp

@ -15,6 +15,13 @@ Here is how we run the astyle command:
This coding style is a work in progress and is still evolving.
Language Standard
-----------------
Try to make all code compile with both C and C++ compiler. C++ is more
strict, which makes the code safer.
Indentation
-----------
@ -32,7 +39,7 @@ Indentation
Line wrapping
-------------
* Keep lines shorter than 80 chars
* Keep lines not longer than 80 chars
* Align wrapped argument to the first argument
@ -46,9 +53,11 @@ Variable names
* Use lowercase with underscores as needed
* Don't use camelCase
* Preprocessor constants should be uppercase
#define BUF_SIZE 1024
int fd;
int bytes_in_stream;
@ -193,3 +202,9 @@ Braces
default:
printf("bad cmd\n");
}
Comments
--------
Use /* */ for comments
Don't use //

@ -1,41 +0,0 @@
This is an attempt to explain my odd programming standard used for this project.
Not to defend any of these but it's my default standard and it makes it easy
for me to read code.
Some files break these rules, they will be updated eventually.
try to make any file compile with c++ compilers
always put one var on a line by itself
char* pvar;
char text[256];
not
char *pvar, text[256];
function calls look like this
foo(a, b, c);
not
foo ( a, b, c );
while, if, and case statements look like
while (i != 0)
not
while(i != 0)
for comments, always use /* */, not //
defines should always be uppercase
don't use tabs, use spaces
no line should exceed 80 chars
always use {} in if and while, even if it's only one line
while (p != 0)
{
p = p->next;
}
not
while (p != 0)
p = p->next;

@ -21,7 +21,7 @@ xup is a module used to connect to an rdp specific X11 server
Xserver is the files needed to build an rdp specific X11 server
COPYING is the license file
design.txt is an attempt to explain the project design
prog_std.txt is an attempt to explain the programming standard used
coding_style.md describes the coding style for the project
since version 0.5.0 we switch to autotools to build xrdp

Loading…
Cancel
Save