From dd57a7f39e45649f18282deb81359433d93abef2 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 13 Mar 2025 09:45:00 +0800 Subject: [PATCH] A bit more renaming in the man pages --- htmplgen/htmplgen.1 | 6 +++--- htmplgen/htmplgen.7 => htmplgen/htmpl.7 | 29 +++++++++++++---------------- htmplgen/htmplgen.c | 2 +- diff --git a/htmplgen/htmplgen.1 b/htmplgen/htmplgen.1 index 3b334a2ccfbf54118a767b2863bd7d3d031f45ab..50fdc8265002cd6ea0126959d9325c13a30f838f 100644 --- a/htmplgen/htmplgen.1 +++ b/htmplgen/htmplgen.1 @@ -16,7 +16,7 @@ .Dd January 6, 2022 .Dt TEMPLATE 1 .Os .Sh NAME -.Nm chtmpl +.Nm htmplgen .Nd templating system compiler .Sh SYNOPSIS .Nm @@ -26,7 +26,7 @@ .Op Ar .Sh DESCRIPTION .Nm is an utility that converts files written in the -.Xr chtmpl 7 +.Xr htmpl 7 format format to a set of routine writtens in the C programming language. .Nm @@ -50,7 +50,7 @@ .El .Sh EXIT STATUS .Ex -std .Sh SEE ALSO -.Xr chtmpl 7 +.Xr htmpl 7 .Sh AUTHORS .An -nosplit The diff --git a/htmplgen/htmplgen.7 b/htmplgen/htmpl.7 rename from htmplgen/htmplgen.7 rename to htmplgen/htmpl.7 index 655b2122eb214f1764a724d933f36ce0b601dd4b..5d1a34c03b4adf44c1a6f306bd081a0ea409c017 100644 --- a/htmplgen/htmplgen.7 +++ b/htmplgen/htmpl.7 @@ -16,21 +16,19 @@ .Dd January 6, 2022 .Dt TEMPLATE 7 .Os .Sh NAME -.Nm chtmpl +.Nm htmpl .Nd templating language .Sh DESCRIPTION .Nm -is a language used to define programs that output data in some way. +is a language used to define programs that output HTML. These programs are called .Dq templates . A .Nm file is assumed to be compiled using the -.Xr chtmpl 1 -utility into C code, to be further compiled as part of a bigger +.Xr htmplgen 1 +utility into Hare code, to be further compiled as part of a bigger application. -The language itself is format-agnostic and can thus be used to produce -various type of outputs. .Pp There are two special sequences: .Bl -tag -width 9m @@ -39,7 +37,7 @@ used for .Nm special syntax. .It Cm {! Ar ... Cm !} -used to include literal C code. +used to include literal Hare code. This is the only special syntax permitted as top-level, except for block definition and includes. .El @@ -47,7 +45,7 @@ .Pp The basic unit of a .Nm file is the block. -Each block is turned into a C function that output its content via some +Each block is turned into a Hare function that output its content via some provided functions. Here's an example of a block: .Bd -literal -offset indent @@ -99,11 +97,11 @@ can be provided zero or more times, .Ic else only zero or one time and always for last. .It Cm {{ Ic for Ar ... ; Ar ... ; Ar ... Cm }} Ar ... Cm {{ Ic end Cm }} -Looping construct similar to the C for loop. +Looping construct similar to the Hare for loop. .It Cm {{ Ic tailq-foreach Ar var head fieldname Cm }} Ar .. Cm {{ Ic end Cm }} Looping construct similar to the queue.h macro TAILQ_FOREACH. .It Cm {{ Ic while Ar ... Cm }} Ar ... Cm {{ Ic end Cm }} -Looping construct similar to the C while loop. +Looping construct similar to the Hare for loop with one condition argument only. .It Cm {{ Ar expression Cm \&| Ic unsafe Cm }} Output .Ar expression @@ -118,10 +116,9 @@ .Ar expression with the default escaping. .El .Sh SEE ALSO -.Xr chtmpl 1 +.Xr htmplgen 1 .Sh AUTHORS -.An -nosplit -The -.Nm -reference was written by -.An Omar Polo Aq Mt op@openbsd.org . +.An Omar Polo Aq Mt op@openbsd.org +wrote the original program. +.An Runxi Yu Aq Mt op@openbsd.org +ported it to Hare. diff --git a/htmplgen/htmplgen.c b/htmplgen/htmplgen.c index f572a07a3284894efd7d32a99a0c2c53378eec65..2085342299f04fd0a93c4496498c1e9da237c542 100644 --- a/htmplgen/htmplgen.c +++ b/htmplgen/htmplgen.c @@ -48,7 +48,7 @@ out = optarg; break; default: if (argc == 0) - usage("chtmpl"); + usage("htmplgen"); else usage(argv[0]); } -- 2.48.1