A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2008 Dan Everton (safetydan)
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef _ROCKCONF_H_
23#define _ROCKCONF_H_
24
25#include "plugin.h"
26#include <tlsf.h>
27
28#undef LUAI_THROW
29#undef LUAI_TRY
30#undef luai_jmpbuf
31
32#undef LUA_PATH_DEFAULT
33#define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;"
34#define INBINARYSTRINGS /* Static strings stored as pointer rather than copied into lua state */
35
36#include <setjmp.h>
37
38#include "lib/pluginlib_exit.h"
39
40#define LUAI_THROW(L,c) longjmp((c)->b, 1)
41#define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a }
42#define luai_jmpbuf jmp_buf
43
44extern char curpath[MAX_PATH];
45struct tm *gmtime(const time_t *timep);
46long strtol(const char *nptr, char **endptr, int base);
47unsigned long strtoul(const char *str, char **endptr, int base);
48size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm);
49long lfloor(long x);
50long lpow(long x, long y);
51int splash_scroller(int timeout, const char* str);
52
53#define floor lfloor
54#define pow lpow
55
56/* Simple substitutions */
57#define malloc tlsf_malloc
58#define realloc tlsf_realloc
59#define free tlsf_free
60#define memchr rb->memchr
61#define snprintf rb->snprintf
62#define strcat rb->strcat
63#define strchr rb->strchr
64#define strcmp rb->strcmp
65#define strcpy rb->strcpy
66#define strlen rb->strlen
67#define yield() rb->yield()
68
69#endif /* _ROCKCONF_H_ */
70