mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
77da20196f
commit
50424df653
4 changed files with 57 additions and 79 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue