VNL-GEN-HEADER(1)

πŸ“¦
version 1.42 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– VNL-GEN-HEADER πŸ’–

okay bestie, so this is a page from the vnlog manual, section 1, and it's all about the tool vnl-gen-header πŸŽ€


✨ NAME ✨

vnl-gen-header β€” create definition for vnlog output from C πŸ¦‹


🌸 SYNOPSIS 🌸

$ vnl-gen-header 'int w' 'uint8_t x' 'char* y' 'double z' > vnlog_fields_generated.h

like. that's it. that's the whole vibe. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so there's this lil C library that makes vnlog output for you, right? and here's the thing β€” the fields it outputs have to be known at compile time. no surprises, no last-minute additions, the compiler needs the receipts up front. 😀

so where do those fields come from? a header file. and who makes that header file? this tool right here. that's literally its whole job. πŸ‘‘

for the actual instructions on how to use the library, go peek at the vnlog documentation, okay? not this page. this page is just about the header-generating bestie. πŸ“–βœ¨


🧚 ARGUMENTS 🧚

okay so you gotta feed this thing a list of field definitions. it's giving "gimme the deets". here's how it looks for them:

  1. first it checks the commandline πŸ‘€
  2. if the definitions aren't there, it goes and checks STDIN πŸ“₯

each definition is a string of the form "type name" β€” so like, one def per argument on the commandline, or one def per line on STDIN. simple as. πŸ“

πŸ’‘ if you're reading from STDIN: blank lines get ignored, and any line starting with # is treated as a comment. so go ahead and annotate, nobody's mad at you.

every single def represents one output field. and each field spec is literally a C-style variable declaration β€” a type, followed by a name. very demure, very C. 🫢

⚠️ heads up bestie: these field specs contain whitespace. so you must quote each one before handing it to the shell. no quote = chaos = the shell eats your type and name as separate words and you will simply perish. 😭

so what types can you use? let's break it down:

  • basic scalars, possibly with set widths β€” think char, double, int, uint32_t, unsigned int, ... you know the ones 🌈
  • a NULL-terminated string β€” that's char* πŸ’«
  • a generic chunk of binary data β€” that's void* 🫧

and the names? they must consist entirely of letters, numbers or _. exactly like variables in C. that's the rule, that's the law, that's the assignment. ⭐


πŸ”₯ REPOSITORY πŸ”₯

the source lives here, go be nosy:

https://github.com/dkogan/vnlog/

πŸ‘‘ AUTHOR πŸ‘‘

Dima Kogan "<dima@secretsauce.net>" β€” the icon, the legend, the one who wrote it. πŸ’–


Copyright 2016 California Institute of Technology. πŸ›οΈ

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. 🫢


and that's the whole page, bestie!! this one's from the vnlog manual, and the page itself is dated 2026-01-26. mwah, go generate some headers πŸ’…βœ¨
πŸ“¦ where this page comes from