Skip to content

Commit 14e2177

Browse files
peffgitster
authored andcommitted
strbuf.h: reorganize api function grouping headers
The original API doc had something like: Functions --------- * Life cycle ... some life-cycle functions ... * Related to the contents of the buffer ... functions related to contents .... etc This grouping can be hard to read in the comment sources, given the "*" in the comment lines, and the amount of text between each section. Instead, let's make a flat list of groupings, and underline each as a section header. That makes them stand out, and eliminates the weird half-phrase of "Related to...". Like: Functions related to the contents of the buffer ----------------------------------------------- Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 088c9a8 commit 14e2177

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

strbuf.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,8 @@ extern char strbuf_slopbuf[];
7171
#define STRBUF_INIT { 0, 0, strbuf_slopbuf }
7272

7373
/**
74-
* Functions
75-
* ---------
76-
*/
77-
78-
/**
79-
* * Life Cycle
74+
* Life Cycle Functions
75+
* --------------------
8076
*/
8177

8278
/**
@@ -120,7 +116,8 @@ static inline void strbuf_swap(struct strbuf *a, struct strbuf *b)
120116

121117

122118
/**
123-
* * Related to the size of the buffer
119+
* Functions related to the size of the buffer
120+
* -------------------------------------------
124121
*/
125122

126123
/**
@@ -162,7 +159,8 @@ static inline void strbuf_setlen(struct strbuf *sb, size_t len)
162159

163160

164161
/**
165-
* * Related to the contents of the buffer
162+
* Functions related to the contents of the buffer
163+
* -----------------------------------------------
166164
*/
167165

168166
/**
@@ -201,7 +199,8 @@ extern int strbuf_cmp(const struct strbuf *, const struct strbuf *);
201199

202200

203201
/**
204-
* * Adding data to the buffer
202+
* Adding data to the buffer
203+
* -------------------------
205204
*
206205
* NOTE: All of the functions in this section will grow the buffer as
207206
* necessary. If they fail for some reason other than memory shortage and the

0 commit comments

Comments
 (0)