rg - random string generator
============================
rg prints cryptographically random alphanumeric strings. It is a
suckless rewrite of rg.veltar.systems as a small C program that
builds on Linux and Windows.

	rg [-v] [-n n] [-l l]

n	number of strings (default 6, min 1, max 1000)
l	length of each string (default 10, min 1, max 256)


Requirements
------------
A C99 compiler.

Linux:  libc with getrandom(2) (glibc 2.25+).
Windows: a compiler with rand_s (MSVC, clang targeting MSVC, or
MinGW-w64).


Installation
------------
Edit config.mk to match your local setup. Edit config.def.h for the
alphabet and limits.

Linux:

	make clean install

Windows (GNU make + clang, from this tree):

	make install

The Windows bits of config.mk are selected when OS=Windows_NT.
Install path (override with PREFIX=...):
  Windows: %USERPROFILE%\.local\bin  (add to PATH if it is not)
  Linux:   /usr/local/bin            (often needs sudo)
make uninstall removes the binary (and the man page on Linux).


Running without make
--------------------
	cp config.def.h config.h

Linux:

	cc -std=c99 -D_DEFAULT_SOURCE -o rg rg.c

Windows (clang / MSVC CRT):

	clang -std=c99 -D_CRT_RAND_S -o rg.exe rg.c

Windows (MinGW-w64):

	gcc -std=c99 -D_CRT_RAND_S -o rg.exe rg.c


Usage
-----
	rg
	rg -n 6 -l 10
	rg -n 1 -l 32


Configuration
-------------
Copy config.def.h to config.h (make does this) and edit. Do not
edit rg.c for configuration.


Remarks
-------
The original page at rg.veltar.systems used n % alphabet.length on
raw 32-bit draws, which is slightly biased. This program rejects
values in the incomplete last bucket so each symbol is equiprobable.
