Christian Couder <christian.couder@xxxxxxxxx> writes: > On Sat, Feb 1, 2025 at 9:20 PM Justin Tobler <jltobler@xxxxxxxxx> wrote: > > >> -static inline int cq_must_quote(char c) >> +static inline int cq_must_quote(char c, int ignore_config) > > I think it's a bit better to use 'unsigned int' instead of just 'int' > for such flags, but it's fine here to use an 'int' because both > `quote_path_fully` and `no_dq` below already use that type. Yup, good forward thinking to suggest using unsigned as these "this is just a single bit, so let's use platform natural int" tend to grow into "there is this another bit that is orthogonal, so pass it as well in the same flag word", at which point unsigned would work better for us. But until that happens, plain platform natural int is fine. >> - for (len = 0; len < maxlen && !cq_must_quote(s[len]); len++); >> + for (len = 0; >> + len < maxlen && !cq_must_quote(s[len], ignore_config); len++); > > Micronit: If you really want to split the line into many lines, I > think it might be better to go all the way like this: > > for (len = 0; > len < maxlen && !cq_must_quote(s[len], ignore_config); > len++); Good style suggestion. Thanks.