Merge branch 'master' of git@github:tstack/lnav

Conflicts:
	configure
This commit is contained in:
tstack 2010-08-17 09:42:46 -07:00
commit 4fbd1aada7
9 changed files with 54 additions and 18 deletions

View File

@ -163,6 +163,7 @@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE3_LIBS = @SQLITE3_LIBS@
SQLITE3_VERSION = @SQLITE3_VERSION@ SQLITE3_VERSION = @SQLITE3_VERSION@
STATIC_LDFLAGS = @STATIC_LDFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
abs_builddir = @abs_builddir@ abs_builddir = @abs_builddir@

3
NEWS
View File

@ -1,4 +1,7 @@
lnav v0.4.0:
lnav v0.3.0: lnav v0.3.0:
Changes: Changes:
* The hotkey for the SQL view was changed to 'v' and 'V' from '.'. * The hotkey for the SQL view was changed to 'v' and 'V' from '.'.

33
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.64 for lnav 0.3.0. # Generated by GNU Autoconf 2.64 for lnav 0.4.0.
# #
# Report bugs to <timothyshanestack@gmail.com>. # Report bugs to <timothyshanestack@gmail.com>.
# #
@ -549,8 +549,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='lnav' PACKAGE_NAME='lnav'
PACKAGE_TARNAME='lnav' PACKAGE_TARNAME='lnav'
PACKAGE_VERSION='0.3.0' PACKAGE_VERSION='0.4.0'
PACKAGE_STRING='lnav 0.3.0' PACKAGE_STRING='lnav 0.4.0'
PACKAGE_BUGREPORT='timothyshanestack@gmail.com' PACKAGE_BUGREPORT='timothyshanestack@gmail.com'
PACKAGE_URL='' PACKAGE_URL=''
@ -623,6 +623,7 @@ CC
LN_S LN_S
RANLIB RANLIB
CFLAGS_PG CFLAGS_PG
STATIC_LDFLAGS
am__fastdepCXX_FALSE am__fastdepCXX_FALSE
am__fastdepCXX_TRUE am__fastdepCXX_TRUE
CXXDEPMODE CXXDEPMODE
@ -713,6 +714,7 @@ ac_subst_files=''
ac_user_opts=' ac_user_opts='
enable_option_checking enable_option_checking
enable_dependency_tracking enable_dependency_tracking
enable_static
enable_profiling enable_profiling
with_ncurses with_ncurses
with_pcre with_pcre
@ -1272,7 +1274,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures lnav 0.3.0 to adapt to many kinds of systems. \`configure' configures lnav 0.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1342,7 +1344,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of lnav 0.3.0:";; short | recursive ) echo "Configuration of lnav 0.4.0:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1352,6 +1354,7 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors --enable-dependency-tracking do not reject slow dependency extractors
--disable-static Disable static linking
--enable-profiling Compile with gprof(1) profiling support --enable-profiling Compile with gprof(1) profiling support
Optional Packages: Optional Packages:
@ -1441,7 +1444,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
lnav configure 0.3.0 lnav configure 0.4.0
generated by GNU Autoconf 2.64 generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc. Copyright (C) 2009 Free Software Foundation, Inc.
@ -1961,7 +1964,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by lnav $as_me 0.3.0, which was It was created by lnav $as_me 0.4.0, which was
generated by GNU Autoconf 2.64. Invocation command line was generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@ $ $0 $@
@ -2770,7 +2773,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=lnav PACKAGE=lnav
VERSION=0.3.0 VERSION=0.4.0
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -3575,6 +3578,16 @@ fi
#CFLAGS=`echo $CFLAGS | sed 's/-O2//g'` #CFLAGS=`echo $CFLAGS | sed 's/-O2//g'`
#CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'` #CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`
# Check whether --enable-static was given.
if test "${enable_static+set}" = set; then :
enableval=$enable_static;
fi
if test x"${enable_static}" != x"no"; then
STATIC_LDFLAGS="$STATIC_LDFLAGS -static"
fi
# Check whether --enable-profiling was given. # Check whether --enable-profiling was given.
if test "${enable_profiling+set}" = set; then : if test "${enable_profiling+set}" = set; then :
enableval=$enable_profiling; enableval=$enable_profiling;
@ -6168,7 +6181,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by lnav $as_me 0.3.0, which was This file was extended by lnav $as_me 0.4.0, which was
generated by GNU Autoconf 2.64. Invocation command line was generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -6232,7 +6245,7 @@ Report bugs to <timothyshanestack@gmail.com>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\ ac_cs_version="\\
lnav config.status 0.3.0 lnav config.status 0.4.0
configured by $0, generated by GNU Autoconf 2.64, configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -1,7 +1,7 @@
AC_INIT(lnav, 0.3.0, timothyshanestack@gmail.com) AC_INIT(lnav, 0.4.0, timothyshanestack@gmail.com)
AC_CONFIG_SRCDIR([src/lnav.cc]) AC_CONFIG_SRCDIR([src/lnav.cc])
AM_INIT_AUTOMAKE(lnav, 0.3.0) AM_INIT_AUTOMAKE(lnav, 0.4.0)
AC_PREFIX_DEFAULT(/usr/) AC_PREFIX_DEFAULT(/usr/)
@ -27,6 +27,14 @@ AC_PROG_CXX
#CFLAGS=`echo $CFLAGS | sed 's/-O2//g'` #CFLAGS=`echo $CFLAGS | sed 's/-O2//g'`
#CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'` #CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`
AC_ARG_ENABLE([static],
AS_HELP_STRING([--disable-static],
[Disable static linking]))
if test x"${enable_static}" != x"no"; then
STATIC_LDFLAGS="$STATIC_LDFLAGS -static"
fi
AC_SUBST(STATIC_LDFLAGS)
AC_ARG_ENABLE([profiling], AC_ARG_ENABLE([profiling],
AS_HELP_STRING([--enable-profiling], AS_HELP_STRING([--enable-profiling],
[Compile with gprof(1) profiling support])) [Compile with gprof(1) profiling support]))

View File

@ -26,7 +26,7 @@ AM_LDFLAGS = \
$(SQLITE3_LDFLAGS) \ $(SQLITE3_LDFLAGS) \
$(PCRE_LDFLAGS) \ $(PCRE_LDFLAGS) \
-pthread \ -pthread \
-static $(STATIC_LDFLAGS)
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-Wall \ -Wall \

View File

@ -149,6 +149,7 @@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE3_LIBS = @SQLITE3_LIBS@
SQLITE3_VERSION = @SQLITE3_VERSION@ SQLITE3_VERSION = @SQLITE3_VERSION@
STATIC_LDFLAGS = @STATIC_LDFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
abs_builddir = @abs_builddir@ abs_builddir = @abs_builddir@
@ -212,7 +213,7 @@ AM_LDFLAGS = \
$(SQLITE3_LDFLAGS) \ $(SQLITE3_LDFLAGS) \
$(PCRE_LDFLAGS) \ $(PCRE_LDFLAGS) \
-pthread \ -pthread \
-static $(STATIC_LDFLAGS)
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-Wall \ -Wall \

View File

@ -176,15 +176,18 @@ public:
(int *)pc.all(), (int *)pc.all(),
count * 2); count * 2);
if (rc < 0) { if (rc < 0) {
} }
else if (rc == 0) { else if (rc == 0) {
rc = 0; rc = 0;
} }
else if (pc.all()->c_begin == pc.all()->c_end) else if (pc.all()->c_begin == pc.all()->c_end) {
rc = 0; rc = 0;
else }
else {
pi.pi_next_offset = pc.all()->c_end; pi.pi_next_offset = pc.all()->c_end;
}
pc.set_count(rc); pc.set_count(rc);

View File

@ -217,6 +217,7 @@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@ SQLITE3_LDFLAGS = @SQLITE3_LDFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@ SQLITE3_LIBS = @SQLITE3_LIBS@
SQLITE3_VERSION = @SQLITE3_VERSION@ SQLITE3_VERSION = @SQLITE3_VERSION@
STATIC_LDFLAGS = @STATIC_LDFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
abs_builddir = @abs_builddir@ abs_builddir = @abs_builddir@

View File

@ -23,8 +23,14 @@ int main(int argc, char *argv[])
{ {
pcrepp match1("(\\w*)=(\\d+)"); pcrepp match1("(\\w*)=(\\d+)");
pcre_input pi("a=1 b=2"); pcre_input pi("a=1 b=2");
pcre_context::capture_t *cap;
assert(match1.match(context, pi)); assert(match1.match(context, pi));
cap = context.all();
assert(cap->c_begin == 0);
assert(cap->c_end == 3);
assert((context.end() - context.begin()) == 2); assert((context.end() - context.begin()) == 2);
assert(pi.get_substr(context.begin()) == "a"); assert(pi.get_substr(context.begin()) == "a");
assert(pi.get_substr(context.begin() + 1) == "1"); assert(pi.get_substr(context.begin() + 1) == "1");