OFINDLINE(3)

๐Ÿ“ฆ
version 2022.10.16 ยท 2 versions
, in opensuse-leap 16.0

๐Ÿฆ‹ OFINDLINE(3) โ€” Schilyยดs LIBRARY FUNCTIONS ๐Ÿฆ‹

okay bestie, this is the ofindline() page from Schilyยดs LIBRARY FUNCTIONS, manual name OFINDLINE(3). itโ€™s giving old-school Unix, and we are keeping every single detail. periodt. ๐Ÿ’…


๐ŸŒธ NAME ๐ŸŒธ

  • ofindline() โ€” finds a line with a matching field โœจ

โœจ SYNOPSIS โœจ

hereโ€™s the signature, copied exactly, no edits bestie:

       int ofindline(f,delim,string,field,array,arraysize)
            FILE *f;
            char delim;
            char *string;
            int field;
            char *array[];
            int arraysize;

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so ofindline() retrieves a line from an open file that has a matching character string in the given field. thatโ€™s the whole mission. ๐ŸŽฏ

the way that ofindline() fills in array with pointers to strings that make up each field on the line? iconic. the strings are allocated new storage โ€” fresh memory, bestie, not reusing somebody elseโ€™s vibe. โœจ

the field delimiter, delim, is used to break up each line of the file into fields. string is the string to match. fieldno is the field number to match. fields are numbered 0..n. array is an array of pointers to fill in. arraysize is the size of array. iykyk ๐Ÿซถ


๐ŸŽ€ RETURNS ๐ŸŽ€

  • +1 โ€” match. slay. โœ…
  • -1 โ€” no match. ๐Ÿ™ˆ
  • -2 โ€” arg error. returned only if the condition findline_arg_err is handled and the handler returns. ๐Ÿ’€
  • -4 โ€” not enough memory to allocate space for files. returned only if the condition findline_storage is handled and the handler returns. ๐Ÿ˜ญ

okay thatโ€™s the page, bestie. source/version: Schilyยดs LIBRARY FUNCTIONS, manual page OFINDLINE(3), author Joerg Schilling, date 2022/09/09. mwah ๐Ÿ’‹โœจ

๐Ÿ“ฆ where this page comes from