docs: add su.1 manual page

The manual page is almost one to one copy with GNU Coreutils 'su
invocation' info page.  This manual also includes few examples, fix
to return values, hint about PAM configuration file, authors and see
also sections.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: fix email macro in manual example

URL macro is not email address macro.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: rewrite su.1 manual

Converting coreutils info page to manual did not result as good
manual pages as writing almost completely new.  Ludwig wrote the
text, Sami cleaned up groff syntax.

Reference: http://www.spinics.net/lists/util-linux-ng/msg06321.html
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
logindefs: change getlogindefs_num() to return unsigned long

Where ever getlogindefs_num() is called return value is always
expected to be unsigned, such as sleep() input, gid_t or mode_t.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: add su executable to .gitignore

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login: allow TTYGROUP name begin by number

Assuming someone is using a TTYGROUP name beginnign by a digit the
login was misbehaving with 'contains invalid numerical value: %s'
message(s) in syslog.  Please notice that group names that consist
only digits as characters are valid (but likely to cause confusion,
and chaos).

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: clean up login.1 manual

PATH contents for users & root in DESCRIPTION section where wrong,
and couple default values where missing.  Rest of the change is about
making the groff, and the output, to look good.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: clean up wdctl.8 manual

Align with Documentation/howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tools: add checkmans.sh

A script to find whether all manuals has proper groff syntax.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: fix all man page groff warnings

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fileutils: xmkstemp() interface change

We can not let the user control where TMPDIR is for this tempfile.
This will be where we write the updated passwd file, and must be
capable of being moved atomically with rename(2).  Therefore, it
cannot be on a different device, or setpwnam() and vipw/vigr programs
will invariably fail with EXDEV.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: clean up chcpu.8 manual

* Add lightness to synopsis.
* Use argument and parameter highlights consistently.
* Indent dispatch modes.
* Add spaces after dots (English spacing).
* Add line break macros.
* Use URL and email macros where appropriate.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: clean up dmesg.1 manual

* Add lightness to synopsis.
* Add few missing italic highlights to text segments which refer
  command line argument(s).
* Turn off bold where ever possible (makes text unnecessarily heavy).
* Add spaces after dots (English spacing).
* Use URL and email macros where appropriate.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: clean up getopt.1 manual

* Add lightness to synopsis.
* Add spaces after dots (English spacing).
* Replace backticks by ticks.
* Reformat text to be 70 characters wide.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
more: remove a meaningless test

regexec only returns 0 or REG_NOMATCH so remove a meaningless test

Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
more: fix regex error messages printing

Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/hexsyntax.c: fix for missing program_invocation_short_name

Some libc do not expose program_invocation_short_name. Therefore util-linux
comes with helpers in 'c.h'. Use the 'c.h' in hexsyntax.c where it was missed.

This patch fixes following error for me:
---8<---
hexsyntax.c: In function 'newsyntax':
hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
hexsyntax.c:115: error: (Each undeclared identifier is reported only once
hexsyntax.c:115: error: for each function it appears in.)
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Fix typos in comments and wall's man page

Culprits identified again by (newer) misspellings:

  $ git ls-files | misspellings -f - | grep -v '^po/'

* wall: Fix typo in man page.
* Fix typos in source code comments.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
dmesg: fix typo in man page

Reported-by: Hemant Borole <hemantborole@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Merge branch 'su.1' of https://github.com/kerolasa/lelux-utiliteetit

* 'su.1' of https://github.com/kerolasa/lelux-utiliteetit:
  docs: rewrite su.1 manual
  docs: fix email macro in manual example
  docs: add su.1 manual page