Bug 519843 - better behavior of js shell under Windows Mobile (no TTY), r=mrbkap

This commit is contained in:
Brian Crowder 2009-10-20 12:11:51 -07:00
parent 1e4ad3b192
commit b9e81a1582

View File

@ -381,6 +381,10 @@ SetContextOptions(JSContext *cx)
JS_SetOperationCallback(cx, ShellOperationCallback);
}
#ifdef WINCE
int errno;
#endif
static void
Process(JSContext *cx, JSObject *obj, char *filename, JSBool forceTTY)
{
@ -411,7 +415,9 @@ Process(JSContext *cx, JSObject *obj, char *filename, JSBool forceTTY)
#ifndef WINCE
/* windows mobile (and possibly other os's) does not have a TTY */
if (!forceTTY && !isatty(fileno(file))) {
if (!forceTTY && !isatty(fileno(file)))
#endif
{
/*
* It's not interactive - just execute it.
*
@ -443,7 +449,6 @@ Process(JSContext *cx, JSObject *obj, char *filename, JSBool forceTTY)
fclose(file);
return;
}
#endif /* WINCE */
/* It's an interactive filehandle; drop into read-eval-print loop. */
lineno = 1;