HP 9000 User Manual page 98

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

}
/* set pointer to beginning o£
output
~c
array */
mbsto~cs(~c_in_array,
mb_in_ptr, MAX_MULTI);
/* convert input multi_byte
string to
~c
array*/
~hile (~c
=
*in_~c_ptr++)
{
/* get a character £rom the
~c
}
array until '\0' encountered */
~ctomb(~c_array, ~c);
/* convert
~c
to a multi-byte
screen_size
C_COLWIDTH(*~c_array);
i£ (counter + screen_size
>
WIDTH) {
}
puts(mb_out_array);
counter = 0;
out_~c_ptr
=
~c_out_array;
counter += screen_size;
character */
/* get screen size o£
~c
*/
/* i£ output array is complete
process it */
/* null terminate the output
array*/
MAX_MULTI} ;
/* convert the
~c
array to a
multi-byte array */
/* output the multi-byte array */
/* reset counter to 0 */
/* reset
~c
output pointer to
beginning of
~c
array */
/* i£ output array not complete,
increment counter */
/* add
~c
to the output array
and increment pointer */
*out_~c_ptr
= '\0';
/* null terminate output array */
~cstombs(mb_out_array, ~c_out_array,
MAX_MULTI);
/* convert
~c
output array to
multi-byte */
/*output the multi-byte array*/
Conversion of Existing Programs
Converting existing programs is an ad hoc process. Use the grep command on
existing source code to find calls to routines, such as ctime and strcmp, which
may require changes.
Developing International Software
6·21
6

Advertisement

Table of Contents
loading

Table of Contents