diff options
author | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-11-16 07:16:51 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-11-16 07:16:51 +0100 |
commit | cd9c1ea3e9c54da1a211563736d6f84664058da8 (patch) | |
tree | f1d883b562a669deb6bfd59b4de27bfaaa63d8a5 /doc | |
parent | 71a38df59b7b10358477073c9bc053055aa394ce (diff) | |
parent | 5ef83547e904e4d411239ea0a27571e7d1a0b5b4 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Mainpage.txt | 58 | ||||
-rw-r--r-- | doc/Makefile.in | 6 |
2 files changed, 19 insertions, 45 deletions
diff --git a/doc/Mainpage.txt b/doc/Mainpage.txt index 173511b..bb5723c 100644 --- a/doc/Mainpage.txt +++ b/doc/Mainpage.txt @@ -27,50 +27,24 @@ * Parsing a URI with uriparser looks like this: * * @code - * UriParserStateA state; * UriUriA uri; + * const char * const uriString = "file:///home/user/song.mp3"; + * const char * errorPos; * - * state.uri = &uri; - * if (uriParseUriA(&state, "file:///home/user/song.mp3") != URI_SUCCESS) { - * /COMMENT_HACK* Failure *COMMENT_HACK/ - * uriFreeUriMembersA(&uri); + * if (uriParseSingleUriA(&uri, uriString, &errorPos) != URI_SUCCESS) { + * /COMMENT_HACK* Failure (no need to call uriFreeUriMembersA) *COMMENT_HACK/ * ... + * return ...; * } + * + * /COMMENT_HACK* Success *COMMENT_HACK/ * ... * uriFreeUriMembersA(&uri); * @endcode * * While the URI object (::UriUriA) holds information about the recognized - * parts of the given URI string, the parser state object (::UriParserStateA) - * keeps error code and position. This information does not belong to - * the URI itself, which is why there are two separate objects. - * - * You can reuse parser state objects for parsing several URIs like this: - * - * @code - * UriParserStateA state; - * UriUriA uriOne; - * UriUriA uriTwo; - * - * state.uri = &uriOne; - * if (uriParseUriA(&state, "file:///home/user/one") != URI_SUCCESS) { - * /COMMENT_HACK* Failure *COMMENT_HACK/ - * uriFreeUriMembersA(&uriOne); - * ... - * } - * ... - * state.uri = &uriTwo; - * if (uriParseUriA(&state, "file:///home/user/two") != URI_SUCCESS) { - * /COMMENT_HACK* Failure *COMMENT_HACK/ - * uriFreeUriMembersA(&uriOne); - * uriFreeUriMembersA(&uriTwo); - * ... - * } - * ... - * uriFreeUriMembersA(&uriOne); - * uriFreeUriMembersA(&uriTwo); - * @endcode - * + * parts of the given URI string, in case of <c>URI_ERROR_SYNTAX</c>, + * <c>errorPos</c> points to the first character starting invalid syntax. * * @subsection recomposition Recomposing URIs (from object back to string) * According to <a href="http://tools.ietf.org/html/rfc3986#section-5.3" target="_blank">RFC 3986</a> @@ -311,8 +285,8 @@ * uriparser comes with two versions of every structure and function: * one handling Ansi text (char *) and one working with Unicode text (wchar_t *), * for instance - * - uriParseUriA() for Ansi and - * - uriParseUriW() for Unicode. + * - uriParseSingleUriA() for Ansi and + * - uriParseSingleUriW() for Unicode. * * This tutorial only shows the usage of the Ansi editions but * their Unicode counterparts work in the very same way. @@ -322,18 +296,18 @@ * You can use the code below to make <c>./configure</c> test for presence * of uriparser 0.6.4 or later. * - *<div class="fragment"><pre class="fragment">URIPARSER_MISSING=<span class="stringliteral">"Please install uriparser 0.6.4 or later. + *<div class="fragment"><pre class="fragment">URIPARSER_MISSING=<span class="stringliteral">"Please install uriparser 0.9.0 or later. * On a Debian-based system enter 'sudo apt-get install liburiparser-dev'."</span> - *AC_CHECK_LIB(uriparser, uriParseUriA,, AC_MSG_ERROR(${URIPARSER_MISSING})) + *AC_CHECK_LIB(uriparser, uriParseSingleUriA,, AC_MSG_ERROR(${URIPARSER_MISSING})) *AC_CHECK_HEADER(uriparser/Uri.h,, AC_MSG_ERROR(${URIPARSER_MISSING})) *<b></b> - *URIPARSER_TOO_OLD=<span class="stringliteral">"uriparser 0.6.4 or later is required, your copy is too old."</span> + *URIPARSER_TOO_OLD=<span class="stringliteral">"uriparser 0.9.0 or later is required, your copy is too old."</span> *AC_COMPILE_IFELSE([ *<span class="preprocessor">\#include <uriparser/Uri.h> *\#if (defined(URI_VER_MAJOR) && defined(URI_VER_MINOR) && defined(URI_VER_RELEASE) \\<b></b> *&& ((URI_VER_MAJOR > 0) \\<b></b> - *|| ((URI_VER_MAJOR == 0) && (URI_VER_MINOR > 6)) \\<b></b> - *|| ((URI_VER_MAJOR == 0) && (URI_VER_MINOR == 6) && (URI_VER_RELEASE >= 4)) \\<b></b> + *|| ((URI_VER_MAJOR == 0) && (URI_VER_MINOR > 9)) \\<b></b> + *|| ((URI_VER_MAJOR == 0) && (URI_VER_MINOR == 9) && (URI_VER_RELEASE >= 0)) \\<b></b> *))</span> *<span class="comment"><b></b>/<b></b>* FINE *<b></b>/</span> *<span class="preprocessor">\#else diff --git a/doc/Makefile.in b/doc/Makefile.in index b8bbff5..801fbe3 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -97,7 +97,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/test/config.h +CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = Doxyfile release.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) @@ -136,8 +136,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CPPTEST_CFLAGS = @CPPTEST_CFLAGS@ -CPPTEST_LIBS = @CPPTEST_LIBS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -158,6 +156,8 @@ FGREP = @FGREP@ GENERATE_HTMLHELP = @GENERATE_HTMLHELP@ GRAPHVIZ_CHECK = @GRAPHVIZ_CHECK@ GREP = @GREP@ +GTEST_CFLAGS = @GTEST_CFLAGS@ +GTEST_LIBS = @GTEST_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ |