def generate_aliases(tokens, mangling):
    """
    Arguments
    ---------
    tokens: list of strings
        The mixed-case windows-style names obtained from tokenize (SETUPdll for instance)
    mangling: str 
        The way in which the SETUPdll function is mangled. ("_setupdll_" for instance)

    Returns
    -------
    aliases: list of tuples
        In each tuple is the windows name, followed by the mangled name
    """

    if mangling == 'setupdll_':
        return [(t,t.lower()+'_') for t in tokens]
    elif mangling == '_setupdll':
        return [(t,'_'+t.lower()) for t in tokens]
    elif mangling == 'setupdll':
        return [(t,t.lower()) for t in tokens]
    else:
        raise KeyError("I don't understand your mangling [{0:s}]".format(mangling))