Re: [PATCH v2 01/11] Add and use generic name->id mapping code for color slot parsing

2018-05-29 Thread Stefan Beller
On Sat, May 26, 2018 at 6:55 AM, Nguyễn Thái Ngọc Duy wrote: > Instead of hard coding the name-to-id mapping in C code, keep it in an > array and use a common function to do the parsing. This reduces code > and also allows us to list all possible color slots later. > > This starts using C99

[PATCH v2 01/11] Add and use generic name->id mapping code for color slot parsing

2018-05-26 Thread Nguyễn Thái Ngọc Duy
Instead of hard coding the name-to-id mapping in C code, keep it in an array and use a common function to do the parsing. This reduces code and also allows us to list all possible color slots later. This starts using C99 designated initializers more for convenience (the first designated