#include <errno.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <libh/string.h>

int main( int argc, char * * argv )
{
#if HAVE_C99

    long double a;
    long double b;
    char * endptr;

    while ( ++ argv, -- argc ) {
	printf( "converting:                          \"%s\"\n", * argv );
	a = strtold( * argv, & endptr );

	printf( "  strtold: %84.17Lf %23.15La\n", a, a );
	b = str_to_ld( * argv, & endptr );
	printf( "str_to_ld: %84.17Lf %23.15La\n", b, b );
    }

    return 0;

#else
    fprintf( stderr, "Your platform does not yet support ISO/IEC 9899:1999 Standard C\n" );
    return 1;
#endif
}

