mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
651d5f1d27
9 changed files with 1151 additions and 48 deletions
|
@ -21,3 +21,7 @@ Other possible targets include:
|
||||||
: make doc # generate the API documentation (will be put in the doc folder)
|
: make doc # generate the API documentation (will be put in the doc folder)
|
||||||
: make help # display the possible targets
|
: make help # display the possible targets
|
||||||
|
|
||||||
|
On BSD try this:
|
||||||
|
|
||||||
|
: sudo gmake install prefix=/usr/local
|
||||||
|
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -34,6 +34,8 @@ testdebug: debug
|
||||||
test: all
|
test: all
|
||||||
${MAKE} -C test test nettest
|
${MAKE} -C test test nettest
|
||||||
|
|
||||||
|
check: test
|
||||||
|
|
||||||
bench: all
|
bench: all
|
||||||
${MAKE} -C test bench
|
${MAKE} -C test bench
|
||||||
|
|
||||||
|
@ -49,5 +51,3 @@ clean:
|
||||||
help:
|
help:
|
||||||
@/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc\n\tmake test\n\tmake doc\n\tmake install [prefix=/usr]"
|
@/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc\n\tmake test\n\tmake doc\n\tmake install [prefix=/usr]"
|
||||||
|
|
||||||
legal:
|
|
||||||
git push l
|
|
||||||
|
|
21
README.org
21
README.org
|
@ -44,6 +44,27 @@ For more information see the API documentation at [[http://lib.psyc.eu/doc/]].
|
||||||
: test/ # test sourcecodes and test input files
|
: test/ # test sourcecodes and test input files
|
||||||
: d/ # the D binding
|
: d/ # the D binding
|
||||||
|
|
||||||
|
* Compiling libpsyc
|
||||||
|
|
||||||
|
On GNU systems, type
|
||||||
|
: make
|
||||||
|
|
||||||
|
On other systems install GNU make, then type
|
||||||
|
: gmake
|
||||||
|
|
||||||
|
and you are done.
|
||||||
|
Other possible targets include:
|
||||||
|
|
||||||
|
: make install [prefix=/usr] # install into prefix
|
||||||
|
: make diet # compile with diet libc
|
||||||
|
: make test # compile and run the tests
|
||||||
|
: make doc # generate the API documentation (will be put in the doc folder)
|
||||||
|
: make help # display the possible targets
|
||||||
|
|
||||||
|
* Requirements
|
||||||
|
|
||||||
|
libpsyc is currently known to compile under Linux and SunOS.
|
||||||
|
|
||||||
* Contact
|
* Contact
|
||||||
|
|
||||||
If you created new bindings, patches or anything other that you think should go
|
If you created new bindings, patches or anything other that you think should go
|
||||||
|
|
4
bench/.gitignore
vendored
4
bench/.gitignore
vendored
|
@ -1,4 +1,4 @@
|
||||||
*.html
|
# *.html
|
||||||
*.pdf
|
# *.pdf
|
||||||
results/
|
results/
|
||||||
packets/binary/[0-9]*
|
packets/binary/[0-9]*
|
||||||
|
|
|
@ -10,11 +10,12 @@ INIT = (setq load-path (cons \"/usr/share/emacs/site-lisp/org-mode\" load-path)
|
||||||
#'
|
#'
|
||||||
ORG = benchmark.org
|
ORG = benchmark.org
|
||||||
|
|
||||||
html:
|
it:
|
||||||
for f in ${ORG}; do \
|
for f in ${ORG}; do \
|
||||||
emacs -Q --batch --eval \
|
emacs -Q --batch --eval \
|
||||||
"(progn ${INIT} (find-file \"$$f\") \
|
"(progn ${INIT} (find-file \"$$f\") \
|
||||||
(org-export-as-html-batch) (kill-buffer))"; \
|
(org-html-export-to-html) (kill-buffer))"; \
|
||||||
|
# (org-export-as-html-batch) (kill-buffer))";
|
||||||
done
|
done
|
||||||
|
|
||||||
pdf:
|
pdf:
|
||||||
|
|
1104
bench/benchmark.html
Normal file
1104
bench/benchmark.html
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,5 @@
|
||||||
#+TITLE: libpsyc Performance Benchmarks
|
#+TITLE: libpsyc Performance Benchmarks
|
||||||
|
#+HTML: <style type="text/css"> body { padding: 44px; } </style>
|
||||||
|
|
||||||
In this document we present the results of performance benchmarks
|
In this document we present the results of performance benchmarks
|
||||||
of libpsyc compared to json-c, libjson-glib, rapidxml and libxml2.
|
of libpsyc compared to json-c, libjson-glib, rapidxml and libxml2.
|
||||||
|
|
|
@ -101,14 +101,10 @@ psyc_text_state_init (PsycTextState *state,
|
||||||
{
|
{
|
||||||
state->cursor = 0;
|
state->cursor = 0;
|
||||||
state->written = 0;
|
state->written = 0;
|
||||||
state->tmpl = (PsycString) {
|
state->tmpl = (PsycString) { tmplen, tmpl };
|
||||||
tmplen, tmpl};
|
state->buffer = (PsycString) { buflen, buffer };
|
||||||
state->buffer = (PsycString) {
|
state->open = (PsycString) { 1, "[" };
|
||||||
buflen, buffer};
|
state->close = (PsycString) { 1, "]" };
|
||||||
state->open = (PsycString) {
|
|
||||||
1, "["};
|
|
||||||
state->close = (PsycString) {
|
|
||||||
1, "]"};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -119,28 +115,24 @@ psyc_text_state_init (PsycTextState *state,
|
||||||
* @param tmplen Length of input buffer.
|
* @param tmplen Length of input buffer.
|
||||||
* @param buffer Output buffer where the rendered text is going to be written.
|
* @param buffer Output buffer where the rendered text is going to be written.
|
||||||
* @param buflen Length of output buffer.
|
* @param buflen Length of output buffer.
|
||||||
* @param open Opening brace.
|
* @param ope Opening brace.
|
||||||
* @param openlen Length of opening brace.
|
* @param opelen Length of opening brace.
|
||||||
* @param close Closing brace.
|
* @param clo Closing brace.
|
||||||
* @param closelen Length of closing brace.
|
* @param clolen Length of closing brace.
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
psyc_text_state_init_custom (PsycTextState *state,
|
psyc_text_state_init_custom (PsycTextState *state,
|
||||||
char *tmpl, size_t tmplen,
|
char *tmpl, size_t tmplen,
|
||||||
char *buffer, size_t buflen,
|
char *buffer, size_t buflen,
|
||||||
char *open, size_t openlen,
|
char *ope, size_t opelen,
|
||||||
char *close, size_t closelen)
|
char *clo, size_t clolen)
|
||||||
{
|
{
|
||||||
state->cursor = 0;
|
state->cursor = 0;
|
||||||
state->written = 0;
|
state->written = 0;
|
||||||
state->tmpl = (PsycString) {
|
state->tmpl = (PsycString) { tmplen, tmpl };
|
||||||
tmplen, tmpl};
|
state->buffer = (PsycString) { buflen, buffer };
|
||||||
state->buffer = (PsycString) {
|
state->open = (PsycString) { opelen, ope };
|
||||||
buflen, buffer};
|
state->close = (PsycString) { clolen, clo };
|
||||||
state->open = (PsycString) {
|
|
||||||
openlen, open};
|
|
||||||
state->close = (PsycString) {
|
|
||||||
closelen, close};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
20
src/memmem.c
20
src/memmem.c
|
@ -1,23 +1,3 @@
|
||||||
/*
|
|
||||||
This file is part of libpsyc.
|
|
||||||
Copyright (C) 2011,2012 Carlo v. Loesch, Gabor X Toth, Mathias L. Baumann,
|
|
||||||
and other contributing authors.
|
|
||||||
|
|
||||||
libpsyc is free software: you can redistribute it and/or modify it under the
|
|
||||||
terms of the GNU Affero General Public License as published by the Free
|
|
||||||
Software Foundation, either version 3 of the License, or (at your option) any
|
|
||||||
later version. As a special exception, libpsyc is distributed with additional
|
|
||||||
permissions to link libpsyc libraries with non-AGPL works.
|
|
||||||
|
|
||||||
libpsyc is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
||||||
details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License and
|
|
||||||
the linking exception along with libpsyc in a COPYING file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com>
|
* Copyright (c) 2005 Pascal Gloor <pascal.gloor@spale.com>
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue