/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley Software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "sh.h"
#include "sh.tconst.h"
/*
* C shell
*/
void
{
int histlen = 0;
#ifdef TRACE
tprintf("TRACE- savehist()\n");
#endif
/* throw away null lines */
return;
if (*cp) {
while (*p) {
if (!digit(*p)) {
histlen = 0;
break;
}
}
}
else
}
struct Hist *
{
#ifdef TRACE
tprintf("TRACE- enthist()\n");
#endif
if (docopy)
else {
}
return (np);
}
void
{
#ifdef TRACE
tprintf("TRACE- hfree()\n");
#endif
}
void
{
#ifdef TRACE
tprintf("TRACE- dohist()\n");
#endif
return;
if (setintr)
while (*++vp2)
switch (*vp2) {
case 'h':
hflg++;
break;
case 'r':
rflg++;
break;
case '-': /* ignore multiple '-'s */
break;
default:
error("Usage: history [-rh] [# number of events]");
}
}
if (*vp)
else {
}
}
void
{
#ifdef TRACE
tprintf("TRACE- dohist1()\n");
#endif
top:
if (hp == 0)
return;
(*np)--;
if (rflg == 0) {
if (print)
return;
}
if (*np >= 0)
goto top;
}
void
{
#ifdef TRACE
tprintf("TRACE- phist()\n");
#endif
if (hflg == 0)
}