On 10/4/23 19:03, Rob Landley wrote: > And I'm backing slowly away from this Thing That Needs Focus To Clean Up. > Gotta > close the open cans of worms first, thanks...
The if/else staircase on TT.vi_mode in vi_main() seems like an obvious potential place to call ex/normal/insert functions to provide different behavior, but breaking that out depends on local variables in the function the first of which is char stdout_buf[8192] which immediately raises the question "why?" and the second question "if we do need it, why isn't this using toybuf" and the existing users of toybuf include text_strstr() calling text_getline()toybuf, ARRAY_LEN(toybuf) which could just be sizeof(toybuf) because dividing by sizeof(char) doesn't help here but ALSO raises the question of how you know this line doesn't go beyond 4k, and then write_file() does sprintf(toybuf, "%s.swp", filename); which gets filename from TT.filename which came from *toys.optargs which VERY DEFINITELY can go beyond 4k... And I am again BACKING AWAY SLOWLY. > Rob Still Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net