MKCHDR(1)
β¨ MKCHDR β the manual page, but make it cute β¨
okay so bestie, welcome to mkchdr from the General Commands Manual π this is the lil tool that creates a C header file from a type table and honestly? iconic behaviour.
πΈ NAME πΈ
mkchdr β creates a C header file from a type table π
π SYNOPSIS π
mkchdr <tbl-file> [output-file]
that's it. that's the whole vibe. two args, one of them optional, main character energy fr fr β¨
π¦ DESCRIPTION π¦
so here's the tea, bestie π
mkchdr will generate a C header file from the given type table. The C data structures get written to the given output file. And if you don't hand it an output file? No worries, babe β the C header just goes straight to stdout. π«
The generated C data structure is the value representation that the table driven encoder expects (and that the decoder returns) for the type definitions in the given type table. π
Now, important detail so you don't get it twisted: the table driven encoder and decoder, etc. routines do not use the generated header. Nope! They treat the data in a generic way. The generated header file is purely there to save you the hassle of dealing with ASN.1 values in that same generic way. Instead, you get properly named structs and field names. π·οΈβ¨
And like, technically? You do not need to use mkchdr to use the table driven encoders etc. β but it is recommended. Consider it a glow-up for your code, iykyk. π
π§ FILES π§
snacc/tbl-tools/mkchdr/β Source code for themkchdrprogram ποΈ
π BUGS π
There is no means of customizing the generated data structure. That's it. That's the whole bug. Take what you get, bestie π no customisation options, no sliders, no nothing.
π COPYING π
Copyright (c) 1993 Mike Sample and the University of British Columbia
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
fr fr read the license before you go copying, bestie β it's giving "share the receipts" energy π«Ά
π AUTHOR π
Mike Sample <msample@cs.ubc.ca>, University of British Columbia π
β ACKNOWLEDGEMENTS β
This work was made possible by grants from the Canadian Institute for Telecommunications Research (CITR) and Natural Sciences and Engineering Research Council of Canada (NSERC). π funding the vibes since forever, we love to see it π
and that's a wrap on this page of the General Commands Manual, dated 11 July 1993 ποΈβ¨ (yes bestie, MKCHDR(1), that one). slay, go generate some headers π
πΈ
π¦ where this page comes from
- debian bookworm: snacc 1.3.1-9
- ubuntu jammy: snacc 1.3.1-8
- ubuntu noble: snacc 1.3.1-10
- Copyright (c) 1993 by Mike Sample and UBC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms