/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1992-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> *
* *
***********************************************************************/
#pragma prototyped
/*
* common support for tail and rev
*/
#include <cmd.h>
#include <rev.h>
/*
* copy the lines starting at offset <start> from in <in> to <out>
* in reverse order
*/
{
register int n, nleft=0;
{
if(!tmp)
return(-1);
return(-1);
return(-1);
start=0;
}
return(0);
while(1)
{
n = BUFSIZE;
{
}
break;
n = *buff;
*buff = '\n';
while(1)
{
if(nleft==0)
cp--;
{
nleft= 1;
break;
}
while(*--cp != '\n');
{
*cp = n;
break;
}
else
cp++;
return(-1);
if(nleft)
{
if(nleft==1)
return(-1);
nleft = 0;
}
}
break;
}
if(nleft)
{
return(-1);
}
return(0);
}