DCE Application Programming Guide
Sample Application Listings
HP NonStop DCE Application Programming Guide—429551-003
A-17
The Server File
The Server File
The server file is shown in Figure A-11 on page A-18.
Figure A-10. The Error Macro File in a Release 1.1 Port
/*
* (c) Copyright 1993 Harold W. Lockhart and Frederic M. Oldfield
* ALL RIGHTS RESERVED
*
* Permission is hereby granted to use, copy, modify and freely
* distribute this software for any purpose without fee, provided
* that the above copyright notice and this permission notice are
* retained in it.
*
* The authors make no representations about the suitability of
* this software for any purpose. It is provided "as is" without
* express or implied warranty. The authors assume no liability,
* direct or consequential, resulting from its use.
*/
#include <dce/dce_error.h>
#define ERROR(msg)\
{dce_svc_printf(INF_S_ERROR_MSG, \
msg);}
#define WARN(msg)\
{dce_svc_printf(INF_S_WARNING_MSG, \
msg);}
#define ERR_CHK(stat, msg) if (stat !=rpc_s_ok)\
{dce_error_string_t _dcemsg_; int _st_;\
dce_error_inq_text( stat, _dcemsg_, &_st_ );\
dce_svc_printf(INF_S_DCE_ERROR_MSG, \
msg, _dcemsg_);}
#define WRN_CHK(stat, msg) if (stat != rpc_s_ok)\
{dce_error_string_t _dcemsg_; int _st_;\
dce_error_inq_text( stat, _dcemsg_, &_st_ );\
dce_svc_printf(INF_S_DCE_WARNING_MSG,\
msg,_dcemsg_);}
#define CND_CHK(cond, msg) if ((cond))\
{dce_svc_printf(INF_S_ERROR_MSG, \
msg);}