72 wxString Str1(pIn, wxConvUTF8);
73 Str1.Replace(
wxT(
"\r"),
wxT(
""));
74 Str1.Replace(
wxT(
"\n"),
wxT(
""));
76 (*pScriptServerFn)( &Str1 , &
Str2);
79 size_t outputLength =
Str2.Length();
83 for(i = 0; i < outputLength; ++i)
87 aStr.Add(
Str2.Mid( iStart, i-iStart) +
wxT(
"\n") );
98size_t smin(
size_t a,
size_t b) {
return a < b ? a : b; }
108 size_t totalLines =
aStr.GetCount();
112 size_t lineLength = lineString.length();
115 wxASSERT(charsLeftInLine >= 0);
117 if (charsLeftInLine == 0)
126 size_t charsToWrite =
smin(charsLeftInLine, nMax - 1);
130 pOut[charsToWrite] =
'\0';
133 int charsWritten =
static_cast<int>(charsToWrite + 1);
135 wxASSERT(
static_cast<size_t>(charsWritten) == charsToWrite + 1);
Contains declarations for ScriptCommandRelay.
DEFINE_VERSION_CHECK DLL_API int ModuleDispatch(ModuleDispatchTypes type)
size_t smin(size_t a, size_t b)
int DLL_API RegScriptServerFunc(tpExecScriptServerFunc pFn)
int DoSrvMore(char *pOut, size_t nMax)
DLL_IMPORT int(* tpExecScriptServerFunc)(wxString *pIn, wxString *pOut)
static tpExecScriptServerFunc pScriptServerFn
static void StartScriptServer(tpRegScriptServerFunc scriptFn)
Starts the script server.