Open topic with navigation

TIBCO® Patterns 6.1.2

# Printing Input and Output Objects

For debugging purposes, it's useful to be able to print the contents of an lpar. The DevKit provides the following function that prints to a file stream:

    void lpar_fprintf( FILE *stream, lpar_t lpar, int nicechar );

The object parameter can be any type of lpar. The function operates recursively, printing the contents of any nested list structures. Indentation is used to depict nesting relationships.

The `nicechar` parameter controls how the content of byte blocks is printed. If nicechar is nonnegative, every non-printable byte (as defined by the C standard library function `isprint`) is replaced with (`unsigned char`) `nicechar` in the printed output. If `nicechar` is negative, this replacement is not done, which can cause trouble for some terminal emulation programs. However, if you are outputting UTF-8 encoded data `nicechar` must always be negative as the `isprint` function might interpret bytes of the UTF-8 character as non-printable.

Note: To view the output your terminal or viewer must be configured to handle UTF-8 encoded text.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Patterns

Copyright © 2010-2025. Cloud Software Group, Inc. All Rights Reserved.