ppd_check_..._is_marked(3)
β¨ ppd_check_..._is_marked β¨
okay bestie, buckle up π this one lives in the Library Functions Manual and it's literally a whole lil trio of functions that tell you what's marked in a PPD file and let you mark stuff yourself. iykyk.
πΈ 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.
no cap, that's the whole vibe: check the status, and pick the option. π
π 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 π
so these three functions are your little group chat for querying whether an option in a PPD file is marked, and also for forcing an option to be selected. slay.
π¦ ppd_check_option_is_marked(PpdFile *ppd, const char *option, const char *choice);
ppd_check_option_is_marked() takes three parameters as input. the first one is the PpdFile pointer to a PPD file that you got by calling one of the ppd_load(3) functions π«Ά. the second parameter is the option of the keyword name. and the final input parameter is the actual choice name. that's it, that's the trio.
π ppd_mark_option(PpdFile *ppd, const char *option, const char *choice);
ppd_mark_option lets the programmer manually select an option in a PPD file β main character energy, you just pick it yourself β¨. the parameters are a valid PpdFile pointer (peep ppd_file_new(3)), 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 (again, see ppd_file_new(3)). it's giving factory reset but make it cute π§.
π₯ RETURN VALUE π₯
ppd_check_option_is_marked()β returnsFALSEif the option is not currently selected, andTRUEis it marked.ppd_mark_option()β always returns0. the only means of determining whether or not the function succeeded is to make a subsequent call toppd_check_option_is_marked()on the same option. yeah bestie, it's not gonna tell you. you gotta go ask. π
fr fr: don't trust the return value ofppd_mark_option()to tell you anything β it is always0. the only way to know if it worked is to follow up withppd_check_option_is_marked()on that same option. periodt.
π SEE ALSO π
ppd_file_new(3)ppd_emit_to_file(3)ppd_file_free(3)ppd_find_choice(3)ppd_get_num_conflicts(3)ppd_get_page_length(3)
π 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).
okay that's the whole page, you ate it π
and just so you know, this is ppd_check_..._is_marked(3) from the Library Functions Manual, brought to you by libppd 0.5 β stay iconic, bestie πβ¨π¦
π¦ where this page comes from
- debian bookworm: libppd-dev 2:0.10-9 Β· GPL-2.0-or-later
- ubuntu jammy: libppd-dev 2:0.10-8 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms