Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorYury Melnichek <melnichek@gmail.com>2013-03-23 20:27:26 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:52:09 +0300
commit5366473097864d3b241d8c277ed87993fa35827f (patch)
treef393dde676560dd6e632e79415f18eca54ee3003 /api
parentef08ddd1f355232e183b3d6cf42246e2cb3dfad2 (diff)
[api] More code review fixes.
Diffstat (limited to 'api')
-rw-r--r--api/src/c/api-client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/api/src/c/api-client.c b/api/src/c/api-client.c
index 701420a953..4c7c398efe 100644
--- a/api/src/c/api-client.c
+++ b/api/src/c/api-client.c
@@ -84,7 +84,9 @@ void MapsWithMe_TransformName(char * s)
}
}
-// URL Encoding.
+// URL Encode string s.
+// Allocates memory that should be freed.
+// Returns the lenghts of the resulting string in bytes including terminating 0.
// URL restricted / unsafe / unwise characters are %-encoded.
// See rfc3986, rfc1738, rfc2396.
int MapsWithMe_UrlEncodeString(char const * s, int size, char ** res)
@@ -141,6 +143,7 @@ int MapsWithMe_UrlEncodeString(char const * s, int size, char ** res)
return out - *res - 1;
}
+// Append s to buf (is there is space). Increment *bytesAppended by size.
void MapsWithMe_AppendString(char * buf, int bufSize, int * bytesAppended, char const * s, int size)
{
int const bytesAvailable = bufSize - *bytesAppended;
@@ -152,8 +155,6 @@ void MapsWithMe_AppendString(char * buf, int bufSize, int * bytesAppended, char
int MapsWithMe_GenShortShowMapUrl(double lat, double lon, double zoom, char const * name, char * buf, int bufSize)
{
- // @TODO: Implement MapsWithMe_GenShortShowMapUrl().
-
// URL format:
//
// +------------------ 1 byte: zoom level