[PD-cvs] pd/src u_pdsend.c,1.1.1.3.2.1,1.1.1.3.2.2
Tim Blechmann
timblech at users.sourceforge.net
Fri Apr 2 00:20:46 CEST 2004
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25792
Modified Files:
Tag: devel_0_37
u_pdsend.c
Log Message:
reverted to 1.1.1.3
Index: u_pdsend.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_pdsend.c,v
retrieving revision 1.1.1.3.2.1
retrieving revision 1.1.1.3.2.2
diff -C2 -d -r1.1.1.3.2.1 -r1.1.1.3.2.2
*** u_pdsend.c 1 Apr 2004 09:54:58 -0000 1.1.1.3.2.1
--- u_pdsend.c 1 Apr 2004 22:20:43 -0000 1.1.1.3.2.2
***************
*** 49,63 ****
else goto usage;
}
-
- //patch: support for command line messages by tim blechmann
- char message[BUFSIZE*10]; //we allow pretty long messages
- if (argc == 5)
- {
- strncpy(message,*(argv+4),strlen(*(argv+4)));
- }
- if (argc > 5)
- goto usage;
- //end of patch
-
else protocol = SOCK_STREAM;
#ifdef MSW
--- 49,52 ----
***************
*** 112,136 ****
}
#endif
-
- //patch: support for command line messages by tim blechmann
- if (argc==5)
- {
- char *bp, nsent, nsend;
- nsend = strlen(message);
- for (bp = message, nsent = 0; nsent < nsend;)
- {
- int res = send(sockfd, message, nsend-nsent, 0);
- if (res < 0)
- {
- sockerror("send");
- goto done;
- }
- nsent += res;
- bp += res;
- }
- }
- else
- //end of patch
-
/* now loop reading stdin and sending it to socket */
while (1)
--- 101,104 ----
***************
*** 157,166 ****
exit (0);
usage:
! //usage message adapted to the command line message patch
! fprintf(stderr,
! "usage: pdsend <portnumber> [host] [udp|tcp] [\"message\"]\n");
fprintf(stderr, "(default is localhost and tcp)\n");
- fprintf(stderr, "(if no message is given, pdsend reads from stdin)\n");
-
exit(1);
}
--- 125,130 ----
exit (0);
usage:
! fprintf(stderr, "usage: pdsend <portnumber> [host] [udp|tcp]\n");
fprintf(stderr, "(default is localhost and tcp)\n");
exit(1);
}
More information about the Pd-cvs
mailing list