From 31be33bc0ff1a588c8e8610c6540d4855692e893 Mon Sep 17 00:00:00 2001 From: Marenz Date: Sun, 8 May 2011 22:32:16 +0200 Subject: [PATCH 1/3] removed UTF character for people from <1990 --- README | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README b/README index 96306ac..e5224c4 100644 --- a/README +++ b/README @@ -15,11 +15,11 @@ framework. == Directory Overview == -doc — where the documentation will be put after generation -include — contains all bindings and the core C API for the library -lib — where the compiled library will be put -src — contains the sourcecode of the library -test — contains test sourcecodes and test input files +doc - where the documentation will be put after generation +include - contains all bindings and the core C API for the library +lib - where the compiled library will be put +src - contains the sourcecode of the library +test - contains test sourcecodes and test input files == Compiling libpsyc == @@ -30,18 +30,18 @@ Type and you are done. Other possible targets include: - make diet — compile with diet libc - make test — compile and run the test - make doc — generate the API documentation (will be put in the doc folder) - make help — display the possible targets + make diet - compile with diet libc + make test - compile and run the test + make doc - generate the API documentation (will be put in the doc folder) + make help - display the possible targets == Contributors And Contribution == The library is being developed by -* tg — psyc://psyced.org/~tg -* lynx — psyc://psyced.org/~lynx -* Marenz — psyc://supraverse.net/~marenz +* tg - psyc://psyced.org/~tg +* lynx - psyc://psyced.org/~lynx +* Marenz - psyc://supraverse.net/~marenz If you created new bindings, patches or anything other that you think should go into the library, contact either anyone of us directly or just join the @@ -53,4 +53,4 @@ developement room at == Licence == -— To be discussed — +- To be discussed - From ab8f70150e1b4aa41032415dd77c14a2950476f5 Mon Sep 17 00:00:00 2001 From: Marenz Date: Sun, 8 May 2011 23:40:26 +0200 Subject: [PATCH 2/3] moved debug.h lib.h to src --- {include/psyc => src}/debug.h | 0 {include/psyc => src}/lib.h | 2 +- src/match.c | 2 +- src/packet.c | 2 +- src/parser.c | 2 +- src/render.c | 6 +++--- src/text.c | 2 +- src/variable.c | 2 +- test/Makefile | 2 +- test/getVarType.c | 2 +- test/isRoutingVar.c | 2 +- test/testMatch.c | 2 +- test/testRender.c | 2 +- test/testText.c | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) rename {include/psyc => src}/debug.h (100%) rename {include/psyc => src}/lib.h (96%) diff --git a/include/psyc/debug.h b/src/debug.h similarity index 100% rename from include/psyc/debug.h rename to src/debug.h diff --git a/include/psyc/lib.h b/src/lib.h similarity index 96% rename from include/psyc/lib.h rename to src/lib.h index dfa017b..ba7808c 100644 --- a/include/psyc/lib.h +++ b/src/lib.h @@ -3,7 +3,7 @@ #ifndef PSYC_LIB_H # define PSYC_LIB_H -#include "../psyc.h" +#include #include "./debug.h" #include diff --git a/src/match.c b/src/match.c index 22d6ced..7fc3c25 100644 --- a/src/match.c +++ b/src/match.c @@ -1,4 +1,4 @@ -#include "psyc/lib.h" +#include "lib.h" int psyc_inherits(char* sho, size_t slen, char* lon, size_t llen) { diff --git a/src/packet.c b/src/packet.c index aed1aa5..fe7c13e 100644 --- a/src/packet.c +++ b/src/packet.c @@ -1,4 +1,4 @@ -#include +#include "lib.h" #include #include diff --git a/src/parser.c b/src/parser.c index 4e50dce..b447750 100644 --- a/src/parser.c +++ b/src/parser.c @@ -5,7 +5,7 @@ #include #endif -#include +#include "lib.h" #include #define ADVANCE_CURSOR_OR_RETURN(ret) \ diff --git a/src/render.c b/src/render.c index 5990f4b..c0e0a77 100644 --- a/src/render.c +++ b/src/render.c @@ -1,6 +1,6 @@ -#include "psyc/lib.h" -#include "psyc/render.h" -#include "psyc/syntax.h" +#include "lib.h" +#include +#include psycRenderRC psyc_renderList (psycList *list, char *buffer, size_t buflen) { diff --git a/src/text.c b/src/text.c index 674890b..70a437b 100644 --- a/src/text.c +++ b/src/text.c @@ -1,4 +1,4 @@ -#include +#include "lib.h" #include psycTextRC psyc_text (psycTextState *state, psycTextCB getValue) diff --git a/src/variable.c b/src/variable.c index a30805d..a1e4845 100644 --- a/src/variable.c +++ b/src/variable.c @@ -1,4 +1,4 @@ -#include +#include "lib.h" #include /// Routing variables in alphabetical order. diff --git a/test/Makefile b/test/Makefile index 749fd75..8217eb5 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,6 @@ OPT = -O2 DEBUG = 2 -CFLAGS = -I../include -Wall -std=c99 ${OPT} +CFLAGS = -I../include -I../src -Wall -std=c99 ${OPT} LDFLAGS = -L../lib LOADLIBES = -lpsyc -lm LOADLIBES_NET = ${LOADLIBES} diff --git a/test/getVarType.c b/test/getVarType.c index bdf6d3c..d0fd152 100644 --- a/test/getVarType.c +++ b/test/getVarType.c @@ -2,7 +2,7 @@ #include #include #include -#include "../include/psyc/lib.h" +#include int main() { unless (psyc_getVarType(PSYC_C2ARG("_list"))) return 1; diff --git a/test/isRoutingVar.c b/test/isRoutingVar.c index f2d0ceb..9c31685 100644 --- a/test/isRoutingVar.c +++ b/test/isRoutingVar.c @@ -2,7 +2,7 @@ #include #include #include -#include "../include/psyc/lib.h" +#include int main() { #if 0 diff --git a/test/testMatch.c b/test/testMatch.c index cdac58a..6874e14 100644 --- a/test/testMatch.c +++ b/test/testMatch.c @@ -1,5 +1,5 @@ #include -#include "../include/psyc/lib.h" +#include int main() { if (psyc_matches(PSYC_C2ARG("_failure_delivery"), PSYC_C2ARG("_failure_unsuccessful_delivery_death"))) return 1; diff --git a/test/testRender.c b/test/testRender.c index edfb798..1f1f61b 100644 --- a/test/testRender.c +++ b/test/testRender.c @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/test/testText.c b/test/testText.c index e5aff36..21f732d 100644 --- a/test/testText.c +++ b/test/testText.c @@ -1,6 +1,6 @@ #include -#include +#include #include #define BUFSIZE 512 From 20b1408e433f3b6318b66a7c79a3ab6a8ef2fa57 Mon Sep 17 00:00:00 2001 From: Marenz Date: Sun, 8 May 2011 23:56:33 +0200 Subject: [PATCH 3/3] adde C API section to README --- README | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README b/README index a814984..c709daa 100644 --- a/README +++ b/README @@ -10,9 +10,20 @@ See http://about.psyc.eu for information on PSYC in general. The plain C API located in the include/psyc directory along with the file psyc.h is primarily intended to be used for binding with other languages and frameworks. -Available bindings are located in include/ where name is the lanugage or +Available bindings are located in include/ where name is the language or framework. +== C API == + +The "plain C API" is a very low-level API intended to be used for bindings. +To access a certain module of the library, just include the according header +file from the psyc directory: + +parser.h -- parse psyc packets +render.h -- render psyc packets +text.h -- text template functions +packet.h -- structures for render.h and functions to initialize them +syntax.h -- definitions and constants related to parsing and rendering == Directory Overview ==