From e7d66020eada47ec1eaf1e8897ceba37ecd5756f Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sat, 26 Jul 2008 19:06:26 +0000 Subject: [PATCH] Add non-parsing WriteOut. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3184 --- include/programs.h | 3 ++- src/misc/programs.cpp | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/programs.h b/include/programs.h index 750b37b7..a6f7e172 100644 --- a/include/programs.h +++ b/include/programs.h @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: programs.h,v 1.16 2008-03-02 11:13:46 qbix79 Exp $ */ +/* $Id: programs.h,v 1.17 2008-07-26 19:06:26 qbix79 Exp $ */ #ifndef DOSBOX_PROGRAMS_H #define DOSBOX_PROGRAMS_H @@ -77,6 +77,7 @@ public: Bitu GetEnvCount(void); bool SetEnv(const char * entry,const char * new_string); void WriteOut(const char * format,...); /* Write to standard output */ + void WriteOut_NoParsing(const char * format); /* Write to standard output, no parsing */ void ChangeToLongCmd(); }; diff --git a/src/misc/programs.cpp b/src/misc/programs.cpp index 451a2e24..ada79052 100644 --- a/src/misc/programs.cpp +++ b/src/misc/programs.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: programs.cpp,v 1.31 2008-03-02 11:13:46 qbix79 Exp $ */ +/* $Id: programs.cpp,v 1.32 2008-07-26 19:06:26 qbix79 Exp $ */ #include #include @@ -126,10 +126,15 @@ void Program::WriteOut(const char * format,...) { vsnprintf(buf,2047,format,msg); va_end(msg); - Bit16u size=strlen(buf); + Bit16u size = strlen(buf); DOS_WriteFile(STDOUT,(Bit8u *)buf,&size); } +void Program::WriteOut_NoParsing(const char * format) { + Bit16u size = strlen(format); + DOS_WriteFile(STDOUT,(Bit8u *)format,&size); +} + bool Program::GetEnvStr(const char * entry,std::string & result) { /* Walk through the internal environment and see for a match */