[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What does the exit command do?
From: |
Geraint Paul Bevan |
Subject: |
Re: What does the exit command do? |
Date: |
Thu, 23 Sep 2004 21:07:36 +0100 |
User-agent: |
Mozilla Thunderbird 0.7.1 (X11/20040715) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thunderbird helpfully added many '~'s to the last message. The patch is
attached again, hopefully intact.
- --
Geraint Bevan
http://www.mech.gla.ac.uk/~gbevan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iEYEARECAAYFAkFTLQcACgkQcXV3N50QmNMaCwCfRCOdovhBIkdAYWBz5ip1LOxQ
LskAnAob/yVa+UVmq61JMiH2L+9qI154
=tU5g
-----END PGP SIGNATURE-----
Index: liboctave/oct-rl-hist.c
===================================================================
RCS file: /cvs/octave/liboctave/oct-rl-hist.c,v
retrieving revision 1.6
diff -u -r1.6 oct-rl-hist.c
--- a/liboctave/oct-rl-hist.c 10 Nov 2003 15:50:39 -0000 1.6
+++ b/liboctave/oct-rl-hist.c 23 Sep 2004 19:50:31 -0000
@@ -32,6 +32,8 @@
#include <readline/history.h>
+static HIST_ENTRY *octave_saved_entry;
+
void
octave_add_history (const char *line)
{
@@ -89,7 +91,9 @@
int
octave_read_history (const char *f)
{
- return read_history (f);
+ int retval = read_history (f);
+ octave_saved_entry = history_get (history_length);
+ return retval;
}
void
@@ -107,7 +111,12 @@
int
octave_write_history (const char *f)
{
- return write_history (f);
+ int retval = 0;
+ if (history_get (history_length) != octave_saved_entry)
+ {
+ retval = write_history (f);
+ }
+ return retval;
}
int
- Re: What does the exit command do?, (continued)
- Re: What does the exit command do?, Dmitri A. Sergatskov, 2004/09/22
- Re: What does the exit command do?, Keith Goodman, 2004/09/22
- Re: What does the exit command do?, Dmitri A. Sergatskov, 2004/09/22
- Re: What does the exit command do?, John W. Eaton, 2004/09/22
- Re: What does the exit command do?, Keith Goodman, 2004/09/22
- Re: What does the exit command do?, Francesco Potorti`, 2004/09/23
- Re: What does the exit command do?, John W. Eaton, 2004/09/23
- Re: What does the exit command do?, Francesco Potorti`, 2004/09/23
- Re: What does the exit command do?, John W. Eaton, 2004/09/23
- Re: What does the exit command do?, Geraint Paul Bevan, 2004/09/23
- Re: What does the exit command do?,
Geraint Paul Bevan <=
- Re: What does the exit command do?, Dmitri A. Sergatskov, 2004/09/22
What does the exit command do?, John W. Eaton, 2004/09/22