aboutsummaryrefslogtreecommitdiffstats
path: root/cgit.c
diff options
context:
space:
mode:
authorLukas Fleischer2013-03-03 16:04:29 +0100
committerLukas Fleischer2013-03-04 01:12:48 +0100
commit53bc747d311d18642fa3ad0cc0de34f3899ed1f4 (patch)
tree97e6fa2e4e7300f55a180917059b71e566c260fe /cgit.c
parent7f4e8c33aeb65bdc5695c9fd13ec1ceb100303c7 (diff)
downloadcgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.tar.gz
cgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.tar.bz2
cgit-53bc747d311d18642fa3ad0cc0de34f3899ed1f4.zip
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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/cgit.c b/cgit.c
index d615315..0807258 100644
--- a/cgit.c
+++ b/cgit.c
@@ -741,7 +741,7 @@ static void cgit_parse_args(int argc, const char **argv)
741 741
742 for (i = 1; i < argc; i++) { 742 for (i = 1; i < argc; i++) {
743 if (!strncmp(argv[i], "--cache=", 8)) { 743 if (!strncmp(argv[i], "--cache=", 8)) {
744 ctx.cfg.cache_root = xstrdup(argv[i]+8); 744 ctx.cfg.cache_root = xstrdup(argv[i] + 8);
745 } 745 }
746 if (!strcmp(argv[i], "--nocache")) { 746 if (!strcmp(argv[i], "--nocache")) {
747 ctx.cfg.nocache = 1; 747 ctx.cfg.nocache = 1;
@@ -750,24 +750,24 @@ static void cgit_parse_args(int argc, const char **argv)
750 ctx.env.no_http = "1"; 750 ctx.env.no_http = "1";
751 } 751 }
752 if (!strncmp(argv[i], "--query=", 8)) { 752 if (!strncmp(argv[i], "--query=", 8)) {
753 ctx.qry.raw = xstrdup(argv[i]+8); 753 ctx.qry.raw = xstrdup(argv[i] + 8);
754 } 754 }
755 if (!strncmp(argv[i], "--repo=", 7)) { 755 if (!strncmp(argv[i], "--repo=", 7)) {
756 ctx.qry.repo = xstrdup(argv[i]+7); 756 ctx.qry.repo = xstrdup(argv[i] + 7);
757 } 757 }
758 if (!strncmp(argv[i], "--page=", 7)) { 758 if (!strncmp(argv[i], "--page=", 7)) {
759 ctx.qry.page = xstrdup(argv[i]+7); 759 ctx.qry.page = xstrdup(argv[i] + 7);
760 } 760 }
761 if (!strncmp(argv[i], "--head=", 7)) { 761 if (!strncmp(argv[i], "--head=", 7)) {
762 ctx.qry.head = xstrdup(argv[i]+7); 762 ctx.qry.head = xstrdup(argv[i] + 7);
763 ctx.qry.has_symref = 1; 763 ctx.qry.has_symref = 1;
764 } 764 }
765 if (!strncmp(argv[i], "--sha1=", 7)) { 765 if (!strncmp(argv[i], "--sha1=", 7)) {
766 ctx.qry.sha1 = xstrdup(argv[i]+7); 766 ctx.qry.sha1 = xstrdup(argv[i] + 7);
767 ctx.qry.has_sha1 = 1; 767 ctx.qry.has_sha1 = 1;
768 } 768 }
769 if (!strncmp(argv[i], "--ofs=", 6)) { 769 if (!strncmp(argv[i], "--ofs=", 6)) {
770 ctx.qry.ofs = atoi(argv[i]+6); 770 ctx.qry.ofs = atoi(argv[i] + 6);
771 } 771 }
772 if (!strncmp(argv[i], "--scan-tree=", 12) || 772 if (!strncmp(argv[i], "--scan-tree=", 12) ||
773 !strncmp(argv[i], "--scan-path=", 12)) { 773 !strncmp(argv[i], "--scan-path=", 12)) {
@@ -834,7 +834,7 @@ int main(int argc, const char **argv)
834 ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/'); 834 ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/');
835 if (!ctx.cfg.virtual_root) 835 if (!ctx.cfg.virtual_root)
836 ctx.cfg.virtual_root = ""; 836 ctx.cfg.virtual_root = "";
837 } 837 }
838 838
839 /* If no url parameter is specified on the querystring, lets 839 /* If no url parameter is specified on the querystring, lets
840 * use PATH_INFO as url. This allows cgit to work with virtual 840 * use PATH_INFO as url. This allows cgit to work with virtual
@@ -856,7 +856,7 @@ int main(int argc, const char **argv)
856 } 856 }
857 857
858 ttl = calc_ttl(); 858 ttl = calc_ttl();
859 ctx.page.expires += ttl*60; 859 ctx.page.expires += ttl * 60;
860 if (ctx.env.request_method && !strcmp(ctx.env.request_method, "HEAD")) 860 if (ctx.env.request_method && !strcmp(ctx.env.request_method, "HEAD"))
861 ctx.cfg.nocache = 1; 861 ctx.cfg.nocache = 1;
862 if (ctx.cfg.nocache) 862 if (ctx.cfg.nocache)