diff --git a/c/old/Makefile b/c/old/Makefile new file mode 100644 index 0000000..3a0de70 --- /dev/null +++ b/c/old/Makefile @@ -0,0 +1,33 @@ +#SOURCE= vlc +#CFLAGS=$(shell pkg-config --libs vlc) +# +#all: compilationvlc +# +#compilationvlc: +# $(CC) $(SOURCE).c -o $(SOURCE) $(CFLAGS) + +CC=clang +CFLAGS=-c -Wall -g +LDFLAGS= +CFILES=$(wildcard *.c) # CFILES => recompiles everything on a C file change +EXEC=$(basename $(wildcard *.c)) +#SOURCES=$(wildcard *.c) +TESTS=$(addsuffix .test, $(EXEC)) + +all: $(SOURCES) $(EXEC) + +$(EXEC): $(CFILES) + $(CC) $(LDFLAGS) $@.c -o $@ + +.c.o: + $(CC) $(CFLAGS) $< -o $@ + +clean: + @-rm $(EXEC) + +# to test a binary "prog" : make prog.test + +$(TESTS): + valgrind --leak-check=full -v --track-origins=yes ./$(basename $@) + +test: all $(TESTS) diff --git a/c/Makefile.distort b/c/old/Makefile.distort similarity index 100% rename from c/Makefile.distort rename to c/old/Makefile.distort diff --git a/c/apres.c b/c/old/apres.c similarity index 100% rename from c/apres.c rename to c/old/apres.c diff --git a/c/by-line/Makefile b/c/old/by-line/Makefile similarity index 100% rename from c/by-line/Makefile rename to c/old/by-line/Makefile diff --git a/c/old/by-line/README.md b/c/old/by-line/README.md new file mode 100644 index 0000000..0fd2398 --- /dev/null +++ b/c/old/by-line/README.md @@ -0,0 +1 @@ +This application is an example of the `poll` syscall. \ No newline at end of file diff --git a/c/by-line/by-line.c b/c/old/by-line/by-line.c similarity index 100% rename from c/by-line/by-line.c rename to c/old/by-line/by-line.c diff --git a/c/cd.c b/c/old/cd.c similarity index 100% rename from c/cd.c rename to c/old/cd.c diff --git a/c/chrono.c b/c/old/chrono.c similarity index 100% rename from c/chrono.c rename to c/old/chrono.c diff --git a/c/cronbis.c b/c/old/cronbis.c similarity index 100% rename from c/cronbis.c rename to c/old/cronbis.c diff --git a/c/design-test/Makefile b/c/old/design-test/Makefile similarity index 100% rename from c/design-test/Makefile rename to c/old/design-test/Makefile diff --git a/c/design-test/com-child.c b/c/old/design-test/com-child.c similarity index 100% rename from c/design-test/com-child.c rename to c/old/design-test/com-child.c diff --git a/c/design-test/com-parent.c b/c/old/design-test/com-parent.c similarity index 100% rename from c/design-test/com-parent.c rename to c/old/design-test/com-parent.c diff --git a/c/distort.c b/c/old/distort.c similarity index 100% rename from c/distort.c rename to c/old/distort.c diff --git a/c/eko.c b/c/old/eko.c similarity index 100% rename from c/eko.c rename to c/old/eko.c diff --git a/c/eko2.c b/c/old/eko2.c similarity index 100% rename from c/eko2.c rename to c/old/eko2.c diff --git a/c/exoPointeurs.c b/c/old/exoPointeurs.c similarity index 100% rename from c/exoPointeurs.c rename to c/old/exoPointeurs.c diff --git a/c/function.c b/c/old/function.c similarity index 100% rename from c/function.c rename to c/old/function.c diff --git a/c/human.c b/c/old/human.c similarity index 100% rename from c/human.c rename to c/old/human.c diff --git a/c/libipc/.gitignore b/c/old/libipc/.gitignore similarity index 100% rename from c/libipc/.gitignore rename to c/old/libipc/.gitignore diff --git a/c/libipc/build.sh b/c/old/libipc/build.sh similarity index 100% rename from c/libipc/build.sh rename to c/old/libipc/build.sh diff --git a/c/libipc/client-tcp.c b/c/old/libipc/client-tcp.c similarity index 100% rename from c/libipc/client-tcp.c rename to c/old/libipc/client-tcp.c diff --git a/c/libipc/example-syslog.c b/c/old/libipc/example-syslog.c similarity index 100% rename from c/libipc/example-syslog.c rename to c/old/libipc/example-syslog.c diff --git a/c/libipc/print-bytes.c b/c/old/libipc/print-bytes.c similarity index 100% rename from c/libipc/print-bytes.c rename to c/old/libipc/print-bytes.c diff --git a/c/libipc/print-hexa.c b/c/old/libipc/print-hexa.c similarity index 100% rename from c/libipc/print-hexa.c rename to c/old/libipc/print-hexa.c diff --git a/c/libipc/select.c b/c/old/libipc/select.c similarity index 100% rename from c/libipc/select.c rename to c/old/libipc/select.c diff --git a/c/libipc/struct-ipc-switching.c b/c/old/libipc/struct-ipc-switching.c similarity index 100% rename from c/libipc/struct-ipc-switching.c rename to c/old/libipc/struct-ipc-switching.c diff --git a/c/libipc/test-connection.c b/c/old/libipc/test-connection.c similarity index 100% rename from c/libipc/test-connection.c rename to c/old/libipc/test-connection.c diff --git a/c/libipc/test-select.c b/c/old/libipc/test-select.c similarity index 100% rename from c/libipc/test-select.c rename to c/old/libipc/test-select.c diff --git a/c/libipc/tests-envvars.c b/c/old/libipc/tests-envvars.c similarity index 100% rename from c/libipc/tests-envvars.c rename to c/old/libipc/tests-envvars.c diff --git a/c/libipc/to-pascal.pl b/c/old/libipc/to-pascal.pl similarity index 100% rename from c/libipc/to-pascal.pl rename to c/old/libipc/to-pascal.pl diff --git a/c/lirecharl.c b/c/old/lirecharl.c similarity index 100% rename from c/lirecharl.c rename to c/old/lirecharl.c diff --git a/c/matrice1.c b/c/old/matrice1.c similarity index 100% rename from c/matrice1.c rename to c/old/matrice1.c diff --git a/c/matrice2.c b/c/old/matrice2.c similarity index 100% rename from c/matrice2.c rename to c/old/matrice2.c diff --git a/c/mini_shell.c b/c/old/mini_shell.c similarity index 100% rename from c/mini_shell.c rename to c/old/mini_shell.c diff --git a/c/minmax.c b/c/old/minmax.c similarity index 100% rename from c/minmax.c rename to c/old/minmax.c diff --git a/c/minuscule.c b/c/old/minuscule.c similarity index 100% rename from c/minuscule.c rename to c/old/minuscule.c diff --git a/c/miroir.c b/c/old/miroir.c similarity index 100% rename from c/miroir.c rename to c/old/miroir.c diff --git a/c/monswap.c b/c/old/monswap.c similarity index 100% rename from c/monswap.c rename to c/old/monswap.c diff --git a/c/multiChrono.c b/c/old/multiChrono.c similarity index 100% rename from c/multiChrono.c rename to c/old/multiChrono.c diff --git a/c/palindrome.c b/c/old/palindrome.c similarity index 100% rename from c/palindrome.c rename to c/old/palindrome.c diff --git a/c/printenv.c b/c/old/printenv.c similarity index 100% rename from c/printenv.c rename to c/old/printenv.c diff --git a/c/semaphores_manuel_exemples/Exemple_curses/essaiCurses b/c/old/semaphores_manuel_exemples/Exemple_curses/essaiCurses similarity index 100% rename from c/semaphores_manuel_exemples/Exemple_curses/essaiCurses rename to c/old/semaphores_manuel_exemples/Exemple_curses/essaiCurses diff --git a/c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc b/c/old/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc similarity index 100% rename from c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc rename to c/old/semaphores_manuel_exemples/Exemple_curses/essaiCurses.doc diff --git a/c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf b/c/old/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf similarity index 100% rename from c/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf rename to c/old/semaphores_manuel_exemples/Exemple_curses/essaiCurses.pdf diff --git a/c/semaphores_manuel_exemples/Exemple_curses/essaicurses.c b/c/old/semaphores_manuel_exemples/Exemple_curses/essaicurses.c similarity index 100% rename from c/semaphores_manuel_exemples/Exemple_curses/essaicurses.c rename to c/old/semaphores_manuel_exemples/Exemple_curses/essaicurses.c diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/a.out b/c/old/semaphores_manuel_exemples/Exemples_semaphores/a.out similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/a.out rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/a.out diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/creaZ b/c/old/semaphores_manuel_exemples/Exemples_semaphores/creaZ similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/creaZ rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/creaZ diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c b/c/old/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/creaZ.c diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c b/c/old/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ.c diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem b/c/old/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c b/c/old/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/ecrireZ_Sem.c diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/lireZ b/c/old/semaphores_manuel_exemples/Exemples_semaphores/lireZ similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/lireZ rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/lireZ diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c b/c/old/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/lireZ.c diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/raZ b/c/old/semaphores_manuel_exemples/Exemples_semaphores/raZ similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/raZ rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/raZ diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/raZ.c b/c/old/semaphores_manuel_exemples/Exemples_semaphores/raZ.c similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/raZ.c rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/raZ.c diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/sema.c b/c/old/semaphores_manuel_exemples/Exemples_semaphores/sema.c similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/sema.c rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/sema.c diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/sema.h b/c/old/semaphores_manuel_exemples/Exemples_semaphores/sema.h similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/sema.h rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/sema.h diff --git a/c/semaphores_manuel_exemples/Exemples_semaphores/sema.o b/c/old/semaphores_manuel_exemples/Exemples_semaphores/sema.o similarity index 100% rename from c/semaphores_manuel_exemples/Exemples_semaphores/sema.o rename to c/old/semaphores_manuel_exemples/Exemples_semaphores/sema.o diff --git a/c/semaphores_manuel_exemples/FileeDeMessage/msgCons.c b/c/old/semaphores_manuel_exemples/FileeDeMessage/msgCons.c similarity index 100% rename from c/semaphores_manuel_exemples/FileeDeMessage/msgCons.c rename to c/old/semaphores_manuel_exemples/FileeDeMessage/msgCons.c diff --git a/c/semaphores_manuel_exemples/FileeDeMessage/msgProd.c b/c/old/semaphores_manuel_exemples/FileeDeMessage/msgProd.c similarity index 100% rename from c/semaphores_manuel_exemples/FileeDeMessage/msgProd.c rename to c/old/semaphores_manuel_exemples/FileeDeMessage/msgProd.c diff --git a/c/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant b/c/old/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant similarity index 100% rename from c/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant rename to c/old/semaphores_manuel_exemples/FileeDeMessage/nom2_de_fichier_existant diff --git a/c/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c b/c/old/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c similarity index 100% rename from c/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c rename to c/old/semaphores_manuel_exemples/FileeDeMessage/test_msgctl.c diff --git a/c/semaphores_manuel_exemples/essaiCurses.pdf b/c/old/semaphores_manuel_exemples/essaiCurses.pdf similarity index 100% rename from c/semaphores_manuel_exemples/essaiCurses.pdf rename to c/old/semaphores_manuel_exemples/essaiCurses.pdf diff --git a/c/semaphores_manuel_exemples/exercice_rw/Makefile b/c/old/semaphores_manuel_exemples/exercice_rw/Makefile similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/Makefile rename to c/old/semaphores_manuel_exemples/exercice_rw/Makefile diff --git a/c/semaphores_manuel_exemples/exercice_rw/consommateur.c b/c/old/semaphores_manuel_exemples/exercice_rw/consommateur.c similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/consommateur.c rename to c/old/semaphores_manuel_exemples/exercice_rw/consommateur.c diff --git a/c/semaphores_manuel_exemples/exercice_rw/consommateur.h b/c/old/semaphores_manuel_exemples/exercice_rw/consommateur.h similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/consommateur.h rename to c/old/semaphores_manuel_exemples/exercice_rw/consommateur.h diff --git a/c/semaphores_manuel_exemples/exercice_rw/constantes.h b/c/old/semaphores_manuel_exemples/exercice_rw/constantes.h similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/constantes.h rename to c/old/semaphores_manuel_exemples/exercice_rw/constantes.h diff --git a/c/semaphores_manuel_exemples/exercice_rw/global.c b/c/old/semaphores_manuel_exemples/exercice_rw/global.c similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/global.c rename to c/old/semaphores_manuel_exemples/exercice_rw/global.c diff --git a/c/semaphores_manuel_exemples/exercice_rw/producteur.c b/c/old/semaphores_manuel_exemples/exercice_rw/producteur.c similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/producteur.c rename to c/old/semaphores_manuel_exemples/exercice_rw/producteur.c diff --git a/c/semaphores_manuel_exemples/exercice_rw/producteur.h b/c/old/semaphores_manuel_exemples/exercice_rw/producteur.h similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/producteur.h rename to c/old/semaphores_manuel_exemples/exercice_rw/producteur.h diff --git a/c/semaphores_manuel_exemples/exercice_rw/rapport b/c/old/semaphores_manuel_exemples/exercice_rw/rapport similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/rapport rename to c/old/semaphores_manuel_exemples/exercice_rw/rapport diff --git a/c/semaphores_manuel_exemples/exercice_rw/sema.c b/c/old/semaphores_manuel_exemples/exercice_rw/sema.c similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/sema.c rename to c/old/semaphores_manuel_exemples/exercice_rw/sema.c diff --git a/c/semaphores_manuel_exemples/exercice_rw/sema.h b/c/old/semaphores_manuel_exemples/exercice_rw/sema.h similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/sema.h rename to c/old/semaphores_manuel_exemples/exercice_rw/sema.h diff --git a/c/semaphores_manuel_exemples/exercice_rw/types.h b/c/old/semaphores_manuel_exemples/exercice_rw/types.h similarity index 100% rename from c/semaphores_manuel_exemples/exercice_rw/types.h rename to c/old/semaphores_manuel_exemples/exercice_rw/types.h diff --git a/c/semaphores_manuel_exemples/ipc_shm_posix.c b/c/old/semaphores_manuel_exemples/ipc_shm_posix.c similarity index 100% rename from c/semaphores_manuel_exemples/ipc_shm_posix.c rename to c/old/semaphores_manuel_exemples/ipc_shm_posix.c diff --git a/c/semaphores_manuel_exemples/manuel_2009.pdf b/c/old/semaphores_manuel_exemples/manuel_2009.pdf similarity index 100% rename from c/semaphores_manuel_exemples/manuel_2009.pdf rename to c/old/semaphores_manuel_exemples/manuel_2009.pdf diff --git a/c/semaphores_manuel_exemples/wtest6.c.pdf b/c/old/semaphores_manuel_exemples/wtest6.c.pdf similarity index 100% rename from c/semaphores_manuel_exemples/wtest6.c.pdf rename to c/old/semaphores_manuel_exemples/wtest6.c.pdf diff --git a/c/skel_getopts.c b/c/old/skel_getopts.c similarity index 100% rename from c/skel_getopts.c rename to c/old/skel_getopts.c diff --git a/c/squeeze.c b/c/old/squeeze.c similarity index 100% rename from c/squeeze.c rename to c/old/squeeze.c diff --git a/c/strdup.c b/c/old/strdup.c similarity index 100% rename from c/strdup.c rename to c/old/strdup.c diff --git a/c/strdup2.c b/c/old/strdup2.c similarity index 100% rename from c/strdup2.c rename to c/old/strdup2.c diff --git a/c/swapp.c b/c/old/swapp.c similarity index 100% rename from c/swapp.c rename to c/old/swapp.c diff --git a/c/testargs.c b/c/old/testargs.c similarity index 100% rename from c/testargs.c rename to c/old/testargs.c diff --git a/c/voir.c b/c/old/voir.c similarity index 100% rename from c/voir.c rename to c/old/voir.c diff --git a/c/weechat_plugins/Makefile b/c/old/weechat_plugins/Makefile similarity index 100% rename from c/weechat_plugins/Makefile rename to c/old/weechat_plugins/Makefile diff --git a/c/weechat_plugins/currentsong.c b/c/old/weechat_plugins/currentsong.c similarity index 100% rename from c/weechat_plugins/currentsong.c rename to c/old/weechat_plugins/currentsong.c diff --git a/c/weechat_plugins/test.c b/c/old/weechat_plugins/test.c similarity index 100% rename from c/weechat_plugins/test.c rename to c/old/weechat_plugins/test.c diff --git a/c/wordcount.c b/c/old/wordcount.c similarity index 100% rename from c/wordcount.c rename to c/old/wordcount.c