cosmetics, divide source more visible
authorChristian Thaeter <ct@pipapo.org>
Tue, 8 Jan 2008 00:18:33 +0000 (01:18 +0100)
committerChristian Thaeter <ct@pipapo.org>
Tue, 8 Jan 2008 00:18:33 +0000 (01:18 +0100)
src/actions.c
src/repo.c
src/repo.h

index f3ff404..69e22ae 100644 (file)
@@ -34,6 +34,9 @@
 #include <stdio.h>
 
 
+/*
+  Main (repository list) page
+*/
 static Html
 webgit_main_menu_action (struct webgit_query* query)
 {
@@ -83,6 +86,8 @@ webgit_main_content_action (struct webgit_query* query)
                                           html(
                                                webgit_log_link (query, n, n->last_head, html("Log")),
                                                " ",
+
+                                               "Diff ",
                                                //webgit_diff_link (query, n, n->last_head, html("Diff")),
                                                //" ",
                                                webgit_object_link (query,
@@ -108,24 +113,42 @@ webgit_main_action (struct webgit_query* query)
               );
 }
 
+
+/*
+  Summary of a single repository
+*/
 static Html
 webgit_summary_action (struct webgit_query* query)
 {
   return html("summary");
 }
 
+
+/*
+  Log page
+*/
 static Html
 webgit_log_action (struct webgit_query* query)
 {
+  
+
   return html("log");
 }
 
+
+/*
+  Diff page
+*/
 static Html
 webgit_diff_action (struct webgit_query* query)
 {
   return html("diff");
 }
 
+
+/*
+  pretty printed objects
+*/
 static Html
 webgit_object_action (struct webgit_query* query)
 {
@@ -177,24 +200,38 @@ webgit_tree_action (struct webgit_query* query)
 }
 
 
+/*
+  spew out raw data only
+*/
 static Html
 webgit_raw_action (struct webgit_query* query)
 {
   return html("raw");
 }
 
+
+/*
+  show tag
+*/
 static Html
 webgit_tag_action (struct webgit_query* query)
 {
   return html("tag");
 }
 
+
+/*
+  edit an object
+*/
 static Html
 webgit_edit_action (struct webgit_query* query)
 {
   return html("edit");
 }
 
+/*
+  commit changes
+*/
 static Html
 webgit_commit_action (struct webgit_query* query)
 {
@@ -205,10 +242,10 @@ webgit_commit_action (struct webgit_query* query)
 Html
 webgit_action_dispatch (struct webgit_query* query)
 {
-#define WEBGIT_ACTION(name, _)                   \
+#define WEBGIT_ACTION(name, _)                  \
 {                                               \
  #name,                                         \
- webgit_##name##_action,                         \
+ webgit_##name##_action,                        \
 },
   struct action_table{
     char* name;
index 7eb13e8..7d79e29 100644 (file)
 
 Html
 webgit_repo_link (struct webgit_query* query,
-                 const char* repo_prefix,
-                 int repo_prefix_len,
-                 const char* repo,
-                 int repo_len,
-                 const char* object,
-                 int object_len,
-                 const char* action,
-                 Html text)
+                  const char* repo_prefix,
+                  int repo_prefix_len,
+                  const char* repo,
+                  int repo_len,
+                  const char* object,
+                  int object_len,
+                  const char* action,
+                  Html text)
 {
   return html (
                html_tag ("a",
@@ -284,8 +284,6 @@ webgit_repoinfo_new (struct webgit_query* query, const char* path)
         }
     }
 
-
-
   /* find 'last' information */
   struct webgit_repo_info ri;
   ri.last_commit = NULL;
index ddb876a..f808b7e 100644 (file)
 
 Html
 webgit_repo_link (struct webgit_query* query,
-                 const char* repo_prefix,
-                 int repo_prefix_len,
-                 const char* repo,
-                 int repo_len,
-                 const char* object,
-                 int object_len,
-                 const char* action,
-                 Html text);
+                  const char* repo_prefix,
+                  int repo_prefix_len,
+                  const char* repo,
+                  int repo_len,
+                  const char* object,
+                  int object_len,
+                  const char* action,
+                  Html text);
 
 
 //int