---
name: "ppd_check_option_is_marked"
section: "3"
platform: "linux"
package: "libppd-dev"
version: "2:0.10-9"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/ppd_check_option_is_marked"
---

# ppd\_check\_option\_is\_marked(3)

a set of functions for determining the current status of PPD options and selecting them.

## NAME

ppd\_check\_option\_is\_marked, ppd\_mark\_defaults, ppd\_mark\_option - a set of functions for determining the current status of PPD options and selecting them.

## SYNOPSIS

**#include \<ppd.h\>**

**gboolean ppd\_check\_option\_is\_marked (PpdFile \*ppd, const char \*keyword, const char \*option);**

**gint ppd\_mark\_option(PpdFile \*ppd, const char \*option, const char \*choice);**

**void ppd\_mark\_defaults (PpdFile \*ppd);**

## DESCRIPTION

These three functions are used to query the marked status of an option in a PPD file as well as forcing an option to be selected.

### ppd\_check\_option\_is\_marked(PpdFile \*ppd, const char \*option, const char \*choice);

ppd\_check\_option\_is\_marked() accepts three parameters as input. The first is the PpdFile pointer to a PPD file obtained by calling one of the **ppd\_load(3)**  functions.  The second parameter is the option of the keyword name.   The final input parameter is the actual choice name.

### ppd\_mark\_option(PpdFile \*ppd, const char \*option, const char \*choice);

ppd\_mark\_option allows the programmer to manually select an option in a PPD file.  The parameters are the a valid PpdFile pointer (see  **[ppd\_file\_new(3)](/ppd_file_new/3.md)**), the option name, and the choice name.

### void ppd\_mark\_defaults (PpdFile \*ppd);

ppd\_mark\_defaults() resets all the default options in the PPD file specified by the PpdFile pointer (see **[ppd\_file\_new(3)](/ppd_file_new/3.md)**).

## RETURN VALUE

- ppd\_check\_option\_is\_marked()

  FALSE if the option is not currently selected and TRUE is it marked

- ppd\_mark\_option()

  Always returns 0.  The only means of determining whether or not the function succeeded is to make a subsequent call to ppd\_check\_option\_is\_marked() on the same option.

## SEE ALSO

[ppd\_file\_new(3)](/ppd_file_new/3.md), [ppd\_emit\_to\_file(3)](/ppd_emit_to_file/3.md), [ppd\_file\_free(3)](/ppd_file_free/3.md), [ppd\_find\_choice(3)](/ppd_find_choice/3.md), [ppd\_get\_num\_conflicts(3)](/ppd_get_num_conflicts/3.md), [ppd\_get\_page\_length(3)](/ppd_get_page_length/3.md)

## AUTHOR

This man page was written by Gerald Carter \<gcarter@valinux.com\>. It was updated by Mark Fasheh \<mfasheh@valinux.com\> to reflect changes in libppd 0.5.  Some of the code was originally part of the Common UNIX Printing System (CUPS).
