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

BIN
test/.Makefile.swp Normal file

Binary file not shown.

9
test/Makefile Normal file
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
test/libtest.a Normal file

Binary file not shown.

9
test/main.c Normal file
View File

@@ -0,0 +1,9 @@
#include "test.h"
int main()
{
int a = 't';
a = transform(a);
ft_putchar(a);
return (0);
}

BIN
test/main.o Normal file

Binary file not shown.

6
test/putchar.c Normal file
View File

@@ -0,0 +1,6 @@
#include "test.h"
void ft_putchar(char c)
{
write(1, &c, 1);
}

BIN
test/putchar.o Normal file

Binary file not shown.

BIN
test/test Executable file

Binary file not shown.

9
test/test.h Normal file
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
test/transform.c Normal file
View File

@@ -0,0 +1,6 @@
#include "test.h"
int transform(int a)
{
return(--a);
}

BIN
test/transform.o Normal file

Binary file not shown.