List for cgit developers and users
 help / color / mirror / Atom feed
From: list at eworm.de (Christian Hesse)
Subject: [PATCH 1/1] snapshot: strip bit from struct cgit_snapshot_format
Date: Mon, 11 Jun 2018 08:51:27 +0200	[thread overview]
Message-ID: <20180611085127.562dffcd@leda> (raw)
In-Reply-To: <20180609111648.GG1922@john.keeping.me.uk>

John Keeping <john at keeping.me.uk> on Sat, 2018/06/09 12:16:
> I think this would be nicer if we introduce a BIT macro like Linux has,
> something like:
> 
> 	#define BIT(x)	(1U << (x))

Reasonable. ;)

> but even better, can't we have something like:
> 
> 	static inline unsigned cgit_snapshot_bit(
> 		const struct cgit_snapshot_format *f)
> 	{
> 		return BIT(f - &cgit_snapshot_formats[0]);
> 	}
> 
> and avoid needing the loop index completely?

Ok, finally got the idea. :-p
I will reply with an updated patch.
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20180611/068d49fe/attachment.asc>


  reply	other threads:[~2018-06-11  6:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 12:12 Custom snapshot prefix & Snapshot signatures list
2018-06-07 12:15 ` [PATCH 1/1] snapshot: support tar signature for compressed tar list
2018-06-07 13:17   ` john
2018-06-07 15:13     ` list
2018-06-07 15:14       ` [PATCH v2 1/2] ui-snapshot: use named constants for snapshot formats list
2018-06-07 15:14         ` [PATCH v2 2/2] snapshot: support tar signature for compressed tar list
2018-06-07 15:21           ` john
2018-06-07 19:36             ` list
2018-06-07 19:38               ` [PATCH v3 1/1] " list
2018-06-27 16:34                 ` Jason
2018-06-27 20:14                   ` john
2018-07-02  7:10                     ` list
2018-07-03 18:56                       ` Jason
2018-06-08 22:11             ` [PATCH 1/1] snapshot: strip bit from struct cgit_snapshot_format list
2018-06-09 11:16               ` john
2018-06-11  6:51                 ` list [this message]
2018-06-11  6:53                   ` [PATCH v2 " list
2018-06-07 13:10 ` Custom snapshot prefix & Snapshot signatures john

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=20180611085127.562dffcd@leda \
    --to=cgit@lists.zx2c4.com \
    /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).