projects
/
browser-switch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use computed offset instead of hand-built array for access to struct swb_config members
[browser-switch]
/
config.h
diff --git
a/config.h
b/config.h
index
31149f6
..
11ef5c5
100644
(file)
--- a/
config.h
+++ b/
config.h
@@
-32,9
+32,6
@@
struct swb_config {
unsigned int flags;
struct swb_config {
unsigned int flags;
- /* Array of pointers to the elements of the struct, in the order given
- in swb_config_options[] */
- void *entries[5];
int continuous_mode;
char *default_browser;
int continuous_mode;
char *default_browser;
@@
-50,10
+47,10
@@
struct swb_config_option {
SWB_CONFIG_OPT_INT
} type;
int set_mask;
SWB_CONFIG_OPT_INT
} type;
int set_mask;
+ size_t offset;
};
};
-void swb_config_copy(struct swb_config *dst, struct swb_config *src);
-void swb_config_init(struct swb_config *cfg);
+inline void swb_config_init(struct swb_config *cfg);
void swb_config_free(struct swb_config *cfg);
int swb_config_load(struct swb_config *cfg);
void swb_config_free(struct swb_config *cfg);
int swb_config_load(struct swb_config *cfg);