Use 'struct membuffer' for profile info string generation

The profile info was generated using nasty string concatenation that the
membuffers are much better at anyway.  And membuffers don't need those
arbitrarily sized fixed buffers (500 bytes? Why 500 bytes?).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2014-01-18 16:21:13 -08:00 committed by Dirk Hohndel
parent 77da20196f
commit 50424df653
4 changed files with 57 additions and 79 deletions

View file

@ -7,6 +7,7 @@ extern "C" {
typedef enum { STABLE, SLOW, MODERATE, FAST, CRAZY } velocity_t;
struct membuffer;
struct divecomputer;
struct graphics_context;
struct plot_info;
@ -56,7 +57,7 @@ struct plot_data *populate_plot_entries(struct dive *dive, struct divecomputer *
struct plot_info *analyze_plot_info(struct plot_info *pi);
void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plot_info *pi);
void calculate_deco_information(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, bool print_mode);
void get_plot_details_new(struct plot_info *pi, int time, char *buf, int bufsize);
void get_plot_details_new(struct plot_info *pi, int time, struct membuffer *);
struct ev_select {
char *ev_name;