[Top][All Lists]

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

Re: [Tinycc-devel] Reformatting Tinycc source code

From: avih
Subject: Re: [Tinycc-devel] Reformatting Tinycc source code
Date: Wed, 2 Dec 2020 11:14:47 +0000 (UTC)

There is a CodingStyle file, and the second paragraph clearly
states (rightly) that style-only changes should be avoided.

The instructions at this file are still valid.

- avih

On Wednesday, December 2, 2020, 01:08:33 PM GMT+2, Tyge Løvset <tylovset@gmail.com> wrote:

I have slowly started to look into the core code of tinycc, but can't help being annoyed by the inconsistent formatting of the code, in particular the mixing of tabs and spaces. (sometimes tabs means 4 indents, sometimes 8). Here is a suggestion for an Artistic Style - Index (sourceforge.net) configuration, which follows the overall existing formatting style (save it e.g.  as tcc_astyle):

### use K&R brackets style with 4 spaces indent

### indenting

### add/remove paddings

### keep one-liners

### considered...

### create no backup file (already in git)

Reformat the code in-place by: astyle --options=tcc_astyle *.c *.h

I omitted --indent-labels, but default K&R style is to have labels at first column, and they are much easier to spot, e.g. those in between switch case labels...

Would anyone care to review the changes it creates, before a possible commit? So far it looks good, and I haven't spotted any errors created by the reformatting so far.

Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]