for (keys = 4; keys < 8; ++keys) key[keys] = 4096;
static PRIntn PR_CALLBACK Tpd(PRIntn argc, char **argv){    void *pd;    PRStatus rv;    PRUintn keys;    PRThread *thread;    char *key_string[] = {        "Key #0", "Key #1", "Key #2", "Key #3",        "Bogus #5", "Bogus #6", "Bogus #7", "Bogus #8"};        fout = PR_STDOUT;    did = should = PR_FALSE;    for (keys = 0; keys < 4; ++keys)    {        rv = PR_NewThreadPrivateIndex(&key[keys], Destructor);        MY_ASSERT(PR_SUCCESS == rv);    }    PrintProgress(__LINE__);    did = should = PR_FALSE;    for (keys = 0; keys < 8; ++keys)    {        pd = PR_GetThreadPrivate(key[keys]);        MY_ASSERT(NULL == pd);    }    PrintProgress(__LINE__);    did = should = PR_FALSE;    for (keys = 0; keys < 4; ++keys)    {        rv = PR_SetThreadPrivate(key[keys], key_string[keys]);        MY_ASSERT(PR_SUCCESS == rv);    }    PrintProgress(__LINE__);#if !defined(DEBUG)    did = should = PR_FALSE;    for (keys = 4; keys < 8; ++keys)    {        rv = PR_SetThreadPrivate(key[keys], key_string[keys]);        MY_ASSERT(PR_FAILURE == rv);    }    PrintProgress(__LINE__);#endif        did = PR_FALSE; should = PR_TRUE;    for (keys = 0; keys < 4; ++keys)    {        rv = PR_SetThreadPrivate(key[keys], key_string[keys]);        MY_ASSERT(PR_SUCCESS == rv);    }    PrintProgress(__LINE__);    did = PR_FALSE; should = PR_TRUE;    for (keys = 0; keys < 4; ++keys)    {        rv = PR_SetThreadPrivate(key[keys], NULL);        MY_ASSERT(PR_SUCCESS == rv);    }    PrintProgress(__LINE__);    did = should = PR_FALSE;    for (keys = 0; keys < 4; ++keys)    {        rv = PR_SetThreadPrivate(key[keys], NULL);        MY_ASSERT(PR_SUCCESS == rv);    }    PrintProgress(__LINE__);    did = should = PR_FALSE;    for (keys = 8; keys < 127; ++keys)    {        rv = PR_NewThreadPrivateIndex(&key[keys], Destructor);        MY_ASSERT(PR_SUCCESS == rv);        rv = PR_SetThreadPrivate(key[keys], "EXTENSION");        MY_ASSERT(PR_SUCCESS == rv);    }    PrintProgress(__LINE__);    did = PR_FALSE; should = PR_TRUE;    for (keys = 8; keys < 127; ++keys)    {        rv = PR_SetThreadPrivate(key[keys], NULL);        MY_ASSERT(PR_SUCCESS == rv);    }    PrintProgress(__LINE__);    did = should = PR_FALSE;    for (keys = 8; keys < 127; ++keys)    {        rv = PR_SetThreadPrivate(key[keys], NULL);        MY_ASSERT(PR_SUCCESS == rv);    }    thread = PR_CreateThread(        PR_USER_THREAD, Thread, NULL, PR_PRIORITY_NORMAL,        PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0);    (void)PR_JoinThread(thread);    PrintProgress(__LINE__);#if defined(WIN16)    printf(        "%s\n",((PR_TRUE == failed) ? "FAILED" : "PASSED"));#else    (void)PR_fprintf(        fout, "%s\n",((PR_TRUE == failed) ? "FAILED" : "PASSED"));#endif        return 0;}  /* Tpd */