diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-09-02 01:15:35 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-09-02 01:15:35 +0000 |
commit | 58e9412bff9947e4514c0d55152bfad91049a60c (patch) | |
tree | dc4cc3d7812388805c07c08d4cd9271eecab938e /apps/misc.h | |
parent | c7240cf844d7c2a28031aa5ec984f0e007de242d (diff) | |
download | rockbox-58e9412bff9947e4514c0d55152bfad91049a60c.tar.gz rockbox-58e9412bff9947e4514c0d55152bfad91049a60c.zip |
Added universal functions for creation of numbered filenames and date+time filenames (units with RTC only). Some size optimisations within code using these new functions. Everything should behave as before, except config saving will always find the highest file number + 1 even if the sequence is non-contiguous.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7449 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.h')
-rw-r--r-- | apps/misc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/misc.h b/apps/misc.h index 757eee7377..5e7450a7b2 100644 --- a/apps/misc.h +++ b/apps/misc.h | |||
@@ -27,6 +27,14 @@ | |||
27 | void output_dyn_value(char *buf, int buf_size, int value, | 27 | void output_dyn_value(char *buf, int buf_size, int value, |
28 | const unsigned char **units, bool bin_scale); | 28 | const unsigned char **units, bool bin_scale); |
29 | 29 | ||
30 | char *create_numbered_filename(char *buffer, const char *path, | ||
31 | const char *prefix, const char *suffix, | ||
32 | int numberlen); | ||
33 | #ifdef HAVE_RTC | ||
34 | char *create_datetime_filename(char *buffer, const char *path, | ||
35 | const char *prefix, const char *suffix); | ||
36 | #endif | ||
37 | |||
30 | /* Read (up to) a line of text from fd into buffer and return number of bytes | 38 | /* Read (up to) a line of text from fd into buffer and return number of bytes |
31 | * read (which may be larger than the number of bytes stored in buffer). If | 39 | * read (which may be larger than the number of bytes stored in buffer). If |
32 | * an error occurs, -1 is returned (and buffer contains whatever could be | 40 | * an error occurs, -1 is returned (and buffer contains whatever could be |