Use @"" constant strings.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@192 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1995-03-23 03:58:37 +00:00
parent 51be0428b1
commit e3e3d3ce4f
3 changed files with 9 additions and 5 deletions

View file

@ -1,6 +1,7 @@
#include <objects/Connection.h>
#include "first-server.h"
#include <objects/String.h>
int main(int argc, char *argv[])
{
@ -10,12 +11,13 @@ int main(int argc, char *argv[])
{
printf("Looking for connection named `firstserver' on host `%s'...\n",
argv[2]);
s = [Connection rootProxyAtName:"firstserver" onHost:argv[2]];
s = [Connection rootProxyAtName:@"firstserver"
onHost:[String stringWithCString:argv[2]]];
}
else
{
printf("Looking for connection named `firstserver' on localhost...\n");
s = [Connection rootProxyAtName:"firstserver"];
s = [Connection rootProxyAtName:@"firstserver"];
}
printf("Found connection named `firstserver'\n");
@ -28,7 +30,7 @@ int main(int argc, char *argv[])
printf("Shutting down my connection to the server\n");
[s free];
[s release];
exit(0);
}

View file

@ -1,6 +1,7 @@
#include <objects/Connection.h>
#include "first-server.h"
#include <objects/String.h>
@implementation FirstServer
- sayHiTo: (char *)name
@ -19,7 +20,7 @@ int main()
/* Register a connection that provides the server object to the network */
printf("Registering a connection for the server using name `firstserver'\n");
c = [Connection newRegisteringAtName:"firstserver"
c = [Connection newRegisteringAtName:@"firstserver"
withRootObject:s];
/* Run the connection */

View file

@ -1,6 +1,7 @@
#include "second-server.h"
#include "second-client.h"
#include <objects/Connection.h>
#include <objects/String.h>
@implementation SecondServer
@ -77,7 +78,7 @@ int main(int argc, char *argv[])
s = [[SecondServer alloc] init];
c = [Connection newRegisteringAtName:"secondserver" withRootObject:s];
c = [Connection newRegisteringAtName:@"secondserver" withRootObject:s];
printf("Regsitered server object on localhost with name `secondserver'\n");
[c setDelegate:s];