From ad01f507d1b35c656c781a50ba3445bca52ea1af Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 21 May 2015 21:38:24 -0400 Subject: add some amount of redundancy to save files --- src/globals.h | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'src/globals.h') 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 -- cgit v1.1