ppd_find_choice(3)

ppd_find_choice3

Set of functions for returning pointers to choices from ppd files.

Usage

#include <ppd.h>

PpdChoice *ppd_find_choice (PpdOption *o, const char *choice);

PpdChoice *ppd_find_marked_choice (PpdFile *ppd, const char *keyword);

PpdOption *ppd_find_option_by_keyword (PpdFile *ppd, const char *keyword);

Overview

These three functions allow the programmer access options and choices within a PPD file.

PpdChoice *ppd_find_choice (PpdOption *o, const char *choice);

This function accepts two parameters. The first is a pointer to a PPD option structure and the second is the name of the choice to locate.

PpdChoice *ppd_find_marked_choice (PpdFile *ppd, const char *keyword);

This function accepts a valid PpdFile pointer (see ppd_file_new(3)) and a keyword or option name to locate in the PPD file.

PpdOption *ppd_find_option_by_keyword (PpdFile *ppd, const char *keyword);

This function accepts two parameters which are identical to those used when invoking the ppd_find_marked_choice() function. However, the ppd_find_option_by_keyword() function does not mark the designated option as being selected.

Return value

ppd_find_choice()

Return a pointer to an option choice; NULL in the case of a failure

ppd_find_marked_choice()

Return the marked choice for the specified option; NULL in the case of a failure

ppd_find_option_by_keyword()

Return a pointer to the specified option; NULL in the case of a failure

Releases

Unchanged in 11 releases since Debian 3.0 (Woody).

  1. 3.0–12

Author

This man page was written by Gerald Carter <[email protected]>. It was updated by Mark Fasheh <[email protected]> to reflect changes in libppd 0.5 Some of the code for these functions was originally part of the Common UNIX Printing System (CUPS).

From libppd-dev 2:0.10-9 in Debian 12 (Bookworm). Parsed by carta from the page's man source.