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:
Andrew McCallum 1995-03-23 04:03:38 +00:00
parent 1999fd09be
commit dbdd04782f

View file

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