Trf_ShiftRegister(3)
π« Trf_ShiftRegister β shift the register, bestie π«
okay so this is a Library Functions Manual page, and the function we're obsessing over today is Trf_ShiftRegister from transform.h π it literally just shifts the register. that's the whole name, that's the whole vibe, no cap.
β¨ SYNOPSIS β¨
#include <transform.h>
void Trf_ShiftRegister
(
void *buffer,
void *in,
int shift,
int buffer_length
);
like. look at her. four params, returns nothing, does one job and does it flawlessly π
π PARAMETERS π
void *bufferβ the data getting shifted to the left. she's the main character here, she's the one doing the moving π¦void *inβ the 2nd register, aka the one getting shifted into the buffer. supporting role but lowkey essential πint shiftβ how many bytes to shift out (and in, bestie, it goes both ways π)int buffer_lengthβ the length ofbufferandin, measured in bytes. both of them. same number. don't @ me π
πΈ DESCRIPTION πΈ
so the register gets shifted shift bytes to the left. that's it, that's the tea β
but wait, because if we just shifted and left it there we'd have a bunch of empty sad little bytes on the right, right? π so the way that it works is: the same number of bytes from the left of the 2nd register (that's in, keep up bestie) gets inserted at the right of buffer, replacing all the lost bytes.
it's giving very much a conveyor belt situation. stuff slides out the left, new stuff slides in from in on the right, nothing is ever empty, everything stays full, we love a seamless transition β¨π«Ά
π SEE ALSO π
the whole friend group, fr fr β go read these too:
Trf_Init(3)Trf_SafeInit(3)Trf_IsInitialized(3)Trf_CreateOptions(3)Trf_DeleteOptions(3)Trf_CheckOptions(3)Trf_SetOption(3)Trf_SetObjOption(3)Trf_QueryOptions(3)Trf_SeekQueryOptions(3)Trf_WriteProc(3)Trf_CreateCtrlBlock(3)Trf_DeleteCtrlBlock(3)Trf_TransformCharacter(3)Trf_TransformBuffer(3)Trf_FlushTransformation(3)Trf_ClearCtrlBlock(3)Trf_QueryMaxRead(3)Trf_Register(3)Trf_ConverterOptions(3)Trf_MDStart(3)Trf_MDUpdate(3)Trf_MDUpdateBuf(3)Trf_MDFinal(3)Trf_MDCheck(3)Trf_RegisterMessageDigest(3)Trf_LoadLibrary(3)Trf_XorBuffer(3)Trf_FlipRegisterShort(3)Trf_FlipRegisterLong(3)Trf_InitStubs(3)
π ngl this page came from c2man transform.h, dated 27 August 2002 β so yeah she's vintage, she's an icon, she's been shifting registers since before some of us were born. respect the elders, bestie π«Ά
that's the whole page, mwah, go shift something πβ¨
π¦ where this page comes from
- debian bookworm: tcl-trf-doc 2.1.4-dfsg3-2.1
- debian trixie: tcl-trf-doc 2.1.4-dfsg3-8
- ubuntu jammy: tcl-trf-doc 2.1.4-dfsg3-2.1build1
- ubuntu noble: tcl-trf-doc 2.1.4-dfsg3-3
- ubuntu questing: tcl-trf-doc 2.1.4-dfsg3-8
- ubuntu resolute: tcl-trf-doc 2.1.4-dfsg3-8build1
- ubuntu stonking: tcl-trf-doc 2.1.4-dfsg3-9build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms