summary refs log tree commit diff
path: root/bin/man1/c.1
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-05-31 13:12:23 -0400
committerJune McEnroe <june@causal.agency>2020-05-31 13:12:23 -0400
commit7daba199347fce96e47b7c59b9c008801f2668ec (patch)
tree11f8ecaab19045cdf29eecac715b6e09e80f7344 /bin/man1/c.1
parentUpdate mdoc source URLs (diff)
downloadsrc-7daba199347fce96e47b7c59b9c008801f2668ec.tar.gz
src-7daba199347fce96e47b7c59b9c008801f2668ec.zip
Add c script
Diffstat (limited to 'bin/man1/c.1')
-rw-r--r--bin/man1/c.140
1 files changed, 40 insertions, 0 deletions
diff --git a/bin/man1/c.1 b/bin/man1/c.1
new file mode 100644
index 00000000..3ae10945
--- /dev/null
+++ b/bin/man1/c.1
@@ -0,0 +1,40 @@
+.Dd May 31, 2020
+.Dt C 1
+.Os
+.
+.Sh NAME
+.Nm c
+.Nd run C
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl e Ar expr
+.Op Fl i Ar include
+.Op Ar stmts ...
+.
+.Sh DESCRIPTION
+The
+.Nm
+utility compiles and runs
+C statements wrapped in
+.Fn main
+with common includes.
+If no
+.Ar expr
+or
+.Ar stmts
+are provided,
+statements are read from standard input.
+.
+.Pp
+The arguments are as follows:
+.Bl -tag -width Ds
+.It Fl e Ar expr
+Print the result of the C expression
+.Ar expr
+after executing
+.Ar stmts .
+.It Fl i Ar include
+Add the include file
+.Ar include .
+.El