[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 59562] kio-man improperly caches command name
From: Stephan Kulow <coolo () kde ! org>
Date: 2003-08-31 19:05:16
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=59562
coolo@kde.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From coolo@kde.org 2003-08-31 21:05 -------
Subject: kdebase/kioslave/man
CVS commit by coolo:
static counters are evil for reused functions
CCMAIL: 59562-close@bugs.kde.org
M +5 -5 man2html.cpp 1.34
--- kdebase/kioslave/man/man2html.cpp #1.33:1.34
@@ -152,4 +152,5 @@ using namespace std;
//static char *sections = "123456789nl";
+static int mandoc_name_count = 0; /* Don't break on the first Nm */
static char *stralloc(int len)
@@ -3022,12 +3023,11 @@ static char *scan_request(char *c)
trans_char(c,'"','\a');
c=c+j;
- static int count = 0; /* Don't break on the first Nm */
- if (mandoc_synopsis && count) { /* Break lines only in the Synopsis.
+ if (mandoc_synopsis && mandoc_name_count) { /* Break lines only in the Synopsis.
* The Synopsis section seems to be treated
* as a special case - Bummer!
*/
out_html("<BR>");
- } else if (!count) {
+ } else if (!mandoc_name_count) {
const char *nextbreak = strchr(c, '\n');
const char *nextspace = strchr(c, ' ');
@@ -3039,5 +3039,5 @@ static char *scan_request(char *c)
}
}
- count++;
+ mandoc_name_count++;
out_html(change_to_font('B'));
@@ -3523,5 +3523,5 @@ void scan_man_page(const char *man_page)
argument = 0;
-
+ mandoc_name_count = 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic