This commit slightly improves the formatting of the manuals. My
OpenBSD machine uses mandoc(1) to format manuals. I check the manuals
with `mandoc -T lint` and fix most of the warnings. I also make
other changes where mandoc didn't warn me.
roff(7) says, "Each sentence should terminate at the end of an input
line," but we often forgot this rule. I insert some newlines after
sentences that had ended mid-line.
roff(7) also says that blank lines "are only permitted within literal
contexts." I delete blank lines. This removes some extra blank lines
from mandoc's output. If I do want a blank line in the output, I call
".sp 1" to make it in man(7). If I want a blank line in the source,
but not the output, I put a plain dot "." so roff ignores it.
Hyphens used for command-line options, like \-a, should be escaped by
a backslash. I insert a few missing backslashes.
mandoc warns if the date in .TH doesn't look like a date. Our manuals
had a missing date or the RCS keyword "$Revision$". Git doesn't
expand RCS keywords. I put in today's date, 2017-01-18.
Some manuals used tab characters in filled mode. That doesn't work.
I use .nf to turn off filled mode, or I use .IP in man(7) to make the
indentation without a tab character.
ack(1) defined a macro .SB but never used it, so I delete the
definition. I also remove a call to the missing macro .RF.
mandoc warns about empty paragraphs. I deleted them. mandoc also
warned about these macro pairs in anm(1):
.SM
.B text
The .SM did nothing because the .B text is on a different line. I
changed each pair to .SB for small bold text.
I make a few other small changes.
I need this so I can add more %token lines to mach/powerpc/as/mach2.c
The assembler's tempfile encoded each token in a byte. This only
worked with tokens 0 to 127 and 256 and 383. If a token 384 or higher
existed, the assembler stopped working. I need tokens 384 and higher.
I change the token encoding to a 2-byte little-endian integer. I also
change a byte in the string encoding.
---snip---
The ELF spec at http://www.sco.com/developers/gabi/ says, "In each
symbol table, all symbols with STB_LOCAL binding precede the weak and
global symbols," and that sh_info is the index of the first non-local
symbol.
I was mixing local and global symbols and setting sh_info to zero. I
also forgot to set the type of the .shstrtab section.
---snip---
See issue #1 (https://github.com/davidgiven/ack/issues/1). The file
mach/proto/as/comm2.y goes through cpp twice. The _include macro,
defined in comm2.y and used in comm0.h, delays the inclusion of system
header files. The inclusion of <stdint.h> wasn't delayed. This
caused multiple inclusions of <sys/_types.h> in FreeBSD and
<machine/_types.h> in OpenBSD.
Use _include to delay <stdint.h>. Also use _include for "arch.h" and
"out.h", because h/out.h includes <stdint.h> and h/arch.h might
include it in the future.
Sort the system includes in comm0.h by moving them up to be with
<stdint.h>. Must include <stdint.h> before "mach0.c", because
mach/powerpc/as/mach0.c needs it. Must include "mach0.c" before
checking ASLD.
In my OpenBSD/amd64 system, the code becomes
if (0)
outname.on_valu &= ~(((0xFFFFFFFF)<<32)<<32);
The 0xFFFFFFFF is a 32-bit int, so the left shift by 32 is out of
range and causes the gcc warning.
The intent might be to clear any sign-extended bits, if the assignment
outname.on_valu = valu did sign extension. Old C had no unsigned
long, so .on_valu would have been long. The code is obsolete because
h/out.h now declares .on_valu as uint32_t.
possible values. Add the PowerPC ncg and mcg backend support to let the test
actually run, including modifying a bunch of PowrePC libem functions so that
they can be called from both ncg and mcg.
assembler directives, ha16() and has16(), for the upper half; has16() applies
the sign adjustment. .powerpcfixup is now gone, as we generate the relocation
in ha*() instead. Add special logic to the linker for undoing and redoing the
sign adjustment when reading/writing fixups. Tests still pass.