diff options
author | Lukas Fleischer <cgit@cryptocrack.de> | 2013-03-03 16:04:29 +0100 |
---|---|---|
committer | Lukas Fleischer <cgit@cryptocrack.de> | 2013-03-04 01:12:48 +0100 |
commit | 53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (patch) | |
tree | 97e6fa2e4e7300f55a180917059b71e566c260fe /cgit.c | |
parent | 7f4e8c33aeb65bdc5695c9fd13ec1ceb100303c7 (diff) | |
download | cgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.tar.gz cgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.tar.xz |
Fix several whitespace errors
* Remove whitespace at the end of lines.
* Replace space indentation by tabs.
* Add whitespace before/after several operators ("+", "-", "*", ...)
* Add whitespace to assignments ("foo = bar;").
* Fix whitespace in parameter lists ("foobar(foo, bar, 42)").
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -741,7 +741,7 @@ static void cgit_parse_args(int argc, const char **argv) for (i = 1; i < argc; i++) { if (!strncmp(argv[i], "--cache=", 8)) { - ctx.cfg.cache_root = xstrdup(argv[i]+8); + ctx.cfg.cache_root = xstrdup(argv[i] + 8); } if (!strcmp(argv[i], "--nocache")) { ctx.cfg.nocache = 1; @@ -750,24 +750,24 @@ static void cgit_parse_args(int argc, const char **argv) ctx.env.no_http = "1"; } if (!strncmp(argv[i], "--query=", 8)) { - ctx.qry.raw = xstrdup(argv[i]+8); + ctx.qry.raw = xstrdup(argv[i] + 8); } if (!strncmp(argv[i], "--repo=", 7)) { - ctx.qry.repo = xstrdup(argv[i]+7); + ctx.qry.repo = xstrdup(argv[i] + 7); } if (!strncmp(argv[i], "--page=", 7)) { - ctx.qry.page = xstrdup(argv[i]+7); + ctx.qry.page = xstrdup(argv[i] + 7); } if (!strncmp(argv[i], "--head=", 7)) { - ctx.qry.head = xstrdup(argv[i]+7); + ctx.qry.head = xstrdup(argv[i] + 7); ctx.qry.has_symref = 1; } if (!strncmp(argv[i], "--sha1=", 7)) { - ctx.qry.sha1 = xstrdup(argv[i]+7); + ctx.qry.sha1 = xstrdup(argv[i] + 7); ctx.qry.has_sha1 = 1; } if (!strncmp(argv[i], "--ofs=", 6)) { - ctx.qry.ofs = atoi(argv[i]+6); + ctx.qry.ofs = atoi(argv[i] + 6); } if (!strncmp(argv[i], "--scan-tree=", 12) || !strncmp(argv[i], "--scan-path=", 12)) { @@ -834,7 +834,7 @@ int main(int argc, const char **argv) ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/'); if (!ctx.cfg.virtual_root) ctx.cfg.virtual_root = ""; - } + } /* If no url parameter is specified on the querystring, lets * use PATH_INFO as url. This allows cgit to work with virtual @@ -856,7 +856,7 @@ int main(int argc, const char **argv) } ttl = calc_ttl(); - ctx.page.expires += ttl*60; + ctx.page.expires += ttl * 60; if (ctx.env.request_method && !strcmp(ctx.env.request_method, "HEAD")) ctx.cfg.nocache = 1; if (ctx.cfg.nocache) |