ajout explications

This commit is contained in:
Hugo LAMY
2019-11-13 12:48:59 +01:00
parent 3d8dde51f4
commit ac4a5e088c
16 changed files with 102 additions and 72 deletions
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
SRC = main.c putchar.c transform.c
DEP = test.h
OBJ = $(SRC:.c=.o)
test: $(OBJ)
gcc -I. -o test $(OBJ)
%.o: %.c $(DEP)
gcc -I. -c $<
BIN
View File
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
#include "test.h"
int main()
{
int a = 't';
a = transform(a);
ft_putchar(a);
return (0);
}
BIN
View File
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
#include "test.h"
void ft_putchar(char c)
{
write(1, &c, 1);
}
BIN
View File
Binary file not shown.
Executable
BIN
View File
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
# ifndef TEST_H
# define TEST_H
#include <unistd.h>
void ft_putchar(char c);
int transform(int a);
# endif
+6
View File
@@ -0,0 +1,6 @@
#include "test.h"
int transform(int a)
{
return(--a);
}
BIN
View File
Binary file not shown.