Commit Graph

1106 Commits (dc500774a8e269df0e161ca61059d70b7d56cf57)
 

Author SHA1 Message Date
Adam Spiers dc500774a8 fix -Wsign-compare warnings in lnav_commands.cc
Fixes these warnings:

    lnav_commands.cc: In function ‘std::string remaining_args(const string&, const std::vector<std::basic_string<char> >&, size_t)’:
    lnav_commands.cc:67:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int lpc = 0; lpc < index; lpc++) {
                                 ^
    lnav_commands.cc: In function ‘std::string com_save_to(std::string, std::vector<std::basic_string<char> >&)’:
    lnav_commands.cc:574:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int lpc = 0; lpc < dls.text_line_count(); lpc++) {
8 years ago
Adam Spiers 961cac8ec0 fix sscanf %qd type mismatch warning
Fixes this warning:

    relative_time.cc: In member function ‘bool relative_time::parse(const char*, size_t, relative_time::parse_error&)’:
    relative_time.cc:222:62: warning: format ‘%qd’ expects argument of type ‘long long int*’, but argument 3 has type ‘int64_t* {aka long int*}’ [-Wformat=]
                         if (sscanf(numstr.c_str(), "%qd", &number) != 1) {
                                                                  ^
8 years ago
Adam Spiers 2aebf4f381 fix -Wunused-result warnings when calling write()
Fix these warnings:

papertrail_proc.hh: In constructor ‘papertrail_proc::papertrail_proc(const string&, time_t, time_t)’:
papertrail_proc.hh:107:36: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_api_key);
                                    ^
papertrail_proc.hh: In member function ‘void papertrail_proc::set_url()’:
papertrail_proc.hh:146:47: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_quoted_search.in());
8 years ago
Adam Spiers 7988200701 fix -Wunused-result warnings when calling asprintf()
Fix these warnings:

papertrail_proc.hh: In constructor ‘papertrail_proc::papertrail_proc(const string&, time_t, time_t)’:
papertrail_proc.hh:107:36: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_api_key);
                                    ^
papertrail_proc.hh: In member function ‘void papertrail_proc::set_url()’:
papertrail_proc.hh:146:47: warning: ignoring return value of ‘int asprintf(char**, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
                  this->ptp_quoted_search.in());
8 years ago
Adam Spiers 43ac6366cb fix -Wformat time_t warnings (#368)
Fix warnings like:

    ptimec.hh: In function ‘void ftime_i(char*, off_t&, ssize_t, const exttm&)’:
    ptimec.hh:387:57: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
         snprintf(&dst[off_inout], len - off_inout, "%lld", t);
                                                             ^

In this case we know that the `t` returned by `tm2sec` is a number of
seconds, so a long should be long enough, and anyway there is already
code checking for overflow.

Fixes #368.

https://github.com/tstack/lnav/issues/368
8 years ago
Adam Spiers 0559a98f91 fix -Wsign-compare warnings (#369)
Fix repeated errors like this:

    log_format.hh:1138:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (len < jfe.jfe_min_width) {

Fixes #369.

https://github.com/tstack/lnav/issues/369
8 years ago
Timothy Stack fb4e66e0b5 [build] package logfile_epoch.1 8 years ago
Timothy Stack 1b8b773184 [tests] print logfile::error exception 8 years ago
Timothy Stack 6618fe1947 [build] test 8 years ago
Timothy Stack 26cd9f5930 [ptime] make sure the full time stamp is matched
Fixes #389
Fixes #390
8 years ago
Timothy Stack 592ee60693 [log] fix rewriting machine-oriented timestamps
Fixes #371
8 years ago
Tim Stack 70240d2ca1 Merge pull request #376 from aspiers/fix-hour-help
fix hints about moving by hour
8 years ago
Adam Spiers c18adb8b73 fix hints about moving by hour
o/O do not move forward/backward an hour; in fact, no hotkey does,
but 6/^ are about as close as it gets.
8 years ago
Tim Stack 742c8b553f Merge pull request #367 from aspiers/fix-compile
fix compile on SUSE
8 years ago
Tim Stack a6f22f77ec Merge pull request #366 from aspiers/git-ignores
add some compile-time artefacts to .gitignore
8 years ago
Tim Stack ae5f4b5dd5 Merge pull request #365 from aspiers/group-keybindings
Group keybindings in built-in help text
8 years ago
Adam Spiers 5c5027673d fix compile on SUSE
If we have both 64-bit and 32-bit versions of ncurses installed,
currently the 32-bit libraries in /lib get found first, so gcc fails to
link against them, and ./configure ends up thinking that we're missing
ncurses libraries.

So scan /lib64 before /lib.  There might be a better fix, but hopefully
it will avoid breaking 32-bit distributions and distributions which have
64-bit libraries in /lib.
8 years ago
Adam Spiers db55d10039 add some compile-time artefacts to .gitignore 8 years ago
Adam Spiers 41acc7f249 group keybindings in built-in help text
Group them in roughly the same way as in the manual.  This makes
it a lot easier to locate a key binding more quickly.
8 years ago
Adam Spiers c354295c92 increase emphasis of level 1 heading underlines
This will allow us to introduce level 2 headings underlined by the
hyphen character.
8 years ago
Timothy Stack 4712bb6f76 update test for json logs with objects/arrays 8 years ago
Timothy Stack d8a49ec737 actual fix for json fields 8 years ago
Timothy Stack a758056657 Revert "need to check level before incrementing line count"
This reverts commit c0cd26dec4.
8 years ago
Timothy Stack c0cd26dec4 need to check level before incrementing line count 8 years ago
Tim Stack 9e82c6ba32 Merge pull request #360 from victorhooi/patch-1
Add Ctrl-W display shortcut for word-wrap.
8 years ago
Victor Hooi ae42f97ba0 Add Ctrl-W display shortcut for word-wrap.
This is mentioned in the lnav 0.6.2 release notes:

http://lnav.org/blog/2013/11/10/word-wrap-support-in-v062

But doesn't appear to be mentioned elsewhere.
8 years ago
Timothy Stack 4c0a8d0376 [ptime] need to clear the zone from the base when using a custom time format 8 years ago
Timothy Stack b296e84a65 [format] color extra json fields that are identifiers 8 years ago
Timothy Stack a59e0b290e [format] allow json log fields to be hidden
Fixes #303
8 years ago
Timothy Stack b392886f0c [highlight] choose highlight color based on the regex
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Tim Stack 06ca3c5288 Merge pull request #356 from rindeal/patch-1
[configure] add AM_PROG_AR to detect 'ar' instead of hard-coding it
8 years ago
Jan Chren d347104a30 [configure] add AM_PROG_AR to detect 'ar' instead of hard-coding it 8 years ago
Timothy Stack 9f79dcc31a [format] point out the location of a pcre-compile error
Defect Number:
    Reviewed By:
   Testing Done:
8 years ago
Timothy Stack d9b5cf3856 call setlocale() to try and get unicode working 8 years ago
Timothy Stack 41a2eed239 [pretty-print] fix printing of quoted strings that have escaped characters
Fixes #354
8 years ago
Timothy Stack 2e68f48a18 [hist] check for zoom with no logs
Fixes #346
8 years ago
Timothy Stack b216993760 [tests] missed a format file in the makefile 8 years ago
Timothy Stack 5539e21c05 [log-format] fix line-format where a variable can span lines
Fixes #337
8 years ago
Timothy Stack 876b37ade0 [log-format] add "truncate" overflow value 8 years ago
Timothy Stack c05dfafae8 [log-format] abbreviate long fields when formatting JSON logs
Fixes #340
8 years ago
Timothy Stack 9ee18c26d3 [log-format] add min-width and align options to line-format
Also some fixes for validating the format definitions.

Fixes #338
8 years ago
Timothy Stack 41854cf637 [json-log] custom date formats
Fixes #341
8 years ago
Timothy Stack 4d091988a0 [release] some more work on the release build 8 years ago
Tim Stack 3a22d8c5f8 Merge pull request #335 from sureshsundriyal/freebsd
[freebsd] Fix out of source builds
8 years ago
Suresh Sundriyal 87590aab6b [freebsd] Revert the bump gcc to 4.8.
Updated the incorrect section.
8 years ago
Suresh Sundriyal f2cb5c80d8 Revert "[freebsd] Install automake before kicking off the build."
This reverts commit 08ab680492.
8 years ago
Suresh Sundriyal 936afab0cc [freebsd] Use GNU Make
Either Autotools is producing a makefile that FreeBSD make does not like
or FreeBSD make does not like pattern rules anymore. Or more plausibly,
we are not invoking autogen.sh correctly.
8 years ago
Suresh Sundriyal 08ab680492 [freebsd] Install automake before kicking off the build. 8 years ago
Suresh Sundriyal 6cea55ae3d [freebsd] More out of source build related fixes. 8 years ago
Suresh Sundriyal 7c670bc730 [freebsd] Fix out of source builds 8 years ago