aboutsummaryrefslogtreecommitdiff
path: root/sp/src/public/tier1/strtools.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2014-05-15 13:59:18 -0700
committerJoe Ludwig <[email protected]>2014-05-15 13:59:18 -0700
commit53e78c503e6e9c7d15e2eefc480755fe37dd7077 (patch)
treec8cc106eb4c0a2b2b5d79f534f2facb0514f5f55 /sp/src/public/tier1/strtools.h
parentAdded many shader source files (diff)
downloadsource-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.tar.xz
source-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.zip
General:
* Upgraded Steamworks SDK to v1.29 * Fixed mod compatibility problem with Multiplayer Base that was introduced in September. * In Hammer, while using the Vertex Tool, pressing CTRL+B will snap selected vertices to the grid. Virtual Reality: * Mods that support virtual reality now need to have a line in gameinfo.txt that says “supportsvr 1”. This indicates to gameui and engine that certain UI should be enabled. * VR-enabled mods will now start up in VR mode when launched from Steam’s VR mode. Windows: * Upgraded to Visual Studio 2013. If you need to build projects for VS 2010, add /2010 to your VPC command line. OSX: * Upgraded to XCode 5.
Diffstat (limited to 'sp/src/public/tier1/strtools.h')
-rw-r--r--sp/src/public/tier1/strtools.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sp/src/public/tier1/strtools.h b/sp/src/public/tier1/strtools.h
index 93d0af6d..d3f1c65b 100644
--- a/sp/src/public/tier1/strtools.h
+++ b/sp/src/public/tier1/strtools.h
@@ -765,6 +765,29 @@ private:
};
+// Encodes a string (or binary data) in URL encoding format, see rfc1738 section 2.2.
+// Dest buffer should be 3 times the size of source buffer to guarantee it has room to encode.
+void Q_URLEncodeRaw( OUT_Z_CAP(nDestLen) char *pchDest, int nDestLen, const char *pchSource, int nSourceLen );
+
+// Decodes a string (or binary data) from URL encoding format, see rfc1738 section 2.2.
+// Dest buffer should be at least as large as source buffer to gurantee room for decode.
+// Dest buffer being the same as the source buffer (decode in-place) is explicitly allowed.
+//
+// Returns the amount of space actually used in the output buffer.
+size_t Q_URLDecodeRaw( OUT_CAP(nDecodeDestLen) char *pchDecodeDest, int nDecodeDestLen, const char *pchEncodedSource, int nEncodedSourceLen );
+
+// Encodes a string (or binary data) in URL encoding format, this isn't the strict rfc1738 format, but instead uses + for spaces.
+// This is for historical reasons and HTML spec foolishness that lead to + becoming a de facto standard for spaces when encoding form data.
+// Dest buffer should be 3 times the size of source buffer to guarantee it has room to encode.
+void Q_URLEncode( OUT_Z_CAP(nDestLen) char *pchDest, int nDestLen, const char *pchSource, int nSourceLen );
+
+// Decodes a string (or binary data) in URL encoding format, this isn't the strict rfc1738 format, but instead uses + for spaces.
+// This is for historical reasons and HTML spec foolishness that lead to + becoming a de facto standard for spaces when encoding form data.
+// Dest buffer should be at least as large as source buffer to gurantee room for decode.
+// Dest buffer being the same as the source buffer (decode in-place) is explicitly allowed.
+//
+// Returns the amount of space actually used in the output buffer.
+size_t Q_URLDecode( OUT_CAP(nDecodeDestLen) char *pchDecodeDest, int nDecodeDestLen, const char *pchEncodedSource, int nEncodedSourceLen );
// NOTE: This is for backward compatability!