Merge pull request #581 from michal037/michal037

Small improvements
This commit is contained in:
Bob Nystrom
2018-07-13 06:53:34 -07:00
committed by GitHub
4 changed files with 13 additions and 2 deletions

View File

@ -21,3 +21,4 @@ Max Ferguson <maxxferguson@gmail.com>
Sven Bergström <sven@underscorediscovery.com>
Kyle Charters <kylewcharters@gmail.com>
Marshall Bowers <elliott.codes@gmail.com>
Michal Kozakiewicz <michalkozakiewicz3@gmail.com>

View File

@ -16,11 +16,21 @@
#include <sys\stat.h>
// Map to Windows permission flags.
#ifndef S_IRUSR
#define S_IRUSR _S_IREAD
#endif
#ifndef S_IWUSR
#define S_IWUSR _S_IWRITE
#endif
#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
// Not supported on Windows.
#define O_SYNC 0

View File

@ -73,7 +73,7 @@ class Repl {
insertChar(byte)
} else {
// TODO: Other shortcuts?
System.print("Unhandled byte: %(byte)")
System.print("Unhandled key-code [dec]: %(byte)")
}
return false

View File

@ -75,7 +75,7 @@ static const char* replModuleSource =
" insertChar(byte)\n"
" } else {\n"
" // TODO: Other shortcuts?\n"
" System.print(\"Unhandled byte: %(byte)\")\n"
" System.print(\"Unhandled key-code [dec]: %(byte)\")\n"
" }\n"
"\n"
" return false\n"