make brace placement in public header struct definitions consistent

placing the opening brace on the same line as the struct keyword/tag
is the style I prefer and seems to be the prevailing practice in more
recent additions.

these changes were generated by the command:

find include/ arch/*/bits -name '*.h' \
-exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} +

and subsequently checked by hand to ensure that the regex did not pick
up any false positives.
This commit is contained in:
Rich Felker committed 2016-07-03 15:02:25 -04:00
1 parent 093288dcb3
commit befa5866ee
68 files changed
+100 -200

No files matched your search

+2 -4
View File
@@ -14,8 +14,7 @@ extern "C" {
typedef uint16_t comp_t;
struct acct
{
struct acct {
char ac_flag;
uint16_t ac_uid;
uint16_t ac_gid;
@@ -36,8 +35,7 @@ struct acct
};
struct acct_v3
{
struct acct_v3 {
char ac_flag;
char ac_version;
uint16_t ac_tty;
+1 -2
View File
@@ -33,8 +33,7 @@ struct elf_prstatus {
#define ELF_PRARGSZ 80
struct elf_prpsinfo
{
struct elf_prpsinfo {
char pr_state;
char pr_sname;
char pr_zomb;
+2 -4
View File
@@ -57,8 +57,7 @@ extern "C" {
#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
struct dqblk
{
struct dqblk {
uint64_t dqb_bhardlimit;
uint64_t dqb_bsoftlimit;
uint64_t dqb_curspace;
@@ -87,8 +86,7 @@ struct dqblk
#define IIF_FLAGS 4
#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
struct dqinfo
{
struct dqinfo {
uint64_t dqi_bgrace;
uint64_t dqi_igrace;
uint32_t dqi_flags;
+2 -4
View File
@@ -19,14 +19,12 @@ extern "C" {
typedef unsigned long long rlim_t;
struct rlimit
{
struct rlimit {
rlim_t rlim_cur;
rlim_t rlim_max;
};
struct rusage
{
struct rusage {
struct timeval ru_utime;
struct timeval ru_stime;
/* linux extentions, but useful */
+5 -10
View File
@@ -20,15 +20,13 @@ extern "C" {
#include <bits/socket.h>
#ifdef _GNU_SOURCE
struct ucred
{
struct ucred {
pid_t pid;
uid_t uid;
gid_t gid;
};
struct mmsghdr
{
struct mmsghdr {
struct msghdr msg_hdr;
unsigned int msg_len;
};
@@ -39,8 +37,7 @@ int sendmmsg (int, struct mmsghdr *, unsigned int, unsigned int);
int recvmmsg (int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *);
#endif
struct linger
{
struct linger {
int l_onoff;
int l_linger;
};
@@ -297,14 +294,12 @@ struct linger
#define SCM_RIGHTS 0x01
#define SCM_CREDENTIALS 0x02
struct sockaddr
{
struct sockaddr {
sa_family_t sa_family;
char sa_data[14];
};
struct sockaddr_storage
{
struct sockaddr_storage {
sa_family_t ss_family;
char __ss_padding[128-sizeof(long)-sizeof(sa_family_t)];
unsigned long __ss_align;
+1 -2
View File
@@ -17,8 +17,7 @@ int gettimeofday (struct timeval *__restrict, void *__restrict);
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2
struct itimerval
{
struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};
+1 -2
View File
@@ -8,8 +8,7 @@ extern "C" {
#define __NEED_clock_t
#include <bits/alltypes.h>
struct tms
{
struct tms {
clock_t tms_utime;
clock_t tms_stime;
clock_t tms_cutime;
+1 -2
View File
@@ -14,8 +14,7 @@ extern "C" {
#include <bits/alltypes.h>
struct sockaddr_un
{
struct sockaddr_un {
sa_family_t sun_family;
char sun_path[108];
};
+1 -2
View File
@@ -7,8 +7,7 @@ extern "C" {
#include <features.h>
struct utsname
{
struct utsname {
char sysname[65];
char nodename[65];
char release[65];