scf2read(3)
π scf2read β bestie edition π
okay so. we're deep in scf2read(3) territory, and yes it's a manual page, but it's also kind of a bop. this is all about translating to and from the Read structure. no cap. π¦
β¨ NAME β¨
scf2read, read2scf, exp2read, read2exp β translate to and from the Read structure. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <Read.h>
Read *scf2read(
Scf *scf);
Scf *read2scf(
Read *read);
Exp_info *read2exp(
Read *read,
char *EN);
Read *exp2read(
Exp_info *e);
four little functions, four little glow-ups. look at them. iconic. π
π DESCRIPTION π
so these functions are the backstage crew β they're used internally by the io library to convert between the in-memory representations of all the supported file formats. the Read structure is the main character here, the central format, which is why the only conversions you get are to and from it. periodt. and those conversions are: to and from the SCF format, and to and from the Experiment File format. that's it, that's the menu. π
scf2read() takes an Scf structure and turns it into a Read structure. the Read structure is allocated by the function β so yes bestie, it's yours, you gotta deal with it. the Scf structure is left unchanged, untouched, unbothered. β¨
read2scf() goes the other way: Read structure in, Scf structure out. again, the Scf structure is allocated by the function, and the Read structure is left unchanged. no notes. π
exp2read() takes an Exp_info structure and makes it a Read structure. important lil detail: you must specify the entryname to use in the EN line type of the Experiment File. like, you have to say it. the Read structure is allocated by the function, and the Exp_info structure is left unchanged. π«Ά
read2exp() takes a Read structure and turns it into an Exp_info structure. the Exp_info structure is allocated by the function, and the Read structure is left unchanged. we love a function that doesn't mess with your stuff. π
β RETURN VALUES β
if everything goes well, scf2read() and exp2read hand you back a pointer to a freshly allocated Read structure. if not? they hand you back NULLRead. that's the sad path bestie, and it's real. π
if everything goes well, read2scf hands you back a pointer to an allocated Scf structure. otherwise, this function returns a null pointer. π
if everything goes well, read2exp hands you back a pointer to an allocated Exp_info structure. otherwise, this function returns a null pointer. π
reminder: allocated means you are responsible for it. not me. not the function. you. π
π SEE ALSO π
read_reading(3)fread_reading(3)write_reading(3)fwrite_reading(3)scf(4)ExperimentFile(4)
iykyk, go read those next. they're the rest of the lore. πβ¨
okay that's the whole page!! this one's from the Staden Package, and yeah, it's scf2read(3) β the header says so, the footer says so, and now you say so. go forth and convert, bestie, you're gonna slay. πππ¦πΈπ
π¦ where this page comes from
- debian bookworm: libstaden-read-dev 1.14.15-1 Β· GRL OR MRC
- debian trixie: libstaden-read-dev 1.15.0-1.1+b2 Β· GRL OR MRC
- fedora 43: staden-io_lib-devel 1.14.8-6.fc43 Β· MIT
- fedora 43: staden-io_lib-devel 1.14.8-6.fc43 Β· MIT
- fedora 44: staden-io_lib-devel 1.14.8-7.fc44 Β· MIT
- fedora 44: staden-io_lib-devel 1.14.8-7.fc44 Β· MIT
- nixos 26.05: libstaden-read 1-15-1
- nixpkgs unstable: libstaden-read 1-15-1
- ubuntu jammy: libstaden-read-dev 1.14.14+dfsg-1 Β· GRL OR MRC
- ubuntu noble: libstaden-read-dev 1.15.0-1.1build2 Β· GRL OR MRC
- ubuntu questing: libstaden-read-dev 1.15.0-1.1build2
- ubuntu resolute: libstaden-read-dev 1.15.0-1.1build3 Β· GRL OR MRC
- ubuntu stonking: libstaden-read-dev 1.15.1-1 Β· GRL OR MRC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms