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

Include file for fsscanf() More...

Go to the source code of this file.

Functions

int fsscanf (char *buffer, char *format,...)
 

Detailed Description

Include file for fsscanf()

Version
V1.1R
Date
01.03.94
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 fsscanf.h.

Function Documentation

int fsscanf ( char *  buffer,
char *  format,
  ... 
)
Parameters
[in]*bufferBuffer from which to read information
[in]*formatFormat string (like scanf() et al., but see restrictions below)
[out]...Scanned output variables
Returns
Number of values read (EOF if end of file or no specifiers found in format string)

Hard formatted version of sscanf(). Implements FORTRAN-like rigid column reading out of a string.

The only parsing characters recognised are:

  %<n>f    A single precision floating point number of width <n>
  %<n>lf   A double precision floating point number of width <n>
  %<n>d    An integer of width <n>
  %<n>ld   A long integer of width <n>
  %<n>u    An unsigned of width <n>
  %<n>lu   An unsigned long of width <n>
  %<n>s    A string of width <n>
  %c       A character (of width 1)
  %<n>x    <n> spaces (like FORTRAN).

With the exception of the c parser, the column width, <n>, must* be specified.

Blank fields read as numbers are given a value of zero.

  • 17.06.93 Original By: ACRM
  • 12.07.93 Added u and lu. Corrected s and c to blank rather than NULL strings if buffer runs out. Pads string if buffer ran out in the middle. Takes
    in buffer as end of string.
  • 24.11.95 `value' was a fixed 40 character buffer. Now changed to allocate a suitable number of characters as required.
  • 13.01.97 Previously if reading from a blank line the output variables were unmodified since an EOF return was done immediately. Now the immediate EOF return only happens if the input buffer is a NULL variable and the EOF on blank string is moved to the end such that all output variables are set to zero or blank before the EOF return.
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 177 of file fsscanf.c.