---
name: "zt_location_at"
section: "3"
platform: "linux"
package: "libzt-doc"
version: "0.3.1-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/zt_location_at"
---

# zt\_location\_at(3)

pack file name and line number into a location value

## NAME

**zt\_location\_at** – pack file name and line number into a location value

## SYNOPSIS

**#include \<zt.h\>**

*zt\_location*\

**zt\_location\_at**(*const char\* fname*, *int lineno*);

## DESCRIPTION

**zt\_location\_at** packs both arguments into a **zt\_location**. It exists to facilitate packing a **zt\_claim** value without any temporary variables. It is useful for support of C compilers that do not support structure literals.

For convenient definition of the current file and line number use the macro **ZT\_CURRENT\_LOCATION**()

## IMPLEMENTATION NOTES

**zt\_location\_at** is only provided as a static inline function.

The fname argument is retained by the value and is typically a constant string literal produced by the preprocessor.

## RETURN VALUES

A **zt\_location** containing the given file name and line number.

## SEE ALSO

[ZT\_CURRENT\_LOCATION(3)](/ZT_CURRENT_LOCATION/3.md), [zt\_location(3)](/zt_location/3.md)

## HISTORY

**zt\_location\_at** first appeared in libzt 0.1

## AUTHORS

Zygmunt Krynicki ⟨*me@zygoon.pl*⟩
