diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-24 22:35:50 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-06-24 22:35:50 +0000 |
commit | 1c910fb89ee11f47c3ab22e3e6c66546accabc86 (patch) | |
tree | 33268af723c62c642cd287f644d67e108f5dd6fc /decoder/fdict.cc | |
parent | 4cea650dce26e983c310aee5e50ce0987b1c26fc (diff) |
build on cygwin
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@23 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/fdict.cc')
-rw-r--r-- | decoder/fdict.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/decoder/fdict.cc b/decoder/fdict.cc index 7e1b0e1f..da80c260 100644 --- a/decoder/fdict.cc +++ b/decoder/fdict.cc @@ -1,5 +1,6 @@ #include "fdict.h" - +#include "stdlib.h" +//for malloc (need on cygwin); todo <cstdlib> and std::malloc #include <string> using namespace std; @@ -59,10 +60,10 @@ int UrlDecode(const char *source, char *dest) } source++; } - + *dest = 0; return dest - start; -} +} int UrlEncode(const char *source, char *dest, unsigned max) { static const char *digits = "0123456789ABCDEF"; @@ -83,7 +84,7 @@ int UrlEncode(const char *source, char *dest, unsigned max) { } else { *dest++ = *source; - } + } source++; } *dest = 0; |