summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2009-01-07 09:53:46 +0000
committerBjörn Stenberg <bjorn@haxx.se>2009-01-07 09:53:46 +0000
commita36cdf5b37994a301d4fdeab123ee1569a34cf46 (patch)
tree5794a1f13f93e3d7190572e07709aa1a11e9e892 /apps/plugins
parentf9329e4c9273f1b82aa5dbb36f243546ce55036d (diff)
Removed the sim_ prefix from the plugin api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19704 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/doom/rockmacros.h16
-rw-r--r--apps/plugins/rockboy/rockmacros.h14
-rw-r--r--apps/plugins/solitaire.c12
-rw-r--r--apps/plugins/text_editor.c2
-rw-r--r--apps/plugins/viewer.c2
5 files changed, 8 insertions, 38 deletions
diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h
index 6e09e6e806..78574c8440 100644
--- a/apps/plugins/doom/rockmacros.h
+++ b/apps/plugins/doom/rockmacros.h
@@ -41,28 +41,12 @@ char *my_strtok( char * s, const char * delim );
#define vsnprintf(...) rb->vsnprintf(__VA_ARGS__)
#define read_line(a,b,c) rb->read_line((a),(b),(c))
-#ifdef SIMULATOR
-#undef open
-#undef close
-#undef lseek
-#undef filesize
-#undef read
-#undef write
-#define open(a,b) rb->sim_open((a),(b))
-#define close(a) rb->sim_close((a))
-#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
-#define filesize(a) rb->sim_filesize((a))
-#define read(a,b,c) rb->sim_read((a),(b),(c))
-#define write(a,b,c) rb->sim_write((a),(b),(c))
-#else /* !SIMULATOR */
#define open(a,b) my_open((a),(b))
#define close(a) my_close((a))
#define lseek(a,b,c) rb->lseek((a),(b),(c))
#define filesize(a) rb->filesize((a))
#define read(a,b,c) rb->read((a),(b),(c))
#define write(a,b,c) rb->write((a),(b),(c))
-#endif /* !SIMULATOR */
-
#define strtok(a,b) my_strtok((a),(b))
#define strcat(a,b) rb->strcat((a),(b))
#define memset(a,b,c) rb->memset((a),(b),(c))
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h
index 179de2313f..34e8d0cd3f 100644
--- a/apps/plugins/rockboy/rockmacros.h
+++ b/apps/plugins/rockboy/rockmacros.h
@@ -60,25 +60,11 @@ void dynamic_recompile (struct dynarec_block *newblock);
#define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && ((c) <= 'Z')))
#define isalnum(c) (isdigit(c) || (isalpha(c)))
-#ifdef SIMULATOR
-#undef open
-#define open(a,b) rb->sim_open((a),(b))
-#undef lseek
-#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
-#undef close
-#define close(a) rb->sim_close((a))
-#undef read
-#define read(a,b,c) rb->sim_read((a),(b),(c))
-#undef write
-#define write(a,b,c) rb->sim_write((a),(b),(c))
-#else /* !SIMULATOR */
#define open(a,b) rb->open((a),(b))
#define lseek(a,b,c) rb->lseek((a),(b),(c))
#define close(a) rb->close((a))
#define read(a,b,c) rb->read((a),(b),(c))
#define write(a,b,c) rb->write((a),(b),(c))
-#endif /* !SIMULATOR */
-
#define strcat(a,b) rb->strcat((a),(b))
#define memset(a,b,c) rb->memset((a),(b),(c))
#define strcpy(a,b) rb->strcpy((a),(b))
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 3a11d02bda..0a9bf99f51 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -1305,7 +1305,7 @@ void delete_save_file( void )
int save_write( int fd, const void *buf, size_t count, int *checksum )
{
size_t i;
- if( rb->PREFIX(write)( fd, buf, count ) < (ssize_t)count )
+ if( rb->write( fd, buf, count ) < (ssize_t)count )
return 1;
for( i = 0; i < count; i++ )
*checksum += (int)(((const char *)buf)[i]);
@@ -1318,7 +1318,7 @@ int save_write( int fd, const void *buf, size_t count, int *checksum )
int save_read( int fd, void *buf, size_t count, int *checksum )
{
size_t i;
- if( rb->PREFIX(read)( fd, buf, count ) < (ssize_t)count )
+ if( rb->read( fd, buf, count ) < (ssize_t)count )
return 1;
for( i = 0; i < count; i++ )
*checksum -= (int)(((const char *)buf)[i]);
@@ -1341,7 +1341,7 @@ int save_game( void )
|| save_write( fd, &cards_per_draw, sizeof( int ), &checksum )
|| save_write( fd, cols, COL_NUM * sizeof( int ), &checksum )
|| save_write( fd, stacks, SUITS * sizeof( int ), &checksum )
- || ( rb->PREFIX(write)( fd, &checksum, sizeof( int ) ) < (ssize_t)(sizeof( int ) ) ) )
+ || ( rb->write( fd, &checksum, sizeof( int ) ) < (ssize_t)(sizeof( int ) ) ) )
{
rb->close( fd );
rb->splash( 2*HZ, "Error while saving game. Aborting." );
@@ -1357,9 +1357,9 @@ int load_game( void )
int checksum;
if( fd < 0 )
return -1;
- if( ( rb->PREFIX(lseek)( fd, -sizeof( int ), SEEK_END ) == -((ssize_t)sizeof( int ))-1 )
- || ( rb->PREFIX(read)( fd, &checksum, sizeof( int ) ) < ((ssize_t)sizeof( int )) )
- || ( rb->PREFIX(lseek)( fd, 0, SEEK_SET ) == -1 )
+ if( ( rb->lseek( fd, -sizeof( int ), SEEK_END ) == -((ssize_t)sizeof( int ))-1 )
+ || ( rb->read( fd, &checksum, sizeof( int ) ) < ((ssize_t)sizeof( int )) )
+ || ( rb->lseek( fd, 0, SEEK_SET ) == -1 )
|| save_read( fd, &cur_card, sizeof( int ), &checksum )
|| save_read( fd, &cur_col, sizeof( int ), &checksum )
|| save_read( fd, &sel_card, sizeof( int ), &checksum )
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c
index c9d973fe22..abb278728f 100644
--- a/apps/plugins/text_editor.c
+++ b/apps/plugins/text_editor.c
@@ -141,7 +141,7 @@ int get_eol_string(char* fn)
return 0;
else if (!fn[0])
return 0;
- fd = rb->PREFIX(open(fn,O_RDONLY));
+ fd = rb->open(fn,O_RDONLY);
if (fd<0)
return 0;
eol[0] = '\0';
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 9a4b25bffd..fd460e50e0 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -1310,7 +1310,7 @@ static void viewer_save_settings(void)/* same name as global, but not the same f
b.top_ptr_pos = 0; /* this is only kept for legassy reasons */
rb->memset(&b.filename[0],0,MAX_PATH);
rb->strcpy(b.filename,file_name);
- rb->PREFIX(lseek)(settings_fd,sizeof(signed int),SEEK_SET);
+ rb->lseek(settings_fd,sizeof(signed int),SEEK_SET);
rb->write (settings_fd, &b, sizeof(struct bookmarked_file_info));
rb->close(settings_fd);
}