Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-26-2004, 10:44 PM   #1
LQ Newbie
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
how to access man pages using C++ ?

how to access man and info pages?

is there some lib or something out there that can access man? i need to be able to get a program to view these pages by implementing the program using C++ (using Qt toolkit preferred ) Can anyone help me out with it? Thanks.
Old 09-26-2004, 10:54 PM   #2
Senior Member
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
They're just files in the /usr/man (sometimes /usr/local/man) directory. Are you just wondering how to process the formatting codes?
Old 09-27-2004, 12:18 AM   #3
LQ Newbie
Registered: Sep 2004
Posts: 5

Original Poster
Rep: Reputation: 0
yes...Those formats that looks similar to HTML Tags. Formats e.g." .BR ", " .B ".......Any idea how can i get them out? Changing them into readable text that QTextEdit or any other widgets that can read and show it just like how it is in a Terminal. If there are other ways...sugguestions are welcome!~Thanks
Old 09-27-2004, 01:20 AM   #4
Registered: Sep 2004
Distribution: OpenSuSe
Posts: 153

Rep: Reputation: 30
First of all, this is just a guess from a C newbie. So dont be angry I'm missing something obvious.

IIRC the codes are the roff/troff formatting commands. So can we use something like (works on a solaris box):

nroff -man < ${file_name}

On linux, /etc/man.config (I think) can give you some pointers about the exact command...

Dont know you are going to implement this in C++. Somthing like system(nroff...) ?!

Old 09-27-2004, 02:25 AM   #5
LQ Newbie
Registered: Sep 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I need a sample code in C++ as guide. Can anyone help out? ( Best if it is done using QT Designer )


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C man pages sono2 Linux - Software 2 09-09-2005 12:24 PM
What do you mean by MAN pages? inspectreo Linux - Newbie 2 05-08-2005 02:12 PM
howto access man and info pages? SciYro Programming 5 07-23-2004 11:21 AM
man pages haobaba1 Linux - General 4 07-30-2003 02:09 PM
man pages spuppett Linux - General 5 02-23-2003 02:28 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration