/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
#include "stdhdr.h"
{
ssize_t m;
ssize_t n;
ssize_t k;
ssize_t p;
uchar* s;
SFMTXDECL(f);
SFMTXENTER(f, -1);
SFMTXRETURN(f, -1);
SFMTXRETURN(f, -1);
SFLOCK(f,0);
for(m = 0;; )
{ /* read new data */
{ m = -1;
break;
}
}
for(k = 0; k < p; ++k) /* find the delimiter */
{ k += 1; /* include delim in copying */
break;
}
}
if((m+k+1) >= n ) /* make sure there is space */
{ n = ((m+k+15)/8)*8;
m = -1;
break;
}
}
if(s[m-1] == delim)
{ s[m] = 0; /* 0-terminated */
break;
}
}
SFOPEN(f,0);
SFMTXRETURN(f,m);
}
{
}