1 /* @(#)xio.h 1.4 06/11/11 Copyright 2003-2004 J. Schilling */ 2 /* 3 * EXtended I/O functions for cdrecord 4 * 5 * Copyright (c) 2003-2004 J. Schilling 6 */ 7 /* 8 * The contents of this file are subject to the terms of the 9 * Common Development and Distribution License, Version 1.0 only 10 * (the "License"). You may not use this file except in compliance 11 * with the License. 12 * 13 * See the file CDDL.Schily.txt in this distribution for details. 14 * A copy of the CDDL is also available via the Internet at 15 * http://www.opensource.org/licenses/cddl1.txt 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file CDDL.Schily.txt from this distribution. 19 */ 20 21 #ifndef _XIO_H 22 #define _XIO_H 23 24 #include <schily/utypes.h> 25 #include <schily/unistd.h> 26 27 typedef struct xio { 28 struct xio *x_next; 29 char *x_name; 30 Ullong x_off; 31 off_t x_startoff; 32 int x_file; 33 int x_refcnt; 34 int x_oflag; 35 int x_omode; 36 int x_xflags; 37 } xio_t; 38 39 /* 40 * Defines for x_xflags 41 */ 42 #define X_NOREWIND 0x01 /* Do not rewind() the file on xclose() */ 43 #define X_UFLAGS 0xFF /* Mask for flags allowed with xopen() */ 44 45 #define X_NOSEEK 0x1000 /* Cannot seek on this fd */ 46 47 48 #define xfileno(p) (((xio_t *)(p))->x_file) 49 50 extern void *xopen __PR((char *name, int oflag, int mode, 51 int xflags)); 52 extern off_t xmarkpos __PR((void *vp)); 53 extern int xclose __PR((void *vp)); 54 55 #endif 56