fgets.c revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* 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"
extern char*
{
int p;
unsigned char* is;
unsigned char* ps;
return NIL(char*);
SFLOCK(f,0);
n -= 1;
while(n)
{ /* peek the read buffer for data */
{ f->getr = '\n';
break;
}
if(p > n)
p = n;
#if _lib_memccpy
is += p;
#else
;
}
else
if(c != '\n')
;
if(c != '\n')
{ f->next[p-1] = c;
is[-1] = c;
}
}
#endif
/* gobble up read data and continue */
break;
else if(n > 0)
n -= p;
}
_Sfi -= 1;
}
else *is = '\0';
SFOPEN(f,0);
return us;
}
char*
{
return _stdgets(f, s, n, 0);
}
char*
gets(char* s)
{
}