mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
51be0428b1
commit
e3e3d3ce4f
3 changed files with 9 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue