OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
B-29
{
printf (" %x", *octet_pointer );
octet_pointer++;
}
printf ("\n");
break;
case OM_S_TELETEX_STRING :
case OM_S_UTC_TIME_STRING :
case OM_S_IA5_STRING :
case OM_S_PRINTABLE_STRING :
len = (short)stccpy (printout,
descriptor_list[exist].value.z_string.elements,
descriptor_list[exist].value.z_string.length + 1);
printf (" %s %s \n",print_data[counter].text,printout);
break;
case OM_S_INTEGER :
printf ( " %s %ld\n",
print_data[counter].text,
descriptor_list[exist].value.integer);
break;
case OM_S_ENUMERATION :
printf ( " %s %ld\n",
print_data[counter].text,
descriptor_list[exist].value.enumeration);
break;
} /* switch */
} /* if */
else
{
/**************************************************************/
/* NOTE: This else part only exists to show the use of the */
/* function GPI_OM_READ_. */
/**************************************************************/
string_length = FIRST_LINE_LEN;
string_offset = 0;
local_rc = GPI_OM_READ_
( read_object_id,
IM_T_TEXT, /* Attribute type */
0, /* Value position */
&string_offset, /* Offset of the start of the */
/* string to read */
string_length, /* Number of string to be read */
data_string, /* Buffer to contain the strings */
&actual_number, /* The actual number of octets read */
/* by this call */
&total_number ); /* Returns the total number of */
/* octets in this value */
if (( local_rc == OM_RC_SUCCESS ) ||
( local_rc == ZGPI_RC_WARNING ))
{
if ( local_rc == ZGPI_RC_WARNING )
printf (" WARNING! number: %d \n", local_rc );
len = (short) stccpy ( printout,
data_string,
FIRST_LINE_LEN + 1);
printf (" %s %s \n",print_data[counter].text,printout);
string_length = SECOND_LINE_LEN;
if ( total_number > actual_number )
{
local_rc = GPI_OM_READ_
( read_object_id,