libcaca-style - Online Linux Manual PageSection : 3caca
Updated : Tue Jan 26 2021
Source : Version 0.99.beta19
Note : libcaca
NAMElibcaca-style − Libcaca coding style
General guidelinesA 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 styleTry 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 styleNothing here yet. 0
Johanes Gumabo
Data Size : 10,576 byte
man-libcaca-style.3cacaBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 239,079
Visitor ID : :
Visitor IP : 18.117.105.184 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.