Re: Command line globber/tokenizer library for C?

Liste des GroupesRevenir à cl c 
Sujet : Re: Command line globber/tokenizer library for C?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 12. Sep 2024, 05:37:06
Autres entêtes
Organisation : None to speak of
Message-ID : <87r09py23h.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13)
ted@loft.tnolan.com (Ted Nolan <tednolan>) writes:
In article <87cyl9zx14.fsf@nosuchdomain.example.com>,
Keith Thompson  <Keith.S.Thompson+u@gmail.com> wrote:
ted@loft.tnolan.com (Ted Nolan <tednolan>) writes:
In article <vbsmlb$3o6n2$1@raubtier-asyl.eternal-september.org>,
Bonita Montero  <Bonita.Montero@gmail.com> wrote:
Am 11.09.2024 um 16:59 schrieb Kenny McCormack:
In article <vbs1om$3jkch$1@raubtier-asyl.eternal-september.org>,
Bonita Montero  <Bonita.Montero@gmail.com> wrote:
Do you think it would make sense to switch the language ?
>
Do you think it would make sense to pay attention to the "Newsgroups" line
in your header before clicking "Send"?
>
I just wanted to suggest a simpler language.
Compare that with a manual implementation of the same in C.
>
Thanks, I appreciate that, but it does have to be C.
>
We could help you more effectively if we understood your requirements.
>
Why exactly does it have to be C?
>
What system or systems do you need to support?  (I asked this before and
you didn't answer.)
>
If you only care about Windows, for example, that's going to affect what
solutions we can offer; likewise if you only care about POSIX-based
systems, or only about Linux-based systems.
>
It might also be useful to know more about the context.  If this is for
some specific application, what is that application intended to do, and
why does it need to do tokenization and globbing?
>
This would be for work, so I am limited in what I can say about it, but
it has to be in C because it is would be a C callout from a GT.M mumps
process.  GT.M stores the command line tail (everything it doesn't need
to get a program running) in the special variable $ZCMDLINE which can
be passed to a callout.  I would like to parse that string as the
shell does a command line.  Basically, if it isn't a C library that
is commonly available through Linux package managers I probably can't
use it.  In the end this is a "nice to have" and I have a q&d approach
that I will probably use.

Since you mentioned Linux package managers, I presume this only needs to
work on Linux-based systems, which means you can use POSIX-specific
functions.  That could have been useful to know earlier.

And you might consider posting to comp.unix.programmer for more
system-specific solutions.

Earlier I suggested using system() to pass the string to the shell.
That wouldn't work on Windows, but it should be ok for your
requirements.  There are good reasons not to want to do that, but "there
might not be a POSIX shell available" apparently isn't one of them.

I'd also suggest nailing down your exact requirements; "as the
shell does" is inexact, since different shells behave differently.

Suggested reading:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
10 Sep 24 * Command line globber/tokenizer library for C?110ted@loft.tnolan.com (Ted Nolan
10 Sep 24 +* Re: Command line globber/tokenizer library for C?2Lawrence D'Oliveiro
10 Sep 24 i`- Re: Command line globber/tokenizer library for C?1Keith Thompson
10 Sep 24 +* Re: Command line globber/tokenizer library for C?2Janis Papanagnou
11 Sep 24 i`- Re: Command line globber/tokenizer library for C?1ted@loft.tnolan.com (Ted Nolan
10 Sep 24 +* Re: Command line globber/tokenizer library for C?2Keith Thompson
11 Sep 24 i`- Re: Command line globber/tokenizer library for C?1ted@loft.tnolan.com (Ted Nolan
11 Sep 24 +* Re: Command line globber/tokenizer library for C?2Kenny McCormack
11 Sep 24 i`- Re: Command line globber/tokenizer library for C?1ted@loft.tnolan.com (Ted Nolan
11 Sep 24 +* Re: Command line globber/tokenizer library for C?97Bonita Montero
11 Sep 24 i+* Re: Command line globber/tokenizer library for C?3ted@loft.tnolan.com (Ted Nolan
11 Sep 24 ii`* Re: Command line globber/tokenizer library for C?2Bonita Montero
11 Sep 24 ii `- Re: Command line globber/tokenizer library for C?1ted@loft.tnolan.com (Ted Nolan
11 Sep 24 i+- Re: Command line globber/tokenizer library for C?1Bart
11 Sep 24 i`* Re: Command line globber/tokenizer library for C?92Kenny McCormack
11 Sep 24 i `* Re: Command line globber/tokenizer library for C?91Bonita Montero
11 Sep 24 i  +- Re: Command line globber/tokenizer library for C?1Kenny McCormack
11 Sep 24 i  +* Re: Command line globber/tokenizer library for C?13ted@loft.tnolan.com (Ted Nolan
11 Sep 24 i  i`* Re: Command line globber/tokenizer library for C?12Keith Thompson
12 Sep 24 i  i `* Re: Command line globber/tokenizer library for C?11ted@loft.tnolan.com (Ted Nolan
12 Sep 24 i  i  +* Re: Command line globber/tokenizer library for C?8Keith Thompson
12 Sep 24 i  i  i`* Re: Command line globber/tokenizer library for C?7ted@loft.tnolan.com (Ted Nolan
12 Sep 24 i  i  i `* Re: Command line globber/tokenizer library for C?6Kenny McCormack
12 Sep 24 i  i  i  `* Re: Command line globber/tokenizer library for C?5ted@loft.tnolan.com (Ted Nolan
12 Sep 24 i  i  i   `* Columbia (Was: Command line globber/tokenizer library for C?)4Kenny McCormack
12 Sep 24 i  i  i    `* Re: Columbia (Was: Command line globber/tokenizer library for C?)3Michael S
12 Sep 24 i  i  i     +- Re: Columbia (Was: Command line globber/tokenizer library for C?)1David Brown
13 Sep 24 i  i  i     `- Re: Columbia (Was: Command line globber/tokenizer library for C?)1Lawrence D'Oliveiro
12 Sep 24 i  i  +- Re: Command line globber/tokenizer library for C?1Lawrence D'Oliveiro
12 Sep 24 i  i  `- Re: Command line globber/tokenizer library for C?1Ben Bacarisse
11 Sep 24 i  `* Re: Command line globber/tokenizer library for C?76Bart
12 Sep 24 i   `* Re: Command line globber/tokenizer library for C?75Bonita Montero
12 Sep 24 i    `* Re: Command line globber/tokenizer library for C?74Bart
12 Sep 24 i     +* Re: Command line globber/tokenizer library for C?19Kenny McCormack
12 Sep 24 i     i+* Re: Command line globber/tokenizer library for C?17Janis Papanagnou
12 Sep 24 i     ii`* Other programming languages (Was: Command line globber/tokenizer library for C?)16Kenny McCormack
12 Sep 24 i     ii `* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)15Bonita Montero
12 Sep 24 i     ii  `* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)14Kenny McCormack
12 Sep 24 i     ii   `* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)13Bonita Montero
12 Sep 24 i     ii    `* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)12Janis Papanagnou
12 Sep 24 i     ii     +* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)2Bonita Montero
12 Sep 24 i     ii     i`- Re: Other programming languages (Was: Command line globber/tokenizer library for C?)1Janis Papanagnou
13 Sep 24 i     ii     `* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)9Lawrence D'Oliveiro
13 Sep 24 i     ii      +* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)3James Kuyper
13 Sep 24 i     ii      i`* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)2Lawrence D'Oliveiro
13 Sep 24 i     ii      i `- Re: Other programming languages (Was: Command line globber/tokenizer library for C?)1Michael S
13 Sep 24 i     ii      +* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)4Janis Papanagnou
13 Sep 24 i     ii      i+* Re: Other programming languages (Was: Command line globber/tokenizer library for C?)2Lawrence D'Oliveiro
13 Sep 24 i     ii      ii`- Re: Other programming languages (Was: Command line globber/tokenizer library for C?)1Janis Papanagnou
13 Sep 24 i     ii      i`- Re: Other programming languages (Was: Command line globber/tokenizer library for C?)1Kaz Kylheku
13 Sep 24 i     ii      `- Re: Other programming languages (Was: Command line globber/tokenizer library for C?)1Kaz Kylheku
12 Sep 24 i     i`- Re: Command line globber/tokenizer library for C?1Bonita Montero
12 Sep 24 i     +* Re: Command line globber/tokenizer library for C?53Janis Papanagnou
12 Sep 24 i     i+* Re: Command line globber/tokenizer library for C?38Bart
12 Sep 24 i     ii+* Re: Command line globber/tokenizer library for C?5Bart
12 Sep 24 i     iii+- Re: Command line globber/tokenizer library for C?1Bonita Montero
12 Sep 24 i     iii`* Re: Command line globber/tokenizer library for C?3Janis Papanagnou
12 Sep 24 i     iii `* Re: Command line globber/tokenizer library for C?2Bart
12 Sep 24 i     iii  `- Re: Command line globber/tokenizer library for C?1Bonita Montero
12 Sep 24 i     ii`* Re: Command line globber/tokenizer library for C?32Michael S
12 Sep 24 i     ii +- Re: Command line globber/tokenizer library for C?1Michael S
12 Sep 24 i     ii `* Re: Command line globber/tokenizer library for C?30Bart
12 Sep 24 i     ii  `* Re: Command line globber/tokenizer library for C?29Bonita Montero
12 Sep 24 i     ii   +- Re: Command line globber/tokenizer library for C?1Kenny McCormack
12 Sep 24 i     ii   `* Re: Command line globber/tokenizer library for C?27Michael S
13 Sep 24 i     ii    +* Re: Command line globber/tokenizer library for C?8Bonita Montero
13 Sep 24 i     ii    i`* Re: Command line globber/tokenizer library for C?7Michael S
13 Sep 24 i     ii    i `* Re: Command line globber/tokenizer library for C?6Bonita Montero
13 Sep 24 i     ii    i  +* Re: Command line globber/tokenizer library for C?2Michael S
13 Sep 24 i     ii    i  i`- Re: Command line globber/tokenizer library for C?1Bonita Montero
14 Sep 24 i     ii    i  `* Re: Command line globber/tokenizer library for C?3Lawrence D'Oliveiro
14 Sep 24 i     ii    i   `* Re: Command line globber/tokenizer library for C?2Bonita Montero
14 Sep 24 i     ii    i    `- Re: Command line globber/tokenizer library for C?1Lawrence D'Oliveiro
13 Sep 24 i     ii    `* Re: Command line globber/tokenizer library for C?18Tim Rentsch
15 Sep11:22 i     ii     `* Re: Command line globber/tokenizer library for C?17Michael S
16 Sep09:52 i     ii      +* Re: Command line globber/tokenizer library for C?3Tim Rentsch
16 Sep11:23 i     ii      i`* Re: Command line globber/tokenizer library for C?2Michael S
17 Sep12:12 i     ii      i `- Re: Command line globber/tokenizer library for C?1Tim Rentsch
18 Sep00:34 i     ii      `* Re: Command line globber/tokenizer library for C?13antispam
18 Sep01:33 i     ii       +- Re: Command line globber/tokenizer library for C?1Tim Rentsch
18 Sep01:46 i     ii       `* Re: Command line globber/tokenizer library for C?11Michael S
18 Sep02:07 i     ii        +* Re: Command line globber/tokenizer library for C?5Bart
18 Sep10:43 i     ii        i`* Re: Command line globber/tokenizer library for C?4Michael S
18 Sep11:49 i     ii        i +* Re: Command line globber/tokenizer library for C?2Bart
18 Sep12:44 i     ii        i i`- Re: Command line globber/tokenizer library for C?1David Brown
18 Sep15:01 i     ii        i `- Re: Command line globber/tokenizer library for C?1Tim Rentsch
18 Sep03:31 i     ii        +* Re: Command line globber/tokenizer library for C?3Tim Rentsch
18 Sep10:03 i     ii        i`* Re: Command line globber/tokenizer library for C?2Michael S
18 Sep14:09 i     ii        i `- Re: Command line globber/tokenizer library for C?1Tim Rentsch
18 Sep04:20 i     ii        `* Re: Command line globber/tokenizer library for C?2Lawrence D'Oliveiro
18 Sep10:05 i     ii         `- Re: Command line globber/tokenizer library for C?1Michael S
12 Sep 24 i     i`* Re: Command line globber/tokenizer library for C?14Bonita Montero
12 Sep 24 i     i `* Re: Command line globber/tokenizer library for C?13Janis Papanagnou
12 Sep 24 i     i  `* Re: Command line globber/tokenizer library for C?12Bonita Montero
12 Sep 24 i     i   +* Re: Command line globber/tokenizer library for C?2Janis Papanagnou
12 Sep 24 i     i   i`- Re: Command line globber/tokenizer library for C?1Bonita Montero
13 Sep 24 i     i   `* Re: Command line globber/tokenizer library for C?9Lawrence D'Oliveiro
13 Sep 24 i     i    `* Re: Command line globber/tokenizer library for C?8Bonita Montero
13 Sep 24 i     i     `* Re: Command line globber/tokenizer library for C?7Lawrence D'Oliveiro
13 Sep 24 i     i      `* Re: Command line globber/tokenizer library for C?6Michael S
14 Sep 24 i     i       `* Re: Command line globber/tokenizer library for C?5Lawrence D'Oliveiro
12 Sep 24 i     `- Re: Command line globber/tokenizer library for C?1Bonita Montero
12 Sep 24 `* Re: Command line globber/tokenizer library for C?4Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal