home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume17
/
e2
/
part01
/
nth_hist.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-08
|
516b
|
24 lines
#include "e.h"
/*
* Get the nth last filename from hlist. Then rebuild the history for
* the directory, putting the requested filename last (most recently used).
*
*/
void
nth_hist(n)
int n;
{
if (n >= hist_count){
if (hist_count > 1){
e_error("Only %d history items exist.", hist_count);
}
else{
e_error("Only one history item exists.");
}
}
ok_sprintf(arg, "%s", hist[hist_count - n - 1]);
reconstruct(hist_count - n - 1);
return;
}