Skip to content

Commit

Permalink
bcm43451b1: updated structs.
Browse files Browse the repository at this point in the history
libargp: made it compile using theos.
  • Loading branch information
matthiasseemoo committed Sep 29, 2017
1 parent 1ea724d commit 2681622
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions firmwares/bcm43451b1/structs.common.h
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,11 @@ struct wlc_info {
int PAD; /* 0X5B4 */
int PAD; /* 0X5B8 */
int PAD; /* 0X5BC */
void *active_queue; /* 0X5C0 verified */
void *active_queue; /* 0X5C0 */
int PAD; /* 0X5C4 */
int PAD; /* 0X5C8 */
int PAD; /* 0X5CC */
int PAD; /* 0X5D0 */
void *hwtimer_stuff; /* 0X5D0 verified for BCM43451b1 */
int PAD; /* 0X5D4 */
int PAD; /* 0X5D8 */
int PAD; /* 0X5DC */
Expand Down
2 changes: 1 addition & 1 deletion utilities/libargp/argp-help.c
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ __argp_failure (const struct argp_state *state, int status, int errnum,

if (errnum)
{
char buf[200];
//char buf[200];

#ifdef USE_IN_LIBIO
if (_IO_fwide (stream, 0) > 0)
Expand Down
28 changes: 14 additions & 14 deletions utilities/libargp/argp-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ find_long_option (struct option *long_options, const char *name)
/* The state of a "group" during parsing. Each group corresponds to a
particular argp structure from the tree of such descending from the top
level argp passed to argp_parse. */
struct group
struct group_local
{
/* This group's parsing function. */
argp_parser_t parser;
Expand All @@ -208,7 +208,7 @@ struct group
unsigned args_processed;

/* This group's parser's parent's group. */
struct group *parent;
struct group_local *parent;
unsigned parent_index; /* And the our position in the parent. */

/* These fields are swapped into and out of the state structure when
Expand All @@ -221,7 +221,7 @@ struct group
from STATE before calling, and back into state afterwards. If GROUP has
no parser, EBADKEY is returned. */
static error_t
group_parse (struct group *group, struct argp_state *state, int key, char *arg)
group_parse (struct group_local *group, struct argp_state *state, int key, char *arg)
{
if (group->parser)
{
Expand Down Expand Up @@ -252,9 +252,9 @@ struct parser
struct _getopt_data opt_data;

/* States of the various parsing groups. */
struct group *groups;
struct group_local *groups;
/* The end of the GROUPS array. */
struct group *egroup;
struct group_local *egroup;
/* A vector containing storage for the CHILD_INPUTS field in all groups. */
void **child_inputs;

Expand Down Expand Up @@ -285,10 +285,10 @@ struct parser_convert_state
into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and
CVT->LONG_END are the points at which new options are added. Returns the
next unused group entry. CVT holds state used during the conversion. */
static struct group *
static struct group_local *
convert_options (const struct argp *argp,
struct group *parent, unsigned parent_index,
struct group *group, struct parser_convert_state *cvt)
struct group_local *parent, unsigned parent_index,
struct group_local *group, struct parser_convert_state *cvt)
{
/* REAL is the most recent non-alias value of OPT. */
const struct argp_option *real = argp->options;
Expand Down Expand Up @@ -459,7 +459,7 @@ parser_init (struct parser *parser, const struct argp *argp,
int argc, char **argv, int flags, void *input)
{
error_t err = 0;
struct group *group;
struct group_local *group;
struct parser_sizes szs;
struct _getopt_data opt_data = _GETOPT_DATA_INITIALIZER;
char *storage;
Expand All @@ -477,7 +477,7 @@ parser_init (struct parser *parser, const struct argp *argp,
calc_sizes (argp, &szs);

/* Lengths of the various bits of storage used by PARSER. */
glen = (szs.num_groups + 1) * sizeof (struct group);
glen = (szs.num_groups + 1) * sizeof (struct group_local);
clen = szs.num_child_inputs * sizeof (void *);
llen = (szs.long_len + 1) * sizeof (struct option);
slen = szs.short_len + 1;
Expand Down Expand Up @@ -570,7 +570,7 @@ static error_t
parser_finalize (struct parser *parser,
error_t err, int arg_ebadkey, int *end_index)
{
struct group *group;
struct group_local *group;

if (err == EBADKEY && arg_ebadkey)
/* Suppress errors generated by unparsed arguments. */
Expand Down Expand Up @@ -669,7 +669,7 @@ parser_parse_arg (struct parser *parser, char *val)
we're parsing is again the front of the arg vector. */
int index = --parser->state.next;
error_t err = EBADKEY;
struct group *group;
struct group_local *group;
int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */

/* Try to parse the argument in each parser. */
Expand Down Expand Up @@ -726,7 +726,7 @@ parser_parse_opt (struct parser *parser, int opt, char *val)
various starting positions in each group's SHORT_END field, we can
determine which group OPT came from. */
{
struct group *group;
struct group_local *group;
char *short_index = strchr (parser->short_opts, opt);

if (short_index)
Expand Down Expand Up @@ -938,7 +938,7 @@ __argp_input (const struct argp *argp, const struct argp_state *state)
{
if (state)
{
struct group *group;
struct group_local *group;
struct parser *parser = state->pstate;

for (group = parser->groups; group < parser->egroup; group++)
Expand Down

0 comments on commit 2681622

Please sign in to comment.