next up previous contents index
Next: Dealing with unknown characters Up: Modules API Previous: Joining characters   Contents   Index


outputFormatter

Once it's all done, the user usually wants the output sent to a file in some way that he/she can read it, instead of the beautiful, complex structures that are spread all over the computer memory. This module should satisfy this caprice. The prototype is:

void (*outputFormatter) (List *bl, void *v);
where the list contains all the blocks, in the order you added them. This module may be changed in the near future.

Each block has a field called text which contains all the characters of the block and the attributes. If you just want to dump them, lousily converted to ascii, here's an example of what you may do:

for_each_data(bl) { 
wchar_t *w = ((gocrBlock *)list_get_current(bl))->text; 

while (*w) 

putc(*w++);
} end_for_each(bl);
You can read more about lists in section 4.2.



Subsections

root 2002-02-17