On Wed, Aug 12, 2015 at 9:59 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
+ format_quote_value(atomv, quote_style, &output);
>>>
>>> If the one to add a literal string (with %hex escaping) is called "append_",
>>> then this should be called append_quoted_atom() or somethin
Karthik Nayak writes:
>>> + format_quote_value(atomv, quote_style, &output);
>>
>> If the one to add a literal string (with %hex escaping) is called "append_",
>> then this should be called append_quoted_atom() or something, no?
>
> Although it does append like "append_non_atom" this
On Tue, Aug 11, 2015 at 11:30 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> @@ -1283,9 +1279,11 @@ void show_ref_array_item(struct ref_array_item *info,
>> const char *format, int qu
>> if (color_parse("reset", color) < 0)
>> die("BUG: couldn't parse
On Tue, Aug 11, 2015 at 11:26 PM, Junio C Hamano wrote:
> Karthik Nayak writes:
>
>> -static void print_value(struct atom_value *v, int quote_style)
>> +static void format_quote_value(struct atom_value *v, int quote_style,
>> struct strbuf *output)
>> {
>
> Hmph...
>
>> -static void emit(const
Karthik Nayak writes:
> @@ -1283,9 +1279,11 @@ void show_ref_array_item(struct ref_array_item *info,
> const char *format, int qu
> if (color_parse("reset", color) < 0)
> die("BUG: couldn't parse 'reset' as a color");
> resetv.s = color;
> -
Karthik Nayak writes:
> -static void print_value(struct atom_value *v, int quote_style)
> +static void format_quote_value(struct atom_value *v, int quote_style, struct
> strbuf *output)
> {
Hmph...
> -static void emit(const char *cp, const char *ep)
> +static void append_non_atom(const char *
Introduce a strbuf `output` which will act as a substitute rather than
printing directly to stdout. This will be used for formatting
eventually.
Rename some functions to reflect the changes made:
print_value() -> format_quote_value()
emit()-> append_non_atom()
Mentored-by: Christian Coude
7 matches
Mail list logo