Modernise decl styles

This commit is contained in:
Tamas TEVESZ 2011-11-15 12:28:37 +01:00 committed by Daniel Beer
parent d98d990752
commit e014e4c6d5
7 changed files with 11 additions and 9 deletions

View File

@ -1825,7 +1825,7 @@ const struct fet_db_record *fet_db_find_by_msg28(uint8_t *data, int len)
if (r->msg28_data[0] == data[0] && if (r->msg28_data[0] == data[0] &&
r->msg28_data[1] == data[1]) { r->msg28_data[1] == data[1]) {
const static int coefficients[FET_DB_MSG28_LEN] = { static const int coefficients[FET_DB_MSG28_LEN] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,
10, 1 10, 1

View File

@ -90,7 +90,7 @@ struct tilib_device {
#define MID_HALT_ANY (MID_BREAKPOINT | MID_CPU_STOPPED) #define MID_HALT_ANY (MID_BREAKPOINT | MID_CPU_STOPPED)
const static MessageID_t my_message_ids = { static const MessageID_t my_message_ids = {
.uiMsgIdSingleStep = MID_SINGLE_STEP, .uiMsgIdSingleStep = MID_SINGLE_STEP,
.uiMsgIdBreakpoint = MID_BREAKPOINT, .uiMsgIdBreakpoint = MID_BREAKPOINT,
.uiMsgIdStorage = MID_STORAGE, .uiMsgIdStorage = MID_STORAGE,

View File

@ -337,11 +337,13 @@ int name(address_t addr, datatype data) { \
\ \
return ret; \ return ret; \
} }
#define IO_REQUEST_FUNC_S(name, method, datatype) \
static IO_REQUEST_FUNC(name, method, datatype)
IO_REQUEST_FUNC(simio_write, write, uint16_t) IO_REQUEST_FUNC(simio_write, write, uint16_t)
IO_REQUEST_FUNC(simio_read, read, uint16_t *) IO_REQUEST_FUNC(simio_read, read, uint16_t *)
IO_REQUEST_FUNC(static simio_write_b_device, write_b, uint8_t) IO_REQUEST_FUNC_S(simio_write_b_device, write_b, uint8_t)
IO_REQUEST_FUNC(static simio_read_b_device, read_b, uint8_t *) IO_REQUEST_FUNC_S(simio_read_b_device, read_b, uint8_t *)
int simio_write_b(address_t addr, uint8_t data) int simio_write_b(address_t addr, uint8_t data)
{ {

View File

@ -171,7 +171,7 @@ static int parse_cmdline_args(int argc, char **argv,
struct cmdline_args *args) struct cmdline_args *args)
{ {
int opt; int opt;
const static struct option longopts[] = { static const struct option longopts[] = {
{"help", 0, 0, 'H'}, {"help", 0, 0, 'H'},
{"fet-list", 0, 0, 'L'}, {"fet-list", 0, 0, 'L'},
{"fet-force-id", 1, 0, 'F'}, {"fet-force-id", 1, 0, 'F'},
@ -189,7 +189,7 @@ static int parse_cmdline_args(int argc, char **argv,
switch (opt) { switch (opt) {
case 'q': case 'q':
{ {
const static union opdb_value v = { static const union opdb_value v = {
.boolean = 1 .boolean = 1
}; };

View File

@ -380,7 +380,7 @@ static int do_isearch(address_t addr, address_t len,
int cmd_isearch(char **arg) int cmd_isearch(char **arg)
{ {
const static struct { static const struct {
const char *name; const char *name;
int (*func)(const char *term, char **arg, int (*func)(const char *term, char **arg,
struct isearch_query *q); struct isearch_query *q);

View File

@ -20,7 +20,7 @@
#include "opdb.h" #include "opdb.h"
#include "util.h" #include "util.h"
const static struct opdb_key keys[] = { static const struct opdb_key keys[] = {
{ {
.name = "color", .name = "color",
.type = OPDB_TYPE_BOOLEAN, .type = OPDB_TYPE_BOOLEAN,

View File

@ -102,7 +102,7 @@ void ctrlc_init(void)
#if defined(__CYGWIN__) #if defined(__CYGWIN__)
signal(SIGINT, sigint_handler); signal(SIGINT, sigint_handler);
#else #else
const static struct sigaction siga = { static const struct sigaction siga = {
.sa_handler = sigint_handler, .sa_handler = sigint_handler,
.sa_flags = 0 .sa_flags = 0
}; };