lua-users home
lua-l archive

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

Luiz Henrique de Figueiredo <> wrote:

>> Actually, speaking of that... I remember a utility from years ago that would
>> reformat the source code for C, it had a *ton* of options to control every
>> possible code formatting scenario (placement of braces, etc). I can't for
>> the life of me remember what the program was called... anyone know?
> Once upon a time there was cb (= C beautifier) but I think you mean indent:
> See also

Ahhh... well, I don't know how I forgot this, but it was Uncrustify. The
config file is the same as I remember, whereas Indent uses switches to
define the reformatting options.

Actually, I had Uncrustify installed for Xcode at one point, but after the
latest update, or maybe the one prior (it's been a while), I can't get
Alcatraz to install and work correctly without generating all sorts of
annoying issues. I will have to install it for the command line and play
with it again. I will also check out Indent as it comes with macOS out
of the box it seems!

Thank you for your help, Luiz, it is appreciated. Also, in my previous
message I asked you why you prefer 1 space indenting. I only ask as this
isn't something I see too often so was just curious. I am definitely NOT
implying you are wrong or anything of the sort, just to be clear.
Personally, I find it hard to track indentation with only one space, so
I don't enjoy working on the compiler code quite as much! ;)

>> I guess, other than general bug-fixes, I didn't realise
>> that community contributions weren't accepted into Lua. 
> The FAQ at says:
> 	1.9 - Do you accept patches?
> 	We encourage discussions based on tested code solutions for
> 	problems and enhancements, but we never incorporate third-party
> 	code verbatim. We always try to understand the issue and the
> 	proposed solution and then, if we choose to address the issue,
> 	we provide our own code. All code in Lua is written by us.

Good to know, thank you for pointing me to the FAQ. I don't quite have
it memorised yet... but probably should be a bit more familiar with it! ;)

That policy pretty much is in line with the conversation we were having
as well about learning from patches and not just copy/pasting them.