summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/battery_bench.c1
-rw-r--r--apps/plugins/blackjack.c2
-rw-r--r--apps/plugins/calculator.c2
-rw-r--r--apps/plugins/calendar.c2
-rw-r--r--apps/plugins/chessbox/chessbox.c6
-rw-r--r--apps/plugins/chessclock.c1
-rw-r--r--apps/plugins/disktidy.c1
-rw-r--r--apps/plugins/jpeg/jpeg.c2
-rw-r--r--apps/plugins/keybox.c1
-rw-r--r--apps/plugins/lib/SOURCES3
-rw-r--r--apps/plugins/lib/gcc-support.c20
-rw-r--r--apps/plugins/mazezam.c2
-rw-r--r--apps/plugins/md5sum.c2
-rw-r--r--apps/plugins/metronome.c2
-rw-r--r--apps/plugins/mp3_encoder.c2
-rw-r--r--apps/plugins/mpegplayer/alloc.c25
-rw-r--r--apps/plugins/pictureflow.c2
-rw-r--r--apps/plugins/properties.c2
-rw-r--r--apps/plugins/robotfindskitten.c2
-rw-r--r--apps/plugins/rockboy/rockboy.c7
-rw-r--r--apps/plugins/rockpaint.c2
-rw-r--r--apps/plugins/shortcuts/shortcuts_common.c1
-rw-r--r--apps/plugins/sokoban.c2
-rw-r--r--apps/plugins/test_greylib_bitmap_scale.c2
-rw-r--r--apps/plugins/wav2wv.c8
-rw-r--r--apps/plugins/xobox.c2
26 files changed, 20 insertions, 84 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 2df55106c6..f87886a2b9 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -196,7 +196,6 @@ PLUGIN_HEADER
196#endif 196#endif
197 197
198/****************************** Plugin Entry Point ****************************/ 198/****************************** Plugin Entry Point ****************************/
199MEM_FUNCTION_WRAPPERS;
200int main(void); 199int main(void);
201bool exit_tsr(bool); 200bool exit_tsr(bool);
202void thread(void); 201void thread(void);
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c
index 222181f71a..cb0a653db9 100644
--- a/apps/plugins/blackjack.c
+++ b/apps/plugins/blackjack.c
@@ -390,8 +390,6 @@ extern const fb_data card_back[];
390 390
391#define NEXT_CARD bj->player_cards[done][bj->num_player_cards[done]] 391#define NEXT_CARD bj->player_cards[done][bj->num_player_cards[done]]
392 392
393MEM_FUNCTION_WRAPPERS;
394
395/* dealer and player card positions */ 393/* dealer and player card positions */
396unsigned int dealer_x, dealer_y, player_x, player_y; 394unsigned int dealer_x, dealer_y, player_x, player_y;
397 395
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c
index f8c73ad49a..1795bca7a7 100644
--- a/apps/plugins/calculator.c
+++ b/apps/plugins/calculator.c
@@ -355,8 +355,6 @@ PLUGIN_HEADER
355static struct ts_raster calc_raster = { X_0_POS, Y_1_POS, BUTTON_COLS*REC_WIDTH, BUTTON_ROWS*REC_HEIGHT, REC_WIDTH, REC_HEIGHT }; 355static struct ts_raster calc_raster = { X_0_POS, Y_1_POS, BUTTON_COLS*REC_WIDTH, BUTTON_ROWS*REC_HEIGHT, REC_WIDTH, REC_HEIGHT };
356#endif 356#endif
357 357
358MEM_FUNCTION_WRAPPERS;
359
360enum { 358enum {
361 basicButtons, 359 basicButtons,
362 sciButtons 360 sciButtons
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index de27012a26..a570f37508 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -186,8 +186,6 @@ CONFIG_KEYPAD == SANSA_M200_PAD
186#define CELL_WIDTH (LCD_WIDTH / 7) 186#define CELL_WIDTH (LCD_WIDTH / 7)
187#define CELL_HEIGHT (LCD_HEIGHT / 7) 187#define CELL_HEIGHT (LCD_HEIGHT / 7)
188 188
189MEM_FUNCTION_WRAPPERS
190
191static bool leap_year; 189static bool leap_year;
192/* days_in_month[][0] is for December */ 190/* days_in_month[][0] is for December */
193static const int days_in_month[2][13] = { 191static const int days_in_month[2][13] = {
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c
index 64f8965947..1504f8a7cb 100644
--- a/apps/plugins/chessbox/chessbox.c
+++ b/apps/plugins/chessbox/chessbox.c
@@ -86,12 +86,6 @@ const char *level_string[] = { "Level 1: 60 moves / 5 min" ,
86/* "While thinking" command */ 86/* "While thinking" command */
87int wt_command = COMMAND_NOP; 87int wt_command = COMMAND_NOP;
88 88
89/* GCC wants this to be present for some targets */
90void* memcpy(void* dst, const void* src, size_t size)
91{
92 return rb->memcpy(dst, src, size);
93}
94
95/* ---- Get the board column and row (e2 f.e.) for a physical x y ---- */ 89/* ---- Get the board column and row (e2 f.e.) for a physical x y ---- */
96void xy2cr ( short x, short y, short *c, short *r ) { 90void xy2cr ( short x, short y, short *c, short *r ) {
97 if (computer == black ) { 91 if (computer == black ) {
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index 1ed9ecdb20..8b179644f8 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -257,7 +257,6 @@ PLUGIN_HEADER
257#define FIRST_LINE 0 257#define FIRST_LINE 0
258#endif 258#endif
259 259
260MEM_FUNCTION_WRAPPERS;
261#define MAX_PLAYERS 10 260#define MAX_PLAYERS 10
262 261
263static struct { 262static struct {
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c
index 3eb61ead29..53af3a2f95 100644
--- a/apps/plugins/disktidy.c
+++ b/apps/plugins/disktidy.c
@@ -21,7 +21,6 @@
21#include "plugin.h" 21#include "plugin.h"
22 22
23PLUGIN_HEADER 23PLUGIN_HEADER
24MEM_FUNCTION_WRAPPERS
25 24
26/* function return values */ 25/* function return values */
27enum tidy_return 26enum tidy_return
diff --git a/apps/plugins/jpeg/jpeg.c b/apps/plugins/jpeg/jpeg.c
index 649cca8288..3415f666d4 100644
--- a/apps/plugins/jpeg/jpeg.c
+++ b/apps/plugins/jpeg/jpeg.c
@@ -76,8 +76,6 @@ GREY_INFO_STRUCT
76 76
77/******************************* Globals ***********************************/ 77/******************************* Globals ***********************************/
78 78
79MEM_FUNCTION_WRAPPERS;
80
81static int slideshow_enabled = false; /* run slideshow */ 79static int slideshow_enabled = false; /* run slideshow */
82static int running_slideshow = false; /* loading image because of slideshw */ 80static int running_slideshow = false; /* loading image because of slideshw */
83#ifndef SIMULATOR 81#ifndef SIMULATOR
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c
index 5575a8b3a5..f50e6be19c 100644
--- a/apps/plugins/keybox.c
+++ b/apps/plugins/keybox.c
@@ -63,7 +63,6 @@ union hash
63 uint32_t words[4]; 63 uint32_t words[4];
64}; 64};
65 65
66MEM_FUNCTION_WRAPPERS;
67static char buffer[sizeof(struct pw_entry)*MAX_ENTRIES]; 66static char buffer[sizeof(struct pw_entry)*MAX_ENTRIES];
68static int bytes_read = 0; /* bytes read into the buffer */ 67static int bytes_read = 0; /* bytes read into the buffer */
69static struct gui_synclist kb_list; 68static struct gui_synclist kb_list;
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES
index 6fca04ae91..9f112dd8c0 100644
--- a/apps/plugins/lib/SOURCES
+++ b/apps/plugins/lib/SOURCES
@@ -1,7 +1,4 @@
1#ifdef CPU_ARM
2/* For now, only ARM uses this for __div0 */
3gcc-support.c 1gcc-support.c
4#endif
5oldmenuapi.c 2oldmenuapi.c
6configfile.c 3configfile.c
7fixedpoint.c 4fixedpoint.c
diff --git a/apps/plugins/lib/gcc-support.c b/apps/plugins/lib/gcc-support.c
index 91744d7fbc..4ea9cfd13a 100644
--- a/apps/plugins/lib/gcc-support.c
+++ b/apps/plugins/lib/gcc-support.c
@@ -28,3 +28,23 @@ void __attribute__((naked)) __div0(void)
28 asm volatile("bx %0" : : "r"(rb->__div0)); 28 asm volatile("bx %0" : : "r"(rb->__div0));
29} 29}
30#endif 30#endif
31
32void *memcpy(void *dest, const void *src, size_t n)
33{
34 return rb->memcpy(dest, src, n);
35}
36
37void *memset(void *dest, int c, size_t n)
38{
39 return rb->memset(dest, c, n);
40}
41
42void *memmove(void *dest, const void *src, size_t n)
43{
44 return rb->memmove(dest, src, n);
45}
46
47int memcmp(const void *s1, const void *s2, size_t n)
48{
49 return rb->memcmp(s1, s2, n);
50}
diff --git a/apps/plugins/mazezam.c b/apps/plugins/mazezam.c
index 6b9ad43cc7..2e79567740 100644
--- a/apps/plugins/mazezam.c
+++ b/apps/plugins/mazezam.c
@@ -32,8 +32,6 @@ PLUGIN_HEADER
32const struct button_mapping *plugin_contexts[] 32const struct button_mapping *plugin_contexts[]
33= {generic_directions, generic_actions}; 33= {generic_directions, generic_actions};
34 34
35MEM_FUNCTION_WRAPPERS;
36
37/* Use the standard plugin buttons rather than a hard-to-maintain list of 35/* Use the standard plugin buttons rather than a hard-to-maintain list of
38 * MazezaM specific buttons. */ 36 * MazezaM specific buttons. */
39#define MAZEZAM_UP PLA_UP 37#define MAZEZAM_UP PLA_UP
diff --git a/apps/plugins/md5sum.c b/apps/plugins/md5sum.c
index 03db427f29..9e04ecf02b 100644
--- a/apps/plugins/md5sum.c
+++ b/apps/plugins/md5sum.c
@@ -24,8 +24,6 @@
24 24
25PLUGIN_HEADER 25PLUGIN_HEADER
26 26
27MEM_FUNCTION_WRAPPERS;
28
29#define BUFFERSIZE 16384 27#define BUFFERSIZE 16384
30 28
31static int count = 0; 29static int count = 0;
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index e93b2ad244..8906c923a0 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -667,8 +667,6 @@ const struct button_mapping *plugin_contexts[] =
667}; 667};
668#define PLA_ARRAY_COUNT sizeof(plugin_contexts)/sizeof(plugin_contexts[0]) 668#define PLA_ARRAY_COUNT sizeof(plugin_contexts)/sizeof(plugin_contexts[0])
669 669
670MEM_FUNCTION_WRAPPERS;
671
672static int bpm = 120; 670static int bpm = 120;
673static int period = 0; 671static int period = 0;
674static int minitick = 0; 672static int minitick = 0;
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index bbba5ab2f9..c0e3cd4aa5 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -17,8 +17,6 @@
17PLUGIN_HEADER 17PLUGIN_HEADER
18PLUGIN_IRAM_DECLARE 18PLUGIN_IRAM_DECLARE
19 19
20MEM_FUNCTION_WRAPPERS;
21
22#define SAMP_PER_FRAME 1152 20#define SAMP_PER_FRAME 1152
23#define SAMPL2 576 21#define SAMPL2 576
24#define SBLIMIT 32 22#define SBLIMIT 32
diff --git a/apps/plugins/mpegplayer/alloc.c b/apps/plugins/mpegplayer/alloc.c
index 6b50b8f24c..a69b6accf8 100644
--- a/apps/plugins/mpegplayer/alloc.c
+++ b/apps/plugins/mpegplayer/alloc.c
@@ -153,21 +153,6 @@ bool mpeg_alloc_init(unsigned char *buf, size_t mallocsize)
153 return true; 153 return true;
154} 154}
155 155
156/* gcc may want to use memcpy before rb is initialised, so here's a trivial
157 implementation */
158
159void *memcpy(void *dest, const void *src, size_t n)
160{
161 size_t i;
162 char* d=(char*)dest;
163 char* s=(char*)src;
164
165 for (i=0;i<n;i++)
166 d[i]=s[i];
167
168 return dest;
169}
170
171/* allocate non-dedicated buffer space which mpeg2_mem_reset will free */ 156/* allocate non-dedicated buffer space which mpeg2_mem_reset will free */
172void * mpeg2_malloc(unsigned size, mpeg2_alloc_t reason) 157void * mpeg2_malloc(unsigned size, mpeg2_alloc_t reason)
173{ 158{
@@ -247,13 +232,3 @@ void codec_free(void* ptr)
247 (void)ptr; 232 (void)ptr;
248} 233}
249 234
250void *memmove(void *dest, const void *src, size_t n)
251{
252 return rb->memmove(dest,src,n);
253}
254
255void *memset(void *s, int c, size_t n)
256{
257 return rb->memset(s,c,n);
258}
259
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c
index 5c72de7c4d..ca1f0715b3 100644
--- a/apps/plugins/pictureflow.c
+++ b/apps/plugins/pictureflow.c
@@ -35,8 +35,6 @@
35 35
36PLUGIN_HEADER 36PLUGIN_HEADER
37 37
38MEM_FUNCTION_WRAPPERS
39
40/******************************* Globals ***********************************/ 38/******************************* Globals ***********************************/
41 39
42const struct button_mapping *plugin_contexts[] 40const struct button_mapping *plugin_contexts[]
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c
index 5fee435808..ce9bfa04a2 100644
--- a/apps/plugins/properties.c
+++ b/apps/plugins/properties.c
@@ -22,8 +22,6 @@
22 22
23PLUGIN_HEADER 23PLUGIN_HEADER
24 24
25MEM_FUNCTION_WRAPPERS;
26
27bool its_a_dir = false; 25bool its_a_dir = false;
28 26
29char str_filename[MAX_PATH]; 27char str_filename[MAX_PATH];
diff --git a/apps/plugins/robotfindskitten.c b/apps/plugins/robotfindskitten.c
index 056b799a52..7ae572152a 100644
--- a/apps/plugins/robotfindskitten.c
+++ b/apps/plugins/robotfindskitten.c
@@ -626,8 +626,6 @@ int screen[X_MAX + 1][Y_MAX + 1];
626 * 626 *
627 *****************************************************************************/ 627 *****************************************************************************/
628 628
629MEM_FUNCTION_WRAPPERS
630
631static void drawchar(int x, int y, char c) 629static void drawchar(int x, int y, char c)
632{ 630{
633 char str[2]; 631 char str[2];
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index 84dcc33ef0..0352f0beb0 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -58,13 +58,6 @@ void *my_malloc(size_t size)
58 return alloc; 58 return alloc;
59} 59}
60 60
61/* Using #define isn't enough with GCC 4.0.1 */
62
63void* memcpy(void* dst, const void* src, size_t size)
64{
65 return rb->memcpy(dst, src, size);
66}
67
68static void setoptions (void) 61static void setoptions (void)
69{ 62{
70 int fd; 63 int fd;
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c
index 7423d75ebd..19d0860ee8 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -306,8 +306,6 @@ extern int errno;
306int errno; 306int errno;
307#endif 307#endif
308 308
309MEM_FUNCTION_WRAPPERS;
310
311static int drawcolor=0; /* Current color (in palette) */ 309static int drawcolor=0; /* Current color (in palette) */
312static int bgdrawcolor=9; /* Current background color (in palette) */ 310static int bgdrawcolor=9; /* Current background color (in palette) */
313bool isbg = false; /* gruik ugly hack alert */ 311bool isbg = false; /* gruik ugly hack alert */
diff --git a/apps/plugins/shortcuts/shortcuts_common.c b/apps/plugins/shortcuts/shortcuts_common.c
index fbf6d81d61..a06abd3f7f 100644
--- a/apps/plugins/shortcuts/shortcuts_common.c
+++ b/apps/plugins/shortcuts/shortcuts_common.c
@@ -21,7 +21,6 @@
21 ****************************************************************************/ 21 ****************************************************************************/
22 22
23#include "shortcuts.h" 23#include "shortcuts.h"
24MEM_FUNCTION_WRAPPERS;
25 24
26#define SHORTCUTS_FILENAME "/shortcuts.link" 25#define SHORTCUTS_FILENAME "/shortcuts.link"
27 26
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c
index 931a802920..e8ccdaca10 100644
--- a/apps/plugins/sokoban.c
+++ b/apps/plugins/sokoban.c
@@ -467,8 +467,6 @@ static struct BufferedBoards {
467} buffered_boards; 467} buffered_boards;
468 468
469 469
470MEM_FUNCTION_WRAPPERS;
471
472static char buf[ROWS*(COLS + 1)]; /* Enough for a whole board or a filename */ 470static char buf[ROWS*(COLS + 1)]; /* Enough for a whole board or a filename */
473 471
474 472
diff --git a/apps/plugins/test_greylib_bitmap_scale.c b/apps/plugins/test_greylib_bitmap_scale.c
index 2117c6f7d4..27bbbbb242 100644
--- a/apps/plugins/test_greylib_bitmap_scale.c
+++ b/apps/plugins/test_greylib_bitmap_scale.c
@@ -35,8 +35,6 @@ GREY_INFO_STRUCT
35static unsigned char grey_bm_buf[LCD_WIDTH * LCD_HEIGHT + 35static unsigned char grey_bm_buf[LCD_WIDTH * LCD_HEIGHT +
36 BM_SCALED_SIZE(LCD_WIDTH,0,FORMAT_NATIVE,0)]; 36 BM_SCALED_SIZE(LCD_WIDTH,0,FORMAT_NATIVE,0)];
37 37
38MEM_FUNCTION_WRAPPERS
39
40/* this is the plugin entry point */ 38/* this is the plugin entry point */
41enum plugin_status plugin_start(const void* parameter) 39enum plugin_status plugin_start(const void* parameter)
42{ 40{
diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c
index a1d4e630b8..a3bd0a9d59 100644
--- a/apps/plugins/wav2wv.c
+++ b/apps/plugins/wav2wv.c
@@ -29,14 +29,6 @@ PLUGIN_HEADER
29 29
30#define SAMPLES_PER_BLOCK 22050 30#define SAMPLES_PER_BLOCK 22050
31 31
32void *memset(void *s, int c, size_t n) {
33 return(rb->memset(s,c,n));
34}
35
36void *memcpy(void *dest, const void *src, size_t n) {
37 return(rb->memcpy(dest,src,n));
38}
39
40static char *audiobuf; 32static char *audiobuf;
41static ssize_t audiobuflen; 33static ssize_t audiobuflen;
42 34
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c
index 76644e520d..2c25eba724 100644
--- a/apps/plugins/xobox.c
+++ b/apps/plugins/xobox.c
@@ -306,8 +306,6 @@ static int speed = 6; /* CYCLETIME = (11-speed)*10 ms */
306static int difficulty = 75; /* Percentage of screen that needs to be filled 306static int difficulty = 75; /* Percentage of screen that needs to be filled
307 * in order to win the game */ 307 * in order to win the game */
308 308
309MEM_FUNCTION_WRAPPERS;
310
311static bool quit = false; 309static bool quit = false;
312 310
313static unsigned int board[BOARD_H][BOARD_W]; 311static unsigned int board[BOARD_H][BOARD_W];