aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-17 23:20:11 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:23:30 +0200
commitc0246423b5d340a263cf666d1cdc5972362cb7e3 (patch)
tree8f1440ced462bdada4a6f945082a9df814930e8f
parent6bf58497fe25026cb7adcdf1a408f24c8ba955e5 (diff)
support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close()
svn path=/trunk/externals/unauthorized/; revision=16903
-rw-r--r--blinkenlights.c7
-rw-r--r--mp3fileout~.c6
-rw-r--r--mp3write~.c7
-rw-r--r--pianoroll.c7
4 files changed, 27 insertions, 0 deletions
diff --git a/blinkenlights.c b/blinkenlights.c
index 1e49474..bd39fbe 100644
--- a/blinkenlights.c
+++ b/blinkenlights.c
@@ -53,6 +53,13 @@
#include "m_pd.h" /* standard pd stuff */
#include "g_canvas.h" /* some pd's graphical functions */
+/* support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close() */
+#if PD_MAJOR_VERSION == 0 && PD_MINOR_VERSION < 44
+#define sys_fopen fopen
+#define sys_fclose fclose
+#define sys_close close
+#endif
+
static char *blinkenlights_version = "blinkenlights: a blinkenlights movies player version 0.2 ( bugs @ ydegoyon@free.fr and chun@goto10.org )";
static int guidebug=0;
diff --git a/mp3fileout~.c b/mp3fileout~.c
index 69e76fa..ecbdfb2 100644
--- a/mp3fileout~.c
+++ b/mp3fileout~.c
@@ -59,6 +59,12 @@
#define MSG_NOSIGNAL 0
#endif
+/* support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close() */
+#if PD_MAJOR_VERSION == 0 && PD_MINOR_VERSION < 44
+#define sys_fopen fopen
+#define sys_fclose fclose
+#define sys_close close
+#endif
#include "mpg123.h" /* mpg123 decoding library from lame 3.92 */
#include "mpglib.h" /* mpglib decoding library from lame 3.92 */
diff --git a/mp3write~.c b/mp3write~.c
index 0ed6845..7012ba1 100644
--- a/mp3write~.c
+++ b/mp3write~.c
@@ -57,6 +57,13 @@
#include <lame/lame.h> /* lame encoder stuff */
#include "m_pd.h" /* standard pd stuff */
+/* support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close() */
+#if PD_MAJOR_VERSION == 0 && PD_MINOR_VERSION < 44
+#define sys_fopen fopen
+#define sys_fclose fclose
+#define sys_close close
+#endif
+
#define MY_MP3_MALLOC_IN_SIZE 65536
/* max size taken from lame readme */
#define MY_MP3_MALLOC_OUT_SIZE 1.25*MY_MP3_MALLOC_IN_SIZE+7200
diff --git a/pianoroll.c b/pianoroll.c
index 560afb9..900b50a 100644
--- a/pianoroll.c
+++ b/pianoroll.c
@@ -48,6 +48,13 @@
#include <unistd.h>
#endif
+/* support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close() */
+#if PD_MAJOR_VERSION == 0 && PD_MINOR_VERSION < 44
+#define sys_fopen fopen
+#define sys_fclose fclose
+#define sys_close close
+#endif
+
/* needed to create a pianoroll from PD's menu
void canvas_objtext(t_glist *gl, int xpos, int ypos, int selected, t_binbuf *b);
void canvas_startmotion(t_canvas *x);