Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xdf_open(3) [debian man page]

XDF_OPEN(3)						     xdffileio library manual						       XDF_OPEN(3)

NAME
xdf_open - Open a xDF file for reading or writing SYNOPSIS
#include <xdfio.h> struct xdf* xdf_open(const char* filename, int mode, enum xdffiletype type); 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 for- mat (XDF_ANY will result in a error). The possible file type values are defined in the header file <xdfio.h> RETURN VALUE
The function returns an handle to xDF file opened in case of success. Otherwise, NULL is returned and errno is set appropriately. 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. EINVAL mode is neither XDF_READ nor XDF_WRITE, or filename is NULL. SEE ALSO
xdf_close(3) EPFL
2010 XDF_OPEN(3)

Check Out this Related Man Page

XDF_SEEK(3)						     xdffileio library manual						       XDF_SEEK(3)

NAME
xdf_seek - move the sample pointer of a xDF file SYNOPSIS
#include <xdfio.h> off_t xdf_seek(struct xdf* xdf, off_t offset, int whence); DESCRIPTION
xdf_seek() repositions the current sample pointer according to the couple (offset,whence) where whence can be: SEEK_SET The offset is set to offset bytes. SEEK_CUR The offset is set to its current location plus offset bytes. SEEK_END The offset is set to the size of the file plus offset bytes. The file referenced by xdf should have been opened with mode XDF_READ and xdf_prepare_arrays(3) should have been successfully called on it. RETURN VALUE
Upon successful completion, xdf_seek() returns the resulting offset location as measured in number of samples from the beginning of the recording. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS
EINVAL xdf is NULL or whence is none of the allowed values. EPERM No successfull call to xdf_prepare_transfer(3) have been done on xdf or it has been opened using the mode XDF_WRITE. ERANGE The requested offset is out of the range of the recording. EINTR The call was interrupted by a signal before any data was read; see signal(7). EIO A low-level I/O error occurred while reading from the inode. ESTALE Stale file handle. This error can occur for NFS and for other file systems SEE ALSO
xdf_define_arrays(3), xdf_prepare_transfer(3) EPFL
2010 XDF_SEEK(3)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file wont execute

sh filename and it gives me an error saying the file doesnt exist but it definately does. (4 Replies)
Discussion started by: iago
4 Replies

2. Solaris

unable to access infodoc!!

Hi, I am refered to see Infodoc 80854. but I am not able to access from sun.com. Is there any precedure to view these?. Please guide me. Thanks in advance. (1 Reply)
Discussion started by: bpsunadm
1 Replies

3. Shell Programming and Scripting

Script to force close sheet opened by someone else

Was wondering what script to run as root that will take as input a filename (full path) that is opened by someone else and force whoever has it opened to close it? Or maybe there is an existing command to do this? Thanks Edit: Meant to say file not sheet, too much Excel... (2 Replies)
Discussion started by: stevensw
2 Replies

4. Shell Programming and Scripting

Removing \r and \n during reading file through while loop

Hi, I am writing in a file through cat command. This file will contain the path of file along with filename. e.g. /home/user/folder1/folder2/filename.txt There might be very large number of this path in same file like say 140 when I try to run while command: while read -r file do //command... (8 Replies)
Discussion started by: Pulkit Lall
8 Replies