src/processing.c
/*
**	This function will return the atoi of the parameter if it's a number, and if
**	it's a label, it'll lookup the label, and return the difference between the
**	label's cursor, and the origin_cursor(the cursor of the last successfully
**	processed instruction). This essentially converts the label into an offset.
*/
This function will return the atoi of the parameter if it's a number, and if
it's a label, it'll lookup the label, and return the difference between the
label's cursor, and the origin_cursor(the cursor of the last successfully
processed instruction). This essentially converts the label into an offset.
This function will return the atoi of the parameter if it ' s a number and if it ' s a label it ' ll lookup the label and return the difference between the label ' s cursor and the origin_cursor ( the cursor of the last successfully processed instruction ) . This essentially converts the label into an offset .
static int	read_nbr(char *param)
{
	int	i;
	i = 0;
	while (!(ft_isdigit(param[i]) || param[i] == '-') && param[i])
	{
		if (param[i] == ':')
			return (search_label(param + i + 1) - g_o_cursor_out);
		++i;
	}
	return (ft_atoi(param + i));
}
static int read_nbr ( char * param ) { int i ; i = 0 ; while ( ! ( ft_isdigit ( param [ i ] ) || param [ i ] == ' ' ) && param [ i ] ) { if ( param [ i ] == ' ' ) return ( search_label ( param + i + 1 ) - g_o_cursor_out ) ; ++ i ; } return ( ft_atoi ( param + i ) ) ; }
This function will return the atoi of the parameter if it's a number, and if
it's a label, it'll lookup the label, and return the difference between the
label's cursor, and the origin_cursor(the cursor of the last successfully
processed instruction).
This function will return the atoi of the parameter if it ' s a number and if it ' s a label it ' ll lookup the label and return the difference between the label ' s cursor and the origin_cursor ( the cursor of the last successfully processed instruction ) .