tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: prop_dictionary_internalize_from_file help



On Wed, Dec 16, 2009 at 8:00 AM, Robert Elz <kre%munnari.oz.au@localhost> wrote:
>    Date:        Wed, 16 Dec 2009 08:42:17 +0100
>    From:        Adam Hamsik <haaaad%gmail.com@localhost>
>    Message-ID:  <C87E5C4C-BB9A-46C6-A890-38AEEF788C8A%gmail.com@localhost>
>
>  | I barely remember that prop_dictionary_internalize_from_file returns
>  | bad error when it can't parse eternalized dictionary.
>
> The man page doesn't say that errno means anything when the proplib
> functions return, which generally means that it doesn't, hence
> using perror() (or strerror()) will just lead to confusion.
>
> (And the source code supports the theory that returning anything
> sensible in errno is not intended).
>
> That function returns NULL to indicate "something went wrong", it
> seems to be left to the coder/user to guess which of many possible
> problems actually ocurred (which can be from opening the file, parsing
> it, malloc() failure, ...)
>


Yeah, I added that to try and get a hint.  Without it I don't even see
the attempt to open my plist.in ktruss.  Is there a good example of a
minimal plist?  The one I started using was just copied from my mac
and I've been dropping stuff from it but I always get NULL.


Home | Main Index | Thread Index | Old Index