Re: [PATCH v2 00/10] port branch.c to use ref-filter's printing options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Then used_atom[] could become something like
>
>     struct {
>     	const char *str; /* e.g. "align:position=left,32" */
> 	struct {
>         	const char *part0; /* everything before '=' */
>                 const char *part1; /* optional */
> 	} *modifier;
>         int modifier_nr;
>     } *used_atom;

If the goal is to prepare as much as possible when parsing the format
string, I'd even push it one step further and have stg like

     struct {
     	const char *str; /* e.g. "align:position=left,32" */
 	union {
         	struct {
			int position;
			enum { left, right, center } kind;
		} align;
                struct {
                	....;
                } objectname;
        int modifier_nr;
     } *used_atom;

Just a thought, I'm not sure how useful this would be, and this may be
too much change for this series (so it may deserve a separate topic).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]