On Mon, Feb 7, 2022, at 1:26 AM, Alex fxmbsw7 Ratchev wrote:
> well i saw now, printf a char of "\0" results in 0 bytes out to wc -c
% /usr/bin/printf '\0' | wc -c
1
> however my solution still stays
> you just use memory locations instead of c strings
> and those entries in memory are of course of known length, before setting
> and all is fine
"Your" solution is decades old. Everyone knows how Pascal-style
strings work. This is not cutting-edge computer science.
> of course this means to not use these fauly 'c strings', but a self
> coded solution
As Greg already mentioned, such a system requires converting back
to C strings for system calls and other external APIs. It's not
insurmountable, but it's more involved than just swapping all your
char * to my_string or whatever.
I repeat:
>> It's so simple that you should have no problem converting the entire
>> bash codebase to Pascal-style strings yourself. We'll wait.
--
vq