Orcish names originate or are inspired by JRR Tolkien's Orcish.
- Standard:
C89
Modifiers | Function Name | Argument List |
---|---|---|
void | orcish | name, name_size |
void | orc_long | name, name_size, l |
void | orc_ptr | name, name_size, p |
const char * | orcify | p |
void orcish(char *const name, const size_t name_size)
Fills name
with a random Orcish name. Potentially up to name_size
- 1, (with a maximum of 128,) then puts a null terminator. Uses rand
from stdlib.h
.
- Parameter: name
A valid pointer to at leastname_size
characters. - Parameter: name_size
If zero, does nothing.
void orc_long(char *const name, const size_t name_size, const unsigned long l)
Fills name
with a deterministic Orcish name based on l
, potentially up to name_size
- 1, (with a maximum,) then puts a null terminator.
- Parameter: name
A valid pointer to at leastname_size
characters. - Parameter: name_size
If zero, does nothing.
void orc_ptr(char *const name, const size_t name_size, const void *const p)
Fills name
with a deterministic Orcish name based on p
, or if p
is null, then "null". Potentially up to name_size
- 1, (with a maximum,) then puts a null terminator.
- Parameter: name
A valid pointer to at leastname_size
characters. - Parameter: name_size
If zero, does nothing.
const char *orcify(const void *const p)
Call orc_ptr with p
with default values and a small temporary buffer.
- Return:
A temporary string; can handle four names at a time.
2014 Neil Edelman, distributed under the terms of the MIT License. Orcish is from JRR Tolkien's work, and some syllables from SMAUG, which is a derivative of Merc, and DikuMud; used under fair-use. Contains MurmurHash-derived code, placed in public domain by Austin Appleby.