(main): Let user set registered name from command line.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1070 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-03-06 14:42:35 +00:00
parent 1716353d46
commit 6aa03e5cd3

View file

@ -38,14 +38,20 @@ int main(int argc, char *argv[])
#endif
if (argc > 1)
p = [Connection rootProxyAtName:@"test2server"
onHost:[String stringWithCString:argv[1]]];
{
if (argc > 2)
p = [Connection rootProxyAtName: [String stringWithCString: argv[2]]
onHost: [String stringWithCString:argv[1]]];
else
p = [Connection rootProxyAtName:@"test2server"
onHost:[String stringWithCString:argv[1]]];
}
else
p = [Connection rootProxyAtName:@"test2server"
onHost:nil];
c = [p connectionForProxy];
type = [c _typeForSelector:sel_get_any_uid("name")
type = [c typeForSelector:sel_get_any_uid("name")
remoteTarget:[p targetForProxy]];
printf(">>type = %s\n", type);