Re: [PATCH 7/8] Use posix_spawn to run external scripts
Pawel Kot <[email protected]> Mon, 3 Dec 2018 20:12:44 +0300
| Newsgroups | gmane.linux.drivers.gnokii |
|---|---|
| Message-ID | <CAHytCw7TTrXz+hD=2pA7TjBpPhEogi_JFAfgCVjFZzyq4hjiyA@mail.gmail.com> |
--===============4769209509127414860== Content-Type: multipart/alternative; boundary="000000000000907144057c214217" --000000000000907144057c214217 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Mon, Dec 3, 2018 at 7:50 PM Ladislav Michl <[email protected]> wrote: > Sure, no problem. I read above you are fine with that approach in general= . Yes, overall it seems fine to me. > However it would be nice if someone could actually give pachset a try. > Preferably on non linux platforms. I will on Windows and OS X once I'm done with travelling. > > > -typedef void (*cfg_foreach_func)(const char *section, const char *key, > > const char *value); > > > -void cfg_foreach(const char *section, cfg_foreach_func func); > > > +#define cfg_foreach_entry(section, header, entry) \ > > > + for (; header !=3D NULL; header =3D header->next) \ > > > + if (strcmp(section, h->section) =3D=3D 0) \ > > > + for (entry =3D h->entries; entry !=3D NULL; e= ntry =3D > > entry->next) > > > > Why that? > > If that question leads to opencoding that single macro use, I'm fine > with that. Yes, that's what I've meant. Sorry for not being clear. Cheers, Pawe=C5=82 -- Pawel Kot --000000000000907144057c214217 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi,<br><br>On Mon, Dec 3, 2018 at 7:50 PM Ladislav Michl &= lt;<a href=3D"mailto:[email protected]">[email protected]</a>> wro= te:<br>> Sure, no problem. I read above you are fine with that approach = in general.<br><br>Yes, overall it seems fine to me.<div><br>> However i= t would be nice if someone could actually give pachset a try.<br>> Prefe= rably on non linux platforms.<br><br>I will on Windows and OS X once I'= m done with travelling.</div><div><br>> > > -typedef void (*cfg_fo= reach_func)(const char *section, const char *key,<br>> > const char *= value);<br>> > > -void cfg_foreach(const char *section, cfg_foreac= h_func func);<br>> > > +#define cfg_foreach_entry(section, header,= entry) \<br>> > > + =C2=A0 =C2=A0 =C2=A0 for (; header !=3D NULL;= header =3D header->next) \<br>> > > + =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 if (strcmp(section, h->section) =3D=3D 0) \<br>= > > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 for (entry =3D h->entries; entry !=3D NULL; entry = =3D<br>> > entry->next)<br>> ><br>> > Why that?<br>>= ;<br>> If that question leads to opencoding that single macro use, I'= ;m fine<br>> with that.<br><br>Yes, that's what I've meant. Sorr= y for not being clear.</div><div><br></div><div>Cheers,</div><div>Pawe=C5= =82<br>--<br>Pawel Kot<br></div></div> --000000000000907144057c214217-- --===============4769209509127414860== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnokii-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/gnokii-users --===============4769209509127414860==--