git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] nested expansion
@ 2009-10-19  7:30 Junio C Hamano
  2009-10-19  7:30 ` [PATCH v2 1/3] strbuf_nested_expand(): allow expansion to interrupt in the middle Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-10-19  7:30 UTC (permalink / raw)
  To: git

This is a re-roll of the earlier "general syntax for applying functions to
pretty-print format output" series, rebased on two patches from Dscho to
implement strbuf_add_wrapped_text().  In other words, this will apply on
top of b4d784c (Add strbuf_add_wrapped_text() to utf8.[ch], 2008-11-10).

The first one is almost the same, except that it drops the unnecessary
cast (pointed out by Dscho) and instead changes the type of return value
from expand callback to ssize_t.

The second one has two changes:

 1. w() is renamed to wrap();
 2. it actually rewraps the text by using Dscho's strbuf_add_wrapped_text().

The third one is new.  It teaches wrap() to just indent without wrapping
when the width parameter is zero or negative.

Junio C Hamano (3):
  strbuf_nested_expand(): allow expansion to interrupt in the middle
  Add %[wrap(width,in1,in2)<<any-string>>%] implementation
  Teach --wrap to only indent without wrapping

 pretty.c |   80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 strbuf.c |   29 +++++++++++++++++-----
 strbuf.h |    5 ++-
 utf8.c   |   13 ++++++++++
 4 files changed, 115 insertions(+), 11 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-19  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19  7:30 [PATCH v2 0/3] nested expansion Junio C Hamano
2009-10-19  7:30 ` [PATCH v2 1/3] strbuf_nested_expand(): allow expansion to interrupt in the middle Junio C Hamano
2009-10-19  7:30 ` [PATCH v2 2/3] Add %[wrap(width,in1,in2)<<any-string>>%] implementation Junio C Hamano
2009-10-19  7:30 ` [PATCH v2 3/3] Teach --wrap to only indent without wrapping Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).