src/temp_out.c
/*
**	Writes len data into the temporary array. Updates cursor as it goes. It will
**	verify that the data will not exceed CHAMP_MAX_SIZE before it starts. If
**	the data is too large, the program will display an error and exit.
*/
Writes len data into the temporary array. Updates cursor as it goes. It will
verify that the data will not exceed CHAMP_MAX_SIZE before it starts. If
the data is too large, the program will display an error and exit.
Writes len data into the temporary array . Updates cursor as it goes . It will verify that the data will not exceed CHAMP_MAX_SIZE before it starts . If the data is too large the program will display an error and exit .
void	write_out(char *data, unsigned int len)
{
	unsigned int	i;
	if (g_cursor_out + len > CHAMP_MAX_SIZE)
	{
		ft_putendl("ERROR: Champion too large!");
		cleanup();
		exit(EXIT_FAILURE);
	}
	i = 0;
	while (i < len)
		g_temp_out[g_cursor_out++] = data[i++];
}
void write_out ( char * data , unsigned int len ) { unsigned int i ; if ( g_cursor_out + len > CHAMP_MAX_SIZE ) { ft_putendl ( " " ) ; cleanup ( ) ; exit ( EXIT_FAILURE ) ; } i = 0 ; while ( i < len ) g_temp_out [ g_cursor_out ++ ] = data [ i ++ ] ; }
Writes len data into the temporary array.
Writes len data into the temporary array .