Compare commits

..

1 Commits

Author SHA1 Message Date
Mthandazo Ndhlovu
56537c0917 Semi Final Parser
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.
2019-04-08 15:27:09 +02:00
170 changed files with 4198 additions and 1273 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "libft"]
path = libft
url = https://github.com/tvdu29/libft

View File

@ -6,11 +6,11 @@
# By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ # # By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2019/03/27 16:51:02 by tmaze #+# #+# # # Created: 2019/03/27 16:51:02 by tmaze #+# #+# #
# Updated: 2019/05/09 18:39:33 by tmaze ### ########.fr # # Updated: 2019/03/31 19:48:45 by tmaze ### ########.fr #
# # # #
#******************************************************************************# #******************************************************************************#
NAME = lem-in NAME = lem_in
# Make options # Make options
MAKEFLAGS += --no-print-directory MAKEFLAGS += --no-print-directory
@ -27,7 +27,7 @@ endif
# Compilator # Compilator
CC = gcc CC = gcc
FLAGS = -Wall -Wextra -Werror FLAGS = -Wall -Wextra -Werror -g -O0 -fsanitize=address
# Folders # Folders
LIBDIR = libft LIBDIR = libft
@ -36,25 +36,7 @@ OBJDIR = objs
INCDIR = includes libft/includes INCDIR = includes libft/includes
# Source files # Source files
SRC = lm_parser.c \ SRC = lem_in.c lm_parser.c lm_mem_utils.c lm_graph_utils.c lm_check_errors.c \
lm_mem_utils.c \
lm_check_errors.c \
lm_data_utils.c \
lm_initdata.c \
lm_mem_utils.c \
lm_graph_utils.c \
lm_parser_error_check.c \
lm_utils_parser.c \
lm_utils_algo.c \
bfs.c \
lst_ind.c \
edmonds_karp.c \
push_ants.c \
push_ants_utils.c \
score_utils.c \
print_map.c \
lem_in.c
OBJ = $(SRC:.c=.o) OBJ = $(SRC:.c=.o)

BIN
Oglibft/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -6,12 +6,12 @@
# By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ # # By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2018/04/07 12:47:06 by tmaze #+# #+# # # Created: 2018/04/07 12:47:06 by tmaze #+# #+# #
# Updated: 2019/05/09 18:39:42 by tmaze ### ########.fr # # Updated: 2019/03/27 17:46:28 by tmaze ### ########.fr #
# # # #
#******************************************************************************# #******************************************************************************#
CC = gcc CC = gcc
CCFLAGS = -Wall -Werror -Wextra CCFLAGS = -Wall -Werror -Wextra -g -O0 -fsanitize=address
CCSTD = CCSTD =
NAME = libft.a NAME = libft.a
@ -32,7 +32,6 @@ SRCS = ft_memalloc.c \
ft_isascii.c \ ft_isascii.c \
ft_isprint.c \ ft_isprint.c \
ft_toupper.c \ ft_toupper.c \
ft_isnumeric.c \
ft_tolower.c \ ft_tolower.c \
ft_isupper.c \ ft_isupper.c \
ft_islower.c \ ft_islower.c \

View File

@ -6,7 +6,7 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */ /* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/08 00:12:36 by tmaze #+# #+# */ /* Created: 2018/04/08 00:12:36 by tmaze #+# #+# */
/* Updated: 2019/04/26 10:36:51 by mndhlovu ### ########.fr */ /* Updated: 2019/03/20 16:46:41 by tmaze ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -266,7 +266,6 @@ int ft_strncmp(const char *s1, const char *s2, size_t n);
int ft_atoi(const char *str); int ft_atoi(const char *str);
int ft_isalpha(int c); int ft_isalpha(int c);
int ft_isdigit(int c); int ft_isdigit(int c);
int ft_isnumeric(char *str);
int ft_isalnum(int c); int ft_isalnum(int c);
int ft_isascii(int c); int ft_isascii(int c);
int ft_isprint(int c); int ft_isprint(int c);

View File

@ -6,7 +6,7 @@
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */ /* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/04 11:33:35 by tmaze #+# #+# */ /* Created: 2018/04/04 11:33:35 by tmaze #+# #+# */
/* Updated: 2019/04/29 11:16:40 by mndhlovu ### ########.fr */ /* Updated: 2018/04/04 11:34:10 by tmaze ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View File

@ -3,22 +3,26 @@
/* ::: :::::::: */ /* ::: :::::::: */
/* ft_strcmp.c :+: :+: :+: */ /* ft_strcmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */ /* +:+ +:+ +:+ */
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */ /* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/07 17:33:42 by mndhlovu #+# #+# */ /* Created: 2018/04/03 15:38:27 by tmaze #+# #+# */
/* Updated: 2018/11/09 17:56:30 by mndhlovu ### ########.fr */ /* Updated: 2018/04/08 15:30:24 by tmaze ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libft.h" #include "libft.h"
#include <string.h>
int ft_strcmp(const char *s1, const char *s2) int ft_strcmp(const char *s1, const char *s2)
{ {
size_t len; int i;
int diff;
len = 0; i = 1;
while (s1[len] && s2[len] && s1[len] == s2[len]) diff = (unsigned char)s1[0] - (unsigned char)s2[0];
len++; while (diff == 0 && s1[i - 1] && s2[i - 1])
return ((unsigned char)s1[len] - (unsigned char)s2[len]); {
diff = (unsigned char)s1[i] - (unsigned char)s2[i];
i++;
}
return (diff);
} }

Some files were not shown because too many files have changed in this diff Show More