Use @"" constant strings.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@193 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-03-23 04:03:38 +00:00
parent e3e3d3ce4f
commit 918f664f8b

View file

@ -1,5 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <objects/SocketPort.h> #include <objects/SocketPort.h>
#include <objects/String.h>
#define MSG "Hello from a client SocketPort." #define MSG "Hello from a client SocketPort."
#define BUFFER_SIZE 80 #define BUFFER_SIZE 80
@ -13,9 +14,10 @@ int main(int argc, char *argv[])
id rp; id rp;
if (argc > 1) if (argc > 1)
remotePort = [SocketPort newRemoteWithNumber:3 onHost:argv[1]]; remotePort = [SocketPort newRemoteWithNumber:3
onHost:[String stringWithCString:argv[1]]];
else else
remotePort = [SocketPort newRemoteWithNumber:3 onHost:""]; remotePort = [SocketPort newRemoteWithNumber:3 onHost:@""];
strcpy(b, MSG); strcpy(b, MSG);
[localPort sendPacket:b length:strlen(b) [localPort sendPacket:b length:strlen(b)