Liste des Groupes | Revenir à cl c |
On 06/06/2024 02:18, Lawrence D'Oliveiro wrote:Just make the editor a part of the shell.On Wed, 5 Jun 2024 11:59:19 +0100, Malcolm McLean wrote:>
So I just call system with nano.The trouble with system(3) is it requires a shell as an intermediary, with
consequent pitfalls involving command-line parsing.
More robust to use posix_spawn(3).
The concept is an ANSI C only shell.
I can write my own text editor on top of Posix easily enough.
But I want to implent an "edit" command so that users can edit files.
And you just can't edit files without non-ASCII keys.I have edited files without non-ASCII keys so I know it can be done.
So at the moment I call system with nano, and it wotks. But it's a clunky solution.--
Les messages affichés proviennent d'usenet.