On Sun, Apr 14, 2013 at 12:35 PM, Petri Hintukainen < [email protected]> wrote:
> On pe, 2013-04-12 at 00:26 +0200, Joakim Plate wrote: > > I think this API is not well designed. At least it should be > documented... > > Negative values are not needed and shouldn't be allowed at all: > 1) It does not make any sense to read/write zero or negative > amount of bytes. > 2) If request size is unsigned also result must be unsigned > (range of result type can't be smaller than range of > request type) > 3) Returning anything else than requested already indicates > failure (EOF or error). There's no need for any special > error code. > I think it's a normal api of the read() function. Negative on error and can return less than requested. The fread api requires the feof() and ferror() functions to signify if it was a normal EOF or an error that occured, to me that is silly to require those addition to know if it was an error or not.
_______________________________________________ libbluray-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libbluray-devel
