gtpc2mavC/C++ Language Support User's Guide

cmemn-Extract the Mode Name

This function returns the current value of the mode_name and mode_name_length characteristics.

Format

#include   <tpfmap.h>
void       cmemn(unsigned char *conversation_ID,
                 unsigned char *mode_name,
                 signed int *mode_name_length,
                 signed int *return_code);

conversation_ID
This is a pointer to an 8-byte character array that contains the conversation ID. This conversation ID must be the ID returned by the cminit (INITIALIZE) or cmaccp (ACCEPT_CONVERSATION) that started this conversation.

mode_name
This is a pointer to an array of characters where the mode name for this conversation is to be placed. The string must allow for as many as 8 characters. The previous contents of the string is overwritten on return.

mode_name_length
This is a pointer to a 4-byte field where the length of the mode name is to be placed. Trailing blanks are not included.

return_code
This is a pointer to a 4-byte field where the return code is to be placed.

Return Codes

The following is a list of return codes that can be returned to the program that called the cmemn function. A complete list of the return codes and their definitions can be found in Table 45.

Programming Considerations

Examples

The following example gets the mode name for the conversation.

#include <tpfmap.h>
 
      unsigned char convid[8];
      unsigned char name[8];
      signed int    length;
      signed int    rcode;
      .
      .
/* set conversation_ID with value returned from accept or initialize */
      .
      .
cmemn(convid,name,&length,&rcode);
      .                       /*  normal processing path             */
      .
      .

Related Information