Re: [PATCH] Add column layout skeleton and git-column

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

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

>  Thanks. I'll go with the simple way: error out.

OK.

> diff --git a/column.c b/column.c
> new file mode 100644
> index 0000000..416a440
> --- /dev/null
> +++ b/column.c
> @@ -0,0 +1,169 @@
> +#include "cache.h"
> +#include "column.h"
> +#include "string-list.h"
> +#include "parse-options.h"
> +
> +/* Display without layout when not enabled */
> +static void display_plain(const struct string_list *list,
> +			  const char *indent, const char *nl)
> +{
> +	int i;
> +
> +	for (i = 0; i < list->nr; i++)
> +		printf("%s%s%s", indent, list->items[i].string, nl);
> +}
> +
> +void print_columns(const struct string_list *list, unsigned int colopts,
> +		   const struct column_options *opts)
> +{
> +	struct column_options nopts;
> +
> +	if (!list->nr)
> +		return;
> +	assert(COL_ENABLE(colopts) != COL_AUTO);

Am I looking at the correct version?  Somehow I thought you eliminated
this confusingly named macro in the previous round.  Two steps forward,
one step backward???

--
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]