OSF DCE Application Development Guide--Introduction and Style Guide
A Sample Application
/* 4. The message "Manager Type ID: <manager_UUID_string>" is */
/* displayed. */
/* */
/* 5. The message "Object ID: <object_UUID_string>" is dis- */
/* played. */
/* */
/* 6. The message "Object Text: <text_string>" is displayed. */
/* */
/* 7. --And this should be followed by some serviceability in- */
/* formational (soon to be debug) messages, from the server. */
/* */
/* ...This is all assuming, of course, that no errors occur. */
fprintf(stdout, "sample_client: Entering do_client_command_line()...0);
if (argc < 2)
{
fprintf(stdout, "0sage:0);
fprintf(stdout, " %s {<object_name> | kill}0, argv[0]);
fprintf(stdout, "Note that the client imports via RPC_DEFAULT_ENTRY!0);
exit(1);
}
if ((argc == 2) && !strcmp("kill", argv[1]))
{
fprintf(stdout, "sample_client: Kill server option selected.0);
*kill_server = TRUE;
}
else
{
fprintf(stdout, "sample_client: Remote call option selected.0);
/* Get the list of object entry names from the command */
/* line... */
objectname_vector->count = 1;
objectname_vector->name[0] = (unsigned_char_p_t)malloc(strlen(argv[1]));
strcpy((char *)objectname_vector->name[0], argv[1]);
fprintf(stdout,
"sample_client: objectname_vector->name == %s0,
objectname_vector->name[0]);
}
return 0;
}
124246 Tandem Computers Incorporated A− 89