[cleanup] little bits of cleanup here and there

pull/48/merge
Timothy Stack 11 years ago
parent ee52bcef41
commit 4c6069c33d

@ -0,0 +1,5 @@
Primary Author
--------------
Timothy Stack (timothyshanestack@gmail.com)

@ -6,5 +6,6 @@ SUBDIRS = src test
noinst_SCRIPTS = TESTS_ENVIRONMENT
EXTRA_DIST = \
AUTHORS \
LICENSE \
README.md

@ -53,7 +53,7 @@ host_triplet = @host@
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) mkinstalldirs \
$(srcdir)/TESTS_ENVIRONMENT.in INSTALL NEWS README \
$(srcdir)/TESTS_ENVIRONMENT.in AUTHORS INSTALL NEWS README \
config.guess config.sub depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/ax_sqlite3.m4 \
@ -283,6 +283,7 @@ ACLOCAL_AMFLAGS = -I .
SUBDIRS = src test
noinst_SCRIPTS = TESTS_ENVIRONMENT
EXTRA_DIST = \
AUTHORS \
LICENSE \
README.md

39
configure vendored

@ -2915,6 +2915,45 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
case $enable_silent_rules in # (((
yes) AM_DEFAULT_VERBOSITY=0;;
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=0;;
esac
am_make=${MAKE-make}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
if ${am_cv_make_support_nested_variables+:} false; then :
$as_echo_n "(cached) " >&6
else
if $as_echo 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
@$(TRUE)
.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
$as_echo "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
AM_V=$AM_DEFAULT_VERBOSITY
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'

@ -1,7 +1,8 @@
AC_INIT(lnav, 0.5.0, timothyshanestack@gmail.com)
AC_CONFIG_SRCDIR([src/lnav.cc])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
AC_PREFIX_DEFAULT(/usr/)

@ -1465,12 +1465,15 @@ static void usage(void)
" directory will be loaded.\n"
"\n"
"Examples:\n"
" To load and follow the syslog file -\n"
" To load and follow the syslog file:\n"
" $ lnav -s\n"
"\n"
" To load all of the files in /var/log:\n"
" $ lnav /var/log\n"
"\n"
" To watch the output of make with timestamps prepended:\n"
" $ make 2>&1 | lnav -t\n"
"\n"
"Version: " PACKAGE_STRING "\n";
fprintf(stderr, usage_msg, lnav_data.ld_program_name);
@ -2606,8 +2609,8 @@ static void setup_highlights(textview_curses::highlight_map_t &hm)
"| create "
"| from | where | order by "
"| group by )", PCRE_CASELESS));
hm["(java"] = textview_curses::
highlighter(xpcre_compile("(?:\\w+\\.java:\\d+)"));
hm["(srcfile"] = textview_curses::
highlighter(xpcre_compile("\\w+\\.(?:java|c|cc|cpp|cxx|h|hh|hpp|hxx|py|pyc|rb):\\d+"));
hm["(xml"] = textview_curses::
highlighter(xpcre_compile("<(/?[^ >]+)[^>]*>"));
hm["(stringd"] = textview_curses::

@ -277,16 +277,16 @@ class generic_log_format : public log_format {
char *prefix,
int len) {
static const char *log_fmt[] = {
"%63[0-9: ,.-]%31[^:]",
"%63[a-zA-Z0-9:-+/.] [%*x %31s",
"%63[a-zA-Z0-9:.,-] %31s",
"%63[a-zA-Z0-9: .,-] [%*[^]]]%31[^:]",
"%63[a-zA-Z0-9: .,-] %31s",
"[%63[0-9: .-] %*s %31s",
"[%63[a-zA-Z0-9: -+/]] %31s",
"[%63[a-zA-Z0-9: -+/]] [%31[a-zA-Z]]",
"[%63[a-zA-Z0-9: .-+/] %*s %31s",
"[%63[a-zA-Z0-9: -+/]] (%*d) %31s",
"%63[0-9: ,.-]%63[^:]",
"%63[a-zA-Z0-9:-+/.] [%*x %63[^\n]",
"%63[a-zA-Z0-9:.,-] %63[^\n]",
"%63[a-zA-Z0-9: .,-] [%*[^]]]%63[^:]",
"%63[a-zA-Z0-9: .,-] %63[^\n]",
"[%63[0-9: .-] %*s %63[^\n]",
"[%63[a-zA-Z0-9: -+/]] %63[^\n]",
"[%63[a-zA-Z0-9: -+/]] [%63[a-zA-Z]]",
"[%63[a-zA-Z0-9: .-+/] %*s %63[^\n]",
"[%63[a-zA-Z0-9: -+/]] (%*d) %63[^\n]",
NULL
};
@ -294,7 +294,7 @@ class generic_log_format : public log_format {
struct tm log_time;
char timestr[64 + 32];
time_t line_time;
char level[32];
char level[64];
char *last_pos;
if ((last_pos = this->log_scanf(prefix,
@ -310,7 +310,6 @@ class generic_log_format : public log_format {
uint16_t millis = 0;
/* Try to pull out the milliseconds value. */
fprintf(stderr, "last pos %s\n", last_pos);
if (last_pos[0] == ',' || last_pos[0] == '.') {
sscanf(last_pos + 1, "%hd", &millis);
if (millis >= 1000)

Loading…
Cancel
Save