/* nuchar.f -- translated by f2c (version 19950314).
   You must link the resulting object file with the libraries:
	-lF77 -lI77 -lm   (in that order)
*/

#include "f2c.h"

/* Subroutine */ int nuchar_(char *line, doublereal *value, integer *nvalue, 
	ftnlen line_len)
{
    /* Initialized data */

    static char comma[1] = ",";
    static char space[1] = " ";

    /* System generated locals */
    integer i__1;

    /* Local variables */
    static integer i;
    extern doublereal reada_(char *, integer *, ftnlen);
    static logical leadsp;
    static integer istart[40];
    static char tab[1];

/* ***********************************************************************
 */

/*   NUCHAR  DETERMINS AND RETURNS THE REAL VALUES OF ALL NUMBERS */
/*           FOUND IN 'LINE'. ALL CONNECTED SUBSTRINGS ARE ASSUMED */
/*           TO CONTAIN NUMBERS */
/*   ON ENTRY LINE    = CHARACTER STRING */
/*   ON EXIT  VALUE   = ARRAY OF NVALUE REAL VALUES */

/* ***********************************************************************
 */
    /* Parameter adjustments */
    --value;

    /* Function Body */
    *(unsigned char *)tab = '\t';

/* CLEAN OUT TABS AND COMMAS */

    for (i = 1; i <= 80; ++i) {
/* L10: */
	if (*(unsigned char *)&line[i - 1] == *(unsigned char *)tab || *(
		unsigned char *)&line[i - 1] == *(unsigned char *)&comma[0]) {
	    *(unsigned char *)&line[i - 1] = *(unsigned char *)&space[0];
	}
    }

/* FIND INITIAL DIGIT OF ALL NUMBERS, CHECK FOR LEADING SPACES FOLLOWED */
/*     BY A CHARACTER */

    leadsp = TRUE_;
    *nvalue = 0;
    for (i = 1; i <= 80; ++i) {
	if (leadsp && *(unsigned char *)&line[i - 1] != *(unsigned char *)&
		space[0]) {
	    ++(*nvalue);
	    istart[*nvalue - 1] = i;
	}
	leadsp = *(unsigned char *)&line[i - 1] == *(unsigned char *)&space[0]
		;
/* L20: */
    }

/* FILL NUMBER ARRAY */

    i__1 = *nvalue;
    for (i = 1; i <= i__1; ++i) {
	value[i] = reada_(line, &istart[i - 1], 80L);
/* L30: */
    }
    return 0;
} /* nuchar_ */

