<div dir="ltr">Hmm, glib ensures that g_get_prgname() returns something as long as applications uses GOption? IIUC it is different thing between glib and fontconfig. of course that would be a good idea that it works without GOption though. anyway, there may be the case in current implementation of fontconfig that FcGetPrgname() returns NULL. implementing some fallbacks as much as possible isn't a bad idea IMHO.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 7, 2013 at 1:28 PM, Behdad Esfahbod <span dir="ltr"><<a href="mailto:behdad@behdad.org" target="_blank">behdad@behdad.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 01/23/2013 08:54 PM, Alan Coopersmith wrote:<br>
> On 01/23/13 12:24 PM, Behdad Esfahbod wrote:<br>
>> On 13-01-22 01:17 PM, Alan Coopersmith wrote:<br>
>>> Yes, getprogname will let you use setprogname to change the reported string,<br>
>>> while getexecname always returns the string passed to exec().<br>
>><br>
>> Feel like submitting a patch for glib's g_[sg]et_prgname()?<br>
><br>
> To do what?  Default to getexecname() if g_set_prgname hasn't been called?<br>
> I only see platform specific bits in there [1] for WIN32 at the moment, nothing<br>
> for the equivalent functions on BSD or Linux.   If you wanted that, I'd expect<br>
> it to look more like Mesa's code for finding program names, that handles all<br>
> the different platforms [2] (though I see now we haven't updated the mesa<br>
> code to handle having getprogname() on Solaris yet).<br>
<br>
</div>You are of course right.  Akira, do we something like Mesa has in fontconfig?<br>
 In glib (if anyone's interested making that happen...)?<br>
<br>
behdad<br>
<div class="im"><br>
> [1] <a href="http://git.gnome.org/browse/glib/tree/glib/gutils.c#n1059" target="_blank">http://git.gnome.org/browse/glib/tree/glib/gutils.c#n1059</a><br>
> [2]<br>
> <a href="http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/common/xmlconfig.c#n42" target="_blank">http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/common/xmlconfig.c#n42</a><br>
><br>
<br>
--<br>
</div>behdad<br>
<a href="http://behdad.org/" target="_blank">http://behdad.org/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Akira TAGOH
</div>