From: Franz Fellner <alpine.art.de@gmail.com>
To: David Bremner <david@tethera.net>,
Tomi Ollila <tomi.ollila@iki.fi>,
notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: Re: [PATCH] lib/database.cc: fix misleading indentation
Date: Fri, 21 Oct 2016 06:42:37 +0000 [thread overview]
Message-ID: <1.477.032.157-ner-5.771@TP_L520> (raw)
In-Reply-To: <87h986k2kj.fsf@tethera.net>
On Thu, 20 Oct 2016 20:45:00 -0300, David Bremner <david@tethera.net> wrote:
> Franz Fellner <alpine.art.de@gmail.com> writes:
>
> > From a quick visual scan at least half the indented lines start with 4 spaces
> > instead of TABS. As I understand the quoted paragraph that should be wrong.
> >
>
> Can you be specific what what lines in what file? I have the feeling
> you're misinterpreting something, or looking at a different file.
This is from lib/database.cc:
const char *
_find_prefix (const char *name)
{
unsigned int i;
for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_INTERNAL); i++) {
if (strcmp (name, BOOLEAN_PREFIX_INTERNAL[i].name) == 0)
return BOOLEAN_PREFIX_INTERNAL[i].prefix;
}
for (i = 0; i < ARRAY_SIZE (BOOLEAN_PREFIX_EXTERNAL); i++) {
if (strcmp (name, BOOLEAN_PREFIX_EXTERNAL[i].name) == 0)
return BOOLEAN_PREFIX_EXTERNAL[i].prefix;
}
for (i = 0; i < ARRAY_SIZE (PROBABILISTIC_PREFIX); i++) {
if (strcmp (name, PROBABILISTIC_PREFIX[i].name) == 0)
return PROBABILISTIC_PREFIX[i].prefix;
}
INTERNAL_ERROR ("No prefix exists for '%s'\n", name);
return "";
}
I set ":set list" and ":set listchars=tab:>-" to visualize tabs in vim. This shows me
* the first two codelines (leaving out empty lines) are indented by 4 spaces
* the first line in the first for loop is indented by only one TAB (IMHO should be
two, because it is one leven down): this is a pattern you can find throughout the
codebase.
* the next two lines are indented by four spaces
* the first line of the second for-loop is indented by one TAB.
* and so on...
Am I misinterpreting something here? Is this intended to be done that way?
I also get confused by the different lengths of TAB/space-indenting. But probably
that's because I never used it...
next prev parent reply other threads:[~2016-10-21 6:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 15:06 [PATCH] lib/database.cc: fix misleading indentation Tomi Ollila
2016-09-28 11:20 ` David Bremner
2016-10-20 12:54 ` Franz Fellner
2016-10-20 16:47 ` David Bremner
2016-10-20 18:30 ` Franz Fellner
2016-10-20 23:45 ` David Bremner
2016-10-21 6:42 ` Franz Fellner [this message]
2016-10-21 7:01 ` Mark Walters
2016-10-21 13:54 ` editorconfig David Bremner
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
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1.477.032.157-ner-5.771@TP_L520 \
--to=alpine.art.de@gmail.com \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).