whitespace fixes. no code changes

This commit is contained in:
Denis Vlasenko
2008-06-25 09:53:17 +00:00
parent f26e3d2e41
commit 7049ff8696
23 changed files with 62 additions and 75 deletions

View File

@ -169,12 +169,12 @@ enum {
#endif #endif
#define current_time_t (G.current_time_t) #define current_time_t (G.current_time_t)
/* memset: we have to zero it out because of NOEXEC */ /* memset: we have to zero it out because of NOEXEC */
#define INIT_G() { \ #define INIT_G() do { \
memset(&G, 0, sizeof(G)); \ memset(&G, 0, sizeof(G)); \
USE_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \ USE_FEATURE_AUTOWIDTH(tabstops = COLUMN_GAP;) \
USE_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \ USE_FEATURE_AUTOWIDTH(terminal_width = TERMINAL_WIDTH;) \
USE_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \ USE_FEATURE_LS_TIMESTAMPS(time(&current_time_t);) \
} } while (0)
#if ENABLE_FEATURE_ASSUME_UNICODE #if ENABLE_FEATURE_ASSUME_UNICODE

View File

@ -627,8 +627,7 @@ struct globals {
char buf[10]; char buf[10];
}; };
#define G (*(struct globals*)&bb_common_bufsiz1) #define G (*(struct globals*)&bb_common_bufsiz1)
#define INIT_G() \ #define INIT_G() do { \
do { \
G.device_name = bb_msg_standard_input; \ G.device_name = bb_msg_standard_input; \
G.max_col = 80; \ G.max_col = 80; \
} while (0) } while (0)

View File

@ -105,8 +105,7 @@ struct globals {
#define pidfile (G.pidfile ) #define pidfile (G.pidfile )
#define user_id (G.user_id ) #define user_id (G.user_id )
#define signal_nr (G.signal_nr ) #define signal_nr (G.signal_nr )
#define INIT_G() \ #define INIT_G() do { \
do { \
user_id = -1; \ user_id = -1; \
signal_nr = 15; \ signal_nr = 15; \
} while (0) } while (0)

View File

@ -103,8 +103,7 @@ struct globals {
const char *cur_file; /* the current file we are reading */ const char *cur_file; /* the current file we are reading */
}; };
#define G (*(struct globals*)&bb_common_bufsiz1) #define G (*(struct globals*)&bb_common_bufsiz1)
#define INIT_G() \ #define INIT_G() do { \
do { \
struct G_sizecheck { \ struct G_sizecheck { \
char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \ char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \
}; \ }; \

View File

@ -19,8 +19,7 @@ enum { STACK_SIZE = (COMMON_BUFSIZE - offsetof(struct globals, stack)) / sizeof(
#define pointer (G.pointer ) #define pointer (G.pointer )
#define base (G.base ) #define base (G.base )
#define stack (G.stack ) #define stack (G.stack )
#define INIT_G() do { \ #define INIT_G() do { } while (0)
} while (0)
static void push(double a) static void push(double a)

View File

@ -50,8 +50,7 @@ struct globals {
struct fb_fix_screeninfo scr_fix; struct fb_fix_screeninfo scr_fix;
}; };
#define G (*ptr_to_globals) #define G (*ptr_to_globals)
#define INIT_G() \ #define INIT_G() do { \
do { \
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
} while (0) } while (0)

View File

@ -61,8 +61,7 @@ struct globals {
#define received (G.received ) #define received (G.received )
#define brd_recv (G.brd_recv ) #define brd_recv (G.brd_recv )
#define req_recv (G.req_recv ) #define req_recv (G.req_recv )
#define INIT_G() \ #define INIT_G() do { \
do { \
count = -1; \ count = -1; \
} while (0) } while (0)

View File

@ -36,8 +36,7 @@ struct BUG_G_too_big {
#define verbose_flag (G.verbose_flag ) #define verbose_flag (G.verbose_flag )
#define do_continue (G.do_continue ) #define do_continue (G.do_continue )
#define buf (G.buf ) #define buf (G.buf )
#define INIT_G() do { \ #define INIT_G() do { } while (0)
} while (0)
static void ftp_die(const char *msg) ATTRIBUTE_NORETURN; static void ftp_die(const char *msg) ATTRIBUTE_NORETURN;

View File

@ -59,8 +59,7 @@ struct globals {
#define cmax (G.cmax ) #define cmax (G.cmax )
#define env_cur (G.env_cur ) #define env_cur (G.env_cur )
#define env_var (G.env_var ) #define env_var (G.env_var )
#define INIT_G() \ #define INIT_G() do { \
do { \
cmax = 30; \ cmax = 30; \
env_cur = &env_var[0]; \ env_cur = &env_var[0]; \
} while (0) } while (0)

View File

@ -92,9 +92,7 @@ struct globals {
#define block_buf (G.block_buf ) #define block_buf (G.block_buf )
#define user_opt (G.user_opt ) #define user_opt (G.user_opt )
#define error_pkt (G.error_pkt ) #define error_pkt (G.error_pkt )
#define INIT_G() \ #define INIT_G() do { } while (0)
do { \
} while (0)
#define error_pkt_reason (error_pkt[3]) #define error_pkt_reason (error_pkt[3])
#define error_pkt_str (error_pkt + 4) #define error_pkt_str (error_pkt + 4)

View File

@ -89,8 +89,7 @@ struct globals {
enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) }; enum { LINE_BUF_SIZE = COMMON_BUFSIZE - offsetof(struct globals, line_buf) };
#define G (*(struct globals*)&bb_common_bufsiz1) #define G (*(struct globals*)&bb_common_bufsiz1)
#define INIT_G() \ #define INIT_G() do { \
do { \
struct G_sizecheck { \ struct G_sizecheck { \
char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \ char G_sizecheck[sizeof(G) > COMMON_BUFSIZE ? -1 : 1]; \
}; \ }; \

View File

@ -103,8 +103,7 @@ struct globals {
#define logpipe (G.logpipe ) #define logpipe (G.logpipe )
#define dir (G.dir ) #define dir (G.dir )
#define svd (G.svd ) #define svd (G.svd )
#define INIT_G() \ #define INIT_G() do { \
do { \
pidchanged = 1; \ pidchanged = 1; \
} while (0) } while (0)

View File

@ -39,8 +39,7 @@ struct globals {
#define SMrup (G.SMrup) #define SMrup (G.SMrup)
#define SMrdn (G.SMrdn) #define SMrdn (G.SMrdn)
#define shbuf (G.shbuf) #define shbuf (G.shbuf)
#define INIT_G() \ #define INIT_G() do { \
do { \
memcpy(SMrup, init_sem, sizeof(init_sem)); \ memcpy(SMrup, init_sem, sizeof(init_sem)); \
} while (0) } while (0)

View File

@ -244,11 +244,11 @@ static ALWAYS_INLINE unsigned div_roundup(unsigned size, unsigned n)
return (size + n-1) / n; return (size + n-1) / n;
} }
#if ENABLE_FEATURE_MINIX2 #if !ENABLE_FEATURE_MINIX2
#define INODE_BLOCKS div_roundup(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \
: MINIX1_INODES_PER_BLOCK))
#else
#define INODE_BLOCKS div_roundup(INODES, MINIX1_INODES_PER_BLOCK) #define INODE_BLOCKS div_roundup(INODES, MINIX1_INODES_PER_BLOCK)
#else
#define INODE_BLOCKS div_roundup(INODES, \
(version2 ? MINIX2_INODES_PER_BLOCK : MINIX1_INODES_PER_BLOCK))
#endif #endif
#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE) #define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE)

View File

@ -149,7 +149,7 @@ static ALWAYS_INLINE unsigned div_roundup(unsigned size, unsigned n)
#else #else
# define SB_ZONES (version2 ? SB.s_zones : SB.s_nzones) # define SB_ZONES (version2 ? SB.s_zones : SB.s_nzones)
# define INODE_BLOCKS div_roundup(SB_INODES, \ # define INODE_BLOCKS div_roundup(SB_INODES, \
version2 ? MINIX2_INODES_PER_BLOCK : MINIX1_INODES_PER_BLOCK) (version2 ? MINIX2_INODES_PER_BLOCK : MINIX1_INODES_PER_BLOCK))
#endif #endif
#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE) #define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE)