summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-09-10 09:46:36 +0000
committerNils Wallménius <nils@rockbox.org>2007-09-10 09:46:36 +0000
commit04b3435afd032766a8ac93b2904166499e62c7a4 (patch)
tree85267d62d97a3ee667fcd17b5c9f22bc5ab9da65 /apps/plugins
parentcd5ad2ff6936c8f30fa7a8a78883822348052633 (diff)
downloadrockbox-04b3435afd032766a8ac93b2904166499e62c7a4.zip
rockbox-04b3435afd032766a8ac93b2904166499e62c7a4.tar.gz
rockbox-04b3435afd032766a8ac93b2904166499e62c7a4.tar.bz2
rockbox-04b3435afd032766a8ac93b2904166499e62c7a4.tar.xz
Clean up hard-coded paths
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14662 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/calendar.c10
-rw-r--r--apps/plugins/lib/configfile.c2
-rw-r--r--apps/plugins/midi/synth.c4
-rw-r--r--apps/plugins/midi2wav.c3
-rw-r--r--apps/plugins/midiplay.c3
-rw-r--r--apps/plugins/pacbox/pacbox.c4
-rw-r--r--apps/plugins/rockboy/menu.c2
-rw-r--r--apps/plugins/rockboy/rockmacros.h2
-rw-r--r--apps/plugins/snake2.c2
-rw-r--r--apps/plugins/zxbox/snapshot.c2
10 files changed, 18 insertions, 16 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index 8c0b6af..8ed6122 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -218,7 +218,7 @@ static void load_memo(struct shown *shown)
for (k = 0; k < 7; k++)
wday_has_memo[k] = false;
memos_in_memory = 0;
- fp = rb->open("/.rockbox/.memo",O_RDONLY);
+ fp = rb->open(ROCKBOX_DIR "/.memo",O_RDONLY);
if (fp > -1)
{
int count = rb->filesize(fp);
@@ -315,8 +315,8 @@ static void load_memo(struct shown *shown)
static bool save_memo(int changed, bool new_mod, struct shown *shown)
{
int fp,fq;
- fp = rb->open("/.rockbox/.memo",O_RDONLY | O_CREAT);
- fq = rb->creat("/.rockbox/~temp");
+ fp = rb->open(ROCKBOX_DIR "/.memo",O_RDONLY | O_CREAT);
+ fq = rb->creat(ROCKBOX_DIR "/~temp");
if ( (fq != -1) && (fp != -1) )
{
int i;
@@ -345,7 +345,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown)
rb->write(fq,temp,1);
}
rb->close(fp);
- fp = rb->creat("/.rockbox/.memo");
+ fp = rb->creat(ROCKBOX_DIR "/.memo");
rb->lseek(fp, 0, SEEK_SET);
rb->lseek(fq, 0, SEEK_SET);
for (i = 0; i < rb->filesize(fq); i++)
@@ -355,7 +355,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown)
}
rb->close(fp);
rb->close(fq);
- rb->remove("/.rockbox/~temp");
+ rb->remove(ROCKBOX_DIR "/~temp");
load_memo(shown);
return true;
}
diff --git a/apps/plugins/lib/configfile.c b/apps/plugins/lib/configfile.c
index 54c067c..0fbba81 100644
--- a/apps/plugins/lib/configfile.c
+++ b/apps/plugins/lib/configfile.c
@@ -33,7 +33,7 @@ void get_cfg_filename(char* buf, int buf_len, const char* filename)
s = cfg_rb->strrchr(buf, '/');
if (!s) /* should never happen */
{
- cfg_rb->snprintf(buf, buf_len, "/.rockbox/rocks/%s", filename);
+ cfg_rb->snprintf(buf, buf_len, PLUGIN_DIR "/%s", filename);
}
else
{
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index 6ec229b..00a01e4 100644
--- a/apps/plugins/midi/synth.c
+++ b/apps/plugins/midi/synth.c
@@ -131,7 +131,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
while(readChar(file)!=' ' && !eof(file));
readTextBlock(file, name);
- rb->snprintf(fn, 40, "/.rockbox/patchset/%s.pat", name);
+ rb->snprintf(fn, 40, ROCKBOX_DIR "/patchset/%s.pat", name);
/* printf("\nLOADING: <%s> ", fn); */
if(patchUsed[a]==1)
@@ -162,7 +162,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
{
readTextBlock(file, number);
readTextBlock(file, name);
- rb->snprintf(fn, 40, "/.rockbox/patchset/%s.pat", name);
+ rb->snprintf(fn, 40, ROCKBOX_DIR "/patchset/%s.pat", name);
idx = rb->atoi(number);
if(idx == 0)
diff --git a/apps/plugins/midi2wav.c b/apps/plugins/midi2wav.c
index 368c8b9..ad41451 100644
--- a/apps/plugins/midi2wav.c
+++ b/apps/plugins/midi2wav.c
@@ -107,7 +107,8 @@ int midimain(void * filename)
struct MIDIfile * mf = loadFile(filename);
rb->splash(HZ/5, "LOADING PATCHES");
- if (initSynth(mf, "/.rockbox/patchset/patchset.cfg", "/.rockbox/patchset/drums.cfg") == -1)
+ if (initSynth(mf, ROCKBOX_DIR "/patchset/patchset.cfg",
+ ROCKBOX_DIR "/patchset/drums.cfg") == -1)
{
return -1;
}
diff --git a/apps/plugins/midiplay.c b/apps/plugins/midiplay.c
index c19ca04..59594a9 100644
--- a/apps/plugins/midiplay.c
+++ b/apps/plugins/midiplay.c
@@ -237,7 +237,8 @@ int midimain(void * filename)
return -1;
}
- if (initSynth(mf, "/.rockbox/patchset/patchset.cfg", "/.rockbox/patchset/drums.cfg") == -1)
+ if (initSynth(mf, ROCKBOX_DIR "/patchset/patchset.cfg",
+ ROCKBOX_DIR "/patchset/drums.cfg") == -1)
return -1;
//#ifndef SIMULATOR
diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c
index 712c3af..fad2735 100644
--- a/apps/plugins/pacbox/pacbox.c
+++ b/apps/plugins/pacbox/pacbox.c
@@ -68,7 +68,7 @@ static bool loadFile( const char * name, unsigned char * buf, int len )
{
char filename[MAX_PATH];
- rb->snprintf(filename,sizeof(filename),"/.rockbox/pacman/%s",name);
+ rb->snprintf(filename,sizeof(filename), ROCKBOX_DIR "/pacman/%s",name);
int fd = rb->open( filename, O_RDONLY);
@@ -419,7 +419,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
SETTINGS_VERSION);
}
} else {
- rb->splash(HZ*2, "No ROMs in /.rockbox/pacman/");
+ rb->splash(HZ*2, "No ROMs in %s/pacman/", ROCKBOX_DIR);
}
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c
index 0c9e46b..e896e26 100644
--- a/apps/plugins/rockboy/menu.c
+++ b/apps/plugins/rockboy/menu.c
@@ -35,7 +35,7 @@ static void do_slot_menu(bool is_load);
static void munge_name(char *buf, size_t bufsiz);
/* directory ROM save slots belong in */
-#define STATE_DIR "/.rockbox/rockboy"
+#define STATE_DIR ROCKBOX_DIR "/rockboy"
int getbutton(char *text)
{
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h
index 83b5998..01beb43 100644
--- a/apps/plugins/rockboy/rockmacros.h
+++ b/apps/plugins/rockboy/rockmacros.h
@@ -121,6 +121,6 @@ struct options {
bool plugbuf;
extern struct options options;
-#define savedir "/.rockbox/rockboy"
+#define savedir ROCKBOX_DIR "/rockboy"
#endif
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index dbefef6..385af15 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -370,7 +370,7 @@ int load_all_levels(void)
return 0;
}
-/*Hi-Score reading and writing to file "/.rockbox/snake2.levels" function */
+/*Hi-Score reading and writing to file "/.rockbox/rocks/games/snake2.levels" function */
void iohiscore(void)
{
int fd;
diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c
index d693d1f..0010550 100644
--- a/apps/plugins/zxbox/snapshot.c
+++ b/apps/plugins/zxbox/snapshot.c
@@ -37,7 +37,7 @@
#define COMPRESS_SAVE 1
-static char quick_snap_file[]="/.rockbox/zxboxq.z80";
+static char quick_snap_file[]= ROCKBOX_DIR "/zxboxq.z80";
typedef struct {
int isfile;