From c0246423b5d340a263cf666d1cdc5972362cb7e3 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 17 Jan 2013 23:20:11 +0000 Subject: support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close() svn path=/trunk/externals/unauthorized/; revision=16903 --- blinkenlights.c | 7 +++++++ mp3fileout~.c | 6 ++++++ mp3write~.c | 7 +++++++ pianoroll.c | 7 +++++++ 4 files changed, 27 insertions(+) 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 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 #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); -- cgit v1.2.1