Index: apps/plugins/pdbox/PDa/src/s_path.c =================================================================== --- apps/plugins/pdbox/PDa/src/s_path.c (revision 21272) +++ apps/plugins/pdbox/PDa/src/s_path.c (working copy) @@ -14,6 +14,26 @@ #define DEBUG(x) void readsf_banana( void); /* debugging */ +#ifdef ROCKBOX + +#include "plugin.h" +#include "pdbox.h" + +#include "m_pd.h" +#include "m_imp.h" +#include "s_stuff.h" + +#define open rb->open +#define close rb->close +#define strcpy rb->strcpy +#define strcat rb->strcat +#define strlen rb->strlen +#define strcmp rb->strcmp +#define strncpy rb->strncpy +#define strrchr rb->strrchr +#define strncat rb_strncat + +#else /* ROCKBOX */ #include #ifdef UNIX #include @@ -29,6 +49,7 @@ #include "s_stuff.h" #include #include +#endif /* ROCKBOX */ static t_namelist *pd_path, *pd_helppath; @@ -85,6 +106,10 @@ char temp[MAXPDSTRING]; t_namelist *nl = listwas, *rtn = listwas; +#ifdef ROCKBOX + (void) rtn; +#endif + npos = s; do { @@ -138,6 +163,10 @@ int fd = -1; char listbuf[MAXPDSTRING]; +#ifdef ROCKBOX + (void) bin; +#endif + if (name[0] == '/' #ifdef MSW || (name[1] == ':' && name[2] == '/') @@ -245,7 +274,9 @@ else #endif { +#ifndef ROCKBOX char *slash; +#endif if (sys_verbose) post("tried %s and succeeded", dirresult); sys_unbashfilename(dirresult, dirresult); close (fd); @@ -266,8 +297,12 @@ search attempts. */ void open_via_helppath(const char *name, const char *dir) { +#ifdef ROCKBOX + t_namelist thislist, *listp; +#else /*ROCKBOX */ t_namelist *nl, thislist, *listp; int fd = -1; +#endif /* ROCKBOX */ char dirbuf2[MAXPDSTRING], realname[MAXPDSTRING]; /* if directory is supplied, put it at head of search list. */ @@ -380,6 +415,10 @@ /* start an audio settings dialog window */ void glob_start_path_dialog(t_pd *dummy, t_floatarg flongform) { +#ifdef ROCKBOX + (void) dummy; + (void) flongform; +#else /* ROCKBOX */ char buf[MAXPDSTRING]; int i; t_namelist *nl; @@ -391,12 +430,19 @@ sprintf(buf, "pdtk_path_dialog %%s\n"); gfxstub_new(&glob_pdobject, glob_start_path_dialog, buf); +#endif /* ROCKBOX */ } /* new values from dialog window */ void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv) { int i; + +#ifdef ROCKBOX + (void) dummy; + (void) s; +#endif /* ROCKBOX */ + namelist_free(pd_path); pd_path = 0; for (i = 0; i < argc; i++)