зеркало из https://github.com/mozilla/gecko-dev.git
moved initConsole() out to :: namespace.
This commit is contained in:
Родитель
a45402c371
Коммит
cbc85867b4
|
@ -27,35 +27,35 @@
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
#include "interpreter.h"
|
#include "interpreter.h"
|
||||||
|
|
||||||
namespace JavaScript {
|
|
||||||
namespace Shell {
|
|
||||||
using namespace Interpreter;
|
|
||||||
|
|
||||||
#if defined(XP_MAC) && !defined(XP_MAC_MPW)
|
#if defined(XP_MAC) && !defined(XP_MAC_MPW)
|
||||||
#include <SIOUX.h>
|
#include <SIOUX.h>
|
||||||
#include <MacTypes.h>
|
#include <MacTypes.h>
|
||||||
|
|
||||||
static char *mac_argv[] = {"js2", 0};
|
static char *mac_argv[] = {"js2", 0};
|
||||||
|
|
||||||
static void initConsole(StringPtr consoleName,
|
|
||||||
const char* startupMessage,
|
|
||||||
int &argc, char **&argv)
|
|
||||||
{
|
|
||||||
SIOUXSettings.autocloseonquit = false;
|
|
||||||
SIOUXSettings.asktosaveonclose = false;
|
|
||||||
SIOUXSetTitle(consoleName);
|
|
||||||
|
|
||||||
// Set up a buffer for stderr (otherwise it's a pig).
|
|
||||||
static char buffer[BUFSIZ];
|
|
||||||
setvbuf(stderr, buffer, _IOLBF, BUFSIZ);
|
|
||||||
|
|
||||||
stdOut << startupMessage;
|
static void initConsole(StringPtr consoleName,
|
||||||
|
const char* startupMessage,
|
||||||
|
int &argc, char **&argv)
|
||||||
|
{
|
||||||
|
SIOUXSettings.autocloseonquit = false;
|
||||||
|
SIOUXSettings.asktosaveonclose = false;
|
||||||
|
SIOUXSetTitle(consoleName);
|
||||||
|
|
||||||
argc = 1;
|
// Set up a buffer for stderr (otherwise it's a pig).
|
||||||
argv = mac_argv;
|
static char buffer[BUFSIZ];
|
||||||
}
|
setvbuf(stderr, buffer, _IOLBF, BUFSIZ);
|
||||||
|
|
||||||
|
JavaScript::stdOut << startupMessage;
|
||||||
|
|
||||||
|
argc = 1;
|
||||||
|
argv = mac_argv;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace JavaScript {
|
||||||
|
namespace Shell {
|
||||||
|
using namespace Interpreter;
|
||||||
|
|
||||||
// Interactively read a line from the input stream in and put it into
|
// Interactively read a line from the input stream in and put it into
|
||||||
// s Return false if reached the end of input before reading anything.
|
// s Return false if reached the end of input before reading anything.
|
||||||
|
|
|
@ -27,35 +27,35 @@
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
#include "interpreter.h"
|
#include "interpreter.h"
|
||||||
|
|
||||||
namespace JavaScript {
|
|
||||||
namespace Shell {
|
|
||||||
using namespace Interpreter;
|
|
||||||
|
|
||||||
#if defined(XP_MAC) && !defined(XP_MAC_MPW)
|
#if defined(XP_MAC) && !defined(XP_MAC_MPW)
|
||||||
#include <SIOUX.h>
|
#include <SIOUX.h>
|
||||||
#include <MacTypes.h>
|
#include <MacTypes.h>
|
||||||
|
|
||||||
static char *mac_argv[] = {"js2", 0};
|
static char *mac_argv[] = {"js2", 0};
|
||||||
|
|
||||||
static void initConsole(StringPtr consoleName,
|
|
||||||
const char* startupMessage,
|
|
||||||
int &argc, char **&argv)
|
|
||||||
{
|
|
||||||
SIOUXSettings.autocloseonquit = false;
|
|
||||||
SIOUXSettings.asktosaveonclose = false;
|
|
||||||
SIOUXSetTitle(consoleName);
|
|
||||||
|
|
||||||
// Set up a buffer for stderr (otherwise it's a pig).
|
|
||||||
static char buffer[BUFSIZ];
|
|
||||||
setvbuf(stderr, buffer, _IOLBF, BUFSIZ);
|
|
||||||
|
|
||||||
stdOut << startupMessage;
|
static void initConsole(StringPtr consoleName,
|
||||||
|
const char* startupMessage,
|
||||||
|
int &argc, char **&argv)
|
||||||
|
{
|
||||||
|
SIOUXSettings.autocloseonquit = false;
|
||||||
|
SIOUXSettings.asktosaveonclose = false;
|
||||||
|
SIOUXSetTitle(consoleName);
|
||||||
|
|
||||||
argc = 1;
|
// Set up a buffer for stderr (otherwise it's a pig).
|
||||||
argv = mac_argv;
|
static char buffer[BUFSIZ];
|
||||||
}
|
setvbuf(stderr, buffer, _IOLBF, BUFSIZ);
|
||||||
|
|
||||||
|
JavaScript::stdOut << startupMessage;
|
||||||
|
|
||||||
|
argc = 1;
|
||||||
|
argv = mac_argv;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace JavaScript {
|
||||||
|
namespace Shell {
|
||||||
|
using namespace Interpreter;
|
||||||
|
|
||||||
// Interactively read a line from the input stream in and put it into
|
// Interactively read a line from the input stream in and put it into
|
||||||
// s Return false if reached the end of input before reading anything.
|
// s Return false if reached the end of input before reading anything.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче