logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

xdf_open - Open a xDF file for reading or writing

Description

xdf_open() opens a xDF the file refered by the path filename for reading or writing.

       If mode is XDF_READ, the file is opened for reading. Thus it must exist and type should be either XDF_ANY
       or set to the type of the file refered by type. Otherwise, the function will fail.

       If  mode  is  XDF_WRITE,  the  file  is opened for writing. Thus the path filename must not refered to an
       existing file: the function will fail if the file exist. This behavior prevents to overwrite any previous
       recording. type should be also be set to the desired type of  data  format  (XDF_ANY  will  result  in  a
       error).

       The possible file type values are defined in the header file <xdfio.h>

Errors

       In addition to the errors related to calls to open(3) or read(3), the following errors can occur:

       EILSEQ The file that is being opened does not correspond to a supported file format or is not of the type
              specified.

       ENOMEM The system is unable to allocate resources.

       EINVALmode is neither XDF_READ nor XDF_WRITE, or filename is NULL.

Name

       xdf_open - Open a xDF file for reading or writing

Return Value

       The  function  returns  an handle to xDF file opened in case of success.  Otherwise, NULL is returned and
       errno is set appropriately.

See Also

xdf_close(3)

EPFL                                                  2010                                           XDF_OPEN(3)

Synopsis

#include<xdfio.h>structxdf*xdf_open(constchar*filename,intmode,enumxdffiletypetype);

See Also