Section 26.8. Sample Application

   


26.8. Sample Application

Several of the examples in other chapters of this book use popt for option processing. A simple implementation of grep is on pages 562-567 and robin appears on pages 355-363. Both provide good examples of how popt is used in most applications.

RPM, a popular Linux package management program, makes heavy use of popt's features. Many of its command-line arguments are implemented through popt aliases, which makes RPM an excellent example of how to take advantage of the popt library.[10]. For more information on RPM, see http://www.rpm.org.

[10] popt was originally implemented for RPM, and many of RPM's query options are implemented as simple popt macros.

Logrotate is a program to help manage a system's log files. It provides a simpler example of using popt than RPM does, and is included with most Linux distributions.


       
    top
     


    Linux Application Development
    Linux Application Development (paperback) (2nd Edition)
    ISBN: 0321563220
    EAN: 2147483647
    Year: 2003
    Pages: 168

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net