io_defs_xsb.h

00001 /* File:      io_defs_xsb.h
00002 ** Author(s): kifer
00003 ** Contact:   xsb-contact@cs.sunysb.edu
00004 ** 
00005 ** Copyright (C) The Research Foundation of SUNY, 1999
00006 ** 
00007 ** XSB is free software; you can redistribute it and/or modify it under the
00008 ** terms of the GNU Library General Public License as published by the Free
00009 ** Software Foundation; either version 2 of the License, or (at your option)
00010 ** any later version.
00011 ** 
00012 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
00013 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014 ** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
00015 ** more details.
00016 ** 
00017 ** You should have received a copy of the GNU Library General Public License
00018 ** along with XSB; if not, write to the Free Software Foundation,
00019 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020 **
00021 ** $Id: io_defs_xsb.h,v 1.11 2005/12/31 01:43:35 tswift Exp $
00022 ** 
00023 */
00024 
00025 /* TLS: redefined FILE_OPEN to XSB_FILE_OPEN to avoid conflict with
00026    win32api/windef.h */
00027 
00028 /* OP numbers for file_function */
00029 #define FILE_FLUSH         0
00030 #define FILE_SEEK          1
00031 #define FILE_TRUNCATE      2
00032 #define FILE_POS           3
00033 #define XSB_FILE_OPEN              4
00034 #define FILE_CLOSE         5
00035 #define FILE_GET           6
00036 #define FILE_PUT           7
00037 #define FILE_GETBUF        8
00038 #define FILE_PUTBUF        9
00039 #define FILE_READ_LINE     10
00040 #define FILE_WRITE_LINE    11
00041 #define FILE_REOPEN        12
00042 #define FILE_CLONE         13
00043 #define PIPE_OPEN          14
00044 #define FD2IOPORT          15
00045 #define FILE_CLEARERR      16
00046 #define TMPFILE_OPEN       17
00047 #define IS_VALID_STREAM    18
00048 #define FILE_READ_LINE_LIST 19
00049 #define STREAM_PROPERTY 20
00050 #define PRINT_OPENFILES 21
00051 #define FILE_END_OF_FILE 22
00052 #define FILE_PEEK 23
00053 #define XSB_STREAM_LOCK_B 24
00054 #define XSB_STREAM_UNLOCK_B 25
00055 
00056 /* This sequence is for stream properties */
00057 #define STREAM_FILE_NAME              0
00058 #define STREAM_MODE                      1
00059 #define STREAM_INPUT                       2
00060 #define STREAM_OUTPUT                   3
00061 #define STREAM_POSITION                 4
00062 #define STREAM_END_OF_STREAM    5
00063 #define STREAM_REPOSITIONABLE    6
00064 #define STREAM_CLASS                      7
00065 #define STREAM_TYPE                        8
00066 #define STREAM_EOF_ACTION            9
00067 
00068 /* Need in here for stream_property/2 */
00069 #define MAX_OPEN_FILES    55
00070 #define MIN_USR_OPEN_FILE 7     /* Where user files start in the XSB
00071                                    open files table */
00072 
00073 /* OP numbers for formatted_io */
00074 #define FMT_WRITE          1
00075 #define FMT_WRITE_STRING   2
00076 #define FMT_READ           3
00077 
00078 #define READ_MODE 0
00079 #define WRITE_MODE 1
00080 #define APPEND_MODE 2
00081 
00082 #define FORCE_FILE_CLOSE     0 
00083 #define NOFORCE_FILE_CLOSE     1
00084 
00085 /* This list may eventually include sockets, urls, etc.
00086    Starting with 1 to preserve 0 as undef.  */
00087 
00088 #define TEXT_FILE_STREAM            1
00089 #define BINARY_FILE_STREAM         2
00090 #define STRING_STREAM                3
00091 #define PIPE_STREAM                    4
00092 #define CONSOLE_STREAM            5

Generated on Wed Jul 26 13:30:41 2006 for XSB by  doxygen 1.4.5