Sujet : Re: Running an editor from ANSI C
De : malcolm.arthur.mclean (at) *nospam* gmail.com (Malcolm McLean)
Groupes : comp.lang.cDate : 06. Jun 2024, 03:47:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3r7v8$1b57j$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 06/06/2024 02:18, Lawrence D'Oliveiro wrote:
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.
So at the moment I call system with nano, and it wotks. But it's a clunky solution.
-- Check out Basic Algorithms and my other books:https://www.lulu.com/spotlight/bgy1mm