ZT_LOCATION(3)
π zt_location β ok so WHERE even ARE we?? π
bestie. it's the zt_location page from the LOCAL manual, and she's a lil struct who knows exactly which line of which file you're standing on. iconic behavior tbh. π
β¨ SYNOPSIS β¨
#include <zt.h>
typedef struct zt_location { ... } zt_location;
like yes, she's a struct, she's short, she's giving minimalist queen π
πΈ DESCRIPTION πΈ
okay so zt_location holds two things and honestly that's all she needs: a file name and a line number. no drama, no extra fields, just vibes and coordinates fr fr π¦
here's the whole squad, field by field:
const char *filenameβ the name of the source file, and it comes straight from__FILE__β¨intlinenoβ the number of the line inside said file, and it comes from__LINE__π
and if you want one of these bad boys describing right here, right now, you use the ZT_CURRENT_LOCATION() macro. she hands you a location describing the current file and current line number. no cap. π₯
π IMPLEMENTATION NOTES π
so like, what is she for? zt_location gets used to report the location of failing test checks and assertions. that's it, that's the job. she's the one pointing at the crime scene when a test goes π and honestly? main character energy. π
π«Ά SEE ALSO π«Ά
go read those too bestie, they're the friend group π§
π HISTORY π
zt_location first appeared in libzt 0.1. a true original. a pioneer. we stan an early-era icon β
π AUTHORS π
Zygmunt Krynicki <me@zygoon.pl> β ty for your service king π«‘π
and that's the whole page!! this was libzt 0.3.1, dated January 12, 2020, and yes she's still serving. mwah, go write some tests, ily πβ¨π
π¦ where this page comes from
- debian bookworm: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- debian trixie: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu jammy: libzt-doc 0.3.1-4 Β· LGPL-3.0-only
- ubuntu noble: libzt-doc 0.3.1-4build1 Β· LGPL-3.0-only
- ubuntu questing: libzt-doc 0.3.1-4build1
- ubuntu resolute: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- ubuntu stonking: libzt-doc 0.3.1-4build2 Β· LGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms