// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: strutl.cc,v 1.21 1999/03/15 08:10:39 jgg Exp $
+// $Id: strutl.cc,v 1.24 1999/04/04 08:07:39 jgg Exp $
/* ######################################################################
String Util - Some usefull string functions.
#endif
#include <apt-pkg/strutl.h>
-#include <apt-pkg//fileutl.h>
+#include <apt-pkg/fileutl.h>
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
+#include <errno.h>
/*}}}*/
// strstrip - Remove white space from the front and back of a string /*{{{*/
return false;
// Jump to the next word
- for (;*C != 0 && *C != ' '; C++)
+ for (;*C != 0 && isspace(*C) == 0; C++)
{
if (*C == '"')
{
Res = Buffer;
// Skip ending white space
- for (;*C != 0 && *C == ' '; C++);
+ for (;*C != 0 && isspace(*C) != 0; C++);
String = C;
return true;
}
while (1)
{
int Res = read(Fd,End,sizeof(Buffer) - (End-Buffer));
+ if (Res < 0 && errno == EINTR)
+ continue;
// Process is dead, this is kind of bad..
if (Res == 0)