C Implementation of atof I'm a beginner at C. 
I'm currently implementing atof to build a raytracer, however I'm still learning how to efficiently write programs.
Assignement
Instructions
The program takes a scene description file as argument to generate objects. Some of these paramaters are float. Example of the file.

I'm parsing through the file. As I'm restricted in terms of lines allowed per function and I'm currently learning how double pointers work, I'm using a double char pointer. Example of one such function using lc_atof.
int    a_parsing(char *str, t_pars *data)
{
    if (*(str++) == 'A')
    {
        if (((data-&gt;a_ratio = lc_atof(&amp;str)) &gt;= 0.0) &amp;&amp; data-&gt;a_ratio &lt;= 1.0 &amp;&amp; errno == 0)
        // 
            if (((data-&gt;a_R = lc_atoi(&amp;str)) &gt;= 0) &amp;&amp; data-&gt;a_R &lt;= 255 &amp;&amp; errno == 0)
                if (*(str++) = ',' &amp;&amp; ((data-&gt;a_G = lc_atoi(&amp;str)) &gt;= 0) &amp;&amp; data-&gt;a_G &lt;= 255 &amp;&amp; errno == 0)
                    if (*(str++) = ',' &amp;&amp; ((data-&gt;a_B = lc_atoi(&amp;str)) &gt;= 0) &amp;&amp; data-&gt;a_B &lt;= 255 &amp;&amp; errno == 0)
                        return (skip_space(&amp;str));
    }
    return (0);
}



Current code to review:
#include &lt;stdlib.h&gt;
#include &lt;unistd.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;limits.h&gt;
#include &lt;errno.h&gt;
#include &lt;float.h&gt;

static float    conversion(char **str)
{
    double    d_nbr;
    double    power;

    d_nbr = 0.0;
    power = 10.0;
    while (isdigit(**str))
    {
        d_nbr = d_nbr * 10.0 + (**str - 48);
        if (d_nbr &gt; FLT_MAX)
        {
            errno = EIO;
            return (-1);
        }
        (*str)++;
    }
    if (**str == '.')
    {
      (*str)++;
      if (isdigit(**str))
      {
        d_nbr = d_nbr * 10.0 + (**str - 48);
        if (d_nbr &gt; FLT_MAX)
        {
            errno = EIO;
            return (-1);
        }
        (*str)++;
        return ((float)(d_nbr / power));
      }
    }
    errno = EIO;
    return (-1);
}

float            lc_atof(char **str)
{
    float    n;
    int        sign;

    n = 0.0;
    sign = 1.0;
    if (!str || !*str)
    {
        errno = EIO;
        return (-1);
    }
    while (isspace(**str))
        (*str)++;
    if (**str == '+' || **str == '-')
    {
        if (**str == '-')
            sign = -1.0;    
        (*str)++;
    }
    if (!isdigit(**str))
    {
        errno = EIO;
        return (-1);
    }
    if ((n = conversion(str)) == 0 &amp;&amp; errno != 0)
       return (-1);
    return (sign * n);
}

The only tweaks to the actual atof I've made is having a double char pointer as argument and returning -1 in case of errors.
Every input much appreciated.
Portability
There is no guarantee that this code will be using ASCII so it would be better to use '0' rather than 48 which is something of a magic number. Using '0' makes it more readable and easier to understand.
lc_atof Doesn't Handle String Termination or End Of Line Correctly
This code doesn't handle a NULL terminated string or an end of line character. The function isspace() returns true for end of line so the code will walk right past it.
    while (isspace(**str))
        (*str)++;
    if (**str == '+' || **str == '-')
    {
        if (**str == '-')
            sign = -1.0;
        (*str)++;
    }
    if (!isdigit(**str))
    {
        errno = EIO;
        return (-1);
    }

Complexity
I reaize that you didn't ask for this to be review, but the complexity of each if statement in the example call function is too much and caused me to make an error in my review previously:
int a_parsing(char* str, t_pars* data)
{
    if (*(str++) == 'A')
    {
        if (((data-&gt;a_ratio = lc_atof(&amp;str)) &gt;= 0.0) &amp;&amp; data-&gt;a_ratio &lt;= 1.0 &amp;&amp; errno == 0)
            // 
            if (((data-&gt;a_R = lc_atoi(&amp;str)) &gt;= 0) &amp;&amp; data-&gt;a_R &lt;= 255 &amp;&amp; errno == 0)
                if (*(str++) = ',' &amp;&amp; ((data-&gt;a_G = lc_atoi(&amp;str)) &gt;= 0) &amp;&amp; data-&gt;a_G &lt;= 255 &amp;&amp; errno == 0)
                    if (*(str++) = ',' &amp;&amp; ((data-&gt;a_B = lc_atoi(&amp;str)) &gt;= 0) &amp;&amp; data-&gt;a_B &lt;= 255 &amp;&amp; errno == 0)
                        return (skip_space(&amp;str));
    }
    return (0);
}

I would rewrite the code as :
#define MAX_COLOR   0xFF
int a_parsing_prime(char* str, t_pars* data)
{
    if (*(str++) == 'A')
    {
        data-&gt;a_ratio = lc_atof(&amp;str);
        if (!errno &amp;&amp; data-&gt;a_R &lt;= MAX_COLOR)
        {
            if (*(str++) = ',')
            {
                data-&gt;a_G = lc_atoi(&amp;str);
                if (!errno &amp;&amp; data-&gt;a_G &lt;= MAX_COLOR)
                {
                    if (*(str++) = ',')
                    {
                        data-&gt;a_B = lc_atoi(&amp;str);
                        if (!errno &amp;&amp; data-&gt;a_B &lt;= MAX_COLOR)
                        {
                            return (skip_space(&amp;str));
                        }
                    }
                }
            }
        }
    }
    return (0);
}

which truely shows the complexity of the function.