From 5d661b49dab6e0e3620efbd4e45a2ed53d04232c Mon Sep 17 00:00:00 2001 From: graehl Date: Thu, 24 Jun 2010 22:35:50 +0000 Subject: build on cygwin git-svn-id: https://ws10smt.googlecode.com/svn/trunk@23 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/fdict.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'decoder/fdict.cc') 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 and std::malloc #include 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; -- cgit v1.2.3