1 /* 2 OW -- One-Wire filesystem 3 version 0.4 7/2/2003 4 5 LICENSE (As of version 2.5p4 2-Oct-2006) 6 owlib: GPL v2 7 owfs, owhttpd, owftpd, owserver: GPL v2 8 owshell(owdir owread owwrite owpresent): GPL v2 9 owcapi (libowcapi): GPL v2 10 owperl: GPL v2 11 owtcl: LGPL v2 12 owphp: GPL v2 13 owpython: GPL v2 14 owsim.tcl: GPL v2 15 where GPL v2 is the "Gnu General License version 2" 16 and "LGPL v2" is the "Lesser Gnu General License version 2" 17 18 19 Written 2003 Paul H Alfille 20 GPL license 21 This program is free software; you can redistribute it and/or 22 modify it under the terms of the GNU General Public License 23 as published by the Free Software Foundation; either version 2 24 of the License, or (at your option) any later version. 25 26 This program is distributed in the hope that it will be useful, 27 but WITHOUT ANY WARRANTY; without even the implied warranty of 28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 GNU General Public License for more details. 30 31 */ 32 33 #ifndef OW_FD_H /* tedious wrapper */ 34 #define OW_FD_H 35 36 /* Simple type for file descriptors */ 37 typedef int FILE_DESCRIPTOR_OR_ERROR ; 38 #define FILE_DESCRIPTOR_BAD -1 39 40 #define FILE_DESCRIPTOR_VALID(fd) ((fd)>FILE_DESCRIPTOR_BAD) 41 #define FILE_DESCRIPTOR_NOT_VALID(fd) (! FILE_DESCRIPTOR_VALID(fd)) 42 43 /* Add a little complexity for Persistence 44 * There is another state where a channel is alreaddy opened 45 * and we with to test that one first 46 */ 47 typedef int FILE_DESCRIPTOR_OR_PERSISTENT ; 48 #define FILE_DESCRIPTOR_PERSISTENT_IN_USE -2 49 50 /* Pipe channels */ 51 enum fd_pipe_channels { 52 fd_pipe_read = 0 , 53 fd_pipe_write = 1 , 54 } ; 55 56 #endif /* OW_LOCALRETURNS_H */ 57