ppd_check_..._is_marked(3)

πŸ“¦ version 0.10, in debian bookworm, ubuntu jammy

✨ 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() β€” returns 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. yeah bestie, it's not gonna tell you. you gotta go ask. 😭
fr fr: don't trust the return value of ppd_mark_option() to tell you anything β€” it is always 0. the only way to know if it worked is to follow up with ppd_check_option_is_marked() on that same option. periodt.

🌈 SEE ALSO 🌈


πŸ‘‘ 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