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

@ -5,6 +5,8 @@
extern "C" {
#endif
struct membuffer;
#define SCALE_SCREEN 1.0
#define SCALE_PRINT (1.0 / get_screen_dpi())
@ -39,7 +41,7 @@ struct graphics_context {
typedef enum { SC_SCREEN, SC_PRINT } scale_mode_t;
extern struct divecomputer *select_dc(struct divecomputer *main);
extern void get_plot_details(struct graphics_context *gc, int time, char *buf, int bufsize);
extern void get_plot_details(struct graphics_context *gc, int time, struct membuffer *mb);
struct options {
enum { PRETTY, TABLE, TWOPERPAGE } type;