aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2002-11-26 11:08:22 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2002-11-26 11:08:22 +0000
commit2979b062ddcbdc9f2c78fe410a322b470e4a29db (patch)
tree964e5b39497b1c0a2a9d46a1bef9d8833ce5b910
parent39bfab603950686c2b007be44fc75643daacc932 (diff)
replaced UNIX with unix
svn path=/trunk/externals/pdogg/; revision=249
-rw-r--r--oggamp~/oggamp~.c4
-rw-r--r--oggcast~/oggcast~.c4
-rw-r--r--oggread~/oggread~.c4
-rw-r--r--oggwrite~/oggwrite~.c30
4 files changed, 21 insertions, 21 deletions
diff --git a/oggamp~/oggamp~.c b/oggamp~/oggamp~.c
index 807a415..452532e 100644
--- a/oggamp~/oggamp~.c
+++ b/oggamp~/oggamp~.c
@@ -42,7 +42,7 @@
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
-#ifdef UNIX
+#ifdef unix
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -1488,4 +1488,4 @@ void oggamp_tilde_setup(void)
class_addmethod(oggamp_class, (t_method)oggamp_recover, gensym("recover"), A_FLOAT, 0);
class_addmethod(oggamp_class, (t_method)oggamp_print, gensym("print"), 0);
class_sethelpsymbol(oggamp_class, gensym("help-oggamp~.pd"));
-} \ No newline at end of file
+}
diff --git a/oggcast~/oggcast~.c b/oggcast~/oggcast~.c
index 67ea43a..4210fa6 100644
--- a/oggcast~/oggcast~.c
+++ b/oggcast~/oggcast~.c
@@ -38,7 +38,7 @@
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
-#ifdef UNIX
+#ifdef unix
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -1299,4 +1299,4 @@ void oggcast_tilde_setup(void)
class_addmethod(oggcast_class, (t_method)oggcast_vbr, gensym("vbr"), A_FLOAT, A_FLOAT, A_FLOAT, 0);
class_addanything(oggcast_class, oggcast_comment);
class_sethelpsymbol(oggcast_class, gensym("help-oggcast~.pd"));
-} \ No newline at end of file
+}
diff --git a/oggread~/oggread~.c b/oggread~/oggread~.c
index af07fb0..8cc879a 100644
--- a/oggread~/oggread~.c
+++ b/oggread~/oggread~.c
@@ -36,7 +36,7 @@
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
-#ifdef UNIX
+#ifdef unix
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -290,7 +290,7 @@ static void oggread_open(t_oggread *x, t_symbol *filename)
post("oggread~: previous file closed");
}
/* open file for reading */
-#ifdef UNIX
+#ifdef unix
if((x->x_file = fopen(filename->s_name, "r")) < 0)
#else
if((x->x_file = fopen(filename->s_name, "rb")) < 0)
diff --git a/oggwrite~/oggwrite~.c b/oggwrite~/oggwrite~.c
index 1648168..f9619de 100644
--- a/oggwrite~/oggwrite~.c
+++ b/oggwrite~/oggwrite~.c
@@ -42,7 +42,7 @@
#include <malloc.h>
#include <ctype.h>
#include <time.h>
-#ifdef UNIX
+#ifdef unix
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -124,7 +124,7 @@ typedef struct _oggwrite
static void sys_closesocket(int fd)
{
-#ifdef UNIX
+#ifdef unix
close(fd);
#endif
#ifdef NT
@@ -145,7 +145,7 @@ static int oggwrite_write(t_oggwrite *x)
{
int result=ogg_stream_pageout(&(x->x_os),&(x->x_og));
if(result==0)break;
-#ifndef UNIX
+#ifndef unix
err = _write(x->x_fd, x->x_og.header, x->x_og.header_len);
#else
err = write(x->x_fd, x->x_og.header, x->x_og.header_len);
@@ -156,7 +156,7 @@ static int oggwrite_write(t_oggwrite *x)
x->x_eos = 1; /* indicate (artificial) end of stream */
return err;
}
-#ifndef UNIX
+#ifndef unix
err = _write(x->x_fd, x->x_og.body, x->x_og.body_len);
#else
err = write(x->x_fd, x->x_og.body, x->x_og.body_len);
@@ -219,7 +219,7 @@ static void oggwrite_encode(t_oggwrite *x)
{
if(x->x_fd > 0)
{
-#ifndef UNIX
+#ifndef unix
if(_close(x->x_fd) < 0)
#else
if(close(x->x_fd) < 0)
@@ -373,7 +373,7 @@ static void oggwrite_vorbis_init(t_oggwrite *x)
{
int result=ogg_stream_flush(&(x->x_os),&(x->x_og));
if(result==0)break;
-#ifndef UNIX
+#ifndef unix
err = _write(x->x_fd, x->x_og.header, x->x_og.header_len);
#else
err = write(x->x_fd, x->x_og.header, x->x_og.header_len);
@@ -385,7 +385,7 @@ static void oggwrite_vorbis_init(t_oggwrite *x)
x->x_vorbis = -1; /* stop encoding instantly */
if(x->x_fd > 0)
{
-#ifndef UNIX
+#ifndef unix
if(_close(x->x_fd) < 0)
#else
if(close(x->x_fd) < 0)
@@ -397,7 +397,7 @@ static void oggwrite_vorbis_init(t_oggwrite *x)
}
return;
}
-#ifndef UNIX
+#ifndef unix
err = _write(x->x_fd, x->x_og.body, x->x_og.body_len);
#else
err = write(x->x_fd, x->x_og.body, x->x_og.body_len);
@@ -409,7 +409,7 @@ static void oggwrite_vorbis_init(t_oggwrite *x)
x->x_vorbis = -1; /* stop encoding instantly */
if(x->x_fd > 0)
{
-#ifndef UNIX
+#ifndef unix
if(_close(x->x_fd) < 0)
#else
if(close(x->x_fd) < 0)
@@ -449,7 +449,7 @@ static void oggwrite_open(t_oggwrite *x, t_symbol *sfile)
/* closing previous file descriptor */
if(x->x_fd > 0)
{
-#ifndef UNIX
+#ifndef unix
if(_close(x->x_fd) < 0)
#else
if(close(x->x_fd) < 0)
@@ -465,7 +465,7 @@ static void oggwrite_open(t_oggwrite *x, t_symbol *sfile)
x->x_recflag = 0;
}
-#ifndef UNIX
+#ifndef unix
if((x->x_fd = _open( sfile->s_name, x->x_file_open_mode, _S_IREAD|_S_IWRITE)) < 0)
#else
if((x->x_fd = open( sfile->s_name, x->x_file_open_mode, S_IRWXU|S_IRWXG|S_IRWXO )) < 0)
@@ -490,7 +490,7 @@ static void oggwrite_open(t_oggwrite *x, t_symbol *sfile)
/* setting file write mode to append */
static void oggwrite_append(t_oggwrite *x)
{
-#ifndef UNIX
+#ifndef unix
x->x_file_open_mode = _O_CREAT|_O_WRONLY|_O_APPEND|_O_BINARY;
#else
x->x_file_open_mode = O_CREAT|O_WRONLY|O_APPEND|O_NONBLOCK;
@@ -501,7 +501,7 @@ static void oggwrite_append(t_oggwrite *x)
/* setting file write mode to truncate */
static void oggwrite_truncate(t_oggwrite *x)
{
-#ifndef UNIX
+#ifndef unix
x->x_file_open_mode = _O_CREAT|_O_WRONLY|_O_TRUNC|_O_BINARY;
#else
x->x_file_open_mode = O_CREAT|O_WRONLY|O_TRUNC|O_NONBLOCK;
@@ -680,7 +680,7 @@ static void oggwrite_free(t_oggwrite *x)
}
if(x->x_fd >= 0)
{ /* close file */
-#ifndef UNIX
+#ifndef unix
_close(x->x_fd);
#else
close(x->x_fd);
@@ -697,7 +697,7 @@ static void *oggwrite_new(void)
outlet_new(&x->x_obj, gensym("float"));
x->x_outpages = outlet_new(&x->x_obj, gensym("float"));
x->x_fd = -1;
-#ifndef UNIX
+#ifndef unix
x->x_file_open_mode = _O_CREAT|_O_WRONLY|_O_APPEND|_O_BINARY;
#else
x->x_file_open_mode = O_CREAT|O_WRONLY|O_APPEND|O_NONBLOCK;