Use FILE* instead of istream& for better line handling

This commit is contained in:
beard%netscape.com 2000-05-05 04:43:12 +00:00
parent a411cb913d
commit efc76ad32c
2 changed files with 6 additions and 8 deletions

View File

@ -39,13 +39,12 @@
#include "utilities.h" #include "utilities.h"
#include "interpreter.h" #include "interpreter.h"
#include <iosfwd> #include <stdio.h>
namespace JavaScript { namespace JavaScript {
namespace Debugger { namespace Debugger {
using namespace Interpreter; using namespace Interpreter;
using std::istream;
class Breakpoint { class Breakpoint {
public: public:
@ -115,7 +114,7 @@ namespace Debugger {
class Shell : public Context::Listener { class Shell : public Context::Listener {
public: public:
Shell (World &aWorld, istream &aIn, Formatter &aOut, Formatter &aErr) : Shell (World &aWorld, FILE *aIn, Formatter &aOut, Formatter &aErr) :
mWorld(aWorld), mIn(aIn), mOut(aOut), mErr(aErr), mWorld(aWorld), mIn(aIn), mOut(aOut), mErr(aErr),
mStopMask(IS_ALL), mTraceFlag(true) mStopMask(IS_ALL), mTraceFlag(true)
{ {
@ -153,7 +152,7 @@ namespace Debugger {
void doPrint (Context *cx, Lexer &lex); void doPrint (Context *cx, Lexer &lex);
World &mWorld; World &mWorld;
istream &mIn; FILE *mIn;
Formatter &mOut, &mErr; Formatter &mOut, &mErr;
ICodeDebugger *mDebugger; ICodeDebugger *mDebugger;
uint32 mStopMask; uint32 mStopMask;

View File

@ -39,13 +39,12 @@
#include "utilities.h" #include "utilities.h"
#include "interpreter.h" #include "interpreter.h"
#include <iosfwd> #include <stdio.h>
namespace JavaScript { namespace JavaScript {
namespace Debugger { namespace Debugger {
using namespace Interpreter; using namespace Interpreter;
using std::istream;
class Breakpoint { class Breakpoint {
public: public:
@ -115,7 +114,7 @@ namespace Debugger {
class Shell : public Context::Listener { class Shell : public Context::Listener {
public: public:
Shell (World &aWorld, istream &aIn, Formatter &aOut, Formatter &aErr) : Shell (World &aWorld, FILE *aIn, Formatter &aOut, Formatter &aErr) :
mWorld(aWorld), mIn(aIn), mOut(aOut), mErr(aErr), mWorld(aWorld), mIn(aIn), mOut(aOut), mErr(aErr),
mStopMask(IS_ALL), mTraceFlag(true) mStopMask(IS_ALL), mTraceFlag(true)
{ {
@ -153,7 +152,7 @@ namespace Debugger {
void doPrint (Context *cx, Lexer &lex); void doPrint (Context *cx, Lexer &lex);
World &mWorld; World &mWorld;
istream &mIn; FILE *mIn;
Formatter &mOut, &mErr; Formatter &mOut, &mErr;
ICodeDebugger *mDebugger; ICodeDebugger *mDebugger;
uint32 mStopMask; uint32 mStopMask;