Implement name to part reference change (ugly)
authorLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Sat, 16 Aug 2025 10:36:41 +0000 (12:36 +0200)
committerLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Sat, 16 Aug 2025 11:02:50 +0000 (13:02 +0200)
commit67720402bc8eb39f2f12f4c1cec322591aee1fd5
treecff019095f70c2227bc45b5371bd1b69ed4e2f39
parentf477cd5a8563c28c4769778323b877bb30febb96
Implement name to part reference change (ugly)

This commit introduces the swap from a part name to a pointer to a part.

It also implements the p and n FETs as parts in a way that I consider
ugly - there is a lot of stuff that WILL BREAK if Libft changes the
implementation of the underlying structures. I explain myself in a
comment directly adjacent to the ugly code but will reiterate here.
The 42 Norm only allows static constant globals I was not able to define
the FETs as such. So I fit them in a static variable of a function. And
so that I don't have to release the memory (Norm mandates clear
Valgrind output) I try to fit it on the stack.

This should be quite easy to refactor if one decides not to comply with
the Norm.
src/c_load.c