Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
Diff: core/http/NyLPC_cUrlReader.c
- Revision:
- 17:f29e1ca90e3d
- Parent:
- 16:5aacf74ae574
- Child:
- 109:18f12ac01097
--- a/core/http/NyLPC_cUrlReader.c Thu Apr 25 04:11:53 2013 +0000 +++ b/core/http/NyLPC_cUrlReader.c Fri Apr 26 05:26:34 2013 +0000 @@ -1,6 +1,15 @@ #include "NyLPC_cUrlReader.h" #include "NyLPC_utils.h" #include <ctype.h> +NyLPC_TBool NyLPC_cUrlReader_getPath(const NyLPC_TChar* i_src,const NyLPC_TChar** path,NyLPC_TInt32* path_len) +{ + const NyLPC_TChar* p=i_src; + for(;strchr("?#\0",*p)==NULL;p++); + *path=i_src; + *path_len=p-i_src; + return NyLPC_TBool_TRUE; +} + /** * 指定したURLクエリキーの値を探します。 * @return @@ -12,18 +21,19 @@ { const NyLPC_TChar* p=i_src; const NyLPC_TChar* k; - NyLPC_TInt32 kn; + NyLPC_TInt32 kn,kl; //?検索 for(;*p!='\0' && *p!='?';p++); if(*p!='?'){ return NULL; } p++; + kl=strlen(i_key_name); //search key value for(;;){ //word検索(alnum_-のみ) kn=NyLPC_cFormatTextReader_readWord(p,&k); - if(strncmp(k,i_key_name,kn)==0){ + if(strncmp(i_key_name,k,kl)==0){ break; } p+=kn;