On 24/04/18 08:30, Julian Kornberger wrote:
> On 24.04.2018 01:07, Simon Kelley wrote:
>>> Where does the DBUS raise a fatal error if support is missing? I
>>> couldn't find anything in the code.
>> src/dnsmasq.c:
> Ok, I only searched in src/option.c
> 
>>> General questions:
>>> - Is there any reason to not use the `enum` for definition lists like
>>> `LOPT_*`?
>> No strong ones, just habit I guess.
> 
> Can this be refactored to simplify the code?

It can be refactored, yes, but it probably won't simplify things.
> 
>>> - Is it planed to make the indentation consistent? Like only tabs or
>>> only spaces.
>>>
>> I edit using emacs, and never see a problem. A massive edit would
>> generate a huge number of spurious changes in the git repository. I use
>> "git blame" quite often and don't want to find that it tells me half the
>> lines were last changed in the great re-tab.
>>
>> Is there any advantage to doing it?
> 
> I always had to duplicate a line to have equal spaces/tabs. Indentation
> looks weird when your editor does not know the width of a tab.

The width of a tab is always 8, I think. That's the default for emacs.

> I would like to see a small style guide that has rules and examples for:
> 
> - identation (tabs or spaces)

tabs are 8, but I can see the arguments for banning tabs and just using
space.

> - where to but curly braces (same line, next line? next line with
> indentation?)

The code is all pure gnu-style. Some hate it, but I like it :)

> - adding whitespace after if/else/... and where else?You mean blank lines? I 
> know what I do, but I'm not sure I could define it.

> - never add ending whitspace to the end of the line
> 
I've never understood why this is a problem, except maybe because of
noise in diffs.

> This makes the code much more readable for someone who does not have a
> well configured editor.
> 


Set tab-width to 8 and all will be well.


Cheers,

Simon.


> Regards
> Julian Kornberger
> 


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to