CalculiX  2.8
A Free Software Three-Dimensional Structural Finite Element Program
 All Classes Files Functions Variables Macros
stof.c File Reference
#include <unistd.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <pthread.h>
#include "CalculiX.h"
#include "readfrd.h"
Include dependency graph for stof.c:

Go to the source code of this file.

Functions

double stof (char *string, ITG a, ITG b)
 

Function Documentation

double stof ( char *  string,
ITG  a,
ITG  b 
)

Definition at line 15 of file stof.c.

16 {
17  register ITG n, i;
18  static char puffer[MAX_LINE_LENGTH];
19 
20  n=-1;
21  for (i=a-1; i<b; i++)
22  {
23  n++;
24  if ((i>=MAX_LINE_LENGTH)||(n>=MAX_LINE_LENGTH)) break;
25  puffer[n] = string[i];
26  }
27  puffer[n+1] = '\0';
28  return( atof( puffer ) );
29 }
#define MAX_LINE_LENGTH
Definition: readfrd.h:10
#define ITG
Definition: CalculiX.h:51
Hosted by OpenAircraft.com, (Michigan UAV, LLC)