Parser working fine with valid maps. only a few adjustments are yet to be made. The adjustments will not affect the output of the adjacency list. FYI leaks like a garden pipe.
35 lines
1.3 KiB
C
35 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* lm_check_errors.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2019/04/02 08:39:09 by mndhlovu #+# #+# */
|
|
/* Updated: 2019/04/08 15:15:44 by mndhlovu ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "lem_in.h"
|
|
|
|
int lm_check_room_before(char **tab, t_syntax *synt)
|
|
{
|
|
if (tab[0] != NULL && tab[1] != NULL && tab[2] != NULL)
|
|
{
|
|
if (!lm_validate_rooms(tab[0], tab[1], tab[2]))
|
|
{
|
|
synt->v_error = 1;
|
|
return (0);
|
|
}
|
|
}
|
|
return (1);
|
|
}
|
|
|
|
int lm_verify_cmd(t_syntax *synt)
|
|
{
|
|
if (synt->s_cmd && synt->e_cmd && synt->v_error
|
|
&& synt->l_error && synt->e_error)
|
|
return (1);
|
|
return (0);
|
|
}
|