On Sat, Oct 13, 2007 at 02:47:20PM +0000, Johannes Schindelin wrote:
g"),
files"),
t git already knows about"),
tat() informations in the index"),
n=20
=20
adding a trailing comma does not add a NULL after that, it's ignored,
you're confused.
=E2=94=8C=E2=94=80(17:00)=E2=94=80=E2=94=80=E2=94=80=E2=94=80
=E2=94=94[artemis] cat a.c
#include <stdio.h>
int main(void) {
const char * const arr[] =3D { "1", "2", };
printf("%d\n", sizeof(arr) / sizeof(arr[0]));
return 0;
};
=E2=94=8C=E2=94=80(17:00)=E2=94=80=E2=94=80=E2=94=80=E2=94=80
=E2=94=94[artemis] ./a
2
Very few compilers do not grok trailing commas, I always put them
because it avoids spurious diffs for nothing, and that you can reorder
lines easily too.
Note that I don't really like using ARRAY_SIZE either, I kept it that
way, but my taste would rather be to have an "empty" option, and
explicitely mark the end of the array.
--=20
=C2=B7O=C2=B7 Pierre Habouzit
=C2=B7=C2=B7O madcoder@debia=
n.org
OOO http://www.madism.org