HOPS
HOPS class reference
Macros | Functions
parse_units.c File Reference
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "vex.h"
#include "mk4_vex.h"
#include "mk4_util.h"

Macros

#define FALSE   0
 
#define MATCH_UNITS(found, units, table, type, out)
 
#define PI   3.14159265358979323846
 
#define TRUE   1
 

Functions

int parse_units (char *unitstring, int units, double *factor)
 

Macro Definition Documentation

◆ FALSE

#define FALSE   0

◆ MATCH_UNITS

#define MATCH_UNITS (   found,
  units,
  table,
  type,
  out 
)
Value:
{ int i; if(!found)\
for (i=0; table[i].str !=NULL; i++)\
if(strcmp(units,table[i].str)==0) {\
out=table[i].factor;\
found=type; } }

◆ PI

#define PI   3.14159265358979323846

◆ TRUE

#define TRUE   1

Function Documentation

◆ parse_units()

int parse_units ( char *  unitstring,
int  units,
double *  factor 
)