From 14914f50c3de6c5444e13cf67db064b03c1c90ef Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 16 Jul 2019 12:58:13 +0200 Subject: c09 passed, c10 start, exam00 and exam01 --- c09/ex00/ft_strcmp.c | 4 +- c09/ex00/ft_strlen.c | 5 +- c09/ex00/libft_creator.sh | 2 +- c09/ex01/Makefile | 23 +++- c09/ex01/srcs/ft_putchar.c | 2 +- c09/ex01/srcs/ft_putstr.c | 3 +- c09/ex02/ft_split.c | 7 +- c09/main.c | 27 ++++ c10/ex00/Makefile | 17 +++ c10/ex00/bonjour | 4 - c10/ex00/main.c | 34 ++--- c10/ex01/Makefile | 1 + c10/ex01/helper.c | 35 +++++ c10/ex01/include.h | 34 +++++ c10/ex01/io.c | 56 ++++++++ c10/ex01/main.c | 34 +++++ exam00/cacharle/__GIT_HISTORY | 71 ++++++++++ exam00/cacharle/ft_atoi/ft_atoi.c | 60 ++++++++ exam00/cacharle/ft_countdown/ft_countdown.c | 20 +++ exam00/cacharle/ft_putstr/ft_putstr.c | 10 ++ exam00/cacharle/ft_strrev/ft_strrev.c | 31 +++++ exam00/cacharle/maff_alpha/maff_alpha.c | 21 +++ exam00/cacharle/only_z/only_z.c | 8 ++ exam00/rendu/__GIT_HISTORY | 71 ++++++++++ exam00/rendu/ft_atoi/ft_atoi.c | 60 ++++++++ exam00/rendu/ft_countdown/ft_countdown.c | 20 +++ exam00/rendu/ft_putstr/ft_putstr.c | 10 ++ exam00/rendu/ft_strrev/ft_strrev.c | 31 +++++ exam00/rendu/maff_alpha/maff_alpha.c | 21 +++ exam00/rendu/only_z/only_z.c | 8 ++ exam00/subjects/0-0-only_z/subject.en.txt | 6 + exam00/subjects/0-0-only_z/subject.fr.txt | 6 + exam00/subjects/1-0-ft_countdown/subject.en.txt | 12 ++ exam00/subjects/1-0-ft_countdown/subject.fr.txt | 12 ++ exam00/subjects/2-0-maff_alpha/examples.txt | 2 + exam00/subjects/2-0-maff_alpha/subject.en.txt | 12 ++ exam00/subjects/2-0-maff_alpha/subject.fr.txt | 12 ++ exam00/subjects/3-0-ft_putstr/subject.en.txt | 13 ++ exam00/subjects/3-0-ft_putstr/subject.fr.txt | 12 ++ exam00/subjects/4-0-ft_strrev/subject.en.txt | 12 ++ exam00/subjects/4-0-ft_strrev/subject.fr.txt | 12 ++ exam00/subjects/5-0-ft_atoi/subject.en.txt | 13 ++ exam00/subjects/5-0-ft_atoi/subject.fr.txt | 12 ++ exam00/subjects/5-1-ft_atoi/subject.en.txt | 13 ++ exam00/subjects/5-1-ft_atoi/subject.fr.txt | 12 ++ exam00/traces/0-0-only_z.trace.txt | 47 +++++++ exam00/traces/1-0-ft_countdown.trace.txt | 53 ++++++++ exam00/traces/2-0-maff_alpha.trace.txt | 59 ++++++++ exam00/traces/3-0-ft_putstr.trace.txt | 100 ++++++++++++++ exam00/traces/4-0-ft_strrev.trace.txt | 112 +++++++++++++++ exam00/traces/5-0-ft_atoi.trace.txt | 79 +++++++++++ exam00/traces/5-1-ft_atoi.trace.txt | 174 ++++++++++++++++++++++++ exam01/rendu/__GIT_HISTORY | 71 ++++++++++ exam01/rendu/ft_range/ft_range.c | 40 ++++++ exam01/rendu/ft_split/ft_split.c | 72 ++++++++++ exam01/rendu/hello/hello.c | 18 +++ exam01/rendu/rev_print/rev_print.c | 32 +++++ exam01/rendu/rotone/rotone.c | 39 ++++++ exam01/rendu/wdmatch/wdmatch.c | 54 ++++++++ exam01/subjects/0-0-hello/examples.txt | 5 + exam01/subjects/0-0-hello/subject.en.txt | 14 ++ exam01/subjects/0-0-hello/subject.fr.txt | 14 ++ exam01/subjects/1-0-rev_print/subject.en.txt | 18 +++ exam01/subjects/1-0-rev_print/subject.fr.txt | 18 +++ exam01/subjects/2-0-rotone/examples.txt | 12 ++ exam01/subjects/2-0-rotone/subject.en.txt | 28 ++++ exam01/subjects/2-0-rotone/subject.fr.txt | 31 +++++ exam01/subjects/3-0-wdmatch/examples.txt | 10 ++ exam01/subjects/3-0-wdmatch/subject.en.txt | 26 ++++ exam01/subjects/3-0-wdmatch/subject.fr.txt | 28 ++++ exam01/subjects/3-1-wdmatch/examples.txt | 10 ++ exam01/subjects/3-1-wdmatch/subject.en.txt | 26 ++++ exam01/subjects/3-1-wdmatch/subject.fr.txt | 28 ++++ exam01/subjects/4-0-ft_range/subject.en.txt | 19 +++ exam01/subjects/4-0-ft_range/subject.fr.txt | 19 +++ exam01/subjects/4-1-ft_range/subject.en.txt | 19 +++ exam01/subjects/4-1-ft_range/subject.fr.txt | 19 +++ exam01/subjects/5-0-ft_split/subject.en.txt | 14 ++ exam01/subjects/5-0-ft_split/subject.fr.txt | 16 +++ exam01/traces/0-0-hello.trace.txt | 47 +++++++ exam01/traces/1-0-rev_print.trace.txt | 103 ++++++++++++++ exam01/traces/2-0-rotone.trace.txt | 154 +++++++++++++++++++++ exam01/traces/3-0-wdmatch.trace.txt | 65 +++++++++ exam01/traces/3-1-wdmatch.trace.txt | 161 ++++++++++++++++++++++ exam01/traces/4-0-ft_range.trace.txt | 115 ++++++++++++++++ exam01/traces/4-1-ft_range.trace.txt | 168 +++++++++++++++++++++++ exam01/traces/5-0-ft_split.trace.txt | 163 ++++++++++++++++++++++ 87 files changed, 3153 insertions(+), 38 deletions(-) create mode 100644 c09/main.c delete mode 100644 c10/ex00/bonjour create mode 100644 c10/ex01/Makefile create mode 100644 c10/ex01/helper.c create mode 100644 c10/ex01/include.h create mode 100644 c10/ex01/io.c create mode 100644 c10/ex01/main.c create mode 100755 exam00/cacharle/__GIT_HISTORY create mode 100755 exam00/cacharle/ft_atoi/ft_atoi.c create mode 100755 exam00/cacharle/ft_countdown/ft_countdown.c create mode 100755 exam00/cacharle/ft_putstr/ft_putstr.c create mode 100755 exam00/cacharle/ft_strrev/ft_strrev.c create mode 100755 exam00/cacharle/maff_alpha/maff_alpha.c create mode 100755 exam00/cacharle/only_z/only_z.c create mode 100755 exam00/rendu/__GIT_HISTORY create mode 100755 exam00/rendu/ft_atoi/ft_atoi.c create mode 100755 exam00/rendu/ft_countdown/ft_countdown.c create mode 100755 exam00/rendu/ft_putstr/ft_putstr.c create mode 100755 exam00/rendu/ft_strrev/ft_strrev.c create mode 100755 exam00/rendu/maff_alpha/maff_alpha.c create mode 100755 exam00/rendu/only_z/only_z.c create mode 100644 exam00/subjects/0-0-only_z/subject.en.txt create mode 100644 exam00/subjects/0-0-only_z/subject.fr.txt create mode 100644 exam00/subjects/1-0-ft_countdown/subject.en.txt create mode 100644 exam00/subjects/1-0-ft_countdown/subject.fr.txt create mode 100644 exam00/subjects/2-0-maff_alpha/examples.txt create mode 100644 exam00/subjects/2-0-maff_alpha/subject.en.txt create mode 100644 exam00/subjects/2-0-maff_alpha/subject.fr.txt create mode 100644 exam00/subjects/3-0-ft_putstr/subject.en.txt create mode 100644 exam00/subjects/3-0-ft_putstr/subject.fr.txt create mode 100644 exam00/subjects/4-0-ft_strrev/subject.en.txt create mode 100644 exam00/subjects/4-0-ft_strrev/subject.fr.txt create mode 100644 exam00/subjects/5-0-ft_atoi/subject.en.txt create mode 100644 exam00/subjects/5-0-ft_atoi/subject.fr.txt create mode 100644 exam00/subjects/5-1-ft_atoi/subject.en.txt create mode 100644 exam00/subjects/5-1-ft_atoi/subject.fr.txt create mode 100644 exam00/traces/0-0-only_z.trace.txt create mode 100644 exam00/traces/1-0-ft_countdown.trace.txt create mode 100644 exam00/traces/2-0-maff_alpha.trace.txt create mode 100644 exam00/traces/3-0-ft_putstr.trace.txt create mode 100644 exam00/traces/4-0-ft_strrev.trace.txt create mode 100644 exam00/traces/5-0-ft_atoi.trace.txt create mode 100644 exam00/traces/5-1-ft_atoi.trace.txt create mode 100755 exam01/rendu/__GIT_HISTORY create mode 100755 exam01/rendu/ft_range/ft_range.c create mode 100755 exam01/rendu/ft_split/ft_split.c create mode 100755 exam01/rendu/hello/hello.c create mode 100755 exam01/rendu/rev_print/rev_print.c create mode 100755 exam01/rendu/rotone/rotone.c create mode 100755 exam01/rendu/wdmatch/wdmatch.c create mode 100644 exam01/subjects/0-0-hello/examples.txt create mode 100644 exam01/subjects/0-0-hello/subject.en.txt create mode 100644 exam01/subjects/0-0-hello/subject.fr.txt create mode 100644 exam01/subjects/1-0-rev_print/subject.en.txt create mode 100644 exam01/subjects/1-0-rev_print/subject.fr.txt create mode 100644 exam01/subjects/2-0-rotone/examples.txt create mode 100644 exam01/subjects/2-0-rotone/subject.en.txt create mode 100644 exam01/subjects/2-0-rotone/subject.fr.txt create mode 100644 exam01/subjects/3-0-wdmatch/examples.txt create mode 100644 exam01/subjects/3-0-wdmatch/subject.en.txt create mode 100644 exam01/subjects/3-0-wdmatch/subject.fr.txt create mode 100644 exam01/subjects/3-1-wdmatch/examples.txt create mode 100644 exam01/subjects/3-1-wdmatch/subject.en.txt create mode 100644 exam01/subjects/3-1-wdmatch/subject.fr.txt create mode 100644 exam01/subjects/4-0-ft_range/subject.en.txt create mode 100644 exam01/subjects/4-0-ft_range/subject.fr.txt create mode 100644 exam01/subjects/4-1-ft_range/subject.en.txt create mode 100644 exam01/subjects/4-1-ft_range/subject.fr.txt create mode 100644 exam01/subjects/5-0-ft_split/subject.en.txt create mode 100644 exam01/subjects/5-0-ft_split/subject.fr.txt create mode 100644 exam01/traces/0-0-hello.trace.txt create mode 100644 exam01/traces/1-0-rev_print.trace.txt create mode 100644 exam01/traces/2-0-rotone.trace.txt create mode 100644 exam01/traces/3-0-wdmatch.trace.txt create mode 100644 exam01/traces/3-1-wdmatch.trace.txt create mode 100644 exam01/traces/4-0-ft_range.trace.txt create mode 100644 exam01/traces/4-1-ft_range.trace.txt create mode 100644 exam01/traces/5-0-ft_split.trace.txt diff --git a/c09/ex00/ft_strcmp.c b/c09/ex00/ft_strcmp.c index 8870811..18f975a 100644 --- a/c09/ex00/ft_strcmp.c +++ b/c09/ex00/ft_strcmp.c @@ -6,11 +6,11 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/11 16:20:33 by cacharle #+# #+# */ -/* Updated: 2019/07/11 16:21:55 by cacharle ### ########.fr */ +/* Updated: 2019/07/16 09:37:13 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ -int ft_strcmp(char *s1, char *s2) +int ft_strcmp(char *s1, char *s2) { while (*s1 == *s2 && *s1 && *s2) { diff --git a/c09/ex00/ft_strlen.c b/c09/ex00/ft_strlen.c index 91e6948..fe5f4b7 100644 --- a/c09/ex00/ft_strlen.c +++ b/c09/ex00/ft_strlen.c @@ -6,11 +6,11 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/11 16:19:43 by cacharle #+# #+# */ -/* Updated: 2019/07/11 16:20:18 by cacharle ### ########.fr */ +/* Updated: 2019/07/16 09:36:56 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ -int ft_strlen(char *str) +int ft_strlen(char *str) { int i; @@ -19,4 +19,3 @@ int ft_strlen(char *str) i++; return (i); } - diff --git a/c09/ex00/libft_creator.sh b/c09/ex00/libft_creator.sh index 9c0aefa..796b263 100755 --- a/c09/ex00/libft_creator.sh +++ b/c09/ex00/libft_creator.sh @@ -1,4 +1,4 @@ #!/bin/sh -gcc -c ft_putchar.c ft_swap.c ft_putstr.c ft_strlen.c ft_strcmp.c +gcc -Wall -Wextra -Werror -c ft_putchar.c ft_swap.c ft_putstr.c ft_strlen.c ft_strcmp.c ar -rs libft.a ft_putchar.o ft_swap.o ft_putstr.o ft_strlen.o ft_strcmp.o rm -f ft_putchar.o ft_swap.o ft_putstr.o ft_strlen.o ft_strcmp.o diff --git a/c09/ex01/Makefile b/c09/ex01/Makefile index ba69535..3547e9c 100644 --- a/c09/ex01/Makefile +++ b/c09/ex01/Makefile @@ -1,6 +1,19 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# Makefile :+: :+: :+: # +# +:+ +:+ +:+ # +# By: cacharle +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2019/07/15 19:27:49 by cacharle #+# #+# # +# Updated: 2019/07/16 07:41:31 by cacharle ### ########.fr # +# # +# **************************************************************************** # + OUT = libft.a CC = gcc CCFLAGS = -Wall -Wextra -Werror +LDFLAGS = -Iincludes OBJ = srcs/ft_putchar.o srcs/ft_swap.o srcs/ft_putstr.o srcs/ft_strlen.o srcs/ft_strcmp.o .PHONY: all @@ -10,19 +23,19 @@ $(OUT): $(OBJ) ar -crs $(OUT) $(OBJ) srcs/ft_putchar.o: srcs/ft_putchar.c includes/ft.h - $(CC) $(CCFLAGS) -c $< -o $@ + $(CC) $(CCFLAGS) $(LDFLAGS) -c $< -o $@ srcs/ft_swap.o: srcs/ft_swap.c includes/ft.h - $(CC) $(CCFLAGS) -c $< -o $@ + $(CC) $(CCFLAGS) $(LDFLAGS) -c $< -o $@ srcs/ft_putstr.o: srcs/ft_putstr.c includes/ft.h - $(CC) $(CCFLAGS) -c $< -o $@ + $(CC) $(CCFLAGS) $(LDFLAGS) -c $< -o $@ srcs/ft_strlen.o: srcs/ft_strlen.c includes/ft.h - $(CC) $(CCFLAGS) -c $< -o $@ + $(CC) $(CCFLAGS) $(LDFLAGS) -c $< -o $@ srcs/ft_strcmp.o: srcs/ft_strcmp.c includes/ft.h - $(CC) $(CCFLAGS) -c $< -o $@ + $(CC) $(CCFLAGS) $(LDFLAGS) -c $< -o $@ .PHONY: clean clean: diff --git a/c09/ex01/srcs/ft_putchar.c b/c09/ex01/srcs/ft_putchar.c index 8a53dc8..51b252e 100644 --- a/c09/ex01/srcs/ft_putchar.c +++ b/c09/ex01/srcs/ft_putchar.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/02 22:03:32 by cacharle #+# #+# */ -/* Updated: 2019/07/03 14:21:40 by cacharle ### ########.fr */ +/* Updated: 2019/07/15 13:18:04 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/c09/ex01/srcs/ft_putstr.c b/c09/ex01/srcs/ft_putstr.c index c4f4564..fef1aac 100644 --- a/c09/ex01/srcs/ft_putstr.c +++ b/c09/ex01/srcs/ft_putstr.c @@ -6,11 +6,12 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/11 16:17:16 by cacharle #+# #+# */ -/* Updated: 2019/07/11 16:18:11 by cacharle ### ########.fr */ +/* Updated: 2019/07/16 07:29:45 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include +#include "ft.h" void ft_putstr(char *str) { diff --git a/c09/ex02/ft_split.c b/c09/ex02/ft_split.c index e1c0186..a11477f 100644 --- a/c09/ex02/ft_split.c +++ b/c09/ex02/ft_split.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/08 15:58:03 by cacharle #+# #+# */ -/* Updated: 2019/07/15 09:21:14 by cacharle ### ########.fr */ +/* Updated: 2019/07/16 09:18:23 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -62,7 +62,8 @@ char **heck(char *str, char *charset, char *tmp, int i) while (!in_charset(*str, charset) && *str) tmp[i++] = *str++; tmp[i] = '\0'; - strs[j++] = tmp; + if (i != 0) + strs[j++] = tmp; } strs[j] = 0; return (strs); @@ -70,7 +71,5 @@ char **heck(char *str, char *charset, char *tmp, int i) char **ft_split(char *str, char *charset) { - if (!*str) - return (NULL); return (heck(str, charset, NULL, 0)); } diff --git a/c09/main.c b/c09/main.c new file mode 100644 index 0000000..02c5a61 --- /dev/null +++ b/c09/main.c @@ -0,0 +1,27 @@ +#include +#include +#include +#include "ex02/ft_split.c" + +int main() +{ + char *const str = "3YaZkAP30iGoBWv L asdf h LbpX8Hx FWHwB2u1FH0S5"; + char *begin = "\n \t hgonjour"; + char *end = "jesuis\n\t hhh"; + char *empty = " h bonjour je suis "; + char *charset = "\n\t"; + char **strs = ft_split(end, charset); + printf("tab start\n"); + for (int i = 0; strs[i] != 0; i++) + { + printf("tab[%d]: %s\n", i, strs[i]); + /*for (int j = 0; j < 10; j++)*/ + /*printf("%d ", strs[i][j]);*/ + } + printf("tab end\n"); + for (int i = 0; strs[i] != 0; i++) + free(strs[i]); + free(strs); + + return 0; +} diff --git a/c10/ex00/Makefile b/c10/ex00/Makefile index e69de29..6ee330b 100644 --- a/c10/ex00/Makefile +++ b/c10/ex00/Makefile @@ -0,0 +1,17 @@ +OUT = ft_display_file +CC = gcc +CCFLAGS = -Wall -Wextra -Werror + +.PHONY: all +all: $(OUT) + +$(OUT): main.c + $(CC) $(CCFLAGS) -o $(OUT) main.c + +.PHONY: clean +clean: + +.PHONY: clean +fclean: clean + rm -f $(OUT) + diff --git a/c10/ex00/bonjour b/c10/ex00/bonjour deleted file mode 100644 index 918a5ef..0000000 --- a/c10/ex00/bonjour +++ /dev/null @@ -1,4 +0,0 @@ -bonjour -je -suis -charles diff --git a/c10/ex00/main.c b/c10/ex00/main.c index 8fee64a..bcf9e68 100644 --- a/c10/ex00/main.c +++ b/c10/ex00/main.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/11 18:06:43 by cacharle #+# #+# */ -/* Updated: 2019/07/11 18:45:01 by cacharle ### ########.fr */ +/* Updated: 2019/07/15 13:45:33 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,26 +15,31 @@ #define BUFFER_SIZE 1 #include -int write_buffer(char *buf) +void read_write_file(int fildes) { int i; + int writing; + char buf[BUFFER_SIZE]; - i = 0; - while (buf[i]) + writing = 1; + while (writing) { - write(STDOUT_FILENO, &buf[i], 1); - /*printf("%d %c\n", buf[i], buf[i]);*/ - if (buf[i] == -1) - return (1); - i++; + if (read(fildes, buf, BUFFER_SIZE) == 0) + break; + i = 0; + while (buf[i]) + { + write(STDOUT_FILENO, &buf[i], 1); + if (buf[i] == -1) + writing = 0; + i++; + } } - return (0); } int main(int argc, char **argv) { int fildes; - char buf[BUFFER_SIZE]; int reading; if (argc == 1) @@ -52,12 +57,7 @@ int main(int argc, char **argv) write(STDERR_FILENO, "Cannot read file.\n", 18); return (1); } - while (1) - { - if (read(fildes, buf, BUFFER_SIZE) == 0) - break; - write_buffer(buf); - } + read_write_file(fildes); close(fildes); return (0); } diff --git a/c10/ex01/Makefile b/c10/ex01/Makefile new file mode 100644 index 0000000..362d434 --- /dev/null +++ b/c10/ex01/Makefile @@ -0,0 +1 @@ +OUT = ft_cat diff --git a/c10/ex01/helper.c b/c10/ex01/helper.c new file mode 100644 index 0000000..8a1c13e --- /dev/null +++ b/c10/ex01/helper.c @@ -0,0 +1,35 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* helper.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/16 10:14:16 by cacharle #+# #+# */ +/* Updated: 2019/07/16 10:26:44 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include +#include +#include "include.h" + +void ft_putstr_err(char *str) +{ + while (*str) + write(STDERR_FILENO, str++, 1); +} + +void handle_error(char *program_name, char *arg) +{ + char *error_msg; + + ft_putstr_err(program_name); + ft_putstr_err(": "); + ft_putstr_err(arg); + ft_putstr_err(": "); + error_msg = strerror(errno); + ft_putstr_err(error_msg); + ft_putstr_err("\n"); +} diff --git a/c10/ex01/include.h b/c10/ex01/include.h new file mode 100644 index 0000000..fed49e8 --- /dev/null +++ b/c10/ex01/include.h @@ -0,0 +1,34 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* include.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/15 16:49:28 by cacharle #+# #+# */ +/* Updated: 2019/07/16 10:23:45 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef INCLUDE_H +# define INCLUDE_H + +# define BUF_SIZE 64 + +/* +** io.c +*/ + +int read_in_buf(int fildes, char buf[BUF_SIZE]); +int write_buf(char buf[BUF_SIZE], int size); +int read_write_fildes(int fildes); +int print_file(char *filename); + +/* +** helper.c +*/ + +void handle_error(char *program_name, char *arg); +void ft_putstr_err(char *str); + +#endif diff --git a/c10/ex01/io.c b/c10/ex01/io.c new file mode 100644 index 0000000..a6c0b01 --- /dev/null +++ b/c10/ex01/io.c @@ -0,0 +1,56 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* io.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/15 19:05:32 by cacharle #+# #+# */ +/* Updated: 2019/07/16 10:52:03 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include +#include "include.h" + +int read_in_buf(int fildes, char buf[BUF_SIZE]) +{ + return (read(fildes, buf, BUF_SIZE - 1)); +} + +int write_buf(char buf[BUF_SIZE], int size) +{ + return (write(1, buf, size)); +} + +int read_write_fildes(int fildes) +{ + int size; + char buf[BUF_SIZE]; + + size = BUF_SIZE - 1; + while (size == BUF_SIZE - 1 || fildes == STDOUT_FILENO ) + { + if ((size = read_in_buf(fildes, buf)) == -1) + return (-1); + if (write_buf(buf, size) == -1) + return (-1); + } + return (0); +} + +int print_file(char *filename) +{ + int fildes; + + if (filename[0] == '-') + fildes = STDIN_FILENO; + else if ((fildes = open(filename, O_RDONLY)) < 0) + return (-1); + if (read_write_fildes(fildes) == -1) + return (-1); + if (close(fildes) == -1) + return (-1); + return (0); +} diff --git a/c10/ex01/main.c b/c10/ex01/main.c new file mode 100644 index 0000000..b5fb416 --- /dev/null +++ b/c10/ex01/main.c @@ -0,0 +1,34 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* main.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/15 16:45:20 by cacharle #+# #+# */ +/* Updated: 2019/07/16 10:20:39 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include "include.h" + +int main(int argc, char **argv) +{ + int i; + int fildes; + int status; + + status = 0; + i = 1; + while (i < argc) + { + if (print_file(argv[i]) == -1) + { + handle_error(argv[0], argv[i]); + status = 1; + } + i++; + } + return (status); +} diff --git a/exam00/cacharle/__GIT_HISTORY b/exam00/cacharle/__GIT_HISTORY new file mode 100755 index 0000000..4ce38dc --- /dev/null +++ b/exam00/cacharle/__GIT_HISTORY @@ -0,0 +1,71 @@ +commit 4933249a7abc3ae2a2f34fa94bc39fc25b94037e +Author: Exam 42 +Date: Fri Jul 5 20:42:29 2019 +0200 + + there is still a main you idiot + + ft_atoi/ft_atoi.c | 5 ----- + 1 file changed, 5 deletions(-) + +commit aee71077430e4cb04d7151c5422572a6ccd97167 +Author: Exam 42 +Date: Fri Jul 5 20:37:38 2019 +0200 + + exam00 ft_atoi + + ft_atoi/ft_atoi.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 65 insertions(+) + +commit a39f6ce8235aec04c798cf602000ab71a8be0361 +Author: Exam 42 +Date: Fri Jul 5 19:25:56 2019 +0200 + + ft_strrev return corr + + ft_strrev/ft_strrev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d7079124e81f8d1d030d31f59ca1fa2a1e2eb8f9 +Author: Exam 42 +Date: Fri Jul 5 19:23:52 2019 +0200 + + exam00 ft_strrev + + ft_strrev/ft_strrev.c | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +commit 9a061d46ec225b60d5798839c9343d3dcb47a21e +Author: Exam 42 +Date: Fri Jul 5 18:57:38 2019 +0200 + + exam00 ft_putstr + + ft_putstr/ft_putstr.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit cf5957fe28f503c7637a640ca229743385364c1d +Author: Exam 42 +Date: Fri Jul 5 18:47:39 2019 +0200 + + exam00 maff_alpha.c + + maff_alpha/maff_alpha.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 +Author: Exam 42 +Date: Fri Jul 5 18:38:16 2019 +0200 + + exam00 ft_countdown + + ft_countdown/ft_countdown.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +commit 1ea27768767e32d773e78820d481b20a4d108c5b +Author: Exam 42 +Date: Fri Jul 5 18:23:38 2019 +0200 + + exam only_z + + only_z/only_z.c | 8 ++++++++ + 1 file changed, 8 insertions(+) diff --git a/exam00/cacharle/ft_atoi/ft_atoi.c b/exam00/cacharle/ft_atoi/ft_atoi.c new file mode 100755 index 0000000..81f0706 --- /dev/null +++ b/exam00/cacharle/ft_atoi/ft_atoi.c @@ -0,0 +1,60 @@ +char ctoi(char c) +{ + return (c - '0'); +} + +int ft_strlen(const char *str) +{ + int counter; + + counter = 0; + while (*str >= '0' && *str <= '9') + { + counter++; + str++; + } + return (counter); +} + +int pow10(int exponent) +{ + int accumulator; + + accumulator = 1; + while (exponent > 0) + { + accumulator *= 10; + exponent--; + } + return (accumulator); +} + +int ft_atoi(const char *str) +{ + int nb; + int i; + int is_negative; + + while (*str == ' ' || *str == '\t'|| *str == '\n' + || *str == '\v'|| *str == '\f'|| *str == '\r') + str++; + if (*str == '-') + is_negative = 1; + else + is_negative = 0; + if (*str == '-' || *str == '+') + { + str++; + } + nb = 0; + i = ft_strlen(str) - 1; + while (*str >= '0' && *str <= '9') + { + nb += pow10(i) * ctoi(*str); + i--; + str++; + } + if (is_negative) + nb = -nb; + return (nb); +} diff --git a/exam00/cacharle/ft_countdown/ft_countdown.c b/exam00/cacharle/ft_countdown/ft_countdown.c new file mode 100755 index 0000000..67861c6 --- /dev/null +++ b/exam00/cacharle/ft_countdown/ft_countdown.c @@ -0,0 +1,20 @@ +#include + +void ft_putchar(char c) +{ + write(1, &c, 1); +} + +int main(void) +{ + char a; + + a = '9'; + while (a >= '0') + { + ft_putchar(a); + a--; + } + ft_putchar('\n'); +} + diff --git a/exam00/cacharle/ft_putstr/ft_putstr.c b/exam00/cacharle/ft_putstr/ft_putstr.c new file mode 100755 index 0000000..aea8468 --- /dev/null +++ b/exam00/cacharle/ft_putstr/ft_putstr.c @@ -0,0 +1,10 @@ +#include + +void ft_putstr(char *str) +{ + while (*str) + { + write(1, str, 1); + str++; + } +} diff --git a/exam00/cacharle/ft_strrev/ft_strrev.c b/exam00/cacharle/ft_strrev/ft_strrev.c new file mode 100755 index 0000000..ef58887 --- /dev/null +++ b/exam00/cacharle/ft_strrev/ft_strrev.c @@ -0,0 +1,31 @@ +int ft_strlen(char *str) +{ + int counter; + + counter = 0; + while (*str) + { + counter++; + str++; + } + return (counter); +} + +char *ft_strrev(char *str) +{ + int i; + int j; + char tmp; + + i = 0; + j = ft_strlen(str) - 1; + while (i <= j) + { + tmp = str[i]; + str[i] = str[j]; + str[j] = tmp; + i++; + j--; + } + return (str); +} diff --git a/exam00/cacharle/maff_alpha/maff_alpha.c b/exam00/cacharle/maff_alpha/maff_alpha.c new file mode 100755 index 0000000..416dc0d --- /dev/null +++ b/exam00/cacharle/maff_alpha/maff_alpha.c @@ -0,0 +1,21 @@ +#include + +void ft_putchar(char c) +{ + write(1, &c, 1); +} + +int main(void) +{ + char ch = 'a'; + while (ch <= 'z') + { + if (ch % 2 == 0) + ft_putchar(ch - 'a' + 'A'); + else + ft_putchar(ch); + ch++; + } + ft_putchar('\n'); + return 0; +} diff --git a/exam00/cacharle/only_z/only_z.c b/exam00/cacharle/only_z/only_z.c new file mode 100755 index 0000000..08ab66b --- /dev/null +++ b/exam00/cacharle/only_z/only_z.c @@ -0,0 +1,8 @@ +#include + +int main(void) +{ + char z = 'z'; + write(1, &z, 1); + return 0; +} diff --git a/exam00/rendu/__GIT_HISTORY b/exam00/rendu/__GIT_HISTORY new file mode 100755 index 0000000..4ce38dc --- /dev/null +++ b/exam00/rendu/__GIT_HISTORY @@ -0,0 +1,71 @@ +commit 4933249a7abc3ae2a2f34fa94bc39fc25b94037e +Author: Exam 42 +Date: Fri Jul 5 20:42:29 2019 +0200 + + there is still a main you idiot + + ft_atoi/ft_atoi.c | 5 ----- + 1 file changed, 5 deletions(-) + +commit aee71077430e4cb04d7151c5422572a6ccd97167 +Author: Exam 42 +Date: Fri Jul 5 20:37:38 2019 +0200 + + exam00 ft_atoi + + ft_atoi/ft_atoi.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 65 insertions(+) + +commit a39f6ce8235aec04c798cf602000ab71a8be0361 +Author: Exam 42 +Date: Fri Jul 5 19:25:56 2019 +0200 + + ft_strrev return corr + + ft_strrev/ft_strrev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d7079124e81f8d1d030d31f59ca1fa2a1e2eb8f9 +Author: Exam 42 +Date: Fri Jul 5 19:23:52 2019 +0200 + + exam00 ft_strrev + + ft_strrev/ft_strrev.c | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +commit 9a061d46ec225b60d5798839c9343d3dcb47a21e +Author: Exam 42 +Date: Fri Jul 5 18:57:38 2019 +0200 + + exam00 ft_putstr + + ft_putstr/ft_putstr.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit cf5957fe28f503c7637a640ca229743385364c1d +Author: Exam 42 +Date: Fri Jul 5 18:47:39 2019 +0200 + + exam00 maff_alpha.c + + maff_alpha/maff_alpha.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 +Author: Exam 42 +Date: Fri Jul 5 18:38:16 2019 +0200 + + exam00 ft_countdown + + ft_countdown/ft_countdown.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +commit 1ea27768767e32d773e78820d481b20a4d108c5b +Author: Exam 42 +Date: Fri Jul 5 18:23:38 2019 +0200 + + exam only_z + + only_z/only_z.c | 8 ++++++++ + 1 file changed, 8 insertions(+) diff --git a/exam00/rendu/ft_atoi/ft_atoi.c b/exam00/rendu/ft_atoi/ft_atoi.c new file mode 100755 index 0000000..81f0706 --- /dev/null +++ b/exam00/rendu/ft_atoi/ft_atoi.c @@ -0,0 +1,60 @@ +char ctoi(char c) +{ + return (c - '0'); +} + +int ft_strlen(const char *str) +{ + int counter; + + counter = 0; + while (*str >= '0' && *str <= '9') + { + counter++; + str++; + } + return (counter); +} + +int pow10(int exponent) +{ + int accumulator; + + accumulator = 1; + while (exponent > 0) + { + accumulator *= 10; + exponent--; + } + return (accumulator); +} + +int ft_atoi(const char *str) +{ + int nb; + int i; + int is_negative; + + while (*str == ' ' || *str == '\t'|| *str == '\n' + || *str == '\v'|| *str == '\f'|| *str == '\r') + str++; + if (*str == '-') + is_negative = 1; + else + is_negative = 0; + if (*str == '-' || *str == '+') + { + str++; + } + nb = 0; + i = ft_strlen(str) - 1; + while (*str >= '0' && *str <= '9') + { + nb += pow10(i) * ctoi(*str); + i--; + str++; + } + if (is_negative) + nb = -nb; + return (nb); +} diff --git a/exam00/rendu/ft_countdown/ft_countdown.c b/exam00/rendu/ft_countdown/ft_countdown.c new file mode 100755 index 0000000..67861c6 --- /dev/null +++ b/exam00/rendu/ft_countdown/ft_countdown.c @@ -0,0 +1,20 @@ +#include + +void ft_putchar(char c) +{ + write(1, &c, 1); +} + +int main(void) +{ + char a; + + a = '9'; + while (a >= '0') + { + ft_putchar(a); + a--; + } + ft_putchar('\n'); +} + diff --git a/exam00/rendu/ft_putstr/ft_putstr.c b/exam00/rendu/ft_putstr/ft_putstr.c new file mode 100755 index 0000000..aea8468 --- /dev/null +++ b/exam00/rendu/ft_putstr/ft_putstr.c @@ -0,0 +1,10 @@ +#include + +void ft_putstr(char *str) +{ + while (*str) + { + write(1, str, 1); + str++; + } +} diff --git a/exam00/rendu/ft_strrev/ft_strrev.c b/exam00/rendu/ft_strrev/ft_strrev.c new file mode 100755 index 0000000..ef58887 --- /dev/null +++ b/exam00/rendu/ft_strrev/ft_strrev.c @@ -0,0 +1,31 @@ +int ft_strlen(char *str) +{ + int counter; + + counter = 0; + while (*str) + { + counter++; + str++; + } + return (counter); +} + +char *ft_strrev(char *str) +{ + int i; + int j; + char tmp; + + i = 0; + j = ft_strlen(str) - 1; + while (i <= j) + { + tmp = str[i]; + str[i] = str[j]; + str[j] = tmp; + i++; + j--; + } + return (str); +} diff --git a/exam00/rendu/maff_alpha/maff_alpha.c b/exam00/rendu/maff_alpha/maff_alpha.c new file mode 100755 index 0000000..416dc0d --- /dev/null +++ b/exam00/rendu/maff_alpha/maff_alpha.c @@ -0,0 +1,21 @@ +#include + +void ft_putchar(char c) +{ + write(1, &c, 1); +} + +int main(void) +{ + char ch = 'a'; + while (ch <= 'z') + { + if (ch % 2 == 0) + ft_putchar(ch - 'a' + 'A'); + else + ft_putchar(ch); + ch++; + } + ft_putchar('\n'); + return 0; +} diff --git a/exam00/rendu/only_z/only_z.c b/exam00/rendu/only_z/only_z.c new file mode 100755 index 0000000..08ab66b --- /dev/null +++ b/exam00/rendu/only_z/only_z.c @@ -0,0 +1,8 @@ +#include + +int main(void) +{ + char z = 'z'; + write(1, &z, 1); + return 0; +} diff --git a/exam00/subjects/0-0-only_z/subject.en.txt b/exam00/subjects/0-0-only_z/subject.en.txt new file mode 100644 index 0000000..930e2e8 --- /dev/null +++ b/exam00/subjects/0-0-only_z/subject.en.txt @@ -0,0 +1,6 @@ +Assignment name : only_z +Expected files : only_z.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that displays a 'z' character on the standard output. diff --git a/exam00/subjects/0-0-only_z/subject.fr.txt b/exam00/subjects/0-0-only_z/subject.fr.txt new file mode 100644 index 0000000..e5ec893 --- /dev/null +++ b/exam00/subjects/0-0-only_z/subject.fr.txt @@ -0,0 +1,6 @@ +Assignment name : only_z +Expected files : only_z.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui affiche un caractère 'z' sur la sortie standard. diff --git a/exam00/subjects/1-0-ft_countdown/subject.en.txt b/exam00/subjects/1-0-ft_countdown/subject.en.txt new file mode 100644 index 0000000..0e3dd56 --- /dev/null +++ b/exam00/subjects/1-0-ft_countdown/subject.en.txt @@ -0,0 +1,12 @@ +Assignment name : ft_countdown +Expected files : ft_countdown.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that displays all digits in descending order, followed by a +newline. + +Example: +$> ./ft_countdown | cat -e +9876543210$ +$> diff --git a/exam00/subjects/1-0-ft_countdown/subject.fr.txt b/exam00/subjects/1-0-ft_countdown/subject.fr.txt new file mode 100644 index 0000000..c4ff0ef --- /dev/null +++ b/exam00/subjects/1-0-ft_countdown/subject.fr.txt @@ -0,0 +1,12 @@ +Assignment name : ft_countdown +Expected files : ft_countdown.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui affiche tous les chiffres en ordre descendant, suivis +d'un newline. + +Exemple: +$> ./ft_countdown | cat -e +9876543210$ +$> diff --git a/exam00/subjects/2-0-maff_alpha/examples.txt b/exam00/subjects/2-0-maff_alpha/examples.txt new file mode 100644 index 0000000..e371037 --- /dev/null +++ b/exam00/subjects/2-0-maff_alpha/examples.txt @@ -0,0 +1,2 @@ +$> ./maff_alpha | cat -e +aBcDeFgHiJkLmNoPqRsTuVwXyZ$ diff --git a/exam00/subjects/2-0-maff_alpha/subject.en.txt b/exam00/subjects/2-0-maff_alpha/subject.en.txt new file mode 100644 index 0000000..e9a8bb0 --- /dev/null +++ b/exam00/subjects/2-0-maff_alpha/subject.en.txt @@ -0,0 +1,12 @@ +Assignment name : maff_alpha +Expected files : maff_alpha.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that displays the alphabet, with even letters in uppercase, and +odd letters in lowercase, followed by a newline. + +Example: + +$> ./maff_alpha | cat -e +aBcDeFgHiJkLmNoPqRsTuVwXyZ$ diff --git a/exam00/subjects/2-0-maff_alpha/subject.fr.txt b/exam00/subjects/2-0-maff_alpha/subject.fr.txt new file mode 100644 index 0000000..a4be7f9 --- /dev/null +++ b/exam00/subjects/2-0-maff_alpha/subject.fr.txt @@ -0,0 +1,12 @@ +Assignment name : maff_alpha +Expected files : maff_alpha.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui affiche l'alphabet une lettre sur 2 en minuscule, et le +reste en majuscule (Voir l'exemple), suivi d'un '\n'. + +Exemple: + +$> ./maff_alpha | cat -e +aBcDeFgHiJkLmNoPqRsTuVwXyZ$ diff --git a/exam00/subjects/3-0-ft_putstr/subject.en.txt b/exam00/subjects/3-0-ft_putstr/subject.en.txt new file mode 100644 index 0000000..243e4d8 --- /dev/null +++ b/exam00/subjects/3-0-ft_putstr/subject.en.txt @@ -0,0 +1,13 @@ +Assignment name : ft_putstr +Expected files : ft_putstr.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a function that displays a string on the standard output. + +The pointer passed to the function contains the address of the string's first +character. + +Your function must be declared as follows: + +void ft_putstr(char *str); diff --git a/exam00/subjects/3-0-ft_putstr/subject.fr.txt b/exam00/subjects/3-0-ft_putstr/subject.fr.txt new file mode 100644 index 0000000..94183ee --- /dev/null +++ b/exam00/subjects/3-0-ft_putstr/subject.fr.txt @@ -0,0 +1,12 @@ +Assignment name : ft_putstr +Expected files : ft_putstr.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire une fonction qui affiche une chaîne de caractères sur la sortie standard. + +Le pointeur passé à la fonction est l'adresse du premier caractère de la chaîne. + +Elle devra être prototypée de la façon suivante : + +void ft_putstr(char *str); diff --git a/exam00/subjects/4-0-ft_strrev/subject.en.txt b/exam00/subjects/4-0-ft_strrev/subject.en.txt new file mode 100644 index 0000000..6c31580 --- /dev/null +++ b/exam00/subjects/4-0-ft_strrev/subject.en.txt @@ -0,0 +1,12 @@ +Assignment name : ft_strrev +Expected files : ft_strrev.c +Allowed functions: +-------------------------------------------------------------------------------- + +Write a function that reverses a string by modifying it. + +It must return its parameter. + +Your function must be declared as follows: + +char *ft_strrev(char *str); diff --git a/exam00/subjects/4-0-ft_strrev/subject.fr.txt b/exam00/subjects/4-0-ft_strrev/subject.fr.txt new file mode 100644 index 0000000..f6eb115 --- /dev/null +++ b/exam00/subjects/4-0-ft_strrev/subject.fr.txt @@ -0,0 +1,12 @@ +Assignment name : ft_strrev +Expected files : ft_strrev.c +Allowed functions: +-------------------------------------------------------------------------------- + +Écrire une fonction qui inverse une chaîne de caractères en la modifiant. + +Elle devra renvoyer son paramètre. + +Votre fonction devra être prototypée de la façon suivante : + +char *ft_strrev(char *str); diff --git a/exam00/subjects/5-0-ft_atoi/subject.en.txt b/exam00/subjects/5-0-ft_atoi/subject.en.txt new file mode 100644 index 0000000..ebfe92b --- /dev/null +++ b/exam00/subjects/5-0-ft_atoi/subject.en.txt @@ -0,0 +1,13 @@ +Assignment name : ft_atoi +Expected files : ft_atoi.c +Allowed functions: None +-------------------------------------------------------------------------------- + +Write a function that converts the string argument str to an integer (type int) +and returns it. + +It works much like the standard atoi(const char *str) function, see the man. + +Your function must be declared as follows: + +int ft_atoi(const char *str); diff --git a/exam00/subjects/5-0-ft_atoi/subject.fr.txt b/exam00/subjects/5-0-ft_atoi/subject.fr.txt new file mode 100644 index 0000000..2c9977c --- /dev/null +++ b/exam00/subjects/5-0-ft_atoi/subject.fr.txt @@ -0,0 +1,12 @@ +Assignment name : ft_atoi +Expected files : ft_atoi.c +Allowed functions: None +-------------------------------------------------------------------------------- + +Écrire une fonction qui convertit une chaîne en un entier (type int) et le retourne. + +Marche comme la fonction standard atoi(const char *str), voir le man. + +La fonction doit être prototypée comme suit: + +int ft_atoi(const char *str); diff --git a/exam00/subjects/5-1-ft_atoi/subject.en.txt b/exam00/subjects/5-1-ft_atoi/subject.en.txt new file mode 100644 index 0000000..ebfe92b --- /dev/null +++ b/exam00/subjects/5-1-ft_atoi/subject.en.txt @@ -0,0 +1,13 @@ +Assignment name : ft_atoi +Expected files : ft_atoi.c +Allowed functions: None +-------------------------------------------------------------------------------- + +Write a function that converts the string argument str to an integer (type int) +and returns it. + +It works much like the standard atoi(const char *str) function, see the man. + +Your function must be declared as follows: + +int ft_atoi(const char *str); diff --git a/exam00/subjects/5-1-ft_atoi/subject.fr.txt b/exam00/subjects/5-1-ft_atoi/subject.fr.txt new file mode 100644 index 0000000..2c9977c --- /dev/null +++ b/exam00/subjects/5-1-ft_atoi/subject.fr.txt @@ -0,0 +1,12 @@ +Assignment name : ft_atoi +Expected files : ft_atoi.c +Allowed functions: None +-------------------------------------------------------------------------------- + +Écrire une fonction qui convertit une chaîne en un entier (type int) et le retourne. + +Marche comme la fonction standard atoi(const char *str), voir le man. + +La fonction doit être prototypée comme suit: + +int ft_atoi(const char *str); diff --git a/exam00/traces/0-0-only_z.trace.txt b/exam00/traces/0-0-only_z.trace.txt new file mode 100644 index 0000000..10c99b3 --- /dev/null +++ b/exam00/traces/0-0-only_z.trace.txt @@ -0,0 +1,47 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r3-p2.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 5 18:27:00 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-00/exam_20190705/cacharle + += Git history ================================================================== +$> git -C /var/folders/g6/h_bg9_59611fps0h1qj_5wn00000gq/T/tmp9Zd5au/user log --pretty='%H - %an, %ad : %s' +1ea27768767e32d773e78820d481b20a4d108c5b - Exam 42, Fri Jul 5 18:23:38 2019 +0200 : exam only_z + += Collected files ========================================== +$> ls -lAR /var/folders/g6/h_bg9_59611fps0h1qj_5wn00000gq/T/tmp9Zd5au/user +total 8 +-rw-r--r-- 1 deepthought deepthought 205 Jul 5 18:27 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:27 only_z + +/var/folders/g6/h_bg9_59611fps0h1qj_5wn00000gq/T/tmp9Zd5au/user/only_z: +total 8 +-rw-r--r-- 1 deepthought deepthought 85 Jul 5 18:27 only_z.c + += only_z ======================================================================= +$> gcc -Wextra -Wall -Werror only_z.c -o user_exe + += Test 1 =================================================== +$> ./u9ozzm9nofxo5ratvr118fdc +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam00/traces/1-0-ft_countdown.trace.txt b/exam00/traces/1-0-ft_countdown.trace.txt new file mode 100644 index 0000000..af6adf8 --- /dev/null +++ b/exam00/traces/1-0-ft_countdown.trace.txt @@ -0,0 +1,53 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r3-p3.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 5 18:39:16 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-00/exam_20190705/cacharle + += Git history ================================================================== +$> git -C /var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpX7leMe/user log --pretty='%H - %an, %ad : %s' +1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 - Exam 42, Fri Jul 5 18:38:16 2019 +0200 : exam00 ft_countdown +1ea27768767e32d773e78820d481b20a4d108c5b - Exam 42, Fri Jul 5 18:23:38 2019 +0200 : exam only_z + += Collected files ========================================== +$> ls -lAR /var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpX7leMe/user +total 8 +-rw-r--r-- 1 deepthought deepthought 445 Jul 5 18:39 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:39 ft_countdown +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:39 only_z + +/var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpX7leMe/user/ft_countdown: +total 8 +-rw-r--r-- 1 deepthought deepthought 176 Jul 5 18:39 ft_countdown.c + +/var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpX7leMe/user/only_z: +total 8 +-rw-r--r-- 1 deepthought deepthought 85 Jul 5 18:39 only_z.c + += ft_countdown ================================================================= +$> gcc -Wextra -Wall -Werror ft_countdown.c -o user_exe + += Test 1 =================================================== +$> ./w1f15fi1k22snxrsd4a6asvb +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam00/traces/2-0-maff_alpha.trace.txt b/exam00/traces/2-0-maff_alpha.trace.txt new file mode 100644 index 0000000..0b85f9c --- /dev/null +++ b/exam00/traces/2-0-maff_alpha.trace.txt @@ -0,0 +1,59 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r3-p3.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 5 18:49:11 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-00/exam_20190705/cacharle + += Git history ================================================================== +$> git -C /var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpN1y_P4/user log --pretty='%H - %an, %ad : %s' +cf5957fe28f503c7637a640ca229743385364c1d - Exam 42, Fri Jul 5 18:47:39 2019 +0200 : exam00 maff_alpha.c +1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 - Exam 42, Fri Jul 5 18:38:16 2019 +0200 : exam00 ft_countdown +1ea27768767e32d773e78820d481b20a4d108c5b - Exam 42, Fri Jul 5 18:23:38 2019 +0200 : exam only_z + += Collected files ========================================== +$> ls -lAR /var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpN1y_P4/user +total 8 +-rw-r--r-- 1 deepthought deepthought 682 Jul 5 18:49 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:49 ft_countdown +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:49 maff_alpha +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:49 only_z + +/var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpN1y_P4/user/ft_countdown: +total 8 +-rw-r--r-- 1 deepthought deepthought 176 Jul 5 18:49 ft_countdown.c + +/var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpN1y_P4/user/maff_alpha: +total 8 +-rw-r--r-- 1 deepthought deepthought 243 Jul 5 18:49 maff_alpha.c + +/var/folders/k2/w11t1l8x7yz1sljm2w6ctr0m0000gq/T/tmpN1y_P4/user/only_z: +total 8 +-rw-r--r-- 1 deepthought deepthought 85 Jul 5 18:49 only_z.c + += maff_alpha =================================================================== +$> gcc -Wextra -Wall -Werror maff_alpha.c -o user_exe + += Test 1 =================================================== +$> ./k84nv7um4hcicmqio061oq0j test1.prm +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam00/traces/3-0-ft_putstr.trace.txt b/exam00/traces/3-0-ft_putstr.trace.txt new file mode 100644 index 0000000..90cdf3f --- /dev/null +++ b/exam00/traces/3-0-ft_putstr.trace.txt @@ -0,0 +1,100 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r2-p3.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 5 18:59:05 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-00/exam_20190705/cacharle + += Git history ================================================================== +$> git -C /var/folders/kq/r93mxbbj0037ct86dqvwz4cm0000gq/T/tmpcv1MNB/user log --pretty='%H - %an, %ad : %s' +9a061d46ec225b60d5798839c9343d3dcb47a21e - Exam 42, Fri Jul 5 18:57:38 2019 +0200 : exam00 ft_putstr +cf5957fe28f503c7637a640ca229743385364c1d - Exam 42, Fri Jul 5 18:47:39 2019 +0200 : exam00 maff_alpha.c +1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 - Exam 42, Fri Jul 5 18:38:16 2019 +0200 : exam00 ft_countdown +1ea27768767e32d773e78820d481b20a4d108c5b - Exam 42, Fri Jul 5 18:23:38 2019 +0200 : exam only_z + += Collected files ========================================== +$> ls -lAR /var/folders/kq/r93mxbbj0037ct86dqvwz4cm0000gq/T/tmpcv1MNB/user +total 8 +-rw-r--r-- 1 deepthought deepthought 903 Jul 5 18:59 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:59 ft_countdown +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:59 ft_putstr +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:59 maff_alpha +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 18:59 only_z + +/var/folders/kq/r93mxbbj0037ct86dqvwz4cm0000gq/T/tmpcv1MNB/user/ft_countdown: +total 8 +-rw-r--r-- 1 deepthought deepthought 176 Jul 5 18:59 ft_countdown.c + +/var/folders/kq/r93mxbbj0037ct86dqvwz4cm0000gq/T/tmpcv1MNB/user/ft_putstr: +total 8 +-rw-r--r-- 1 deepthought deepthought 100 Jul 5 18:59 ft_putstr.c + +/var/folders/kq/r93mxbbj0037ct86dqvwz4cm0000gq/T/tmpcv1MNB/user/maff_alpha: +total 8 +-rw-r--r-- 1 deepthought deepthought 243 Jul 5 18:59 maff_alpha.c + +/var/folders/kq/r93mxbbj0037ct86dqvwz4cm0000gq/T/tmpcv1MNB/user/only_z: +total 8 +-rw-r--r-- 1 deepthought deepthought 85 Jul 5 18:59 only_z.c + += ft_putstr ==================================================================== +$> gcc -Wextra -Wall -Werror main.c ft_putstr.c -o user_exe + += Test 1 =================================================== +$> ./9xfoet7m0vempzhmnf4ho43n "jvb2pelNRFGJ" +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./wq3alz983dqqc3wg484wnqfw "VMgqCef" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./9tl0aba3kifdg15f779yybe9 "3BvXW7CUPgy8" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./mh26e96e326m10sggfje4nkv "Sc0viD1Iewt MEmOYySDaf M56Zv8m F6AO2wnZSYuTPjD4 XVaKDeorYTiG" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./oo97vg5v00skozn6cv63ru0q "9iSuh3 KSXjbpno VQPyJ0DT3NCkvRnzK LM5obuBZ78C0H4aiz 1NQFbRP89BAtgC0ek 2VBFA9GQOXW381 UnKsoyJ8Y" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./ymnkpobfcyso5yegtup4zdrk "xLO5lC ESD8 Qp5m7xuWInPiVes1 0XPk8 4XZ2N TMpaPXVDF9RkG c8rVf gX9dJ3 GfsQ2ajKWcvqkH vtisz 0wNIH4Mvy58KlfoL RbJmOsgMPWnU uhI8Y1moe5j JR8lKwLf34g5N" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./vtyvlhepzovpnctjscujlfuh "EIs69jQneGxJ7lzqH jUnGHiyFlfLEX p0xnaLOfU e1OLu5fU ZOSCiXt7aKRd QETZ9J5jeI4lvCL e8k4O35y 7AJL4yKh5bkZ" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./qiu1bn42f0p5m1b4o4iibk29 +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam00/traces/4-0-ft_strrev.trace.txt b/exam00/traces/4-0-ft_strrev.trace.txt new file mode 100644 index 0000000..1142596 --- /dev/null +++ b/exam00/traces/4-0-ft_strrev.trace.txt @@ -0,0 +1,112 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r8-p3.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 5 19:27:06 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-00/exam_20190705/cacharle + += Git history ================================================================== +$> git -C /var/folders/l9/6nrl35jn2mgbhk1y0r2zhrtm0000gq/T/tmpFz8MhK/user log --pretty='%H - %an, %ad : %s' +a39f6ce8235aec04c798cf602000ab71a8be0361 - Exam 42, Fri Jul 5 19:25:56 2019 +0200 : ft_strrev return corr +d7079124e81f8d1d030d31f59ca1fa2a1e2eb8f9 - Exam 42, Fri Jul 5 19:23:52 2019 +0200 : exam00 ft_strrev +9a061d46ec225b60d5798839c9343d3dcb47a21e - Exam 42, Fri Jul 5 18:57:38 2019 +0200 : exam00 ft_putstr +cf5957fe28f503c7637a640ca229743385364c1d - Exam 42, Fri Jul 5 18:47:39 2019 +0200 : exam00 maff_alpha.c +1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 - Exam 42, Fri Jul 5 18:38:16 2019 +0200 : exam00 ft_countdown +1ea27768767e32d773e78820d481b20a4d108c5b - Exam 42, Fri Jul 5 18:23:38 2019 +0200 : exam only_z + += Collected files ========================================== +$> ls -lAR /var/folders/l9/6nrl35jn2mgbhk1y0r2zhrtm0000gq/T/tmpFz8MhK/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1375 Jul 5 19:27 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 19:27 ft_countdown +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 19:27 ft_putstr +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 19:27 ft_strrev +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 19:27 maff_alpha +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 19:27 only_z + +/var/folders/l9/6nrl35jn2mgbhk1y0r2zhrtm0000gq/T/tmpFz8MhK/user/ft_countdown: +total 8 +-rw-r--r-- 1 deepthought deepthought 176 Jul 5 19:27 ft_countdown.c + +/var/folders/l9/6nrl35jn2mgbhk1y0r2zhrtm0000gq/T/tmpFz8MhK/user/ft_putstr: +total 8 +-rw-r--r-- 1 deepthought deepthought 100 Jul 5 19:27 ft_putstr.c + +/var/folders/l9/6nrl35jn2mgbhk1y0r2zhrtm0000gq/T/tmpFz8MhK/user/ft_strrev: +total 8 +-rw-r--r-- 1 deepthought deepthought 320 Jul 5 19:27 ft_strrev.c + +/var/folders/l9/6nrl35jn2mgbhk1y0r2zhrtm0000gq/T/tmpFz8MhK/user/maff_alpha: +total 8 +-rw-r--r-- 1 deepthought deepthought 243 Jul 5 19:27 maff_alpha.c + +/var/folders/l9/6nrl35jn2mgbhk1y0r2zhrtm0000gq/T/tmpFz8MhK/user/only_z: +total 8 +-rw-r--r-- 1 deepthought deepthought 85 Jul 5 19:27 only_z.c + += ft_strrev ==================================================================== +$> gcc -Wextra -Wall -Werror ft_strrev.c main.c -o user_exe + += Test 1 =================================================== +$> ./m7ofdfc4x6acb1hvwpt1dv18 "" +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./rqmpywt6pg6lptmqqccdu4py "S5BV2wD9cN" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./04n96wi4nvf6dlbcugel5b99 "dpoEjIvf4gOh3F5L" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./wa66cmqzpx5vac9lh0ykzp8q "PrRONg" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./m1qcicepj53lx51duzzc9aff "JyXK9SWxIU5" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./5n6iqtvn684cti4ula2zhjvs "UYHbnBMIF4jLmE ubfao3sMp 0SRs8Q3Co5EidaZ4r 8vYZ2UTR9t fgSP8puxyD7eih bryUG" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./898kgo65zyo6adca1w8hitdi "zZL vQE4Hp 12JAy 7NLfVQqeoAnE jgDIaY7r1n Mh0aIlc NelMTAGdCIVbn PQZet2iU6OIqR QW06jtlN FlbE5yqgWA DmhgSAbza8tVuer P4np BSqtyMc AFY J5gPYj2hZi19dSL 41WoZrvjwLbJzRa" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./pc3xu83kbhgy9sip0h8dmqta "dgTlb3Xz4JyaN2i 2AzSZr3gbJT6MK GqXnrcaTHy35VZgoW 1aPD" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./vbwg4lkl4002py4s32r8oxcc "yoN9Pl IyWnpxTh9gD xpo F93wpDR5kt7Zf1neW YCJ WTfnGUhMzlPQa UzKxEMXe WvQcgHXKPV2iLn cIFepna6wOk0tyZ 7ILYvnNzJxOQ3 rs4wP PoXZG374LzEMj9 ba6wdf4miJTV D6BgKbrIe5nvqti E4eJGHIVW6l71Ct" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam00/traces/5-0-ft_atoi.trace.txt b/exam00/traces/5-0-ft_atoi.trace.txt new file mode 100644 index 0000000..7db7fb4 --- /dev/null +++ b/exam00/traces/5-0-ft_atoi.trace.txt @@ -0,0 +1,79 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r1-p1.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 5 20:39:50 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-00/exam_20190705/cacharle + += Git history ================================================================== +$> git -C /var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user log --pretty='%H - %an, %ad : %s' +aee71077430e4cb04d7151c5422572a6ccd97167 - Exam 42, Fri Jul 5 20:37:38 2019 +0200 : exam00 ft_atoi +a39f6ce8235aec04c798cf602000ab71a8be0361 - Exam 42, Fri Jul 5 19:25:56 2019 +0200 : ft_strrev return corr +d7079124e81f8d1d030d31f59ca1fa2a1e2eb8f9 - Exam 42, Fri Jul 5 19:23:52 2019 +0200 : exam00 ft_strrev +9a061d46ec225b60d5798839c9343d3dcb47a21e - Exam 42, Fri Jul 5 18:57:38 2019 +0200 : exam00 ft_putstr +cf5957fe28f503c7637a640ca229743385364c1d - Exam 42, Fri Jul 5 18:47:39 2019 +0200 : exam00 maff_alpha.c +1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 - Exam 42, Fri Jul 5 18:38:16 2019 +0200 : exam00 ft_countdown +1ea27768767e32d773e78820d481b20a4d108c5b - Exam 42, Fri Jul 5 18:23:38 2019 +0200 : exam only_z + += Collected files ========================================== +$> ls -lAR /var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1635 Jul 5 20:39 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:39 ft_atoi +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:39 ft_countdown +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:39 ft_putstr +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:39 ft_strrev +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:39 maff_alpha +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:39 only_z + +/var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user/ft_atoi: +total 8 +-rw-r--r-- 1 deepthought deepthought 830 Jul 5 20:39 ft_atoi.c + +/var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user/ft_countdown: +total 8 +-rw-r--r-- 1 deepthought deepthought 176 Jul 5 20:39 ft_countdown.c + +/var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user/ft_putstr: +total 8 +-rw-r--r-- 1 deepthought deepthought 100 Jul 5 20:39 ft_putstr.c + +/var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user/ft_strrev: +total 8 +-rw-r--r-- 1 deepthought deepthought 320 Jul 5 20:39 ft_strrev.c + +/var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user/maff_alpha: +total 8 +-rw-r--r-- 1 deepthought deepthought 243 Jul 5 20:39 maff_alpha.c + +/var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/tmpWSUHVh/user/only_z: +total 8 +-rw-r--r-- 1 deepthought deepthought 85 Jul 5 20:39 only_z.c + += ft_atoi ====================================================================== +$> gcc -Wextra -Wall -Werror main.c ft_atoi.c -o user_exe +duplicate symbol _main in: + /var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/main-778510.o + /var/folders/94/qc05t_2x0hl2j9mv5vr_t2mw0000gq/T/ft_atoi-1b1dec.o +ld: 1 duplicate symbol for architecture x86_64 +clang: error: linker command failed with exit code 1 (use -v to see invocation) + +Could not compile 'user_exe' +Grade: 0 + += Final grade: 0 =============================================================== diff --git a/exam00/traces/5-1-ft_atoi.trace.txt b/exam00/traces/5-1-ft_atoi.trace.txt new file mode 100644 index 0000000..00c226d --- /dev/null +++ b/exam00/traces/5-1-ft_atoi.trace.txt @@ -0,0 +1,174 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r1-p4.s19.be +Darwin 17.0.0 x86_64 +$> date +Fri Jul 5 20:43:43 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin17.0.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin17.0.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-00/exam_20190705/cacharle + += Git history ================================================================== +$> git -C /var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user log --pretty='%H - %an, %ad : %s' +4933249a7abc3ae2a2f34fa94bc39fc25b94037e - Exam 42, Fri Jul 5 20:42:29 2019 +0200 : there is still a main you idiot +aee71077430e4cb04d7151c5422572a6ccd97167 - Exam 42, Fri Jul 5 20:37:38 2019 +0200 : exam00 ft_atoi +a39f6ce8235aec04c798cf602000ab71a8be0361 - Exam 42, Fri Jul 5 19:25:56 2019 +0200 : ft_strrev return corr +d7079124e81f8d1d030d31f59ca1fa2a1e2eb8f9 - Exam 42, Fri Jul 5 19:23:52 2019 +0200 : exam00 ft_strrev +9a061d46ec225b60d5798839c9343d3dcb47a21e - Exam 42, Fri Jul 5 18:57:38 2019 +0200 : exam00 ft_putstr +cf5957fe28f503c7637a640ca229743385364c1d - Exam 42, Fri Jul 5 18:47:39 2019 +0200 : exam00 maff_alpha.c +1bff6951e5d37fb9f911e6cf93afdb9a2a079a64 - Exam 42, Fri Jul 5 18:38:16 2019 +0200 : exam00 ft_countdown +1ea27768767e32d773e78820d481b20a4d108c5b - Exam 42, Fri Jul 5 18:23:38 2019 +0200 : exam only_z + += Collected files ========================================== +$> ls -lAR /var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1859 Jul 5 20:43 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:43 ft_atoi +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:43 ft_countdown +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:43 ft_putstr +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:43 ft_strrev +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:43 maff_alpha +drwxr-xr-x 3 deepthought deepthought 102 Jul 5 20:43 only_z + +/var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user/ft_atoi: +total 8 +-rw-r--r-- 1 deepthought deepthought 803 Jul 5 20:43 ft_atoi.c + +/var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user/ft_countdown: +total 8 +-rw-r--r-- 1 deepthought deepthought 176 Jul 5 20:43 ft_countdown.c + +/var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user/ft_putstr: +total 8 +-rw-r--r-- 1 deepthought deepthought 100 Jul 5 20:43 ft_putstr.c + +/var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user/ft_strrev: +total 8 +-rw-r--r-- 1 deepthought deepthought 320 Jul 5 20:43 ft_strrev.c + +/var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user/maff_alpha: +total 8 +-rw-r--r-- 1 deepthought deepthought 243 Jul 5 20:43 maff_alpha.c + +/var/folders/b1/8nhw8rjs4r3bn7v4ds221x280000gq/T/tmpqohSkG/user/only_z: +total 8 +-rw-r--r-- 1 deepthought deepthought 85 Jul 5 20:43 only_z.c + += ft_atoi ====================================================================== +$> gcc -Wextra -Wall -Werror main.c ft_atoi.c -o user_exe + += Test 1 =================================================== +$> ./jcbihz3rfanj4x6x5e2420hn +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./icpi3e1j8a5w9251wig3mgwr "21" "2313" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./egs0v0izcp5b5i259wc7rzmr 2147483647 +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./9qbnqd0xzkoc9fac8q2o0rk9 -2147483648 +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./c9sjne36n9gvufl69589d6gc 0 +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./ttxxj0yzi1hqgolxx8abqqn0 12211t11 +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./ayg93ljmtrf4q2fjl7sk0fgx --223 +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./8zjh6rwdaosf4gk1q22od9ty -233501767 +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./jurbtuxtvq05sb8xqhz4d3kc 25783639 +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./5jgfse31lkl5mvd01dc735pz 943397825 +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./cqu77yuhsstqzcubdclr4keh -1826524713 +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D += Test 12 ================================================== +$> ./zzy1kk0f16nhvaitixx79bnn -1431651155 +$> diff -U 3 user_output_test12 test12.output | cat -e + +Diff OK :D += Test 13 ================================================== +$> ./cy5gs1nd6hg2dv1kj4wq69k4 -795113048 +$> diff -U 3 user_output_test13 test13.output | cat -e + +Diff OK :D += Test 14 ================================================== +$> ./b8anyi7uw8w54ozysfe4c7xu -1074627657 +$> diff -U 3 user_output_test14 test14.output | cat -e + +Diff OK :D += Test 15 ================================================== +$> ./y3aay5vvyuqgpt7pxsn73p5d -534138154 +$> diff -U 3 user_output_test15 test15.output | cat -e + +Diff OK :D += Test 16 ================================================== +$> ./7okhq227013a5fvxed41in8z -1870913365 +$> diff -U 3 user_output_test16 test16.output | cat -e + +Diff OK :D += Test 17 ================================================== +$> ./gbx3tjvqv96qes54lsorfrx1 -693151582 +$> diff -U 3 user_output_test17 test17.output | cat -e + +Diff OK :D += Test 18 ================================================== +$> ./u5w0ipo8b8mqlizlitmuomv1 -1588217085 +$> diff -U 3 user_output_test18 test18.output | cat -e + +Diff OK :D += Test 19 ================================================== +$> ./hkrfzy0re8mg38lkj62sq3dq -1136243523 +$> diff -U 3 user_output_test19 test19.output | cat -e + +Diff OK :D += Test 20 ================================================== +$> ./i041ni9qy52eullsbton5yr4 -1280114021 +$> diff -U 3 user_output_test20 test20.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/rendu/__GIT_HISTORY b/exam01/rendu/__GIT_HISTORY new file mode 100755 index 0000000..07c2777 --- /dev/null +++ b/exam01/rendu/__GIT_HISTORY @@ -0,0 +1,71 @@ +commit 45e8e511bd3d91e4cc7d44cef1257914d442541c +Author: Exam 42 +Date: Fri Jul 12 19:28:29 2019 +0200 + + ft_split + + ft_split/ft_split.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 72 insertions(+) + +commit 3f66b01dadeabbfb7332ca8eaff6c651baa7d60c +Author: Exam 42 +Date: Fri Jul 12 18:33:39 2019 +0200 + + overme + + ft_range/ft_range.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 2fa3ca5efbeea644b056cbaa24c006cb475f1d68 +Author: Exam 42 +Date: Fri Jul 12 18:22:27 2019 +0200 + + ft_range + + ft_range/ft_range.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +commit b9247efc1f78a0f27a5e8cb097a6d09316541982 +Author: Exam 42 +Date: Fri Jul 12 17:58:16 2019 +0200 + + k you dumb fuck + + wdmatch/wdmatch.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 79c5bf10efda0eead115b274dac91ad92587a53d +Author: Exam 42 +Date: Fri Jul 12 17:55:47 2019 +0200 + + wdmatch + + wdmatch/wdmatch.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 55 insertions(+) + +commit 39cdf357b40ced49f3ac6290d932c7801816115d +Author: Exam 42 +Date: Fri Jul 12 17:22:53 2019 +0200 + + rotone + + rotone/rotone.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +commit c265e4850d0962b936392aca4f3fd6668bd213b2 +Author: Exam 42 +Date: Fri Jul 12 17:11:27 2019 +0200 + + rev_print + + rev_print/rev_print.c | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +commit 9addd4166252d59255a58e3c6c1c7a1e926b37d3 +Author: Exam 42 +Date: Fri Jul 12 17:04:19 2019 +0200 + + hello + + hello/hello.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) diff --git a/exam01/rendu/ft_range/ft_range.c b/exam01/rendu/ft_range/ft_range.c new file mode 100755 index 0000000..de8c414 --- /dev/null +++ b/exam01/rendu/ft_range/ft_range.c @@ -0,0 +1,40 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_range.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 18:00:18 by exam #+# #+# */ +/* Updated: 2019/07/12 18:32:44 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include + +int *ft_range(int start, int end) +{ + int *range; + int i; + + range = (int*)malloc(sizeof(int) * + (end - start < 0 ? start - end : end - start + 1)); + if (range == NULL) + return (NULL); + i = 0; + if (start < end) + while (start <= end) + { + range[i] = start; + start++; + i++; + } + else + while (start >= end) + { + range[i] = start; + start--; + i++; + } + return (range); +} diff --git a/exam01/rendu/ft_split/ft_split.c b/exam01/rendu/ft_split/ft_split.c new file mode 100755 index 0000000..7c8e5c7 --- /dev/null +++ b/exam01/rendu/ft_split/ft_split.c @@ -0,0 +1,72 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_split.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 18:35:38 by exam #+# #+# */ +/* Updated: 2019/07/12 19:27:00 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include + +#define ISSEP(c) (c == ' ' || c == '\n' || c == '\t') + +int count_segment(char *str) +{ + int counter; + + counter = 0; + while (*str) + { + if (!ISSEP(*str)) + { + counter++; + while (*str && !ISSEP(*str)) + str++; + if (!*str) + break; + } + str++; + } + return (counter); +} + +char **ft_split(char *str) +{ + char **split; + char *tmp; + int i; + int j; + int segments; + + segments = count_segment(str); + split = (char**)malloc(sizeof(char*) * segments + 1); + if (split == NULL) + return (NULL); + j = 0; + while (j < segments) + { + if (ISSEP(*str)) + { + str++; + continue; + } + i = 0; + while (!ISSEP(str[i])) + i++; + tmp = (char*)malloc(sizeof(char) * i + 1); + if (tmp == NULL) + return (NULL); + i = 0; + while (!ISSEP(*str)) + tmp[i++] = *str++; + tmp[i] = '\0'; + split[j] = tmp; + j++; + } + split[j] = NULL; + return (split); +} diff --git a/exam01/rendu/hello/hello.c b/exam01/rendu/hello/hello.c new file mode 100755 index 0000000..0becc7e --- /dev/null +++ b/exam01/rendu/hello/hello.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* hello.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:01:31 by exam #+# #+# */ +/* Updated: 2019/07/12 17:03:00 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include + +int main(void) +{ + write(1, "Hello World!\n", 13); +} diff --git a/exam01/rendu/rev_print/rev_print.c b/exam01/rendu/rev_print/rev_print.c new file mode 100755 index 0000000..b46a2d6 --- /dev/null +++ b/exam01/rendu/rev_print/rev_print.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* rev_print.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:06:11 by exam #+# #+# */ +/* Updated: 2019/07/12 17:10:21 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include + +int main(int argc, char **argv) +{ + int i; + + if (argc == 1 || argc > 2) + { + write(1, "\n", 1); + return (0); + } + + i = 0; + while (argv[1][i]) + i++; + while (i-- > 0) + write(1, &argv[1][i], 1); + write(1, "\n", 1); + return (0); +} diff --git a/exam01/rendu/rotone/rotone.c b/exam01/rendu/rotone/rotone.c new file mode 100755 index 0000000..55a6ef5 --- /dev/null +++ b/exam01/rendu/rotone/rotone.c @@ -0,0 +1,39 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* rotone.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:12:59 by exam #+# #+# */ +/* Updated: 2019/07/12 17:21:12 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include + +void ft_putchar(char c) +{ + write(1, &c, 1); +} + +int main(int argc, char **argv) +{ + if (argc == 1 || argc > 2) + { + write(1, "\n", 1); + return (0); + } + while (*argv[1]) + { + if (*argv[1] >= 'a' && *argv[1] <= 'z') + ft_putchar(*argv[1] == 'z' ? 'a' : *argv[1] + 1); + else if (*argv[1] >= 'A' && *argv[1] <= 'Z') + ft_putchar(*argv[1] == 'Z' ? 'A' : *argv[1] + 1); + else + ft_putchar(*argv[1]); + argv[1]++; + } + write(1, "\n", 1); + return (0); +} diff --git a/exam01/rendu/wdmatch/wdmatch.c b/exam01/rendu/wdmatch/wdmatch.c new file mode 100755 index 0000000..96242c9 --- /dev/null +++ b/exam01/rendu/wdmatch/wdmatch.c @@ -0,0 +1,54 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* wdmatch.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:25:25 by exam #+# #+# */ +/* Updated: 2019/07/12 17:57:14 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include + +int in_charset(char c, char *charset) +{ + while (*charset) + if (c == *charset++) + return (1); + return (0); +} + +int main(int argc, char **argv) +{ + int i; + int j; + char *str; + char *charset; + + if (argc != 3) + { + write(1, "\n", 1); + return (0); + } + str = argv[1]; + charset = argv[2]; + i = 0; + j = 0; + while (str[i]) + { + if (!in_charset(str[i], charset)) + { + write(1, "\n", 1); + return (0); + } + while (*charset != str[i]) + charset++; + i++; + } + while (*str) + write(1, str++, 1); + write(1, "\n", 1); + return (0); +} diff --git a/exam01/subjects/0-0-hello/examples.txt b/exam01/subjects/0-0-hello/examples.txt new file mode 100644 index 0000000..4ac95f1 --- /dev/null +++ b/exam01/subjects/0-0-hello/examples.txt @@ -0,0 +1,5 @@ +$>./hello +Hello World! +$>./hello | cat -e +Hello World!$ +$> diff --git a/exam01/subjects/0-0-hello/subject.en.txt b/exam01/subjects/0-0-hello/subject.en.txt new file mode 100644 index 0000000..9dcbeaf --- /dev/null +++ b/exam01/subjects/0-0-hello/subject.en.txt @@ -0,0 +1,14 @@ +Assignment name : hello +Expected files : hello.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that displays "Hello World!" followed by a \n. + +Example: + +$>./hello +Hello World! +$>./hello | cat -e +Hello World!$ +$> diff --git a/exam01/subjects/0-0-hello/subject.fr.txt b/exam01/subjects/0-0-hello/subject.fr.txt new file mode 100644 index 0000000..9b4e158 --- /dev/null +++ b/exam01/subjects/0-0-hello/subject.fr.txt @@ -0,0 +1,14 @@ +Assignment name : hello +Expected files : hello.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui affiche "Hello World!" suivi d'un \n. + +Exemple: + +$>./hello +Hello World! +$>./hello | cat -e +Hello World!$ +$> diff --git a/exam01/subjects/1-0-rev_print/subject.en.txt b/exam01/subjects/1-0-rev_print/subject.en.txt new file mode 100644 index 0000000..7898a0d --- /dev/null +++ b/exam01/subjects/1-0-rev_print/subject.en.txt @@ -0,0 +1,18 @@ +Assignment name : rev_print +Expected files : rev_print.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes a string, and displays the string in reverse +followed by a newline. + +If the number of parameters is not 1, the program displays a newline. + +Examples: + +$> ./rev_print "rainbow dash" | cat -e +hsad wobniar$ +$> ./rev_print "Ponies are awesome" | cat -e +emosewa era seinoP$ +$> ./rev_print | cat -e +$ diff --git a/exam01/subjects/1-0-rev_print/subject.fr.txt b/exam01/subjects/1-0-rev_print/subject.fr.txt new file mode 100644 index 0000000..4af7395 --- /dev/null +++ b/exam01/subjects/1-0-rev_print/subject.fr.txt @@ -0,0 +1,18 @@ +Assignment name : rev_print +Expected files : rev_print.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui prend une chaîne et l'affiche en ordre inverse suivie +d'un newline. + +Si le nombre d'arguments n'est pas 1, le programme affiche un newline. + +Exemples: + +$> ./rev_print "zaz" | cat -e +zaz$ +$> ./rev_print "dub0 a POIL" | cat -e +LIOP a 0bud$ +$> ./rev_print | cat -e +$ diff --git a/exam01/subjects/2-0-rotone/examples.txt b/exam01/subjects/2-0-rotone/examples.txt new file mode 100644 index 0000000..b8db87f --- /dev/null +++ b/exam01/subjects/2-0-rotone/examples.txt @@ -0,0 +1,12 @@ +$>./rotone "abc" +bcd +$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e +Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$ +$>./rotone "AkjhZ zLKIJz , 23y " | cat -e +BlkiA aMLJKa , 23z $ +$>./rotone | cat -e +$ +$> +$>./rotone "" | cat -e +$ +$> diff --git a/exam01/subjects/2-0-rotone/subject.en.txt b/exam01/subjects/2-0-rotone/subject.en.txt new file mode 100644 index 0000000..093fc7a --- /dev/null +++ b/exam01/subjects/2-0-rotone/subject.en.txt @@ -0,0 +1,28 @@ +Assignment name : rotone +Expected files : rotone.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes a string and displays it, replacing each of its +letters by the next one in alphabetical order. + +'z' becomes 'a' and 'Z' becomes 'A'. Case remains unaffected. + +The output will be followed by a \n. + +If the number of arguments is not 1, the program displays \n. + +Example: + +$>./rotone "abc" +bcd +$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e +Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$ +$>./rotone "AkjhZ zLKIJz , 23y " | cat -e +BlkiA aMLJKa , 23z $ +$>./rotone | cat -e +$ +$> +$>./rotone "" | cat -e +$ +$> diff --git a/exam01/subjects/2-0-rotone/subject.fr.txt b/exam01/subjects/2-0-rotone/subject.fr.txt new file mode 100644 index 0000000..07e5004 --- /dev/null +++ b/exam01/subjects/2-0-rotone/subject.fr.txt @@ -0,0 +1,31 @@ +Assignment name : rotone +Expected files : rotone.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme nommé rotone, qui prend en paramètre une chaîne de +caractères, et qui affiche cette chaîne en remplaçant chaque caractère +alphabétique par le caractère suivant dans l'ordre alphabétique. + +'z' devient 'a' et 'Z' devient 'A'. Les majuscules restent des majuscules, les +minuscules restent des minuscules. + +L'affichage se termine toujours par un retour à la ligne. + +Si le nombre de paramètres transmis est différent de 1, le programme affiche +'\n'. + +Exemple: + +$>./rotone "abc" +bcd +$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e +Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$ +$>./rotone "AkjhZ zLKIJz , 23y " | cat -e +BlkiA aMLJKa , 23z $ +$>./rotone | cat -e +$ +$> +$>./rotone "" | cat -e +$ +$> diff --git a/exam01/subjects/3-0-wdmatch/examples.txt b/exam01/subjects/3-0-wdmatch/examples.txt new file mode 100644 index 0000000..cf0c96a --- /dev/null +++ b/exam01/subjects/3-0-wdmatch/examples.txt @@ -0,0 +1,10 @@ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e +quarante deux$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-0-wdmatch/subject.en.txt b/exam01/subjects/3-0-wdmatch/subject.en.txt new file mode 100644 index 0000000..a8e058d --- /dev/null +++ b/exam01/subjects/3-0-wdmatch/subject.en.txt @@ -0,0 +1,26 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes two strings and checks whether it's possible to +write the first string with characters from the second string, while respecting +the order in which these characters appear in the second string. + +If it's possible, the program displays the string, followed by a \n, otherwise +it simply displays a \n. + +If the number of arguments is not 2, the program displays a \n. + +Examples: + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-0-wdmatch/subject.fr.txt b/exam01/subjects/3-0-wdmatch/subject.fr.txt new file mode 100644 index 0000000..383fe15 --- /dev/null +++ b/exam01/subjects/3-0-wdmatch/subject.fr.txt @@ -0,0 +1,28 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Le programme prend en paramètres deux chaînes de caractères et vérifie qu'il +est possible d'écrire la première chaîne de caractères a l'aide des caractères +de la deuxiême chaîne, tout en respectant l'ordre des caractères dans la +deuxième chaîne. + +Si cela est possible, le programme affiche la première chaîne de caractères, +suivie de '\n'. Sinon le programme affiche seulement '\n'. + +Si le nombre de paramètres transmis est différent de 2, le programme affiche +'\n'. + +Exemples : + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ \ No newline at end of file diff --git a/exam01/subjects/3-1-wdmatch/examples.txt b/exam01/subjects/3-1-wdmatch/examples.txt new file mode 100644 index 0000000..cf0c96a --- /dev/null +++ b/exam01/subjects/3-1-wdmatch/examples.txt @@ -0,0 +1,10 @@ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e +quarante deux$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-1-wdmatch/subject.en.txt b/exam01/subjects/3-1-wdmatch/subject.en.txt new file mode 100644 index 0000000..a8e058d --- /dev/null +++ b/exam01/subjects/3-1-wdmatch/subject.en.txt @@ -0,0 +1,26 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes two strings and checks whether it's possible to +write the first string with characters from the second string, while respecting +the order in which these characters appear in the second string. + +If it's possible, the program displays the string, followed by a \n, otherwise +it simply displays a \n. + +If the number of arguments is not 2, the program displays a \n. + +Examples: + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-1-wdmatch/subject.fr.txt b/exam01/subjects/3-1-wdmatch/subject.fr.txt new file mode 100644 index 0000000..383fe15 --- /dev/null +++ b/exam01/subjects/3-1-wdmatch/subject.fr.txt @@ -0,0 +1,28 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Le programme prend en paramètres deux chaînes de caractères et vérifie qu'il +est possible d'écrire la première chaîne de caractères a l'aide des caractères +de la deuxiême chaîne, tout en respectant l'ordre des caractères dans la +deuxième chaîne. + +Si cela est possible, le programme affiche la première chaîne de caractères, +suivie de '\n'. Sinon le programme affiche seulement '\n'. + +Si le nombre de paramètres transmis est différent de 2, le programme affiche +'\n'. + +Exemples : + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ \ No newline at end of file diff --git a/exam01/subjects/4-0-ft_range/subject.en.txt b/exam01/subjects/4-0-ft_range/subject.en.txt new file mode 100644 index 0000000..66a77a2 --- /dev/null +++ b/exam01/subjects/4-0-ft_range/subject.en.txt @@ -0,0 +1,19 @@ +Assignment name : ft_range +Expected files : ft_range.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Write the following function: + +int *ft_range(int start, int end); + +It must allocate (with malloc()) an array of integers, fill it with consecutive +values that begin at start and end at end (Including start and end !), then +return a pointer to the first value of the array. + +Examples: + +- With (1, 3) you will return an array containing 1, 2 and 3. +- With (-1, 2) you will return an array containing -1, 0, 1 and 2. +- With (0, 0) you will return an array containing 0. +- With (0, -3) you will return an array containing 0, -1, -2 and -3. diff --git a/exam01/subjects/4-0-ft_range/subject.fr.txt b/exam01/subjects/4-0-ft_range/subject.fr.txt new file mode 100644 index 0000000..9e848b3 --- /dev/null +++ b/exam01/subjects/4-0-ft_range/subject.fr.txt @@ -0,0 +1,19 @@ +Assignment name : ft_range +Expected files : ft_range.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Écrire la fonction suivante : + +int *ft_range(int start, int end); + +Cette fonction doit allouer avec malloc() un tableau d'ints, le remplir avec +les valeurs (consécutives) démarrant à start et finissant à end (start et end +inclus !), et renvoyer un pointeur vers la première valeur du tableau. + +Exemples: + +- Avec (1, 3) vous devrez renvoyer un tableau contenant 1, 2 et 3. +- Avec (-1, 2) vous devrez renvoyer un tableau contenant -1, 0, 1 et 2. +- Avec (0, 0) vous devrez renvoyer un tableau contenant 0. +- Avec (0, -3) vous devrez renvoyer un tableau contenant 0, -1, -2 et -3. diff --git a/exam01/subjects/4-1-ft_range/subject.en.txt b/exam01/subjects/4-1-ft_range/subject.en.txt new file mode 100644 index 0000000..66a77a2 --- /dev/null +++ b/exam01/subjects/4-1-ft_range/subject.en.txt @@ -0,0 +1,19 @@ +Assignment name : ft_range +Expected files : ft_range.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Write the following function: + +int *ft_range(int start, int end); + +It must allocate (with malloc()) an array of integers, fill it with consecutive +values that begin at start and end at end (Including start and end !), then +return a pointer to the first value of the array. + +Examples: + +- With (1, 3) you will return an array containing 1, 2 and 3. +- With (-1, 2) you will return an array containing -1, 0, 1 and 2. +- With (0, 0) you will return an array containing 0. +- With (0, -3) you will return an array containing 0, -1, -2 and -3. diff --git a/exam01/subjects/4-1-ft_range/subject.fr.txt b/exam01/subjects/4-1-ft_range/subject.fr.txt new file mode 100644 index 0000000..9e848b3 --- /dev/null +++ b/exam01/subjects/4-1-ft_range/subject.fr.txt @@ -0,0 +1,19 @@ +Assignment name : ft_range +Expected files : ft_range.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Écrire la fonction suivante : + +int *ft_range(int start, int end); + +Cette fonction doit allouer avec malloc() un tableau d'ints, le remplir avec +les valeurs (consécutives) démarrant à start et finissant à end (start et end +inclus !), et renvoyer un pointeur vers la première valeur du tableau. + +Exemples: + +- Avec (1, 3) vous devrez renvoyer un tableau contenant 1, 2 et 3. +- Avec (-1, 2) vous devrez renvoyer un tableau contenant -1, 0, 1 et 2. +- Avec (0, 0) vous devrez renvoyer un tableau contenant 0. +- Avec (0, -3) vous devrez renvoyer un tableau contenant 0, -1, -2 et -3. diff --git a/exam01/subjects/5-0-ft_split/subject.en.txt b/exam01/subjects/5-0-ft_split/subject.en.txt new file mode 100644 index 0000000..97375e9 --- /dev/null +++ b/exam01/subjects/5-0-ft_split/subject.en.txt @@ -0,0 +1,14 @@ +Assignment name : ft_split +Expected files : ft_split.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Write a function that takes a string, splits it into words, and returns them as +a NULL-terminated array of strings. + +A "word" is defined as a part of a string delimited either by spaces/tabs/new +lines, or by the start/end of the string. + +Your function must be declared as follows: + +char **ft_split(char *str); diff --git a/exam01/subjects/5-0-ft_split/subject.fr.txt b/exam01/subjects/5-0-ft_split/subject.fr.txt new file mode 100644 index 0000000..acd1b41 --- /dev/null +++ b/exam01/subjects/5-0-ft_split/subject.fr.txt @@ -0,0 +1,16 @@ +Assignment name : ft_split +Expected files : ft_split.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Écrire une fonction qui prend en paramètre une chaîne de caractères et la +découpe en mots, qui seront retournés sous la forme d'un tableau de chaînes +terminé par NULL. + +On appelle "mot" une portion de chaîne de caractères délimitée soit par des +espaces, des retours à la ligne et/ou des tabulations, soit par le début / fin +de la chaîne. + +Votre fonction devra être prototypée de la façon suivante : + +char **ft_split(char *str); diff --git a/exam01/traces/0-0-hello.trace.txt b/exam01/traces/0-0-hello.trace.txt new file mode 100644 index 0000000..6708b57 --- /dev/null +++ b/exam01/traces/0-0-hello.trace.txt @@ -0,0 +1,47 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r1-p2.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:05:17 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmpHW3uXn/user log --pretty='%H - %an, %ad : %s' +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmpHW3uXn/user +total 8 +-rw-r--r-- 1 deepthought deepthought 210 Jul 12 17:05 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:05 hello + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmpHW3uXn/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:05 hello.c + += hello ======================================================================== +$> gcc -Wextra -Wall -Werror hello.c -o user_exe + += Test 1 =================================================== +$> ./swu3bvaw8nu1f56oykt470ve test1.prm +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/1-0-rev_print.trace.txt b/exam01/traces/1-0-rev_print.trace.txt new file mode 100644 index 0000000..c9212d6 --- /dev/null +++ b/exam01/traces/1-0-rev_print.trace.txt @@ -0,0 +1,103 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r2-p4.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:12:08 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user log --pretty='%H - %an, %ad : %s' +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user +total 8 +-rw-r--r-- 1 deepthought deepthought 447 Jul 12 17:12 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:12 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:12 rev_print + +/var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:12 hello.c + +/var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:12 rev_print.c + += rev_print ==================================================================== +$> gcc -Wextra -Wall -Werror rev_print.c -o user_exe + += Test 1 =================================================== +$> ./qp1cxso9hvmxofxjwbrbtvw4 +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./gjibjpt1qoil06muy87ewdrx "bU4ktETLK1My9u" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./5zqb19ur5317h4rx0gxwti18 "kxYCfVjHreaSiBKp0" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./sz55vjsqvgvqokxrvnvuf2yx "MuOS0w1vEPDyJoH" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./77k6m1s1joa651w6qods8p84 "X41Pf7FCa2ISZ alQ5jBtAm atob4mgfBenYOFSw 6O4xBlmCPoAfzt gYfc81ymiOQrMAuUJ" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./i3kqwfb8cs4ustspao4u0xsv "wbMyK9ck Jvir 3EVKp JGNkq qn5fDiLmd9KvQN kTrPsKia fWMNy1DFgm2dUK GDOcYsj2gQ3I49 S2sWCDc5YfbERngL" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./mt240kr9fje92d3sceymn1xh "7lZxPYHshQw 6EzZGqJojWlfVvMr1 svcq170ESUMuD JA9Ugls341bBv bXW 9pQwY NFRPx fPiQ3d unChBiMLRGYK VHyA0ulq5gEe6pIh duZsRC Bsl0MIG6vwJL CjchIOUGJm" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./iydwvdaeetokh323ft2bholm "Vs826SBY0T9" "REkbsFTtOw" "zUouOkQvtZE" "R2nOiJcNjkPrFE" "mvgaQsd1HAC2EuB" "jkrqu8nzUa" "pe9Koul6FEvhX" "LFkaBOoVXn9Sd" "gF9SGuJwB8Z" "LEi" "LtPBlSnZjXsR" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./jgb9gq5ioyi72pjqj6zpkguh "k3QoDP2m5Ih7Ftr" "HcyhAi" "tbuWkUpH" "VEyg3MAduwZeG8" "1o5wMxTcn2" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./qlkcoodi721p27el6yryjnqx "ql9k QLA6Grj9pND35Mni PSWcy2 hsSzplIZWdxjNemK 6CrsOLbGv1 pa9dA1Mx8BEb dOpkBMRP7 pmtZ vhmezF0Rk WOMqkDeQl3ouIUw7 CRo9J4lEw6Lg3r wx0lPTIKcv9dU" "HnDVvFhAWq 4BYigusbQonc7fxV boIKUFYBpQa NZIYygcSVC5mxHGuA Ep7nfMPN apcuB rkuUqSnZQlIa7 0hQ rv4ixO9TYK 0aYextFX" "wWJ2bUDudgHpfEs6K 8nJsbfpvr04HEwNM UGwDtYAXc hc03 Wg3mq9KYGphe4t iO2gXlF lS4Ohw jYA59Lv2oGTOufQPB ZpmurSBjiAJHIwXVE Fb9LfqzeHkYE21c Cbn5 S7cN0 I6v7ko VLPoyBGjb HxFflpJRk5aO3Ig C2JExK0a84cn6 XZrMbLT E4WRLqCS5" "j5SdkQOs9urf 6I0adOVe MoN4y6n 1GZvHxq7bCAfKcD 6gzwtK Ia6qX4 tTGExkyqe7z qsY1V8G4 vASbdw RZqlPJB BNu5pO79r oj8Sph25v dGRZcT58e C67int" "sCu rAspIohz9Rmd6waf oGaFT EHxQ4wFk Bogv3Nz mEbwhun9slY7N4Cvt e78Dt 3x6gE M6QV EWP2b 32kD tYeJZSMC fpz24v TWcx1" "LH6gWZtoEBm jn9 kHm7 Eoem eZp hrjOTiaNgnd68UDmS RFKcion3JIheOHGd 2qAdGtic iHMdryEBZVOU 8qQNajv2AnU oGK" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./9upevvmsesg1wj241ujrur1v "VoUHTMPEGQ7f2tS Ri7VXDwbC6TYSu21s CAB1PmX7FMtOUckj 45YsDerNfv tfx1zDe3YP o5Xw GFmEecLTv9qC4VDh ijVJX8 HWNJM z9q8oJ 5jZuG U9ELsgoaHS3In Seq3K6m xV8 d2HfUSb" "t02fbz R7w2tBfQCgpksmF89 pBK 6lXNnCQ9 vqXWLaKyzCZ3bh5s AYQeUtpsRMcBl6q SrQw1 rVgkfTvdJl AHE0clZy WJjSty20KdNbcFru QN4qJMvhd3s0o OjvqzP0wB9MJ3NA68 hJ5l3RqtPT1mH 3V48St10ag udZUKG6vY0ea7CDLc" "em61Jg7UN KyGdkE8bB1T KLH HIsmKBiqpT 3dmPeGgtv gpdatls ce2ah R63l Eljkd6XgruWRZ Z3qo6IzYKrh0GJwMO aBtUemER O9KnLdAqjIXcGMTJN yAZxY 2m93QVp7Y4MFS gQrVx47E6WlT" "6XCuv0JldqNoxYOZs KwQmEzWgMX1 Uq0k8SX EqpOAgZIJz 1jc9BN5s7azo6 MPOnDqEH gtS 5cHisDm" "XipOD7mfWaxK 16fSmQyeLKCUZF V9j8Fp6Ix2RztOhq x2hCNXuVyQoPw Y5eG1nDPRo7LyFf 9y0 G7z bkZtVgarLzFAfjP6M MK3YmEqCy2 D2f3t OxUzm2dPKc5" "Uey0DfZzkh8Cl 15JY VI0E 5jTkwe9I8L40 P4msUMwx VkXt7vZqsLyfawWK FUQfToHz6wlVc8s1n yr3VL ucRE2sGm5DjiYOgNr vJHSGkC9 JTz6uPNt2ahrQsdF ehq1dD Pm3q4B" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/2-0-rotone.trace.txt b/exam01/traces/2-0-rotone.trace.txt new file mode 100644 index 0000000..313b569 --- /dev/null +++ b/exam01/traces/2-0-rotone.trace.txt @@ -0,0 +1,154 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r2-p1.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:23:20 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user log --pretty='%H - %an, %ad : %s' +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user +total 8 +-rw-r--r-- 1 deepthought deepthought 682 Jul 12 17:23 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:23 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:23 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:23 rotone + +/var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:23 hello.c + +/var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:23 rev_print.c + +/var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 17:23 rotone.c + += rotone ======================================================================= +$> gcc -Wextra -Wall -Werror rotone.c -o user_exe + += Test 1 =================================================== +$> ./5p2v1eij0gkpe58u5j1xc61v +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./t5h70kjtjnz320gn3acua3iy +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./6l5samsigyoctvkzg19vnotm "salut" "a" "tous" "tout" "le" "monde" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./ul8gcbbvq0epa14hkn5klqp7 "gKJdrWc" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./wa7m13u46s6u9i75esgqff3t "3bjR8uUYtWdEqGr" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./evh5cg5bbs2hx17tn74iw11k "cpKELqwb" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./crudn5sd96ial62bvofy0sxj "QlUCGD3FiOXsf vEO 7ydB CYH0TOZgJcve8w" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./7fsn6hc4owe6yyrvxfhi2bct "54oVvONYrUw Oz8xi3Sk w4BWXosIpvANOU8u cWzQl79jV PsE5b bOlrutJGxZ Ex2BpNwC" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./l83z7exbivdhpxdwebhw4bww "3EV58cJkxoePb bWjoM3 oXsv VMt wjae0gsQV fekI lYvtOcb1j8sTr0 IaPsBU FOaVyX6 lCXIc qm1fp p7TuLPWev3I IdJgCiX6AFp vY4 krwXELltguWS65 i7B3Gx0rX YSmf1Tx" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./9soy6rbmf7ez6udbcv4xzulz ")LNUg5t4Jyn5KLAwsXT1gajN932 =" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./snz9zhto1blihahtzay1lbzl "0vuwp2)yAS ;" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D += Test 12 ================================================== +$> ./lwd4d6lw1re2uaqieo2mlk04 "1HLqhljdXr41 /H0xzSDEni5Zcu,aWop4bzjORT7uItP;rOTEH9w6qo@tVwEsfMn?PFa0v6DORz3dTEe6myVIRtvqiQuW3fz5:PYgRCySlWHLc5iBJ1" +$> diff -U 3 user_output_test12 test12.output | cat -e + +Diff OK :D += Test 13 ================================================== +$> ./qxr0xvlzfd7600tj1t2rytr8 "/Mmr1Q7UTqRmCNbcnJ:kDJuB2MeAbm71 ;UY1s42XhuaZ3F9krj fElQNHLCrh2M9FjJ/Qk4B7SqmV9r6" +$> diff -U 3 user_output_test13 test13.output | cat -e + +Diff OK :D += Test 14 ================================================== +$> ./07f5ev38zqoitr0k1id0aoko "3Tiw (" +$> diff -U 3 user_output_test14 test14.output | cat -e + +Diff OK :D += Test 15 ================================================== +$> ./7v9i3lvbarnrc94xq6c57u9f ".gwMtPpORxyzED7uG4AdxnYFTkp FrBvim52xf/W2PxGYMj0 DufzGReEbnqBPdm:PGs3 ?jFA1O9rmEWRevoG?" +$> diff -U 3 user_output_test15 test15.output | cat -e + +Diff OK :D += Test 16 ================================================== +$> ./qnbx0s1lt8jhbdxsox60yonu " HhOL RbElYXIm6 @qcmFgPsHDRrCT4" +$> diff -U 3 user_output_test16 test16.output | cat -e + +Diff OK :D += Test 17 ================================================== +$> ./jot2ckxacbzccdegeq3fgwnd " 5IYiwLZ2yEJdovwCLhk " +$> diff -U 3 user_output_test17 test17.output | cat -e + +Diff OK :D += Test 18 ================================================== +$> ./o1l96w0t5uj234saf6izownp " 4VrRgmLEvHyJnZ 5Ha3uVM=eX9MOgBsYxwov3kSh04qfPQ1TRFd?" +$> diff -U 3 user_output_test18 test18.output | cat -e + +Diff OK :D += Test 19 ================================================== +$> ./lhpopm7d6r7mowhgsnyidsr3 ",OdqFXiYfIhZnMB>Ixr1uaVJlmvf3eyY 1gCRk0bDZ6eh)c1BFzDUdHJp -" +$> diff -U 3 user_output_test19 test19.output | cat -e + +Diff OK :D += Test 20 ================================================== +$> ./48l65bjipgn86o4dfgjt3k9p "8uUlX7CHiJBrsV4mp,uSJFrN25DWhb9Y6.YarDR(DgftRvSal1qsPmbk1kQhWNSU7jqgsuJ )2UI5l0pRiXqoM 4mhTR1goq3x2f4Ons >" +$> diff -U 3 user_output_test20 test20.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/3-0-wdmatch.trace.txt b/exam01/traces/3-0-wdmatch.trace.txt new file mode 100644 index 0000000..e1d3ab6 --- /dev/null +++ b/exam01/traces/3-0-wdmatch.trace.txt @@ -0,0 +1,65 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r1-p2.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:56:18 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user log --pretty='%H - %an, %ad : %s' +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user +total 8 +-rw-r--r-- 1 deepthought deepthought 936 Jul 12 17:56 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 wdmatch + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:56 hello.c + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:56 rev_print.c + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 17:56 rotone.c + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1448 Jul 12 17:56 wdmatch.c + += wdmatch ====================================================================== +$> gcc -Wextra -Wall -Werror wdmatch.c -o user_exe +wdmatch.c:25:7: error: unused variable 'k' [-Werror,-Wunused-variable] + int k; + ^ +1 error generated. + +Could not compile 'user_exe' +Grade: 0 + += Final grade: 0 =============================================================== diff --git a/exam01/traces/3-1-wdmatch.trace.txt b/exam01/traces/3-1-wdmatch.trace.txt new file mode 100644 index 0000000..9743146 --- /dev/null +++ b/exam01/traces/3-1-wdmatch.trace.txt @@ -0,0 +1,161 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r2-p5.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:59:24 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user log --pretty='%H - %an, %ad : %s' +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1159 Jul 12 17:59 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 wdmatch + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:59 hello.c + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:59 rev_print.c + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 17:59 rotone.c + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 17:59 wdmatch.c + += wdmatch ====================================================================== +$> gcc -Wextra -Wall -Werror wdmatch.c -o user_exe + += Test 1 =================================================== +$> ./n9zviw9j3v4zn5ckd9eoyo8s +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./c6yzzsryz3arxspfwla7xalk "salut a tous tout le monde" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./qg9mddv7x21yn0rpttql3xpv "salut" "a" "tous" "tout" "le" "monde" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./3ypnkej5n8624wirdb6p47hu "llo" "helllo" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./vhzpjkvd3y7lr4qo57w520y8 "hj" "3hQxj" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./v1jn1lmkqga4f1lo6d6z9s5b "T0GLy" "tSPOIbFzmieBP" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./66wcc32oyhp5wolik9xhizda "eApPN" "K4EXjRIgMpvTfui5C9" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./2n1djla2zveq15agknjibehv "eUQVA" "JkguGhz9L57tCVEyus9xSHc1l6P" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./mlitjrnvk8uuyfaat0ce5zve "NYW6w" "egjZPO2LEfQ7YVD5QjuaxTs4yCg" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./z3arjyex46fups161cg8bpqq "lPVtY" "Ajk4FHUO5Zu8WD73n8omr4hd" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./n9n0adpmhw1ih9lx5umo0oy8 "wjqkN" "fiY8W2EjboAO5HgDI" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D += Test 12 ================================================== +$> ./znxhx77j9t81cyk3clxl2ifs "XE3Vp" "XQxEW3DnVjpzy" +$> diff -U 3 user_output_test12 test12.output | cat -e + +Diff OK :D += Test 13 ================================================== +$> ./fz0b7g6y6yyc12npc94am62v "Hylfr" "HVOylfSvrn9" +$> diff -U 3 user_output_test13 test13.output | cat -e + +Diff OK :D += Test 14 ================================================== +$> ./d334rpw01wa9tqblbr133fun "mjWgP" "CfFSQ2dDkJIE" +$> diff -U 3 user_output_test14 test14.output | cat -e + +Diff OK :D += Test 15 ================================================== +$> ./cmr7w33jvh3zgpfach4m48sr "bamH" "G0OXchivUTudp28Ax91V" +$> diff -U 3 user_output_test15 test15.output | cat -e + +Diff OK :D += Test 16 ================================================== +$> ./moaxsm61mtz09hnqlssc7z9d "TyaLR" "fd5SRHBb9lw5zUiskaG" +$> diff -U 3 user_output_test16 test16.output | cat -e + +Diff OK :D += Test 17 ================================================== +$> ./qintd2y92gek5sdblk2n0xd4 "bMva7" "brMDvjap7" +$> diff -U 3 user_output_test17 test17.output | cat -e + +Diff OK :D += Test 18 ================================================== +$> ./ku1atu25akqnrf4fg0i6b0oy "s3iEf" "3rznPk2KYIquf8gwvT9paPuVb" +$> diff -U 3 user_output_test18 test18.output | cat -e + +Diff OK :D += Test 19 ================================================== +$> ./j9g9z9l3kz62q72ez6yktn87 "9q" "9kAq" +$> diff -U 3 user_output_test19 test19.output | cat -e + +Diff OK :D += Test 20 ================================================== +$> ./6oj676fehbo3e4lje9ul1taj "RYcM" "xRj5YhdcM" +$> diff -U 3 user_output_test20 test20.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/4-0-ft_range.trace.txt b/exam01/traces/4-0-ft_range.trace.txt new file mode 100644 index 0000000..7115c1b --- /dev/null +++ b/exam01/traces/4-0-ft_range.trace.txt @@ -0,0 +1,115 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r5-p1.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 18:23:16 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user log --pretty='%H - %an, %ad : %s' +2fa3ca5efbeea644b056cbaa24c006cb475f1d68 - Exam 42, Fri Jul 12 18:22:27 2019 +0200 : ft_range +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1400 Jul 12 18:23 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 ft_range +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 wdmatch + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/ft_range: +total 8 +-rw-r--r-- 1 deepthought deepthought 1260 Jul 12 18:23 ft_range.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 18:23 hello.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 18:23 rev_print.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 18:23 rotone.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 18:23 wdmatch.c + += ft_range ===================================================================== +$> gcc -Wextra -Wall -Werror main.c ft_range.c -o user_exe + += Test 1 =================================================== +$> ./g21mmeb3fnkmra613kplrje3 +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./ff12prfgdfgwwgiuazp32zoi "21" "2313" "12" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./4k2pgjm72ynpxvnp38nm1dxy "2147483647" "2147483640" "7" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./rw49m14fa6ups80bepjum2ly "-2147483648" "-2147483600" "48" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./o0sll2siyvd6r40hr7x02mou "0" "0" "1" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./14dqgxcnetdxy26xiwmjt0so "947524478" "947524491" "14" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./dakasgofurjtxi05ideufkg3 "1772357724" "1772357724" "1" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./qfjgzmefzhhguiaqrzj54r1v "-190719626" "-190719609" "18" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./ltc0ovkn3xduhtaljmm6vawv "413688041" "413688079" "39" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./c8gp9fhmubnej8hccywxfdl3 "366550988" "366550969" "20" +Command './c8gp9fhmubnej8hccywxfdl3 "366550988" "366550969" "20"' got killed by a Segmentation fault (Signal -11) +Grade: 0 + += Final grade: 0 =============================================================== diff --git a/exam01/traces/4-1-ft_range.trace.txt b/exam01/traces/4-1-ft_range.trace.txt new file mode 100644 index 0000000..fd85054 --- /dev/null +++ b/exam01/traces/4-1-ft_range.trace.txt @@ -0,0 +1,168 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r3-p1.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 18:34:21 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user log --pretty='%H - %an, %ad : %s' +3f66b01dadeabbfb7332ca8eaff6c651baa7d60c - Exam 42, Fri Jul 12 18:33:39 2019 +0200 : overme +2fa3ca5efbeea644b056cbaa24c006cb475f1d68 - Exam 42, Fri Jul 12 18:22:27 2019 +0200 : ft_range +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1623 Jul 12 18:34 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 ft_range +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 wdmatch + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/ft_range: +total 8 +-rw-r--r-- 1 deepthought deepthought 1297 Jul 12 18:34 ft_range.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 18:34 hello.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 18:34 rev_print.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 18:34 rotone.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 18:34 wdmatch.c + += ft_range ===================================================================== +$> gcc -Wextra -Wall -Werror main.c ft_range.c -o user_exe + += Test 1 =================================================== +$> ./5gnhy9cl4wh3edale0etwron +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./mt913ajheprtwzaeleoeulzj "21" "2313" "12" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./pd3xjbxxqx6523c7gvknvm2k "2147483647" "2147483640" "7" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./y5p808qu0ixv9jxw52de12ul "-2147483648" "-2147483600" "48" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./5gkxe87k5v1wn3uspajyr0ik "0" "0" "1" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./0at5ige22l7dcjjv6u3adinr "522550420" "522550435" "16" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./xzmzoyn30lgsw0f24wvefdp5 "318550871" "318550861" "11" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./hf5jk1jdtwmco53qcmwe13ok "86321634" "86321661" "28" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./87ycspb992rbng8paclgxk21 "1374261865" "1374261844" "22" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./luc8mpllyflufoo7hjmp06qo "571776829" "571776806" "24" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./x3xt4ncgbhohjwxg2kpaypvj "1698674613" "1698674594" "20" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D += Test 12 ================================================== +$> ./yburw73lnwpbkhizk9wolzjb "1965022154" "1965022126" "29" +$> diff -U 3 user_output_test12 test12.output | cat -e + +Diff OK :D += Test 13 ================================================== +$> ./dl4k13imbv4ajmtpgdbdf1ay "1772753417" "1772753447" "31" +$> diff -U 3 user_output_test13 test13.output | cat -e + +Diff OK :D += Test 14 ================================================== +$> ./ny8qmx0olpsrv7e52xiik9sy "479115808" "479115804" "5" +$> diff -U 3 user_output_test14 test14.output | cat -e + +Diff OK :D += Test 15 ================================================== +$> ./69hppukj6xoo8z8pk675wc84 "396942871" "396942823" "49" +$> diff -U 3 user_output_test15 test15.output | cat -e + +Diff OK :D += Test 16 ================================================== +$> ./e6idhi7ofk8r2301vp9qwof0 "74676945" "74676941" "5" +$> diff -U 3 user_output_test16 test16.output | cat -e + +Diff OK :D += Test 17 ================================================== +$> ./58ymfqqquqy21jy8gojjjxlr "1765998341" "1765998314" "28" +$> diff -U 3 user_output_test17 test17.output | cat -e + +Diff OK :D += Test 18 ================================================== +$> ./1y9td2e4s6wqounorz9ztxwi "1548556672" "1548556696" "25" +$> diff -U 3 user_output_test18 test18.output | cat -e + +Diff OK :D += Test 19 ================================================== +$> ./vxiw3frjqwrix4mr1ye8vbi9 "1736446061" "1736446048" "14" +$> diff -U 3 user_output_test19 test19.output | cat -e + +Diff OK :D += Test 20 ================================================== +$> ./d8w68dypib9yfcpnvpdd29ln "-171928845" "-171928865" "21" +$> diff -U 3 user_output_test20 test20.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/5-0-ft_split.trace.txt b/exam01/traces/5-0-ft_split.trace.txt new file mode 100644 index 0000000..0032fa5 --- /dev/null +++ b/exam01/traces/5-0-ft_split.trace.txt @@ -0,0 +1,163 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r5-p7.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 19:28:53 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user log --pretty='%H - %an, %ad : %s' +45e8e511bd3d91e4cc7d44cef1257914d442541c - Exam 42, Fri Jul 12 19:28:29 2019 +0200 : ft_split +3f66b01dadeabbfb7332ca8eaff6c651baa7d60c - Exam 42, Fri Jul 12 18:33:39 2019 +0200 : overme +2fa3ca5efbeea644b056cbaa24c006cb475f1d68 - Exam 42, Fri Jul 12 18:22:27 2019 +0200 : ft_range +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1878 Jul 12 19:28 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 ft_range +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 ft_split +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 wdmatch + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/ft_range: +total 8 +-rw-r--r-- 1 deepthought deepthought 1297 Jul 12 19:28 ft_range.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/ft_split: +total 8 +-rw-r--r-- 1 deepthought deepthought 1745 Jul 12 19:28 ft_split.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 19:28 hello.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 19:28 rev_print.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 19:28 rotone.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 19:28 wdmatch.c + += ft_split ===================================================================== +$> gcc -Wextra -Wall -Werror ft_split.c main.c -o user_exe + += Test 1 =================================================== +$> ./a4vj6tsoef07wx4xuf6eqvha "" +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./xutol673u4gqzbgldd2pi5ke " + + +" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./2i6xq0u09m0xypndu45oq8na " + " +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./jq7qzt2b8rkalfklwzmpnt9s "ieyn0wrT5akRqX" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./mdi3gwilmko0h3f8ax42fr3i "PSmlftsD0" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./4uycdib5rdg7g4c5fkwcvd93 " + +KOL0Skb8PEa62i +CvV + + On1cNJwhmR + rB2VK1Skv a3nGgp6xMeikkjvwtpQ1Xayiq + B0iq + KfbC wZ3x0jdlmT +emHAkzjwi6 YqheUTZsAo3" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./lk7npxuxf5eld6gzs6hustfr "Vne42szF7EDLMPNY9kbBqQui ZwdNUtXAnVQiDg + +5PtgFuzyQ2SdqIWnx + pFSm7D1jzPhbXfes F7jlWU9tha1CSOcEtdie6Yn3 + +" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./2wnp79s2d3m26reowmd2f5b2 " + + MWEf0DaoFi + +Sbjlga5 +5j1szveJwXIRHPo79 + + + +FAkapH7TzmDxInUr + + " +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./0baf8z595hkr5znegf1uxa8x " + +ypvHO53EKQL +qpBbg +EYrKyLFp7 + + KrS95jgv CN9ltq0j5GE + +0mvY4 + + bH6XSGYpiAKc + + qsTUa + 3ZLV1gMHafJ6tu tmEvYksZ0 IRABxmTVX5qZk +Y01Oc + " +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== -- cgit