Reactivate examples that can build on windows

This is proof that Hammer can be linked and used in a windows
program!
This commit is contained in:
Nicolas Léveillé 2016-01-31 18:11:27 +01:00
parent 9a7752b9a6
commit f9d8f1df7f
2 changed files with 5 additions and 5 deletions

View file

@ -14,6 +14,5 @@ build_script:
}
- call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM%
- call tools\windows\build.bat
# FIXME(windows) TODO(uucidl): reactivate examples
# - call tools\windows\build_examples.bat
- call tools\windows\build_examples.bat
- exit /b 0

View file

@ -22,11 +22,12 @@
const char *nonterminal_name(const HCFGrammar *g, const HCFChoice *nt) {
// if user_data exists and is printable:
if(nt->user_data != NULL && *(char*)(nt->user_data) > ' ' && *(char*)(nt->user_data) < 127) {
if(*(char*)(nt->user_data) != '0') {
char* user_str = (char*)(nt->user_data);
if(*user_str != '\0') {
// user_data is a non-empty string
return nt->user_data;
return user_str;
} else {
return nt->user_data+1;
return user_str+1;
}
}