summaryrefslogtreecommitdiff
path: root/libyelp/yelp-man-parser.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated method of doing private structs on gobjectsShaun McCance2020-03-091-1/+1
|
* Initialize ws_start variable before returning itTomas Popela2019-01-211-1/+1
| | | | | yelp-3.28.1/libyelp/yelp-man-parser.c:1194: var_decl: Declaring variable "ws_start" without initializer. yelp-3.28.1/libyelp/yelp-man-parser.c:1202: uninit_use: Using uninitialized value "ws_start".
* Increase the size of string variables passed to sscanfTomas Popela2019-01-211-2/+2
| | | | | | yelp-3.28.1/libyelp/yelp-man-parser.c:549: error[invalidScanfFormatWidth]: Width 10 given in format string (no. 2) is larger than destination buffer 'name[10]', use %9s to prevent overflowing it. yelp-3.28.1/libyelp/yelp-man-parser.c:926: error[invalidScanfFormatWidth]: Width 16 given in format string (no. 1) is larger than destination buffer 'name[16]', use %15s to prevent overflowing it.
* Avoid possible overrun while comparing to MAN_FONTSTomas Popela2019-01-211-2/+2
| | | | | | | | | yelp-3.28.1/libyelp/yelp-man-parser.c:464: cond_at_most: Checking "k > 8U" implies that "k" may be up to 8 on the false branch. yelp-3.28.1/libyelp/yelp-man-parser.c:469: overrun-local: Overrunning array "parser->font_registers" of 8 8-byte elements at element index 8 (byte offset 64) using index "k" (which evaluates to 8). yelp-3.28.1/libyelp/yelp-man-parser.c:476: assignment: Assigning: "k" = "parser->current_font". yelp-3.28.1/libyelp/yelp-man-parser.c:477: cond_at_most: Checking "k > 8U" implies that "k" and "parser->current_font" may be up to 8 on the false branch. yelp-3.28.1/libyelp/yelp-man-parser.c:477: overrun-local: Overrunning array "parser->font_registers" of 8 8-byte elements at element index 8 (byte offset 64) using index "k" (which evaluates to 8).
* Check whether parser is null before dereferencing itTomas Popela2019-01-211-4/+6
| | | | | yelp-3.28.1/libyelp/yelp-man-parser.c:445: var_compare_op: Comparing "parser" to null implies that "parser" might be null. yelp-3.28.1/libyelp/yelp-man-parser.c:449: var_deref_op: Dereferencing null pointer "parser".
* Fix crash when viewing man pagesDavid King2015-02-161-5/+8
| | | | Calling g_strfreev() on a stack-allocated array is a bad idea.
* Avoid warning due to unnecessary comparisonDavid King2015-02-091-1/+1
|
* Fix format signedness warningsDavid King2015-02-091-2/+2
|
* Fix warnings about discarding constDavid King2015-02-091-3/+5
|
* Fix sign comparison warningDavid King2015-02-091-1/+1
|
* Avoid warnings from mixing declarations and codeDavid King2015-02-091-1/+3
|
* Remove redundant extra semicolonsDavid King2015-02-091-13/+13
|
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* fix format stringDexter Morgan2011-09-271-1/+1
|
* Don't use stdout as a variable name.Antoine Jacoutot2011-06-141-3/+3
| | | | | | stdout is defined in stdio.h which breaks the compilation under (at least) OpenBSD and it is usually considered bad pratice to use such generic variable names.
* Cleverer heuristic on what constitutes a man link.Rupert Swarbrick2011-01-101-4/+16
|
* Correctly deal with man links containing newlines.Rupert Swarbrick2011-01-101-3/+39
|
* Do the indents in man pages correctly with CSS and javascript.Rupert Swarbrick2011-01-101-2/+4
|
* Add support for http:// urls.Rupert Swarbrick2011-01-101-0/+30
|
* Make links from strings of the form "blah(2)" in man pages.Rupert Swarbrick2011-01-101-0/+322
| | | | | Note that there's not a space before the (2): it seems that strings like that are used for Copyright (C) etc. and not links).
* Fix some compiler warnings.Rupert Swarbrick2011-01-101-13/+14
| | | | Note: the stray g_next_char() line had no effect.
* Deal correctly with the last line of output.Rupert Swarbrick2010-12-201-6/+157
| | | | | | | | Since we're parsing the whole thing in one pass, we can't know this is the last line until we're done, so we go through at the end and check whether there's an empty section. If so, we know what the title should look like, so we extract the information and put it somewhere more useful.
* Treat 'C' and 'N' lines more carefully. Yay! Russian works properly at last!Rupert Swarbrick2010-12-201-41/+80
|
* Correctly deal with titles with spaces.Rupert Swarbrick2010-12-201-43/+116
| | | | | | This works harder to understand the first line of output: the previous code didn't work if there was a space (or hyphen or anything else) in the command name.
* Draw vertical jumps correctly.Rupert Swarbrick2010-12-201-8/+60
| | | | | This allows us to work out when there should be a wider gap between two paragraphs, for instance.
* Spacing changes to fix horizontal spacing for perl(1) and man(1).Rupert Swarbrick2010-12-201-46/+76
|
* Add support for N and C lines.Rupert Swarbrick2010-12-201-9/+223
| | | | | | | At the moment, there's a horrible hack with a hardcoded table of character names and unicode code points. Hopefully eventually this can be replaced by parsing a file or calling a program... but I don't know how yet :-(
* Use a monospace font and   for internal spacing.Rupert Swarbrick2010-12-201-1/+34
| | | | | Basically, to get internal spaces correct (eg in tables etc), we *have* to use a monospace font.
* Initial implementation calling man -Z and parsing.Rupert Swarbrick2010-12-201-1636/+421
| | | | | | | | Currently doesn't deal with 'special characters' (including umlauts and ... hyphens!) Also seems to fail with pretty simple formatting (see list of sections in man man)
* [yelp-man-parser] Append \n to avoid running words togetherShaun McCance2010-06-011-0/+1
| | | | | Since GDataInputStream doesn't return newlines, we end up running words together if the whitespace between them is a newline. This approach might be overzealous.
* [yelp-man-parser] Lines from GDataInputStream don't include \nShaun McCance2010-06-011-16/+16
| | | | | Lines from GIOChannel do. A bunch of the code from the old GIOChannel-based parser was wrong, because it was looking for \n.
* [libyelp] Adding man page support, some formatting still offShaun McCance2010-06-011-0/+1821