aboutsummaryrefslogtreecommitdiff
path: root/desiredata
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-04-24 20:44:03 +0000
committerN.N. <matju@users.sourceforge.net>2009-04-24 20:44:03 +0000
commite26c07908a00579b98de12931996476ea75dbdab (patch)
treefb457196cd8c8a17f837692fee173db2d4a2e797 /desiredata
parent1f0ba6b7f3bec530f23b7e8bcce8dcc070633169 (diff)
remove gcc 4.2 warning in binbuf_write, binbuf_read, binbuf_read_via_canvas, binbuf_read_via_path
svn path=/trunk/; revision=11127
Diffstat (limited to 'desiredata')
-rw-r--r--desiredata/src/kernel.c8
-rw-r--r--desiredata/src/m_pd.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/desiredata/src/kernel.c b/desiredata/src/kernel.c
index 67c59b50..69ce456c 100644
--- a/desiredata/src/kernel.c
+++ b/desiredata/src/kernel.c
@@ -1988,7 +1988,7 @@ static FILE *binbuf_dofopen(const char *s, const char *mode) {
return fopen(namebuf, mode);
}
-int binbuf_read(t_binbuf *b, char *filename, char *dirname, int flags) {
+int binbuf_read(t_binbuf *b, const char *filename, char *dirname, int flags) {
long length;
char *buf;
char *namebuf=0;
@@ -2014,7 +2014,7 @@ int binbuf_read(t_binbuf *b, char *filename, char *dirname, int flags) {
}
/* read a binbuf from a file, via the search patch of a canvas */
-int binbuf_read_via_canvas(t_binbuf *b, char *filename, t_canvas *canvas, int flags) {
+int binbuf_read_via_canvas(t_binbuf *b, const char *filename, t_canvas *canvas, int flags) {
char *buf, *bufptr;
int fd = canvas_open2(canvas, filename, "", &buf, &bufptr, 0);
if (fd<0) {error("%s: can't open", filename); return 1;}
@@ -2023,7 +2023,7 @@ int binbuf_read_via_canvas(t_binbuf *b, char *filename, t_canvas *canvas, int fl
}
/* old version */
-int binbuf_read_via_path(t_binbuf *b, char *filename, char *dirname, int flags) {
+int binbuf_read_via_path(t_binbuf *b, char const *filename, char *dirname, int flags) {
char *buf, *bufptr;
int fd = open_via_path2(dirname, filename, "", &buf, &bufptr, 0);
if (fd<0) {error("%s: can't open", filename); return 1;}
@@ -2037,7 +2037,7 @@ int binbuf_read_via_path(t_binbuf *b, char *filename, char *dirname, int flags)
static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd);
/* write a binbuf to a text file. If "crflag" is set we suppress semicolons. */
-int binbuf_write(t_binbuf *x, char *filename, char *dir, int crflag) {
+int binbuf_write(t_binbuf *x, const char *filename, char *dir, int crflag) {
char sbuf[WBUFSIZE];
ostringstream fbuf;
char *bp = sbuf, *ep = sbuf + WBUFSIZE;
diff --git a/desiredata/src/m_pd.h b/desiredata/src/m_pd.h
index 5ccefd26..8b9d7235 100644
--- a/desiredata/src/m_pd.h
+++ b/desiredata/src/m_pd.h
@@ -457,10 +457,10 @@ EXTERN void binbuf_print(t_binbuf *x);
EXTERN int binbuf_getnatom(t_binbuf *x);
EXTERN t_atom *binbuf_getvec(t_binbuf *x);
EXTERN void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv);
-EXTERN int binbuf_read( t_binbuf *b, char *filename, char *dirname, int flags);
-EXTERN int binbuf_read_via_canvas(t_binbuf *b, char *filename, t_canvas *canvas, int flags);
-EXTERN int binbuf_read_via_path( t_binbuf *b, char *filename, char *dirname, int flags);
-EXTERN int binbuf_write( t_binbuf *x, char *filename, char *dir, int flags);
+EXTERN int binbuf_read( t_binbuf *b, const char *filename, char *dirname, int flags);
+EXTERN int binbuf_read_via_canvas(t_binbuf *b, const char *filename, t_canvas *canvas, int flags);
+EXTERN int binbuf_read_via_path( t_binbuf *b, const char *filename, char *dirname, int flags);
+EXTERN int binbuf_write( t_binbuf *x, const char *filename, char *dir, int flags);
EXTERN void binbuf_evalfile(t_symbol *name, t_symbol *dir);
EXTERN t_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew);