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;
|
||||
scat(scat(scat(srcpath, "inc/"), scpy(s, filename, 64)), ".htm");
|
||||
if (head)
|
||||
fprintf(f, "<h2 id='%s'><a href='%s.html'>%s</a></h2>",
|
||||
scsw(filename, ' ', '_'), filename, s);
|
||||
fprintf(
|
||||
f,
|
||||
"<h2 id='%s'><a href='%s.html'>%s</a></h2>",
|
||||
scsw(filename, ' ', '_'),
|
||||
filename,
|
||||
s);
|
||||
fpinject(f, l, srcpath);
|
||||
l->refs[target]++;
|
||||
return 1;
|
||||
|
@ -151,7 +155,8 @@ FILE *build(FILE *f, Lexicon *l, char *name, char *srcpath) {
|
|||
/* begin */
|
||||
fputs("<!DOCTYPE html><html lang='en'>", f);
|
||||
fputs("<head>", f);
|
||||
fprintf(f,
|
||||
fprintf(
|
||||
f,
|
||||
"<meta charset='utf-8'>"
|
||||
"<meta name='description' content='%s'/>"
|
||||
"<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 {
|
||||
fputs("<link rel='stylesheet' type='text/css' href='" MAINCSS "'>", f);
|
||||
}
|
||||
fprintf(f,
|
||||
fprintf(
|
||||
f,
|
||||
"<link rel='shortcut icon' href='/favicon.ico'>"
|
||||
"<title>" NAME " — %s</title>",
|
||||
name);
|
||||
|
@ -196,7 +202,8 @@ FILE *build(FILE *f, Lexicon *l, char *name, char *srcpath) {
|
|||
/* footer */
|
||||
fputs("<footer>", f);
|
||||
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);
|
||||
fputs("(<a href='keys.html'>keys</a>)", f);
|
||||
/* fputs("<a href='" LICENSE "' target='_blank'>BY-NC-SA 4.0</a>", f) */;
|
||||
|
|
Loading…
Reference in a new issue