Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <87r09py23h.fsf@nosuchdomain.example.com>
Deutsch   English   Français   Italiano  
<87r09py23h.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Command line globber/tokenizer library for C?
Date: Wed, 11 Sep 2024 20:37:06 -0700
Organization: None to speak of
Lines: 65
Message-ID: <87r09py23h.fsf@nosuchdomain.example.com>
References: <lkbjchFebk9U1@mid.individual.net>
	<vbsmlb$3o6n2$1@raubtier-asyl.eternal-september.org>
	<lke71fFqdjcU1@mid.individual.net>
	<87cyl9zx14.fsf@nosuchdomain.example.com>
	<lkf456Fuf84U1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 12 Sep 2024 05:37:06 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4b8fa2c92ce4a3b1e07f703ae75bae6f";
	logging-data="75339"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+vOgYSbTqIT+DxQJN3LgVJ"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:UzjUDKQVLtzAF3t9uutSd6DD5kk=
	sha1:wBUdi5KbGjtWArr94lTkMmWGTcw=
Bytes: 4247

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 */