Update several codec Makefiles so that the codec libs build again on Coldfire targets...
[Rockbox.git] / apps / misc.h
blob1bc9a23447d83f491d72f638c14fcb8693ab7c33
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Daniel Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef MISC_H
20 #define MISC_H
22 /* Format a large-range value for output, using the appropriate unit so that
23 * the displayed value is in the range 1 <= display < 1000 (1024 for "binary"
24 * units) if possible, and 3 significant digits are shown. If a buffer is
25 * given, the result is snprintf()'d into that buffer, otherwise the result is
26 * voiced.*/
27 void output_dyn_value(char *buf, int buf_size, int value,
28 const unsigned char **units, bool bin_scale);
30 char *create_numbered_filename(char *buffer, const char *path,
31 const char *prefix, const char *suffix,
32 int numberlen);
33 #ifdef CONFIG_RTC
34 char *create_datetime_filename(char *buffer, const char *path,
35 const char *prefix, const char *suffix);
36 #endif
38 /* Read (up to) a line of text from fd into buffer and return number of bytes
39 * read (which may be larger than the number of bytes stored in buffer). If
40 * an error occurs, -1 is returned (and buffer contains whatever could be
41 * read). A line is terminated by a LF char. Neither LF nor CR chars are
42 * stored in buffer.
44 int read_line(int fd, char* buffer, int buffer_size);
45 int fast_readline(int fd, char *buf, int buf_size, void *parameters,
46 int (*callback)(int n, const char *buf, void *parameters));
48 #ifdef HAVE_LCD_BITMAP
49 /* Save a .BMP file containing the current screen contents. */
50 void screen_dump(void);
51 void screen_dump_set_hook(void (*hook)(int fh));
52 #endif
54 bool settings_parseline(char* line, char** name, char** value);
55 long default_event_handler_ex(long event, void (*callback)(void *), void *parameter);
56 long default_event_handler(long event);
57 void car_adapter_mode_init(void);
58 extern int show_logo(void);
60 #endif