The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Data Structures | Macros | Functions
BuffInp.h File Reference

Header file for BuffInp.c. More...

#include <stdio.h>
#include "SysDefs.h"
#include "deprecated.h"

Go to the source code of this file.

Data Structures

struct  INBUFFER
 

Macros

#define _BUFFINPUT_H_DEPRECATED
 

Functions

INBUFFERblOpenBufferedFile (char *filename, int maxstr)
 
BOOL blReadBufferedFile (INBUFFER *bfp, char *string, int length)
 
BOOL blProbeBufferedFile (INBUFFER *bfp, char *string, int length)
 

Detailed Description

Header file for BuffInp.c.

Version
V1.3
Date
14.08.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

Usage:

Revision History:

Definition in file BuffInp.h.

Macro Definition Documentation

#define _BUFFINPUT_H_DEPRECATED

Definition at line 86 of file BuffInp.h.

Function Documentation

INBUFFER* blOpenBufferedFile ( char *  filename,
int  maxstr 
)
Parameters
[in]*filenameFile name
[in]maxstrMax string length in file for buffering
Returns
Pointer to a buffered file

Open a file for buffered input. This allows probe-ahead to look at the contents of the next line without removing it from the input stream.

  • 28.02.94 Original By: ACRM
  • 03.03.94 If filename is NULL, make file stdin
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 115 of file BuffInp.c.

BOOL blProbeBufferedFile ( INBUFFER bfp,
char *  string,
int  length 
)
Parameters
[in]*bfpPointer to a buffered file structure
[in]lengthSize of output string
[out]*stringOutput string read from file
Returns
TRUE: Successful read FALSE: End of file (or error)

Read the next line from a buffered file without removing it from the input stream. Repeated calls will thus return the same string. The next call to ReadBufferedFile will also output the same string, but will remove the line from the input stream. Blank lines in the file will be skipped.

  • 28.02.94 Original By: ACRM
  • 07.03.94 Added code to skip blank lines
  • 10.03.94 Added call to RePrompt() after blank line
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 217 of file BuffInp.c.

BOOL blReadBufferedFile ( INBUFFER bfp,
char *  string,
int  length 
)
Parameters
[in]*bfpPointer to a buffered file structure
[in]lengthSize of output string
[out]*stringOutput string read from file
Returns
TRUE: Successful read FALSE: End of file (or error)

Reads a line from a buffered file (like fgets()). Blank lines in the file will be skipped.

  • 28.02.94 Original By: ACRM
  • 07.03.94 Added code to skip blank lines
  • 10.03.94 Added call to RePrompt() if we're reading from stdin and we get a blank line
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 161 of file BuffInp.c.