LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-26-2004, 10:44 PM   #1
ambitionless
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
itsme86
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
ambitionless
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
dustu76
Member
 
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...) ?!

HTH.
 
Old 09-27-2004, 02:25 AM   #5
ambitionless
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 )
 
  


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:54 PM.

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