summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2016-03-13 11:54:01 +0100
committerpgen <p.gen.progs@gmail.com>2016-03-13 12:47:45 +0100
commit874b657f867b259879a5be31dc3f19772ee44e2c (patch)
tree772c574cb65dc179adbeccd93a000c50c24f35fc
parent63f77c2abe61ed0e8f4d1e59e19193a07e20d223 (diff)
Bump to version 0.9.1v0.9.1
- Add a ChangeLog file - Move, add and improve some comments
-rw-r--r--ChangeLog23
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in4
-rwxr-xr-xconfigure20
-rw-r--r--smenu.c105
-rw-r--r--version2
6 files changed, 94 insertions, 62 deletions
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..250d0d7
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,23 @@
+-------------------------------------------------------------------
+Sun Mar 13 09:28:52 UTC 2016 - p.gen.progs@gmail.com
+
+- Version 0.9.1
+* Use the GNU autotools
+* Fix a lot of small and not so small bugs
+* Change the -s option semantic
+* Improve help and man page
+* Introduce some new options - see the man page for more
+* Also rework some options - see the man page for more
+* Add more configurable colors
+* Add the notion of non-selectable words
+* Add the notion of special words
+* Add a (de)selection by rows and/or columns
+* Interpret quotations in the input stream and ignore empty words
+* Add an option to center the output window
+* And many other minor changes
+
+-------------------------------------------------------------------
+Sun Aug 9 23:00:59 UTC 2015 - p.gen.progs@gmail.com
+
+- Initial version - 0.9
+
diff --git a/Makefile.am b/Makefile.am
index 7467100..89cdbaa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
bin_PROGRAMS = smenu
smenu_SOURCES = smenu.c
dist_man_MANS = smenu.1
-EXTRA_DIST = smenu.spec.in smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples
+EXTRA_DIST = smenu.spec.in ChangeLog smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples
diff --git a/Makefile.in b/Makefile.in
index 25fea8e..35f3ecf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -81,7 +81,7 @@ subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/smenu.spec.in depcomp \
- $(dist_man_MANS) TODO install-sh missing
+ $(dist_man_MANS) ChangeLog TODO install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -291,7 +291,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
smenu_SOURCES = smenu.c
dist_man_MANS = smenu.1
-EXTRA_DIST = smenu.spec.in smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples
+EXTRA_DIST = smenu.spec.in ChangeLog smenu.spec build.sh version COPYRIGHT INTERNALS.rst LICENSE.rst README.rst examples
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/configure b/configure
index 0eb7656..4083438 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for smenu 0.9.
+# Generated by GNU Autoconf 2.69 for smenu 0.9.1.
#
# Report bugs to <p.gen.progs@gmail.com>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='smenu'
PACKAGE_TARNAME='smenu'
-PACKAGE_VERSION='0.9'
-PACKAGE_STRING='smenu 0.9'
+PACKAGE_VERSION='0.9.1'
+PACKAGE_STRING='smenu 0.9.1'
PACKAGE_BUGREPORT='p.gen.progs@gmail.com'
PACKAGE_URL=''
@@ -1267,7 +1267,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures smenu 0.9 to adapt to many kinds of systems.
+\`configure' configures smenu 0.9.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1333,7 +1333,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of smenu 0.9:";;
+ short | recursive ) echo "Configuration of smenu 0.9.1:";;
esac
cat <<\_ACEOF
@@ -1424,7 +1424,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-smenu configure 0.9
+smenu configure 0.9.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1847,7 +1847,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by smenu $as_me 0.9, which was
+It was created by smenu $as_me 0.9.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2713,7 +2713,7 @@ fi
# Define the identity of the package.
PACKAGE='smenu'
- VERSION='0.9'
+ VERSION='0.9.1'
cat >>confdefs.h <<_ACEOF
@@ -5436,7 +5436,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by smenu $as_me 0.9, which was
+This file was extended by smenu $as_me 0.9.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5502,7 +5502,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-smenu config.status 0.9
+smenu config.status 0.9.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/smenu.c b/smenu.c
index e9f043e..40ed07d 100644
--- a/smenu.c
+++ b/smenu.c
@@ -5891,11 +5891,15 @@ main(int argc, char *argv[])
if (term.curs_column > 1)
puts("");
- /* Display the words window for the first time */
- /* """"""""""""""""""""""""""""""""""""""""""" */
+ /* Display the words window and its title for the first time */
+ /* """"""""""""""""""""""""""""""""""""""""""""""""""""""""" */
message_lines = disp_message(message_lines_list,
message_max_width, message_max_len, &term, &win);
+ /* Before displaying the word windows for the first time when in column */
+ /* or line mode, we need to ensure that the word under the cursor will */
+ /* be visible by setting the number of the first column to be displayed */
+ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
if (win.col_mode | win.line_mode)
{
int pos;
@@ -5903,8 +5907,8 @@ main(int argc, char *argv[])
len = term.ncolumns - 3;
- /* Adjust win.first_column if the cursor is no more visible */
- /* """""""""""""""""""""""""""""""""""""""""""""""""""""""" */
+ /* Adjust win.first_column if the cursor is not visible */
+ /* """""""""""""""""""""""""""""""""""""""""""""""""""" */
pos = first_word_in_line_a[line_nb_of_word_a[current]];
while (word_a[current].end - word_a[pos].start >= len)
@@ -5913,8 +5917,10 @@ main(int argc, char *argv[])
win.first_column = word_a[pos].start;
}
- /* Save the cursor line column */
- /* """"""""""""""""""""""""""" */
+ /* Save the initial cursor line and column, here only the line is */
+ /* interesting us. This will tell us if we are in need to compensate */
+ /* a terminal automatic scrolling */
+ /* """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
get_cursor_position(&term.curs_line, &term.curs_column);
nl = disp_lines(word_a, &win, &toggle, current, count, search_mode,
@@ -5933,8 +5939,9 @@ main(int argc, char *argv[])
for (i = 1; i < offset; i++)
(void) tputs(cursor_up, 1, outch);
- /* Save again the cursor current line and column positions */
- /* """"""""""""""""""""""""""""""""""""""""""""""""""""""" */
+ /* Save again the cursor current line and column positions so that we */
+ /* will be able to put the terminal cursor back here */
+ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
get_cursor_position(&term.curs_line, &term.curs_column);
/* Main loop */
@@ -6078,6 +6085,8 @@ main(int argc, char *argv[])
continue;
}
+ /* Pressed keys scancodes processing */
+ /* """"""""""""""""""""""""""""""""" */
page = 1; /* Default number of lines to do down/up *
* with PgDn/PgUp */
@@ -6087,15 +6096,15 @@ main(int argc, char *argv[])
{
switch (buffer[0])
{
+ case 0x1b: /* ESC */
/* An escape sequence or a multibyte character has been pressed */
/* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
- case 0x1b: /* ESC */
if (!search_mode)
{
- /* HOME key has been pressed */
- /* """"""""""""""""""""""""" */
if (memcmp("\x1bOH", buffer, 3) == 0)
{
+ /* HOME key has been pressed */
+ /* """"""""""""""""""""""""" */
current = win.start;
/* Find the first selectable word */
@@ -6116,10 +6125,10 @@ main(int argc, char *argv[])
break;
}
- /* END key has been pressed */
- /* """""""""""""""""""""""" */
if (memcmp("\x1bOF", buffer, 3) == 0)
{
+ /* END key has been pressed */
+ /* """""""""""""""""""""""" */
current = win.end;
/* Find the last selectable word */
@@ -6166,45 +6175,45 @@ main(int argc, char *argv[])
break;
}
- /* Left arrow key has been pressed */
- /* """"""""""""""""""""""""""""""" */
if (memcmp("\x1bOD", buffer, 3) == 0
|| memcmp("\x1b[D", buffer, 3) == 0)
+ /* Left arrow key has been pressed */
+ /* """"""""""""""""""""""""""""""" */
goto kl;
- /* Right arrow key has been pressed */
- /* """""""""""""""""""""""""""""""" */
if (memcmp("\x1bOC", buffer, 3) == 0
|| memcmp("\x1b[C", buffer, 3) == 0)
+ /* Right arrow key has been pressed */
+ /* """""""""""""""""""""""""""""""" */
goto kr;
- /* Up arrow key has been pressed */
- /* """"""""""""""""""""""""""""" */
if (memcmp("\x1bOA", buffer, 3) == 0
|| memcmp("\x1b[A", buffer, 3) == 0)
+ /* Up arrow key has been pressed */
+ /* """"""""""""""""""""""""""""" */
goto ku;
- /* Down arrow key has been pressed */
- /* """"""""""""""""""""""""""""""" */
if (memcmp("\x1bOB", buffer, 3) == 0
|| memcmp("\x1b[B", buffer, 3) == 0)
+ /* Down arrow key has been pressed */
+ /* """"""""""""""""""""""""""""""" */
goto kd;
- /* PgUp key has been pressed */
- /* """"""""""""""""""""""""" */
if (memcmp("\x1b[5~", buffer, 4) == 0)
+ /* PgUp key has been pressed */
+ /* """"""""""""""""""""""""" */
goto kpp;
- /* PgDn key has been pressed */
- /* """"""""""""""""""""""""" */
if (memcmp("\x1b[6~", buffer, 4) == 0)
+ /* PgDn key has been pressed */
+ /* """"""""""""""""""""""""" */
goto knp;
}
- /* ESC key has been pressed */
- /* """""""""""""""""""""""" */
if (memcmp("\x1b", buffer, 1) == 0)
{
+ /* ESC key has been pressed */
+ /* """""""""""""""""""""""" */
if (search_mode || help_mode)
{
search_mode = 0;
@@ -6219,11 +6228,11 @@ main(int argc, char *argv[])
/* Else ignore key */
break;
- /* q or Q has been pressed */
- /* """"""""""""""""""""""" */
case 'q':
case 'Q':
case 3: /* ^C */
+ /* q or Q of ^C has been pressed */
+ /* """"""""""""""""""""""""""""" */
if (search_mode)
goto special_cmds_when_searching;
@@ -6256,10 +6265,10 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
- /* n or <Space Bar> has been pressed */
- /* """"""""""""""""""""""""""""""""" */
case 'n':
case ' ':
+ /* n or <Space Bar> has been pressed */
+ /* """"""""""""""""""""""""""""""""" */
if (search_mode)
goto special_cmds_when_searching;
@@ -6272,10 +6281,10 @@ main(int argc, char *argv[])
tmp_max_word, &langinfo);
break;
- /* <Enter> has been pressed */
- /* """""""""""""""""""""""" */
case 0x0d: /* CR */
{
+ /* <Enter> has been pressed */
+ /* """""""""""""""""""""""" */
int extra_lines;
char *output_str;
@@ -6381,11 +6390,11 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
- /* Cursor Left key has been pressed */
- /* """""""""""""""""""""""""""""""" */
kl:
case 'H':
case 'h':
+ /* Cursor Left key has been pressed */
+ /* """""""""""""""""""""""""""""""" */
if (!search_mode)
{
int old_current = current;
@@ -6464,11 +6473,11 @@ main(int argc, char *argv[])
else
goto special_cmds_when_searching;
- /* Right key has been pressed */
- /* """""""""""""""""""""""""" */
kr:
case 'L':
case 'l':
+ /* Right key has been pressed */
+ /* """""""""""""""""""""""""" */
if (!search_mode)
{
int old_current = current;
@@ -6559,16 +6568,16 @@ main(int argc, char *argv[])
else
goto special_cmds_when_searching;
+ kpp:
/* PgUp key has been pressed */
/* """"""""""""""""""""""""" */
- kpp:
page = win.max_lines;
- /* Cursor Up key has been pressed */
- /* """""""""""""""""""""""""""""" */
ku:
case 'K':
case 'k':
+ /* Cursor Up key has been pressed */
+ /* """""""""""""""""""""""""""""" */
if (!search_mode)
{
int cur_line;
@@ -6709,16 +6718,16 @@ main(int argc, char *argv[])
else
goto special_cmds_when_searching;
+ knp:
/* PgDn key has been pressed */
/* """"""""""""""""""""""""" */
- knp:
page = win.max_lines;
- /* Cursor Down key has been pressed */
- /* """""""""""""""""""""""""""""""" */
kd:
case 'J':
case 'j':
+ /* Cursor Down key has been pressed */
+ /* """""""""""""""""""""""""""""""" */
if (!search_mode)
{
int cur_line;
@@ -6873,10 +6882,10 @@ main(int argc, char *argv[])
else
goto special_cmds_when_searching;
- /* / or CTRL-F key has been pressed (start of a search session) */
- /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
case 0x06:
case '/':
+ /* / or CTRL-F key has been pressed (start of a search session) */
+ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
if (!search_mode)
{
search_mode = 1;
@@ -6906,10 +6915,10 @@ main(int argc, char *argv[])
else
goto special_cmds_when_searching;
- /* Backspace and CTRL-H */
- /* """""""""""""""""""" */
case 0x08: /* ^H */
case 0x7f: /* BS */
+ /* Backspace or CTRL-H */
+ /* """"""""""""""""""" */
if (search_mode)
{
if (*search_buf != '\0')
@@ -6933,9 +6942,9 @@ main(int argc, char *argv[])
}
break;
+ case '?':
/* Help mode */
/* """"""""" */
- case '?':
if (!search_mode)
{
help(&win, &term, last_line);
diff --git a/version b/version
index b63ba69..f374f66 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.9
+0.9.1