[PD-cvs] pd/src m_binbuf.c, 1.4.4.1.2.8.2.8, 1.4.4.1.2.8.2.9 x_misc.c, 1.2.8.1.2.2, 1.2.8.1.2.3 x_net.c, 1.2.4.2.2.2.2.2, 1.2.4.2.2.2.2.3
Mathieu Bouchard
matju at users.sourceforge.net
Wed Dec 20 10:09:21 CET 2006
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5689
Modified Files:
Tag: desiredata
m_binbuf.c x_misc.c x_net.c
Log Message:
stop using stderr
Index: m_binbuf.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_binbuf.c,v
retrieving revision 1.4.4.1.2.8.2.8
retrieving revision 1.4.4.1.2.8.2.9
diff -C2 -d -r1.4.4.1.2.8.2.8 -r1.4.4.1.2.8.2.9
*** m_binbuf.c 20 Dec 2006 08:42:28 -0000 1.4.4.1.2.8.2.8
--- m_binbuf.c 20 Dec 2006 09:09:19 -0000 1.4.4.1.2.8.2.9
***************
*** 24,27 ****
--- 24,28 ----
#include <string.h>
#include <stdarg.h>
+ #include <errno.h>
struct _binbuf
***************
*** 582,599 ****
strcat(namebuf, filename);
if ((fd = binbuf_doopen(namebuf, 0)) < 0) {
! fprintf(stderr, "open: ");
! perror(namebuf);
return 1;
}
if ((length = lseek(fd, 0, SEEK_END)) < 0 || lseek(fd, 0, SEEK_SET) < 0
|| !(buf = (char *)t_getbytes(length))) {
! fprintf(stderr, "lseek: ");
! perror(namebuf);
close(fd);
return 1;
}
if ((readret = read(fd, buf, length)) < length) {
! fprintf(stderr, "read (%d %ld) -> %d\n", fd, length, readret);
! perror(namebuf);
close(fd);
t_freebytes(buf, length);
--- 583,597 ----
strcat(namebuf, filename);
if ((fd = binbuf_doopen(namebuf, 0)) < 0) {
! error("open: %s: %s",namebuf,strerror(errno));
return 1;
}
if ((length = lseek(fd, 0, SEEK_END)) < 0 || lseek(fd, 0, SEEK_SET) < 0
|| !(buf = (char *)t_getbytes(length))) {
! error("lseek: %s: %s",namebuf,strerror(errno));
close(fd);
return 1;
}
if ((readret = read(fd, buf, length)) < length) {
! error("read (%d %ld) -> %d; %s: %s\n", fd, length, readret, namebuf, strerror(errno));
close(fd);
t_freebytes(buf, length);
***************
*** 654,659 ****
}
if (!(f = binbuf_dofopen(fbuf, "w"))) {
! fprintf(stderr, "open: ");
! sys_unixerror(fbuf);
goto fail;
}
--- 652,656 ----
}
if (!(f = binbuf_dofopen(fbuf, "w"))) {
! error("open: %s: %s",fbuf,strerror(errno));
goto fail;
}
***************
*** 667,671 ****
if (ep - bp < length) {
if (fwrite(sbuf, bp-sbuf, 1, f) < 1) {
! sys_unixerror(fbuf);
goto fail;
}
--- 664,668 ----
if (ep - bp < length) {
if (fwrite(sbuf, bp-sbuf, 1, f) < 1) {
! error("write: %s: %s",fbuf,strerror(errno));
goto fail;
}
***************
*** 688,692 ****
}
if (fwrite(sbuf, bp-sbuf, 1, f) < 1) {
! sys_unixerror(fbuf);
goto fail;
}
--- 685,689 ----
}
if (fwrite(sbuf, bp-sbuf, 1, f) < 1) {
! error("write: %s: %s",fbuf,strerror(errno));
goto fail;
}
Index: x_misc.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_misc.c,v
retrieving revision 1.2.8.1.2.2
retrieving revision 1.2.8.1.2.3
diff -C2 -d -r1.2.8.1.2.2 -r1.2.8.1.2.3
*** x_misc.c 20 Dec 2006 08:29:02 -0000 1.2.8.1.2.2
--- x_misc.c 20 Dec 2006 09:09:19 -0000 1.2.8.1.2.3
***************
*** 325,329 ****
if (*s->s_name) x->x_sym = s;
else x->x_sym = gensym("print");
- fprintf(stderr,"%s\n",__PRETTY_FUNCTION__);
return (x);
}
--- 325,328 ----
Index: x_net.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_net.c,v
retrieving revision 1.2.4.2.2.2.2.2
retrieving revision 1.2.4.2.2.2.2.3
diff -C2 -d -r1.2.4.2.2.2.2.2 -r1.2.4.2.2.2.2.3
*** x_net.c 3 Dec 2006 00:24:20 -0000 1.2.4.2.2.2.2.2
--- x_net.c 20 Dec 2006 09:09:19 -0000 1.2.4.2.2.2.2.3
***************
*** 55,61 ****
/* create a socket */
sockfd = socket(AF_INET, x->x_protocol, 0);
- #if 0
- fprintf(stderr, "send socket %d\n", sockfd);
- #endif
if (sockfd < 0)
{
--- 55,58 ----
***************
*** 261,267 ****
/* create a socket */
sockfd = socket(AF_INET, (udp ? SOCK_DGRAM : SOCK_STREAM), 0);
- #if 0
- fprintf(stderr, "receive socket %d\n", sockfd);
- #endif
if (sockfd < 0)
{
--- 258,261 ----
More information about the Pd-cvs
mailing list