mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Release calc version 2.10.3t5.45
This commit is contained in:
12
hist.c
12
hist.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995 David I. Bell
|
||||
* Copyright (c) 1997 David I. Bell
|
||||
* Permission is granted to use, distribute, or modify this source,
|
||||
* provided that this copyright notice remains intact.
|
||||
*
|
||||
@@ -48,6 +48,7 @@
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
extern FILE *curstream(void);
|
||||
|
||||
#define STDIN 0
|
||||
#define SAVE_SIZE 256 /* size of save buffer */
|
||||
@@ -1135,11 +1136,11 @@ static void
|
||||
list_history(void)
|
||||
{
|
||||
HIST *hp;
|
||||
int num;
|
||||
int hnum;
|
||||
|
||||
for (num = 0; num < HS.histcount; num++) {
|
||||
hp = get_event(num);
|
||||
printf("\n%3d: ", HS.histcount - num);
|
||||
for (hnum = 0; hnum < HS.histcount; hnum++) {
|
||||
hp = get_event(hnum);
|
||||
printf("\n%3d: ", HS.histcount - hnum);
|
||||
echo_string(hp->data, hp->len);
|
||||
}
|
||||
refresh_line();
|
||||
@@ -1378,6 +1379,7 @@ quit_calc(void)
|
||||
{
|
||||
hist_term();
|
||||
putchar('\n');
|
||||
libcalc_call_me_last();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user