0
0
This commit is contained in:
Guy Baconniere
2021-08-21 13:48:07 +02:00
parent 800ff7ac31
commit 681c2242b9
8 changed files with 275 additions and 0 deletions

11
Rush_02/Makefile Normal file
View File

@@ -0,0 +1,11 @@
clone:
@git clone git@vogsphere.42lausanne.ch:vogsphere/intra-uuid-43aa272e-0de1-4199-8bd8-51ca85234f84-3736481 rush-02
cc:
@norminette -R CheckForbiddenSourceHeader
@gcc -Wall -Wextra -Werror -o a.out *.c
@./a.out
@rm -f a.out
all: clone

73
Rush_02/TODO/Makefile Normal file
View File

@@ -0,0 +1,73 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gbaconni <gbaconni@42lausanne.ch> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/08/21 11:01:00 by gbaconni #+# #+# #
# Updated: 2021/08/21 11:59:26 by gbaconni ### ########.fr #
# #
# **************************************************************************** #
#
# make fclean
# make
#
NAME = "rush-02"
DICT = "numbers.dict"
SRC = main.c \
ft_errors.c
HDR = ft.errors.h
all: $(NAME)
@echo "all"
$(NAME): compile
@echo "$(NAME)"
clean:
@echo "cleanning all objects"
@/bin/rm -f *.o
fclean: clean
@echo "cleanning $(NAME)"
@/bin/rm -f "$(NAME)"
re: fclean all
norminette:
@norminette -R CheckDefine $(HDR)
@norminette -R CheckForbiddenSourceHeader $(SRC)
macro:
@cpp $(SRC)
compile:
@cc -Wall -Wextra -Werror -o $(NAME) $(SRC)
@chmod +x $(NAME)
test:
@echo "Expected: forty two"
./$(NAME) 42 | cat -e
@echo "Expected: zero"
./$(NAME) 0 | cat -e
@echo "Expected: error"
./$(NAME) 10.4 | cat -e
@echo "Expected: one hundred thousand"
./$(NAME) 100000 | cat -e
@echo "Expected: 20 : hey everybody !"
grep "20" $(DICT) | cat -e
@echo "Expected: hey everybody !"
./$(NAME) 20 | cat -e
git-clone:
@git clone git@vogsphere.42lausanne.ch:vogsphere/intra-uuid-43aa272e-0de1-4199-8bd8-51ca85234f84-3736481 .
@grep -o 'git@.*' .git/config
git: git-clone

BIN
Rush_02/fr.subject.pdf Normal file

Binary file not shown.

41
Rush_02/numbers.dict.txt Normal file
View File

@@ -0,0 +1,41 @@
0: zero
1: one
2: two
3: three
4: four
5: five
6: six
7: seven
8: eight
9: nine
10: ten
11: eleven
12: twelve
13: thirteen
14: fourteen
15: fifteen
16: sixteen
17: seventeen
18: eighteen
19: nineteen
20: twenty
30: thirty
40: forty
50: fifty
60: sixty
70: seventy
80: eighty
90: ninety
100: hundred
1000: thousand
1000000: million
1000000000: billion
1000000000000: trillion
1000000000000000: quadrillion
1000000000000000000: quintillion
1000000000000000000000: sextillion
1000000000000000000000000: septillion
1000000000000000000000000000: octillion
1000000000000000000000000000000: nonillion
1000000000000000000000000000000000: decillion
1000000000000000000000000000000000000: undecillion

73
Rush_02/rush-02/Makefile Normal file
View File

@@ -0,0 +1,73 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: gbaconni <gbaconni@42lausanne.ch> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/08/21 11:01:00 by gbaconni #+# #+# #
# Updated: 2021/08/21 12:05:34 by gbaconni ### ########.fr #
# #
# **************************************************************************** #
#
# make fclean
# make
#
NAME = "rush-02"
DICT = "numbers.dict"
SRC = main.c \
ft_errors.c
HDR = ft.errors.h
all: $(NAME)
@echo "all"
$(NAME): compile
@echo "$(NAME)"
clean:
@echo "cleanning all objects"
@/bin/rm -f *.o
fclean: clean
@echo "cleanning $(NAME)"
@/bin/rm -f "$(NAME)"
re: fclean all
norminette:
@norminette -R CheckDefine $(HDR)
@norminette -R CheckForbiddenSourceHeader $(SRC)
macro:
@cpp $(SRC)
compile:
@cc -Wall -Wextra -Werror -o $(NAME) $(SRC)
@chmod +x $(NAME)
test:
@echo "Expected: forty two"
./$(NAME) 42 | cat -e
@echo "Expected: zero"
./$(NAME) 0 | cat -e
@echo "Expected: error"
./$(NAME) 10.4 | cat -e
@echo "Expected: one hundred thousand"
./$(NAME) 100000 | cat -e
@echo "Expected: 20 : hey everybody !"
grep "20" $(DICT) | cat -e
@echo "Expected: hey everybody !"
./$(NAME) 20 | cat -e
git-clone:
@git clone git@vogsphere.42lausanne.ch:vogsphere/intra-uuid-43aa272e-0de1-4199-8bd8-51ca85234f84-3736481 .
@grep -o 'git@.*' .git/config
git: git-clone