libcaca-style man page on Slackware

Man page or keyword search:  
man Server   14563 pages
apropos Keyword Search (all sections)
Output format
Slackware logo
[printable version]

libcaca-style(3caca)		    libcaca		  libcaca-style(3caca)

NAME
       libcaca-style - Libcaca coding style

General guidelines
       A pretty safe rule of thumb is: look at what has already been done and
       try to do the same.

       · Tabulations should be avoided and replaced with eight spaces.

	 · Indentation is generally 4 spaces.

	 · Lines should wrap at most at 79 characters.

	 · Do not leave whitespace at the end of lines.

	 · Do not use multiple spaces for anything else than indentation.

	 · Code qui fait des warnings == code de porc == deux baffes dans ta
	   gueule

C coding style
       Try to use short names whenever possible (i for indices, w for width,
       cv for canvas...). Macros are always uppercase, variable and function
       names are always lowercase. Use the underscore to separate words within
       names:

       #define BROKEN 0
       #define MAX(x, y) ((x > y) ? (x) : (y))

       unsigned int x, y, w, h;
       char *font_name;
       void frobulate_every_three_seconds(void);

       const is a suffix. It's char const *foo, not const char *foo.

       Use spaces after commas and between operators. Do not use spaces after
       an opening parenthesis or before a closing one:

       a += 2;
       b = (a * (c + d));
       x = min(x1, x2, x3);

       Do not put a space between functions and the corresponding opening
       parenthesis:

       int function(int);

       A space can be inserted after keywords such as for, while or if, but
       consistency with the rest of the page is encouraged:

       if(a == b)
	   return;

       if (p == NULL)

       Do not put parentheses around return values:

       return a + (b & x) + d[10];

       Opening braces should be on a line of their own, aligned with the
       current block. Braces are optional for one-liners:

       int function(int a)
       {
	   if(a & 0x84)
	       return a;

	   if(a < 0)
	   {
	       return -a;
	   }
	   else
	   {
	       a /= 2;

	       switch(a)
	       {
		   case 0:
		   case 1:
		       return -1;
		       break;
		   default:
		       return a;
	       }
	   }
       }

C++ coding style
       Nothing here yet.

Version 0.99.beta18		Tue Jun 19 2012		  libcaca-style(3caca)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Slackware

List of man pages available for Slackware

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net