summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-09-16 14:31:59 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-09-16 14:31:59 +0000
commitb4390130258f8c7d663eb7fba9f5ed09b950d4b9 (patch)
treee056a965fe03602d2d18aea354ca771d88ea8f72
parente561781079b92cf565210454898cb7a88893ada1 (diff)
Add a manual page for genassym.cf, from NetBSD, and documenting our changes.
-rw-r--r--share/man/man5/Makefile4
-rw-r--r--share/man/man5/genassym.cf.5131
2 files changed, 133 insertions, 2 deletions
diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile
index 2efcad672c9..88747c0933b 100644
--- a/share/man/man5/Makefile
+++ b/share/man/man5/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.23 2001/09/11 01:06:58 marc Exp $
+# $OpenBSD: Makefile,v 1.24 2001/09/16 14:31:58 miod Exp $
# $NetBSD: Makefile,v 1.14 1995/05/11 23:13:15 cgd Exp $
# missing: dump.5 plot.5
@@ -8,7 +8,7 @@ MAN= a.out.5 acct.5 bsd.port.mk.5 core.5 dir.5 disktab.5 ethers.5 fbtab.5 \
link.5 login.conf.5 moduli.5 motd.5 netgroup.5 networks.5 passwd.5 \
passwd.conf.5 nat.conf.5 pf.conf.5 phones.5 printcap.5 protocols.5 \
remote.5 resolv.conf.5 rpc.5 services.5 shells.5 stab.5 sysctl.conf.5 \
- types.5 utmp.5 wsconsctl.conf.5 forward.5
+ types.5 utmp.5 wsconsctl.conf.5 forward.5 genassym.cf.5
MLINKS= dir.5 dirent.5 fs.5 inode.5 utmp.5 wtmp.5 utmp.5 lastlog.5
MLINKS+= hosts.equiv.5 .rhosts.5
MLINKS+= resolv.conf.5 resolver.5
diff --git a/share/man/man5/genassym.cf.5 b/share/man/man5/genassym.cf.5
new file mode 100644
index 00000000000..31a049d333c
--- /dev/null
+++ b/share/man/man5/genassym.cf.5
@@ -0,0 +1,131 @@
+.\" $OpenBSD: genassym.cf.5,v 1.1 2001/09/16 14:31:58 miod Exp $
+.\" $NetBSD: genassym.cf.5,v 1.8 2001/06/19 12:34:27 wiz Exp $
+.\"
+.\" Copyright (c) 1997 Matthias Pfaller.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Matthias Pfaller.
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd April 25, 1998
+.Dt GENASSYM.CF 5
+.Os
+.Sh NAME
+.Nm genassym.cf
+.Nd assym.h definition file
+.Sh DESCRIPTION
+The
+.Nm
+file is used by
+.Xr genassym.sh 8
+to make constant C expressions known to assembler source files.
+.Pp
+Lines starting with '#' are discarded by
+.Xr genassym.sh 8 .
+Lines starting with
+.Em include ,
+.Em ifdef ,
+.Em if ,
+.Em else
+or
+.Em endif
+are preceded with '#' and passed otherwise unmodified to the C compiler.
+.Pp
+Lines starting with
+.Em quote
+get passed on with the
+.Em quote
+command removed.
+.Pp
+The first word after a
+.Em define
+command is taken as a CPP identifier and the rest of the line has to be
+a constant C expression. The output of
+.Xr genassym.sh 8
+will assign the numerical value of this expression to the CPP identifier.
+.Pp
+.Em "export foo"
+.br
+is a shorthand for
+.br
+.Em "define foo foo" .
+.Pp
+.Em "struct foo"
+.br
+remembers foo for the
+.Em member
+command and does a
+.br
+.Em "define FOO_SIZEOF sizeof(foo)" ,
+.br
+with the structure name converted to upper
+case.
+.Pp
+.Em "member foo"
+.br
+does a
+.br
+.Em "define FOO offsetof(<last struct>, foo)" .
+.br
+The two argument form of
+.Em "member" ,
+as
+.br
+.Em "member foo bar"
+.br
+does a
+.br
+.Em "define FOO offsetof(<last struct>, bar)" ,
+.br
+with its first argument converted to upper case. In the case where struct was
+invoked with an extra argument, as in
+.br
+.Em "struct foo PREFIX_" ,
+.br
+the first argument of member will be prefixed by the remembered prefix, before
+being converted to upper case.
+.Pp
+.Em "config <ctype> <gcc constraint> <asm print modifier>"
+.br
+can be used to customize the output of
+.Xr genassym.sh 8 .
+.br
+When producing C output, values are casted to <ctype> (default: long)
+before they get handed to printf. <gcc constraint> (default: n) is the
+constraint used in the __asm__ statements. <asm print modifier> (default:
+empty) can be used to force gcc to output operands in different ways
+then normal. The "a" modifier e.g. stops gcc from emitting immediate
+prefixes in front of constants for the i386 and m68k port.
+.Sh FILES
+.Pa /sys/arch/${MACHINE}/${MACHINE}/genassym.cf
+.Sh SEE ALSO
+.Xr genassym.sh 8
+.Sh HISTORY
+The first use of
+.Nm
+files occured in
+.Ox 2.2 .
+Its use was generalized to all ports for
+.Ox 3.0 .