OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
{\
if (returned_st == expected_st) { \
}\
else { \
dce_error_inq_text(returned_st, \
(unsigned char *)unexpected, &dce_status); \
dce_error_inq_text(expected_st,\
(unsigned char *)expected, &dce_status); \
printf("FAILED %s()\nresult: %s\nexpected: %s\n\n", \
func, unexpected, expected); \
}\
}\
static unsigned char unexpected[dce_c_error_string_len];
static unsigned char expected[dce_c_error_string_len];
static int dce_status;
int
main(int argc, char *argv[])
{
error_status_t status;
int i;
rpc_ns_handle_t inq_contxt;
rpc_binding_vector_t *binding_vector;
rpc_codeset_mgmt_p_t arr;
pthread_t this_thread = pthread_self();
sigset_t sigset;
char *nsi_entry_name;
char *server_locale_name;
error_status_t expected = rpc_s_ok;
int server_pid;
/* The environment variable I18N_SERVER_ENTRY needs
* to be set before running this program. This is
* not a DCE environment variable, so you can set up
* your own environment variable if you like.
*/
nsi_entry_name = getenv("I18N_SERVER_ENTRY");
(void)pthread_mutex_init(&mutex, pthread_mutexattr_default);
/* Set the locale. In this way, the current locale
* information is extracted from XPG/POSIX defined
* environment variable LANG or LC_ALL.
*/
setlocale(LC_ALL, "");
/*
* Get supported code sets.
*/
rpc_rgy_get_codesets (
&arr,
&status );
15 18 Tandem Computers Incorporated 124245