Skip to content
Tcl Source Code Artifact [521b8bca3b]
Login

Artifact [521b8bca3b]

Artifact 521b8bca3bc1556c0dc0a06623a46aea5a212728a01e3a2352a4384ac173a330:


# geo_types.tcl --
#
# FR : Produit geo_types.h, l'en-tête C des types de la géométrie, depuis
#      les type def ({c!}export) : les struct, et les _Static_assert qui vérifient
#      que le compilateur range comme Tcl.
#        tclsh geo_types.tcl > geo_types.h
# EN : Writes geo_types.h (the C header of the geometry types) from the type
#      defs, with the _Static_assert checking the C compiler lays them out as
#      Tcl does.
set ici [file dirname [file normalize [info script]]]
source [file join $ici .. .. layout binaliases.tcl]
type def point  {{double}x; {double}y}
type def pointC {{f64le}x; {f64le}y}
type def polyC  {{u32le}n; {list($n).pointC}pts}
puts -nonewline [type {c!}export point pointC polyC]