diff options
Diffstat (limited to 'apps/misc.h')
-rw-r--r-- | apps/misc.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/apps/misc.h b/apps/misc.h index 99e709c2c8..998ee9ea8f 100644 --- a/apps/misc.h +++ b/apps/misc.h | |||
@@ -33,27 +33,6 @@ | |||
33 | char *output_dyn_value(char *buf, int buf_size, int value, | 33 | char *output_dyn_value(char *buf, int buf_size, int value, |
34 | const unsigned char **units, bool bin_scale); | 34 | const unsigned char **units, bool bin_scale); |
35 | 35 | ||
36 | /* Create a filename with a number part in a way that the number is 1 | ||
37 | * higher than the highest numbered file matching the same pattern. | ||
38 | * It is allowed that buffer and path point to the same memory location, | ||
39 | * saving a strcpy(). Path must always be given without trailing slash. | ||
40 | * | ||
41 | * "num" can point to an int specifying the number to use or NULL or a value | ||
42 | * less than zero to number automatically. The final number used will also | ||
43 | * be returned in *num. If *num is >= 0 then *num will be incremented by | ||
44 | * one. */ | ||
45 | #if defined(HAVE_RECORDING) && (CONFIG_RTC == 0) | ||
46 | /* this feature is needed by recording without a RTC to prevent disk access | ||
47 | when changing files */ | ||
48 | #define IF_CNFN_NUM_(...) __VA_ARGS__ | ||
49 | #define IF_CNFN_NUM | ||
50 | #else | ||
51 | #define IF_CNFN_NUM_(...) | ||
52 | #endif | ||
53 | char *create_numbered_filename(char *buffer, const char *path, | ||
54 | const char *prefix, const char *suffix, | ||
55 | int numberlen IF_CNFN_NUM_(, int *num)); | ||
56 | |||
57 | /* Format time into buf. | 36 | /* Format time into buf. |
58 | * | 37 | * |
59 | * buf - buffer to format to. | 38 | * buf - buffer to format to. |
@@ -62,17 +41,6 @@ char *create_numbered_filename(char *buffer, const char *path, | |||
62 | */ | 41 | */ |
63 | void format_time(char* buf, int buf_size, long t); | 42 | void format_time(char* buf, int buf_size, long t); |
64 | 43 | ||
65 | #if CONFIG_RTC | ||
66 | /* Create a filename with a date+time part. | ||
67 | It is allowed that buffer and path point to the same memory location, | ||
68 | saving a strcpy(). Path must always be given without trailing slash. | ||
69 | unique_time as true makes the function wait until the current time has | ||
70 | changed. */ | ||
71 | char *create_datetime_filename(char *buffer, const char *path, | ||
72 | const char *prefix, const char *suffix, | ||
73 | bool unique_time); | ||
74 | #endif /* CONFIG_RTC */ | ||
75 | |||
76 | /* Ask the user if they really want to erase the current dynamic playlist | 44 | /* Ask the user if they really want to erase the current dynamic playlist |
77 | * returns true if the playlist should be replaced */ | 45 | * returns true if the playlist should be replaced */ |
78 | bool warn_on_pl_erase(void); | 46 | bool warn_on_pl_erase(void); |
@@ -87,24 +55,6 @@ int read_line(int fd, char* buffer, int buffer_size); | |||
87 | int fast_readline(int fd, char *buf, int buf_size, void *parameters, | 55 | int fast_readline(int fd, char *buf, int buf_size, void *parameters, |
88 | int (*callback)(int n, const char *buf, void *parameters)); | 56 | int (*callback)(int n, const char *buf, void *parameters)); |
89 | 57 | ||
90 | #ifdef HAVE_LCD_BITMAP | ||
91 | /* Save a .BMP file containing the current screen contents. */ | ||
92 | void screen_dump(void); | ||
93 | void screen_dump_set_hook(void (*hook)(int fh)); | ||
94 | #endif | ||
95 | |||
96 | /* Make BMP colour map entries from R, G, B triples, without and with blending. | ||
97 | * Not within HAVE_LCD_BITMAP because it is also used for the Player sim */ | ||
98 | #define RED_CMP(c) (((c) >> 16) & 0xff) | ||
99 | #define GREEN_CMP(c) (((c) >> 8) & 0xff) | ||
100 | #define BLUE_CMP(c) ((c) & 0xff) | ||
101 | |||
102 | #define BMP_COLOR(c) BLUE_CMP(c), GREEN_CMP(c), RED_CMP(c), 0 | ||
103 | #define BMP_COLOR_MIX(c1, c2, num, den) \ | ||
104 | (BLUE_CMP(c2) - BLUE_CMP(c1)) * (num) / (den) + BLUE_CMP(c1), \ | ||
105 | (GREEN_CMP(c2) - GREEN_CMP(c1)) * (num) / (den) + GREEN_CMP(c1), \ | ||
106 | (RED_CMP(c2) - RED_CMP(c1)) * (num) / (den) + RED_CMP(c1), 0 | ||
107 | |||
108 | bool settings_parseline(char* line, char** name, char** value); | 58 | bool settings_parseline(char* line, char** name, char** value); |
109 | long default_event_handler_ex(long event, void (*callback)(void *), void *parameter); | 59 | long default_event_handler_ex(long event, void (*callback)(void *), void *parameter); |
110 | long default_event_handler(long event); | 60 | long default_event_handler(long event); |