[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request to abstract write operations to stdout and stderr in jitter
From: |
Luca Saiu |
Subject: |
Re: Request to abstract write operations to stdout and stderr in jitter |
Date: |
Wed, 11 Nov 2020 23:42:07 +0100 |
User-agent: |
Gnus (Gnus v5.13), GNU Emacs 27.0.50, x86_64-pc-linux-gnu |
On 2020-11-08 at 19:02 +0100, Luca Saiu wrote:
> Following the IRC discussions with you and with José, I will implement a
> tentative API very soon; I hope tomorrow. You are right, this is a
> problem worth solving.
>
> If I do not answer within a few days feel free to write me.
I pushed a definition of the new data structures, plus two predefined
print context kinds, to the new "print-context" branch:
http://git.ageinghacker.net/jitter/log/?h=print-context
The new functionality is not yet used from the rest of the code base,
but it will soon. I have tested it with dirty code which is not worth
committing to git. Example:
jitter_print_context cx = jitter_print_context_make_file_star (stdout);
jitter_print_char_star (cx, "===========\n");
jitter_print_pointer (cx, main);
jitter_print_char_star (cx, "\n===========\n");
jitter_print_int (cx, 10, 0); jitter_print_char_star (cx, "\n");
jitter_print_begin_class (cx, "interesting");
jitter_print_int (cx, 2, 14); jitter_print_char_star (cx, "\n");
jitter_print_end_class (cx);
jitter_print_int (cx, 10, 1234567); jitter_print_char_star (cx, "\n");
jitter_print_ulong_long (cx, 10, 1234567); jitter_print_char_star (cx, "\n");
jitter_print_long_long (cx, 10, -123456789012345LL); jitter_print_char_star
(cx, "\n");
jitter_print_destroy_context (cx);
I welcome comments.
Regards,
--
Luca Saiu
* My personal web site: http://ageinghacker.net
* GNU epsilon: http://www.gnu.org/software/epsilon
* Jitter: http://ageinghacker.net/projects/jitter
I support everyone's freedom of mocking any opinion or belief, no
matter how deeply held, with open disrespect and the same unrelented
enthusiasm of a toddler who has just learned the word "poo".
signature.asc
Description: PGP signature