# HG changeset patch # User Tony Theodore # Date 1334583506 -36000 # Node ID 7ddb24a19c22b5505cc7af1d61c5e661259cf6be # Parent cbcb88df00f677827832f027ab83e216bd3d12a7# Parent d84bf9fcb3687a63e08ae0274d28e0cba2f3aedb Merge branch 'master' of github.com:mxe/mxe diff -r cbcb88df00f6 -r 7ddb24a19c22 .gitignore --- a/.gitignore Mon Apr 16 22:26:19 2012 +1000 +++ b/.gitignore Mon Apr 16 23:38:26 2012 +1000 @@ -1,5 +1,4 @@ -usr/ -log/ -pkg -dist/ -wip/ +/usr/ +/log/ +/pkg +/wip/ diff -r cbcb88df00f6 -r 7ddb24a19c22 Makefile --- a/Makefile Mon Apr 16 22:26:19 2012 +1000 +++ b/Makefile Mon Apr 16 23:38:26 2012 +1000 @@ -23,7 +23,6 @@ LOG_DIR := $(PWD)/log TIMESTAMP := $(shell date +%Y%m%d_%H%M%S) PKG_DIR := $(PWD)/pkg -DIST_DIR := $(PWD)/dist TMP_DIR = $(PWD)/tmp-$(1) MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE))) diff -r cbcb88df00f6 -r 7ddb24a19c22 src/hunspell-test.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hunspell-test.cpp Mon Apr 16 23:38:26 2012 +1000 @@ -0,0 +1,37 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include +#include +#include + +int main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + + std::ofstream dic ("hunspell-test.dic"); + dic << "2\nHello\nWorld"; + dic.close(); + std::ofstream aff ("hunspell-test.aff"); + aff << "SET UTF-8\nTRY loredWH\nMAXDIFF 1"; + aff.close(); + Hunspell h("hunspell-test.aff", "hunspell-test.dic"); + + if (h.spell("Hello") == 0) + { + std::cerr << "Error: hunspell marked correct word as wrong" << std::endl; + } + if (h.spell("wrld") != 0) + { + std::cerr << "Error: hunspell marked wrong word as correct" << std::endl; + } + + char ** result; + int n = h.suggest(&result, "ell"); + for (int i = 0; i < n; i++) std::cout << result[i]; + + return 0; +} diff -r cbcb88df00f6 -r 7ddb24a19c22 src/hunspell-test.cxx --- a/src/hunspell-test.cxx Mon Apr 16 22:26:19 2012 +1000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * This file is part of MXE. - * See index.html for further information. - */ - -#include -#include -#include - -int main(int argc, char *argv[]) -{ - (void)argc; - (void)argv; - - std::ofstream dic ("hunspell-test.dic"); - dic << "2\nHello\nWorld"; - dic.close(); - std::ofstream aff ("hunspell-test.aff"); - aff << "SET UTF-8\nTRY loredWH\nMAXDIFF 1"; - aff.close(); - Hunspell h("hunspell-test.aff", "hunspell-test.dic"); - - if (h.spell("Hello") == 0) - { - std::cerr << "Error: hunspell marked correct word as wrong" << std::endl; - } - if (h.spell("wrld") != 0) - { - std::cerr << "Error: hunspell marked wrong word as correct" << std::endl; - } - - char ** result; - int n = h.suggest(&result, "ell"); - for (int i = 0; i < n; i++) std::cout << result[i]; - - return 0; -} diff -r cbcb88df00f6 -r 7ddb24a19c22 src/hunspell.mk --- a/src/hunspell.mk Mon Apr 16 22:26:19 2012 +1000 +++ b/src/hunspell.mk Mon Apr 16 23:38:26 2012 +1000 @@ -31,6 +31,6 @@ # Test '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).cxx' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \ + '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \ `'$(TARGET)-pkg-config' hunspell --cflags --libs` endef