GETARGINIT(3)

πŸ“¦ version 2022.10.16, in opensuse-leap 16.0

πŸ’… GETARGINIT(3) β€” getarginit()

okay so real talk, this one lives in Schily´s LIBRARY FUNCTIONS (that's the manual name bestie, we're in the getargs cinematic universe) and it's literally the setup queen for all her sister functions. she doesn't parse anything herself, she just hands out the vibes ✨


🌸 NAME 🌸

getarginit() β€” initialize properties for getargs() type functions

like, she's the one who picks the outfit (the properties) before the rest of the squad goes out πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <schily/getargs.h>

int getarginit(propg, flags)
   struct ga_props *props; /* control properties */
   int flags;              /* to control option parsing behavior */

πŸ’– DESCRIPTION πŸ’–

getarginit() initializes struct ga_props as needed by the functions getlargs(), getlallargs(), getlfiles(), getvargs(), getvallargs(), getvfiles(). no cap, she's the pre-game ritual for the whole fam 🫢

The flags argument controls the behavior of the named functions. If the value is 0, the default behavior as documented in the man pages is used. icymi, here are the flags you can pass β€” and yes, they may be combined (except for the one diva that refuses to share the spotlight, scroll down πŸ’…):

  • GAF_DEFAULT β€” Use the default behavior. the "no thoughts head empty" option, respect 🧚
  • GAF_NO_PLUS β€” Options may not start with a + even if they are marked with a + in the format string. sorry plus-sign girlies, not today πŸ™ˆ
  • GAF_NO_EQUAL β€” Disallow = between option name and value. the equals sign has left the chat πŸ’€
  • GAF_NEED_DASH β€” A dash is needed before an option that takes an argument. Options in the form name=value are not allowed. dash girlies rise, name=value stans sit down 😭
  • GAF_DELIM_DASHDASH β€” The special argument -- stops option parsing even when using getallargs(), getlallargs(), getvallargs(). -- said "I'm done" and she meant it πŸ”₯
  • GAF_SINGLEARG β€” In a string with combined single character options, the last option character may be an option that has an argument. so like, the last one in the bundle is allowed to be the needy one πŸ₯Ί
  • GAF_POSIX β€” This macro enforces POSIX behavior and expands to GAF_NO_PLUS | GAF_NO_EQUAL | GAF_SINGLEARG. This value may not be combined with other flags. ⚠️ she's an all-or-nothing icon, do not try to mix her with the others, that's not the vibe πŸ‘‘
fr fr, GAF_POSIX will not be combined with other flags. that's not me being dramatic, that's the rule bestie 😌

⭐ RETURNS ⭐

  • 0 β€” No error occurred. slay, we're so back πŸ’š
  • -1 β€” The version of the library was too old for the calling program. rip, time to update πŸ™ƒ

🌈 SEE ALSO 🌈

getlargs(3), getlallargs(3), getlfiles(3), getvargs(3), getvallargs(3), getvfiles(3). the whole friend group, go read them too iykyk πŸ’œ


πŸ’€ BUGS πŸ’€

None currently known. flawless behavior, we love to see it ✨

Mail bugs and suggestions to schilytools@mlists.in-berlin.de or open a ticket at https://codeberg.org/schilytools/schilytools/issues. she reads her dms πŸ“¬

The mailing list archive may be found at:

https://mlists.in-berlin.de/mailman/listinfo/schilytools-mlists.in-berlin.de

πŸ‘‘ AUTHOR πŸ‘‘

Joerg Schilling and the schilytools project authors. main character energy, honestly 🫢


that's the whole page babes, no notes 🌸 written by Joerg Schilling and dated 2022/09/09, and that footer you saw at the bottom? that's just the source/version + date doing its little sign-off πŸŽ€ mwah πŸ’‹

πŸ“¦ where this page comes from