/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1992-2010 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> *
* *
***********************************************************************/
#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);
}