forked from len0rd/rockbox
Clean up hard-coded paths
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14662 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cd5ad2ff69
commit
04b3435afd
11 changed files with 19 additions and 17 deletions
|
@ -108,7 +108,7 @@ bool logfdump(void)
|
|||
/* nothing is logged just yet */
|
||||
return false;
|
||||
|
||||
fd = open("/.rockbox/logf.txt", O_CREAT|O_WRONLY|O_TRUNC);
|
||||
fd = open(ROCKBOX_DIR "/logf.txt", O_CREAT|O_WRONLY|O_TRUNC);
|
||||
if(-1 != fd) {
|
||||
unsigned char buffer[MAX_LOGF_ENTRY +1];
|
||||
int index = logfindex-1;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -121,6 +121,6 @@ struct options {
|
|||
bool plugbuf;
|
||||
|
||||
extern struct options options;
|
||||
#define savedir "/.rockbox/rockboy"
|
||||
#define savedir ROCKBOX_DIR "/rockboy"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue