interim commit
This commit is contained in:
parent
3fc663609e
commit
8059913da3
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: Awk.hpp 248 2009-08-06 08:27:14Z hyunghwan.chung $
|
* $Id: Awk.hpp 249 2009-08-07 13:35:24Z hyunghwan.chung $
|
||||||
*
|
*
|
||||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||||
|
|
||||||
@ -275,14 +275,18 @@ public:
|
|||||||
* The Awk::Source::Data class is used to deliver information
|
* The Awk::Source::Data class is used to deliver information
|
||||||
* needed for source script I/O.
|
* needed for source script I/O.
|
||||||
*/
|
*/
|
||||||
class Data
|
class Data: protected qse_awk_sio_arg_t
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
friend class Awk;
|
friend class Awk;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Data (Awk* awk, Mode mode):
|
Data (Awk* awk, Mode mode):
|
||||||
awk (awk), mode (mode), handle (QSE_NULL) {}
|
awk (awk), mode (mode)
|
||||||
|
{
|
||||||
|
this->name = QSE_NULL;
|
||||||
|
this->handle = QSE_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Mode getMode() const
|
Mode getMode() const
|
||||||
@ -290,9 +294,14 @@ public:
|
|||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char_t* getName() const
|
||||||
|
{
|
||||||
|
return this->name;
|
||||||
|
}
|
||||||
|
|
||||||
const void* getHandle () const
|
const void* getHandle () const
|
||||||
{
|
{
|
||||||
return handle;
|
return this->handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setHandle (void* handle)
|
void setHandle (void* handle)
|
||||||
@ -313,7 +322,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
Awk* awk;
|
Awk* awk;
|
||||||
Mode mode;
|
Mode mode;
|
||||||
void* handle;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Source () {}
|
Source () {}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: awk.h 248 2009-08-06 08:27:14Z hyunghwan.chung $
|
* $Id: awk.h 249 2009-08-07 13:35:24Z hyunghwan.chung $
|
||||||
*
|
*
|
||||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||||
|
|
||||||
@ -286,6 +286,7 @@ struct qse_awk_sio_arg_t
|
|||||||
|
|
||||||
qse_size_t lin;
|
qse_size_t lin;
|
||||||
qse_size_t col;
|
qse_size_t col;
|
||||||
|
|
||||||
struct qse_awk_sio_arg_t* next;
|
struct qse_awk_sio_arg_t* next;
|
||||||
};
|
};
|
||||||
typedef struct qse_awk_sio_arg_t qse_awk_sio_arg_t;
|
typedef struct qse_awk_sio_arg_t qse_awk_sio_arg_t;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: Awk.cpp 246 2009-07-27 02:31:58Z hyunghwan.chung $
|
* $Id: Awk.cpp 249 2009-08-07 13:35:24Z hyunghwan.chung $
|
||||||
*
|
*
|
||||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||||
|
|
||||||
@ -1612,6 +1612,7 @@ Awk::ssize_t Awk::readSource (
|
|||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case QSE_AWK_SIO_OPEN:
|
case QSE_AWK_SIO_OPEN:
|
||||||
|
xtn->awk->sourceIn.name = arg->name;
|
||||||
return xtn->awk->sourceReader->open (xtn->awk->sourceIn);
|
return xtn->awk->sourceReader->open (xtn->awk->sourceIn);
|
||||||
case QSE_AWK_SIO_CLOSE:
|
case QSE_AWK_SIO_CLOSE:
|
||||||
return xtn->awk->sourceReader->close (xtn->awk->sourceIn);
|
return xtn->awk->sourceReader->close (xtn->awk->sourceIn);
|
||||||
@ -1631,6 +1632,7 @@ Awk::ssize_t Awk::writeSource (
|
|||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case QSE_AWK_SIO_OPEN:
|
case QSE_AWK_SIO_OPEN:
|
||||||
|
xtn->awk->sourceOut.name = arg->name;
|
||||||
return xtn->awk->sourceWriter->open (xtn->awk->sourceOut);
|
return xtn->awk->sourceWriter->open (xtn->awk->sourceOut);
|
||||||
case QSE_AWK_SIO_CLOSE:
|
case QSE_AWK_SIO_CLOSE:
|
||||||
return xtn->awk->sourceWriter->close (xtn->awk->sourceOut);
|
return xtn->awk->sourceWriter->close (xtn->awk->sourceOut);
|
||||||
|
Loading…
Reference in New Issue
Block a user