Esempio n. 1
0
static const char *mpw_templateForType_v0(MPSiteType type, uint16_t seedByte) {

    size_t count = 0;
    const char **templates = mpw_templatesForType( type, &count );
    if (!count)
        return NULL;

    return templates[seedByte % count];
}
Esempio n. 2
0
// Algorithm version helpers.
static const char *mpw_templateForType_v0(MPResultType type, uint16_t templateIndex) {

    size_t count = 0;
    const char **templates = mpw_templatesForType( type, &count );
    char const *template = templates && count? templates[templateIndex % count]: NULL;