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. |
They're just files in the /usr/man (sometimes /usr/local/man) directory. Are you just wondering how to process the formatting codes?
|
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
|
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. |
I need a sample code in C++ as guide. Can anyone help out? ( Best if it is done using QT Designer )
|
All times are GMT -5. The time now is 01:58 AM. |