git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH v2 0/3] nested expansion
Date: Mon, 19 Oct 2009 00:30:11 -0700	[thread overview]
Message-ID: <1255937414-10043-1-git-send-email-gitster@pobox.com> (raw)

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(-)

             reply	other threads:[~2009-10-19  7:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19  7:30 Junio C Hamano [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1255937414-10043-1-git-send-email-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).