/*
 *   This file was automatically generated by version 1.7 of cextract.
 *   Manual editing not recommended.
 *
 *   Created: Wed Jul  7 18:35:00 1993
 */
#ifndef __CEXTRACT__
#if __STDC__

/* Copyright (C) 1993 by the author(s).
 
 This software is published in the hope that it will be useful, but
 WITHOUT ANY WARRANTY for any part of this software to work correctly
 or as described in the manuals. See the ShapeTools Public License
 for details.

 Permission is granted to use, copy, modify, or distribute any part of
 this software but only under the conditions described in the ShapeTools 
 Public License. A copy of this license is supposed to have been given
 to you along with ShapeTools in a file named LICENSE. Among other
 things, this copyright notice and the Public License must be
 preserved on all copies.
*/
/*
 * ShapeTools/shape program - mfiles.c
 *   implements memory file. A memory file is completely
 *   read into a buffer. All operations work on that buffer.
 *
 * by Juergen.Nickelsen@cs.tu-berlin.de
 *
 * $Header: mfiles.c[4.25] Tue Jul  6 15:46:00 1993 axel@cs.tu-berlin.de proposed $
 */

/* Kill an MFILE buffer pointed to by mf. Releases all memory
   associated with this buffer. */
void mf_kilbuf ( MFILE *mf );

/* Kill all MFILE buffers. */
void mf_killall ( void );

/* Read standard input into MFILE buffer */
MFILE *mf_readin_stdin ( void );

/* Read file fname into an MFILE buffer */
MFILE *mf_readin ( char *fname );

/* The current line is set to the next line. A pointer to the beginning
   of this line is returned. */
char *mf_nextline ( MFILE *mf );

/* The current line is set to the previous line. A pointer to the beginning
   of this line is returned. */
char *mf_prevline ( MFILE *mf );

/* Return a pointer to the specified line in mf. */
char *mf_thisline ( MFILE *mf, int lineno );

/* The file name and line number ptr points into are written into
   *pfilename and *plineno. If ptr does not point into an MFILE
   buffer, 0 is returned, 1 on success. */
int mf_locate ( char *ptr, char **pfilename, int *plineno );

/* The line number ptr points into in the buffer of mf is returned.
   If ptr does not point into the buffer of mf, -1 is returned. */
int mf_locate_in ( MFILE *mf, char *ptr );

/* set the current line of mf to the line ptr points to. If ptr does
   not point into the buffer of mf, a fatal error is raised. */
void mf_setline ( MFILE *mf, char *ptr );

#else /* __STDC__ */

/* Copyright (C) 1993 by the author(s).
 
 This software is published in the hope that it will be useful, but
 WITHOUT ANY WARRANTY for any part of this software to work correctly
 or as described in the manuals. See the ShapeTools Public License
 for details.

 Permission is granted to use, copy, modify, or distribute any part of
 this software but only under the conditions described in the ShapeTools 
 Public License. A copy of this license is supposed to have been given
 to you along with ShapeTools in a file named LICENSE. Among other
 things, this copyright notice and the Public License must be
 preserved on all copies.
*/
/*
 * ShapeTools/shape program - mfiles.c
 *   implements memory file. A memory file is completely
 *   read into a buffer. All operations work on that buffer.
 *
 * by Juergen.Nickelsen@cs.tu-berlin.de
 *
 * $Header: mfiles.c[4.25] Tue Jul  6 15:46:00 1993 axel@cs.tu-berlin.de proposed $
 */

/* Kill an MFILE buffer pointed to by mf. Releases all memory
   associated with this buffer. */
void mf_kilbuf (/* MFILE *mf */);

/* Kill all MFILE buffers. */
void mf_killall (/* void */);

/* Read standard input into MFILE buffer */
MFILE *mf_readin_stdin (/* void */);

/* Read file fname into an MFILE buffer */
MFILE *mf_readin (/* char *fname */);

/* The current line is set to the next line. A pointer to the beginning
   of this line is returned. */
char *mf_nextline (/* MFILE *mf */);

/* The current line is set to the previous line. A pointer to the beginning
   of this line is returned. */
char *mf_prevline (/* MFILE *mf */);

/* Return a pointer to the specified line in mf. */
char *mf_thisline (/* MFILE *mf, int lineno */);

/* The file name and line number ptr points into are written into
   *pfilename and *plineno. If ptr does not point into an MFILE
   buffer, 0 is returned, 1 on success. */
int mf_locate (/* char *ptr, char **pfilename, int *plineno */);

/* The line number ptr points into in the buffer of mf is returned.
   If ptr does not point into the buffer of mf, -1 is returned. */
int mf_locate_in (/* MFILE *mf, char *ptr */);

/* set the current line of mf to the line ptr points to. If ptr does
   not point into the buffer of mf, a fatal error is raised. */
void mf_setline (/* MFILE *mf, char *ptr */);

#endif /* __STDC__ */
#endif /* __CEXTRACT__ */
