mpq_readline.h

Go to the documentation of this file.
00001 #include "qs_config.h"
00002 #ifdef HAVE_LIBGMP
00003 #if HAVE_LIBGMP
00004 /****************************************************************************/
00005 /*                                                                          */
00006 /*  This file is part of QSopt_ex.                                          */
00007 /*                                                                          */
00008 /*  (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash,      */
00009 /*  and Daniel Espinoza                                                     */
00010 /*                                                                          */
00011 /*  Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his     */
00012 /*  copyright in QSopt.                                                     */
00013 /*                                                                          */
00014 /*  This code may be used under the terms of the GNU General Public License */
00015 /*  (Version 2.1 or later) as published by the Free Software Foundation.    */
00016 /*                                                                          */
00017 /*  Alternatively, use is granted for research purposes only.               */
00018 /*                                                                          */
00019 /*  It is your choice of which of these two licenses you are operating      */
00020 /*  under.                                                                  */
00021 /*                                                                          */
00022 /*  We make no guarantees about the correctness or usefulness of this code. */
00023 /*                                                                          */
00024 /****************************************************************************/
00025 
00026 /* RCSINFO $Id: rdline.h,v 1.2 2003/11/05 16:57:39 meven Exp $ */
00027 #ifndef mpq_LINE_READER_FILE_H
00028 #define mpq_LINE_READER_FILE_H
00029 
00030 #include "mpq_qsopt.h"
00031 #include "mpq_format.h"
00032 
00033 /* #ifdef _WINDOWS */
00034 typedef char *(
00035   *mpq_qsread_line_fct) (
00036   char *s,
00037   int size,
00038   void *src);
00039 
00040 typedef struct mpq_qsline_reader
00041 {
00042   mpq_qsread_line_fct read_line_fct;
00043   void *data_src;
00044   struct mpq_qserror_collector *error_collector;
00045 }
00046 mpq_qsline_reader;
00047 
00048 mpq_qsline_reader *mpq_ILLline_reader_new (
00049   mpq_qsread_line_fct fct,
00050   void *data_src);
00051 void mpq_ILLline_reader_free (
00052   mpq_qsline_reader * reader);
00053 
00054 #define mpq_ILLline_reader_get(s, size, reader)  \
00055   (reader)->read_line_fct(s, size, (reader)->data_src)
00056                    /* used by parsers to retrieve next input line */
00057 /* #else  
00058  *
00059  * typedef FILE mpq_qsline_reader; 
00060  *
00061  * #define mpq_ILLline_reader_new(fct, data) ((FILE*) (data)) 
00062  * #define mpq_ILLline_reader_free(reader)  
00063  * #define mpq_ILLline_reader_get(s, size, reader) fgets(s,size,reader) 
00064  * #endif 
00065  */
00066 
00067 #endif
00068 #endif
00069 #endif

Generated on Thu Mar 29 09:32:32 2012 for QSopt_ex by  doxygen 1.4.7