diff options
| author | Franklin Wei <git@fwei.tk> | 2015-05-21 21:38:24 -0400 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2015-05-21 21:38:24 -0400 |
| commit | ad01f507d1b35c656c781a50ba3445bca52ea1af (patch) | |
| tree | 508de0b44a6acfaa425ab27fed20efb7d99aa4df /src/globals.h | |
| parent | 06c23ee7f9950c7fe6f8ffda137f0db437f7a92e (diff) | |
| download | market-sim-ad01f507d1b35c656c781a50ba3445bca52ea1af.zip market-sim-ad01f507d1b35c656c781a50ba3445bca52ea1af.tar.gz market-sim-ad01f507d1b35c656c781a50ba3445bca52ea1af.tar.bz2 market-sim-ad01f507d1b35c656c781a50ba3445bca52ea1af.tar.xz | |
add some amount of redundancy to save files
Diffstat (limited to 'src/globals.h')
| -rw-r--r-- | src/globals.h | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/globals.h b/src/globals.h index 60cd40c..c336aa4 100644 --- a/src/globals.h +++ b/src/globals.h @@ -80,39 +80,38 @@ struct command_t { }; /*** prototypes ***/ -void cleanup(void); -int compare_stocks(const void*, const void*); -void all_lower(char*); -void all_upper(char*); + +void do_menu(struct player_t*, const struct command_t*, uint len, const char *prompt); bool get_stock_info(char *sym, struct money_t*, char **name); -uint64_t to_sys64(uint64_t); -uint64_t to_be64(uint64_t); -uint32_t to_sys32(uint32_t); -uint32_t to_be32(uint32_t); -uint16_t to_sys16(uint16_t); -uint16_t to_be16(uint16_t); +char *csv_read(char**); +char *read_string(void); +char *read_ticker(void); +int compare_stocks(const void*, const void*); struct stock_t *find_stock(struct player_t*, char*); +uint parse_args(struct player_t*, int argc, char *argv[]); +uint16_t to_be16(uint16_t); +uint16_t to_sys16(uint16_t); +uint32_t to_be32(uint32_t); +uint32_t to_sys32(uint32_t); +uint64_t to_be64(uint64_t); +uint64_t to_sys64(uint64_t); +ullong read_int(void); void add_hist(struct stock_t*, enum history_action, ullong count); +void all_lower(char*); +void all_upper(char*); +void cleanup(void); +void load_portfolio(struct player_t*, const char*); void print_history(struct stock_t*); -char *read_ticker(void); -char *read_string(void); -ullong read_int(void); void print_usage(int argc, char *argv[]); void print_version(void); -uint parse_args(struct player_t*, int argc, char *argv[]); -char *csv_read(char**); -void load_portfolio(struct player_t*, const char*); - void buy_handler(struct player_t*); -void sell_handler(struct player_t*); void info_handler(struct player_t*); -void update_handler(struct player_t*); -void save_handler(struct player_t*); void load_handler(struct player_t*); -void quit_handler(struct player_t*); void print_handler(struct player_t*); - -void do_menu(struct player_t*, const struct command_t*, uint len, const char *prompt); +void quit_handler(struct player_t*); +void save_handler(struct player_t*); +void sell_handler(struct player_t*); +void update_handler(struct player_t*); #endif |