Sujet : Re: Running an editor from ANSI C
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.cDate : 08. Jun 2024, 00:57:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v406q5$29fla$5@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Pan/0.158 (Avdiivka; )
On Fri, 7 Jun 2024 14:24:29 +0300, Michael S wrote:
On Fri, 7 Jun 2024 10:47:57 -0000 (UTC)
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Fri, 07 Jun 2024 02:37:42 -0700, Keith Thompson wrote:
As for portability, I'm not aware of the $EDITOR convention being
used on non-POSIX systems.
Can non-POSIX systems offer anything better? Any worthwhile
alternative?
No.
Yes. The one below is better.
ShellExecute(NULL, "edit", filename, NULL, NULL, SW_NORMAL);
On Windows, that combines the command-line arguments into a single string.
Which then has to be teased apart by the receiving program. Assuming the
two ends can agree on consistent rules for doing so.