Client message callback example

This is an example of a client message callback:

        /*
         ** ex_clientmsg_cb()
         **
         ** Type of function:
         **      Example program client message handler
         **
         ** Purpose:
         **      Installed as a callback into Open Client.
         **
         ** Returns:
         **      CS_SUCCEED
         **
         ** Side Effects:
         **      None
         */
        CS_RETCODE CS_PUBLIC
         ex_clientmsg_cb(context, connection, errmsg)
         CS_CONTEXT        *context
         CS_CONNECTION     *connection;
         CS_CLIENTMSG      *errmsg;
         {
             fprintf(EX_ERROR_OUT, "\nOpen Client Message:\n");
             fprintf(EX_ERROR_OUT, "Message number: 
                 LAYER = (%ld) ORIGIN = (%ld) ",
                 CS_LAYER(errmsg->msgnumber),
                 CS_ORIGIN(errmsg->msgnumber));
             fprintf(EX_ERROR_OUT, "SEVERITY = (%ld) 
                 NUMBER = (%ld)\n",
                 CS_SEVERITY(errmsg->msgnumber), 
                 CS_NUMBER(errmsg->msgnumber));
             fprintf(EX_ERROR_OUT, "Message String: %s\n", 
                 errmsg->msgstring);
             if (errmsg->osstringlen > 0)
             {
                 fprintf(EX_ERROR_OUT, "Operating System \ 
                     Error: %s\n", errmsg->osstring);
             }
            return CS_SUCCEED;
         }