WOKUnix_MaxPipeSize.hxx
WOKUnix_regexp.h
WOKUnix_regexp_1.c
-WOKUnix_WOKSteps.edl
WOKUnix_CMPLRS.edl
WOKUnix_StatBuf.hxx
WOKUnix_Dir.hxx
{
Handle(TCollection_HAsciiString) astr;
- if(myFILE == NULL)
+ if(myFILE != NULL)
{
- TCollection_AsciiString abuf;
+ TCollection_AsciiString abuf ( 1024 );
Standard_Integer nbread = 0;
while(IsAtEnd() == Standard_False)
}
else
{
- TCollection_AsciiString abuf;
+ TCollection_AsciiString abuf ( 1024 );
Standard_Integer nbread = 0;
while(GetNbToRead() != 0)
#ifdef LIN
static FILE* _wokunix_fdopen ( int fd ) {
- char* fdMode;
- int mode = fcntl ( fd, F_GETFL );
+ char* fdMode = "r";
+ int mode = fcntl ( fd, F_GETFL );
switch ( mode & O_ACCMODE ) {
- case O_RDONLY:
-
- fdMode = "r";
-
- break;
-
case O_WRONLY:
fdMode = "w";
if(mybuffer.FileNo() != -1)
{
Handle(TColStd_HSequenceOfHAsciiString) aseq = new TColStd_HSequenceOfHAsciiString;
- Standard_Integer nbread;
mybuffer.Reset();
while(mybuffer.IsAtEnd() == Standard_False)
{
- aseq->Append(mybuffer.ReadLine());
+ Handle( TCollection_HAsciiString ) str = mybuffer.ReadLine ();
+
+ if ( !str.IsNull () && !str -> IsEmpty () )
+
+ aseq -> Append ( str );
}
aseq->Append(WOKUnix_Buffer::Echo());
//=======================================================================
void WOKUnix_FileBuffer::Acquit(const Standard_Integer astatus, const WOKUnix_FDSet& aset)
{
+#ifndef LIN
Standard_Integer nbtoread = GetFDescr().GetNbToRead();
-
-#ifdef WOK_VERBOSE
+#endif // LIN
+#if defined( WOK_VERBOSE ) && !defined( LIN )
VerboseMsg("WOK_PROCESS") << "WOKUnix_FileBuffer::Acquit"
<< "There is " << nbtoread << " bytes to read on process output" << endm;
#endif
-
+#ifndef LIN
if(nbtoread >= MAX_PIPE_SIZE)
+#endif // LIN
{
Dump();
}
#include <stdio.h>
#include <unistd.h>
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
#include <WOKUnix_Path.ixx>
#include <WOKTools_Messages.hxx>
#include <WOKUnix_PathIterator.hxx>
+#ifndef PATH_MAX
+# define PATH_MAX 1024
+#endif // end PATH_MAX
+
//=======================================================================
//function : WOKUnix_Path
//purpose : Empty Contructor
WOKUnix_PathIterator::WOKUnix_PathIterator(const Handle(WOKUnix_Path)& apath, const Standard_Boolean abool, const Standard_CString amask)
-: mypath(apath), myrecflag(abool), mymask(amask)
+: mymask(amask), mypath(apath), myrecflag(abool)
{
TCollection_HAsciiString mask;
mask.AssignCat(apath->Name()->ToCString());
#include <sys/wait.h>
#include <signal.h>
#include <errno.h>
+#include <stdio.h>
#include <Standard_ProgramError.hxx>
const Standard_Integer aTblLen
) {
- int syntax;
+ int syntax = RE_SYNTAX_AWK;
_TCHAR* errMsg;
Destroy ();
switch ( aSyntax ) {
case WOKUnix_RESyntaxAWK:
- syntax = RE_SYNTAX_AWK;
+
break;
case WOKUnix_RESyntaxEGREP:
#include <sys/param.h>
#include <sys/time.h>
#endif
+
+#include <stdio.h>
#include <Standard_ProgramError.hxx>
#include <WOKTools_Messages.hxx>
#endif
#include <fstream.h>
+#include <stdio.h>
#include <WOKTools_Messages.hxx>
WOKUnix_Shell::WOKUnix_Shell(const WOKUnix_ShellMode amode,
const WOKUnix_PopenOutputMode outmode,
const WOKUnix_PopenBufferMode bufmode)
-: WOKUnix_Process(3, ShellArgv, outmode, bufmode, -1), mymode(amode), myecho(Standard_False), mylocked(Standard_False)
+: WOKUnix_Process(3, ShellArgv, outmode, bufmode, -1),
+ mymode(amode), mylocked(Standard_False), myecho(Standard_False)
{
switch(amode)
{
const WOKUnix_ShellMode amode,
const WOKUnix_PopenOutputMode outmode,
const WOKUnix_PopenBufferMode bufmode)
-: WOKUnix_Process(3, ShellArgv, outmode, bufmode, -1), mymode(amode), myecho(Standard_False), mylocked(Standard_False)
+: WOKUnix_Process(3, ShellArgv, outmode, bufmode, -1), mymode(amode), mylocked(Standard_False), myecho(Standard_False)
{
switch(amode)
{
+#include <stdio.h>
#include <WOKUnix_ShellStatus.ixx>
#include <stdlib.h>
#include <signal.h>
+#include <stdio.h>
#ifdef LIN
#include <bits/sigset.h>
case WOKUnix_SIGSEGV : return SIGSEGV;
case WOKUnix_SIGCHILD : return SIGCLD;
}
+ return 0;
}
#include <WOKUnix_regexp.h>
+#include <stdlib.h>
/***/
/******************************************************************************/
} /* end if */
break;
+
+ default: break;
} /* end switch */
d2 = string2, dend2 = regend[ regno ]; /* end of string1 => advance to string2. */
- } /* end while
+ } /* end while */
/* At end of register contents => success */
if ( d2 == dend2 ) break;
break;
+ default: break;
+
} /* end switch */
continue; /* Successfully matched one pattern command; keep matching */