PATCOMPILE(3)

πŸ“¦
version 2022.10.16 Β· 2 versions
, in opensuse-leap 16.0

πŸ’– PATCOMPILE(3) β€” SchilyΒ΄s LIBRARY FUNCTIONS πŸ’–

okay so bestie, this is the PATCOMPILE(3) page from Schily´s LIBRARY FUNCTIONS, and it's literally about getting your matching pattern compiled and ready to slay. ✨

🌸 NAME 🌸

patcompile() β€” compiles a matching pattern. That's it, that's the whole vibe: pattern goes in, compiled internal form comes out. πŸ’…

✨ SYNOPSIS ✨

int patcompile(pattern, length, aux)
     char *pattern;
     int length;
     int aux[];

πŸ¦‹ DESCRIPTION πŸ¦‹

patcompile() takes a pattern and compiles it into an internal form β€” the kind of glow-up that patmatch(3) can actually use. πŸ”₯

It scans the string at pattern with size length. Then it fills the array aux with state information for patmatch(3). No cap, aux should have at least length elements β€” like, at minimum, bestie, don't skimp. 🫢

πŸŽ€ RETURNS πŸŽ€

  • It returns 0 if the pattern contains an error. Sad girl hours, the compile did not eat. 😭
  • Any other values should be passed to patmatch(3) as the alt argument. That's the handoff, iykyk. πŸ’«

🌈 SEE ALSO 🌈

  • match(1)
  • For a description of the regular expressions. (The original page says "ot" instead of "of" β€” a tiny typo moment, but the info is still giving. πŸ™ˆ)

πŸ‘‘ NOTES πŸ‘‘

The pattern matching functions are based on ones presented by Martin Richards in "A Compact Function for Regular Expression Pattern Matching", Software-Practice and Experience vol 9, 527-534 (1979). Academic icon behavior, honestly. 🧚


mwah πŸ’‹ β€” this page is from SchilyΒ΄s LIBRARY FUNCTIONS, written by Joerg Schilling, dated 2022/09/09, and yes bestie, it's PATCOMPILE(3) to the very end πŸ’–βœ¨

πŸ“¦ where this page comes from