One text window is allowed per tool at present. It must be created last and before calling tw_end_tool by a call to
Widget tw_textsw(int rows, int cols)
This creates a text window wih nrows rows and ncols cols. The last created textsw (most Tina applications need only one) can be written to by a call to the function
void format(char *fmt,...)
which works exactly like printf, but sends its output to the text subwindow (if it exists, if not it goes to stdout).
If there are multiple tools with text subwindows tw_textsw returns an integer identifier which can be used together with the print functions
void tw_text_add(Widget text, char *string) void tw_text_set(Widget text, char *string)
where tw_text_add adds the string to the end of the displayed text and tw_text_set replaces the displayed text by string.