[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
indentation of structures/enums
From: |
Alfred M. Szmidt |
Subject: |
indentation of structures/enums |
Date: |
Sun, 25 Mar 2012 10:08:34 -0400 |
Hi,
can't find anything in the GCS about how to "properly" indent structs
and enums, and all the code I've seen is abit ad-hoc when it comes to
how to indent them. Personally, I have no preference, would be nice
to have a recommended variant though.
For enum's I've see the following,
enum
{
OPT_ENVIRON = 256,
OPT_RESOLVE
};
/* Indented using indent-region. */
enum
{
OPT_ENVIRON = 256,
OPT_RESOLVE
};
/* Indented using indent-region. */
enum {
OPT_ENVIRON = 256,
OPT_RESOLVE
};
For structs,
static struct argp_option argp_options[] = {
{ "debug", 'd', NULL, 0,
"turn on debugging, run in foreground mode", GRP + 1 },
};
/* Indented using indent-region. */
static struct argp_option argp_options[] =
{
{ "debug", 'd', NULL, 0,
"turn on debugging, run in foreground mode", GRP + 1 },
};
/* Indented using indent-region. */
static struct argp_option argp_options[] =
{
{ "debug", 'd', NULL, 0,
"turn on debugging, run in foreground mode", GRP + 1 },
};
With and without a space prefix inside the internal curlies.
- indentation of structures/enums,
Alfred M. Szmidt <=