scan_uuencoded(3)
β¨ scan_uuencoded β the manual, but make it cute β¨
okay bestie, so this page is from the Library Functions Manual, and it's literally all about scan_uuencoded(3). it decodes uuencoded data. yes THAT uuencode. the vintage one. she's old but she ate π
π NAME π
scan_uuencoded β decode uuencoded data. that's the whole job description. no cap.
πΈ SYNTAX πΈ
#include <libowfat/textcode.h>
size_t scan_uuencoded(const char *src,char *dest,size_t* destlen);
like, you gotta pull in <libowfat/textcode.h> first or she simply will not know what you're talking about π«Ά
π¦ DESCRIPTION π¦
okay so here's the vibe: scan_uuencoded decodes uuencoded data from src into dest. that's the main character move.
the way it works is it will stop the second it encounters any non-valid input characters. like, she has boundaries. π§ and when she stops, she writes the number of decoded bytes that landed in dest into *destlen, and returns the number of bytes she decoded out of src. two numbers, two places, keep track of both, i promise it's not that deep.
β οΈ heads up fr fr: real world uuencoded data is sometimes permitted to contain whitespace characters or new lines. this function will not allow those, and will return the decoded data up until then. so like, if your input is being a little sloppy with spaces, she's gonna tap out early. that's just the deal. π
now, the lore: uudecoding works on lines, and the first byte in each line contains the length of the line (encoded, obviously π
). scan_uuencoded expects one such line as input, and it will decode all the bytes in it. one line in, all the bytes out. periodt.
also important: uuencoded data can contain bytes from 0x21 to 0x96, which means it is not "string safe" β it can contain single and double quotes and backslash. so pls do not just yeet this into a string and expect everything to be chill, because it will not be. π
and the flexible queen energy: dest can be NULL. destlen can be NULL. dest can be src. in-place decoding, we love to see it π
π₯ RETURN VALUE π₯
scan_uuencoded returns the number of bytes successfully scanned and processed from src. that's it. that's the number. take it, use it, slay. β¨
π EXAMPLES π
here's the little demo, exactly as written:
scan_uuencoded("&9FYO<F0*",buf,&i) -> return 9, i=5, buf="fnord"
so: she returns 9, i becomes 5, and buf ends up as "fnord". iconic honestly. fnord. no notes. π
π SEE ALSO π
go read those too, they're the friend group π«Ά
and that's the whole page bestie π this was scan_uuencoded(3) from the Library Functions Manual β no extra version stamps or dates to hand you, just the manual name itself, so take that as the sign-off. stay string-unsafe-aware, decode one line at a time, and drink some water. mwah π
β¨
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms