FEDRA emulsion software from the OPERA Collaboration
EdbBasic.h File Reference
#include <stdio.h>
Include dependency graph for EdbBasic.h:

Go to the source code of this file.

Functions

int Sfscanf (FILE *fp, char *mes,...)
 to provide fortran-like reading by strings More...
 

Function Documentation

◆ Sfscanf()

int Sfscanf ( FILE *  fp,
char *  mes,
  ... 
)

to provide fortran-like reading by strings

//////////////////////////////////////////////////////////////////////// // EdbBasic // // collection of general purpose algorithms // // ////////////////////////////////////////////////////////////////////////

17{
18 char buffer[256]="";
19 int ncols;
20 va_list marker;
21
22 if (fgets (buffer, 256, fp) == NULL)
23 return -1;
24 else{
25 va_start(marker,mes);
26 ncols = vsscanf( buffer, mes, marker );
27 va_end(marker);
28 }
29 return ncols;
30}
#define NULL
Definition: nidaqmx.h:84