summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 527b9d7)
raw | patch | inline | side by side (parent: 527b9d7)
author | Stephen Boyd <bebarino@gmail.com> | |
Fri, 18 Dec 2009 00:05:28 +0000 (16:05 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Dec 2009 05:54:28 +0000 (21:54 -0800) |
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/api-strbuf.txt | patch | blob | history |
index 7438149249364ca8837811771b072b20990b3a5d..a0e0f850f83fe164dd7c1ca87d001fe485ba2ec2 100644 (file)
strbufs has some invariants that are very important to keep in mind:
-. The `buf` member is never NULL, so you it can be used in any usual C
+. The `buf` member is never NULL, so it can be used in any usual C
string operations safely. strbuf's _have_ to be initialized either by
`strbuf_init()` or by `= STRBUF_INIT` before the invariants, though.
+
* `struct strbuf`
-This is string buffer structure. The `len` member can be used to
+This is the string buffer structure. The `len` member can be used to
determine the current length of the string, and `buf` member provides access to
the string itself.
comments are considered contents to be removed or not.
`launch_editor`::
+
+ Launch the user preferred editor to edit a file and fill the buffer
+ with the file's contents upon the user completing their editing. The
+ third argument can be used to set the environment which the editor is
+ run in. If the buffer is NULL the editor is launched as usual but the
+ file's contents are not read into the buffer upon completion.