Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

graph.c: mark private file-scope symbols as static

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information...
commit ba35480439d05b8f6cca50527072194fe3278bbb 1 parent d2aea13
Junio C Hamano authored

Showing 2 changed files with 30 additions and 29 deletions. Show diff stats Hide diff stats

  1. 32  graph.c
  2. 27  graph.h
32  graph.c
@@ -8,6 +8,34 @@
8 8
 /* Internal API */
9 9
 
10 10
 /*
  11
+ * Output the next line for a graph.
  12
+ * This formats the next graph line into the specified strbuf.  It is not
  13
+ * terminated with a newline.
  14
+ *
  15
+ * Returns 1 if the line includes the current commit, and 0 otherwise.
  16
+ * graph_next_line() will return 1 exactly once for each time
  17
+ * graph_update() is called.
  18
+ */
  19
+static int graph_next_line(struct git_graph *graph, struct strbuf *sb);
  20
+
  21
+/*
  22
+ * Set up a custom scheme for column colors.
  23
+ *
  24
+ * The default column color scheme inserts ANSI color escapes to colorize
  25
+ * the graph. The various color escapes are stored in an array of strings
  26
+ * where each entry corresponds to a color, except for the last entry,
  27
+ * which denotes the escape for resetting the color back to the default.
  28
+ * When generating the graph, strings from this array are inserted before
  29
+ * and after the various column characters.
  30
+ *
  31
+ * This function allows you to enable a custom array of color escapes.
  32
+ * The 'colors_max' argument is the index of the last "reset" entry.
  33
+ *
  34
+ * This functions must be called BEFORE graph_init() is called.
  35
+ */
  36
+static void graph_set_column_colors(const char **colors, unsigned short colors_max);
  37
+
  38
+/*
11 39
  * Output a padding line in the graph.
12 40
  * This is similar to graph_next_line().  However, it is guaranteed to
13 41
  * never print the current commit line.  Instead, if the commit line is
@@ -62,7 +90,7 @@ enum graph_state {
62 90
 static const char **column_colors;
63 91
 static unsigned short column_colors_max;
64 92
 
65  
-void graph_set_column_colors(const char **colors, unsigned short colors_max)
  93
+static void graph_set_column_colors(const char **colors, unsigned short colors_max)
66 94
 {
67 95
 	column_colors = colors;
68 96
 	column_colors_max = colors_max;
@@ -1116,7 +1144,7 @@ static void graph_output_collapsing_line(struct git_graph *graph, struct strbuf
1116 1144
 		graph_update_state(graph, GRAPH_PADDING);
1117 1145
 }
1118 1146
 
1119  
-int graph_next_line(struct git_graph *graph, struct strbuf *sb)
  1147
+static int graph_next_line(struct git_graph *graph, struct strbuf *sb)
1120 1148
 {
1121 1149
 	switch (graph->state) {
1122 1150
 	case GRAPH_PADDING:
27  graph.h
@@ -4,22 +4,6 @@
4 4
 /* A graph is a pointer to this opaque structure */
5 5
 struct git_graph;
6 6
 
7  
-/*
8  
- * Set up a custom scheme for column colors.
9  
- *
10  
- * The default column color scheme inserts ANSI color escapes to colorize
11  
- * the graph. The various color escapes are stored in an array of strings
12  
- * where each entry corresponds to a color, except for the last entry,
13  
- * which denotes the escape for resetting the color back to the default.
14  
- * When generating the graph, strings from this array are inserted before
15  
- * and after the various column characters.
16  
- *
17  
- * This function allows you to enable a custom array of color escapes.
18  
- * The 'colors_max' argument is the index of the last "reset" entry.
19  
- *
20  
- * This functions must be called BEFORE graph_init() is called.
21  
- */
22  
-void graph_set_column_colors(const char **colors, unsigned short colors_max);
23 7
 
24 8
 /*
25 9
  * Create a new struct git_graph.
@@ -49,17 +33,6 @@ void graph_update(struct git_graph *graph, struct commit *commit);
49 33
  */
50 34
 int graph_is_commit_finished(struct git_graph const *graph);
51 35
 
52  
-/*
53  
- * Output the next line for a graph.
54  
- * This formats the next graph line into the specified strbuf.  It is not
55  
- * terminated with a newline.
56  
- *
57  
- * Returns 1 if the line includes the current commit, and 0 otherwise.
58  
- * graph_next_line() will return 1 exactly once for each time
59  
- * graph_update() is called.
60  
- */
61  
-int graph_next_line(struct git_graph *graph, struct strbuf *sb);
62  
-
63 36
 
64 37
 /*
65 38
  * graph_show_*: helper functions for printing to stdout

0 notes on commit ba35480

Please sign in to comment.
Something went wrong with that request. Please try again.