summaryrefslogtreecommitdiff
path: root/src/UriCommon.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2026-05-08 11:53:45 +0200
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2026-05-08 11:53:45 +0200
commitc3dce46c5f7cad6bc3cc91cc2c711ac089f25923 (patch)
treeabaac2b003b368aa5bde30a5b898a3f51e85db43 /src/UriCommon.h
parentbc983f30186f3c204b1daea57b0057f93b74dde1 (diff)
New upstream version 1.0.1+dfsgupstream/1.0.1+dfsgupstream
Diffstat (limited to 'src/UriCommon.h')
-rw-r--r--src/UriCommon.h88
1 files changed, 45 insertions, 43 deletions
diff --git a/src/UriCommon.h b/src/UriCommon.h
index 42311dd..d141935 100644
--- a/src/UriCommon.h
+++ b/src/UriCommon.h
@@ -38,35 +38,34 @@
*/
#if (defined(URI_PASS_ANSI) && !defined(URI_COMMON_H_ANSI)) \
- || (defined(URI_PASS_UNICODE) && !defined(URI_COMMON_H_UNICODE)) \
- || (!defined(URI_PASS_ANSI) && !defined(URI_PASS_UNICODE))
+ || (defined(URI_PASS_UNICODE) && !defined(URI_COMMON_H_UNICODE)) \
+ || (!defined(URI_PASS_ANSI) && !defined(URI_PASS_UNICODE))
/* What encodings are enabled? */
-#include <uriparser/UriDefsConfig.h>
-#if (!defined(URI_PASS_ANSI) && !defined(URI_PASS_UNICODE))
+# include <uriparser/UriDefsConfig.h>
+# if (!defined(URI_PASS_ANSI) && !defined(URI_PASS_UNICODE))
/* Include SELF twice */
-# ifdef URI_ENABLE_ANSI
-# define URI_PASS_ANSI 1
-# include "UriCommon.h"
-# undef URI_PASS_ANSI
-# endif
-# ifdef URI_ENABLE_UNICODE
-# define URI_PASS_UNICODE 1
-# include "UriCommon.h"
-# undef URI_PASS_UNICODE
-# endif
+# ifdef URI_ENABLE_ANSI
+# define URI_PASS_ANSI 1
+# include "UriCommon.h"
+# undef URI_PASS_ANSI
+# endif
+# ifdef URI_ENABLE_UNICODE
+# define URI_PASS_UNICODE 1
+# include "UriCommon.h"
+# undef URI_PASS_UNICODE
+# endif
/* Only one pass for each encoding */
-#elif (defined(URI_PASS_ANSI) && !defined(URI_COMMON_H_ANSI) \
- && defined(URI_ENABLE_ANSI)) || (defined(URI_PASS_UNICODE) \
- && !defined(URI_COMMON_H_UNICODE) && defined(URI_ENABLE_UNICODE))
-# ifdef URI_PASS_ANSI
-# define URI_COMMON_H_ANSI 1
-# include <uriparser/UriDefsAnsi.h>
-# else
-# define URI_COMMON_H_UNICODE 1
-# include <uriparser/UriDefsUnicode.h>
-# endif
-
-
+# elif (defined(URI_PASS_ANSI) && !defined(URI_COMMON_H_ANSI) \
+ && defined(URI_ENABLE_ANSI)) \
+ || (defined(URI_PASS_UNICODE) && !defined(URI_COMMON_H_UNICODE) \
+ && defined(URI_ENABLE_UNICODE))
+# ifdef URI_PASS_ANSI
+# define URI_COMMON_H_ANSI 1
+# include <uriparser/UriDefsAnsi.h>
+# else
+# define URI_COMMON_H_UNICODE 1
+# include <uriparser/UriDefsUnicode.h>
+# endif
/* Used to point to from empty path segments.
* X.first and X.afterLast must be the same non-NULL value then. */
@@ -74,34 +73,37 @@ extern const URI_CHAR * const URI_FUNC(SafeToPointTo);
extern const URI_CHAR * const URI_FUNC(ConstPwd);
extern const URI_CHAR * const URI_FUNC(ConstParent);
+void URI_FUNC(ResetUri)(URI_TYPE(Uri) * uri);
+int URI_FUNC(FreeUriPath)(URI_TYPE(Uri) * uri, UriMemoryManager * memory);
-void URI_FUNC(ResetUri)(URI_TYPE(Uri) * uri);
+int URI_FUNC(CompareRange)(const URI_TYPE(TextRange) * a, const URI_TYPE(TextRange) * b);
-int URI_FUNC(CompareRange)(
- const URI_TYPE(TextRange) * a,
- const URI_TYPE(TextRange) * b);
+UriBool URI_FUNC(CopyRange)(URI_TYPE(TextRange) * destRange,
+ const URI_TYPE(TextRange) * sourceRange,
+ UriMemoryManager * memory);
+UriBool URI_FUNC(CopyRangeAsNeeded)(URI_TYPE(TextRange) * destRange,
+ const URI_TYPE(TextRange) * sourceRange,
+ UriMemoryManager * memory);
UriBool URI_FUNC(RemoveDotSegmentsAbsolute)(URI_TYPE(Uri) * uri,
- UriMemoryManager * memory);
-UriBool URI_FUNC(RemoveDotSegmentsEx)(URI_TYPE(Uri) * uri,
- UriBool relative, UriBool pathOwned, UriMemoryManager * memory);
+ UriMemoryManager * memory);
+UriBool URI_FUNC(RemoveDotSegmentsEx)(URI_TYPE(Uri) * uri, UriBool relative,
+ UriBool pathOwned, UriMemoryManager * memory);
unsigned char URI_FUNC(HexdigToInt)(URI_CHAR hexdig);
-URI_CHAR URI_FUNC(HexToLetter)(unsigned int value);
URI_CHAR URI_FUNC(HexToLetterEx)(unsigned int value, UriBool uppercase);
-UriBool URI_FUNC(IsHostSet)(const URI_TYPE(Uri) * uri);
-
UriBool URI_FUNC(CopyPath)(URI_TYPE(Uri) * dest, const URI_TYPE(Uri) * source,
- UriMemoryManager * memory);
-UriBool URI_FUNC(CopyAuthority)(URI_TYPE(Uri) * dest,
- const URI_TYPE(Uri) * source, UriMemoryManager * memory);
+ UriMemoryManager * memory);
+UriBool URI_FUNC(CopyAuthority)(URI_TYPE(Uri) * dest, const URI_TYPE(Uri) * source,
+ UriMemoryManager * memory);
UriBool URI_FUNC(FixAmbiguity)(URI_TYPE(Uri) * uri, UriMemoryManager * memory);
-void URI_FUNC(FixEmptyTrailSegment)(URI_TYPE(Uri) * uri,
- UriMemoryManager * memory);
-
+UriBool URI_FUNC(FixPathNoScheme)(URI_TYPE(Uri) * uri, UriMemoryManager * memory);
+UriBool URI_FUNC(EnsureThatPathIsNotMistakenForHost)(URI_TYPE(Uri) * uri,
+ UriMemoryManager * memory);
+void URI_FUNC(FixEmptyTrailSegment)(URI_TYPE(Uri) * uri, UriMemoryManager * memory);
-#endif
+# endif
#endif