Bug #19155 2013-10-18 13:38

gd_on

Man page viewer does not follow link inside .gz files

Man page viewer does not seem to be able to find links if they are inside a .gz file.

Example :

On my windows machine I have inside man3 folder a sprintf.3 which contains .so man3/printf.3

So when I try to obtain an help on sprintf, I obtain the printf help. That's OK, the direct link works.

On a Linux machine I have inside man3 folder a sprintf.3.gz which contains itself sprintf.3 with the same content as previously.

So an help on sprintf, finds in my case 3 occurences in the help viewer : sprintf.3, sprintf.3p, sprintf.3p

But if I click on a each link, it does not work, because those files are .gz files, containing a link to man3/printf.3 for example. But the real file to find should be printf.3.gz for example.

In case of a link to a .gz file, this option is not tried, so the file is not found.

see also : http://forums.codeblocks.org/index.php/topic,18446.msg126209.html#msg126209

An other problem.

If the help is very long (gcc for example), it could be nice if there was an option to search a word inside this man page.

Finally, when a help page is viewed, it appears with different characters types (bold, bigger ones, italics, ...). I tried to copy and paste the contents of the viewer to Word for example. The text is transfered, but not the characters types. Could it be possible to add a such thing !

Category
Plugin::Any
Group
Platform:All
Status
Closed
Close date
2014-01-09 12:03
Assigned to
tpetrov
tpetrov 2014-01-02 23:44

The first problem should have been fixed in r9516.

Please test it and report if this is the case.

For the second problem please open another feature request.

The third problem is probably a limitation of wxWidgets wxHTML control. Probably you should talk to them if this is supported, I've no time to dig in to it, sorry.

gd_on 2014-01-06 15:50

I have just tried with version 9537 on a linux machine. But it still does not work : when I click on one of the link, sprintf.3 or sprintf.3p or sprintf.3p, I obtain a blank page.

As told before, may be in more details, for example :

sprintf.3.gz contains a file sprintf.3 which itself contains .so man3/printf.3

In this system I have only a printf.3.gz file, containing a file printf.3 which is finally the file to display.

tpetrov 2014-01-06 18:48

Can you tar you man folder and upload it somewhere, so I can see exactly what is going on?

I'm not sure if it is possible to upload it here, thought.

gd_on 2014-01-07 17:39

I have uploaded on http://thunderbird-noia2.pagesperso-orange.fr/man_test.tar.gz a simplified version of the man folder (original really too big).

It only contains the files used for printf and sprintf help, in subfloders man3, man3p ou a french version in fr/man3.

You can configure the help plugin to use it directly.

In my case, the folder man_test is in my home and I configure it by man:/home/gdurand/man_test.

The standard configuration is normally man:/usr/share/man.

With this specific configuration, you can reproduce the bug behaviaour.

If you search sprintf in the man help, you'll find 3 results : sprintf.3, sprintf.3 and sprintf.3p

I suppose the 1srt one is for the sprintf.3 in man3 and the 2nd one is for the sprintf.3 in fr/man3.

When I click on one of the link, I obtain no results, only a blank page. Normally, it should display the printf.3 (or .3p) file.

Note that if I unzip a sprint.3.gz in its own folder (so for example in man3), I see a new sprintf.3 in the links and if I click on it, the printf.3.gz is read, unzipped and correctly displayed.

So, it's probably the first unzip, the one on sprint.3.gz, which does not give the expected results (may be because it is not in the right folder ? in a temporary one ? so the reconstructed path to printf.3.gz is not correct ?).

gd_on

tpetrov 2014-01-08 21:23

Thank you, I was able to reproduce the problem and I'm fixing it. I'll notify you when I've committed my fix. But I'm seeing another problem: C::B is not able to open your FR versions of the man. Does the man program itself opens them correctly on your system?

gd_on 2014-01-09 07:38

No problems for me.

man works with the french versions on the linux machine.

More, on Windows, it works too (with C::B svn 9544). If the different sprintf.*.gz are manually locally unzipped (inside their corresponding man3* folders), I can reach and display correctly the content of the corresponding printf.* files.

May be yur problem with the french version comes from the fact that your system is not compatible with some french files, because of the accentuated characters (that's just an hypothesis !)

gd_on

tpetrov 2014-01-09 12:03

I've committed my fixes, so your man files should be accessible. Please test and report if it doesn't work again.

gd_on 2014-01-09 14:08

Tested on Windows and several Linux machines. It's OK. Perfect !

And cool the (fr) added when in a /fr subfolder.

Many thanks.

gd_on