add my .clang-format
This commit is contained in:
parent
836e861d99
commit
ff4700df5a
2 changed files with 58 additions and 28 deletions
23
.clang-format
Normal file
23
.clang-format
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
TabWidth: 2
|
||||||
|
IndentWidth: 2
|
||||||
|
ContinuationIndentWidth: 2
|
||||||
|
UseTab: Never
|
||||||
|
AllowShortBlocksOnASingleLine: Always
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortEnumsOnASingleLine: true
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 255
|
||||||
|
IndentCaseLabels: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
AlignAfterOpenBracket: AlwaysBreak
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackArguments: false
|
||||||
|
PointerAlignment: Left
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
SortIncludes: false
|
||||||
|
AllowAllArgumentsOnNextLine: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
|
17
main.c
17
main.c
|
@ -94,8 +94,12 @@ int fpportal(FILE *f, Lexicon *l, char *s, int head) {
|
||||||
filename[0] = 0;
|
filename[0] = 0;
|
||||||
scat(scat(scat(srcpath, "inc/"), scpy(s, filename, 64)), ".htm");
|
scat(scat(scat(srcpath, "inc/"), scpy(s, filename, 64)), ".htm");
|
||||||
if (head)
|
if (head)
|
||||||
fprintf(f, "<h2 id='%s'><a href='%s.html'>%s</a></h2>",
|
fprintf(
|
||||||
scsw(filename, ' ', '_'), filename, s);
|
f,
|
||||||
|
"<h2 id='%s'><a href='%s.html'>%s</a></h2>",
|
||||||
|
scsw(filename, ' ', '_'),
|
||||||
|
filename,
|
||||||
|
s);
|
||||||
fpinject(f, l, srcpath);
|
fpinject(f, l, srcpath);
|
||||||
l->refs[target]++;
|
l->refs[target]++;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -151,7 +155,8 @@ FILE *build(FILE *f, Lexicon *l, char *name, char *srcpath) {
|
||||||
/* begin */
|
/* begin */
|
||||||
fputs("<!DOCTYPE html><html lang='en'>", f);
|
fputs("<!DOCTYPE html><html lang='en'>", f);
|
||||||
fputs("<head>", f);
|
fputs("<head>", f);
|
||||||
fprintf(f,
|
fprintf(
|
||||||
|
f,
|
||||||
"<meta charset='utf-8'>"
|
"<meta charset='utf-8'>"
|
||||||
"<meta name='description' content='%s'/>"
|
"<meta name='description' content='%s'/>"
|
||||||
"<meta name='viewport' content='width=device-width,initial-scale=1'>",
|
"<meta name='viewport' content='width=device-width,initial-scale=1'>",
|
||||||
|
@ -161,7 +166,8 @@ FILE *build(FILE *f, Lexicon *l, char *name, char *srcpath) {
|
||||||
} else {
|
} else {
|
||||||
fputs("<link rel='stylesheet' type='text/css' href='" MAINCSS "'>", f);
|
fputs("<link rel='stylesheet' type='text/css' href='" MAINCSS "'>", f);
|
||||||
}
|
}
|
||||||
fprintf(f,
|
fprintf(
|
||||||
|
f,
|
||||||
"<link rel='shortcut icon' href='/favicon.ico'>"
|
"<link rel='shortcut icon' href='/favicon.ico'>"
|
||||||
"<title>" NAME " — %s</title>",
|
"<title>" NAME " — %s</title>",
|
||||||
name);
|
name);
|
||||||
|
@ -196,7 +202,8 @@ FILE *build(FILE *f, Lexicon *l, char *name, char *srcpath) {
|
||||||
/* footer */
|
/* footer */
|
||||||
fputs("<footer>", f);
|
fputs("<footer>", f);
|
||||||
fpedited(f, srcpath);
|
fpedited(f, srcpath);
|
||||||
fputs("contact: <a href='mailto://drkste@zoho.com'>drkste@zoho.com</a> ",
|
fputs(
|
||||||
|
"contact: <a href='mailto://drkste@zoho.com'>drkste@zoho.com</a> ",
|
||||||
f);
|
f);
|
||||||
fputs("(<a href='keys.html'>keys</a>)", f);
|
fputs("(<a href='keys.html'>keys</a>)", f);
|
||||||
/* fputs("<a href='" LICENSE "' target='_blank'>BY-NC-SA 4.0</a>", f) */;
|
/* fputs("<a href='" LICENSE "' target='_blank'>BY-NC-SA 4.0</a>", f) */;
|
||||||
|
|
Loading…
Reference in a new issue