started dev on parser
defined data structure WIP
This commit is contained in:
parent
a6e27627c6
commit
808dd8c403
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "libft"]
|
||||
path = libft
|
||||
url = https://github.com/tvdu29/libft
|
@ -1,5 +1,43 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* lem_in.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/03/23 17:31:19 by tmaze #+# #+# */
|
||||
/* Updated: 2019/03/23 17:42:58 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef LEM_IN_N
|
||||
# define LEM_IN_H
|
||||
|
||||
# include "libft.h"
|
||||
|
||||
typedef struct s_node
|
||||
{
|
||||
char *name;
|
||||
int x;
|
||||
int y;
|
||||
char role;
|
||||
int ind;
|
||||
} t_node;
|
||||
|
||||
typedef struct s_ind;
|
||||
{
|
||||
int index;
|
||||
struct s_ind *next;
|
||||
} t_ind;
|
||||
|
||||
typedef struct s_lmdata
|
||||
{
|
||||
int nbants;
|
||||
t_list *nodes;
|
||||
t_ind **adj;
|
||||
} t_lmdata;
|
||||
|
||||
void lm_initdata(t_lmdata *data);
|
||||
int lm_getparams(t_lmdata *data);
|
||||
|
||||
#endif
|
||||
|
1
libft
Submodule
1
libft
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 05a6363b5d450a1c7cfc320257ed17e5678a7dfa
|
20
srcs/lm_getparams.c
Normal file
20
srcs/lm_getparams.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* lm_getparams.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/03/23 17:46:34 by tmaze #+# #+# */
|
||||
/* Updated: 2019/03/23 17:51:35 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "lem_in.h"
|
||||
|
||||
int lm_getparams(t_lmdata *data)
|
||||
{
|
||||
char *buff;
|
||||
|
||||
while ()
|
||||
}
|
20
srcs/lm_initdata.c
Normal file
20
srcs/lm_initdata.c
Normal file
@ -0,0 +1,20 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* lm_initdata.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/03/23 17:43:34 by tmaze #+# #+# */
|
||||
/* Updated: 2019/03/23 17:45:09 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "lem_in.h"
|
||||
|
||||
void lm_initdata(t_lmdata *data)
|
||||
{
|
||||
data->nbants = 0;
|
||||
data->nodes = NULL;
|
||||
data->adj = NULL;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user