fp=(FUNCTION *)lh_retrieve(prog,(char *)&f);
fp=(FUNCTION *)lh_retrieve(prog,&f);
static int do_cmd(LHASH *prog, int argc, char *argv[])	{	FUNCTION f,*fp;	int i,ret=1,tp,nl;	if ((argc <= 0) || (argv[0] == NULL))		{ ret=0; goto end; }	f.name=argv[0];	fp=(FUNCTION *)lh_retrieve(prog,(char *)&f);	if (fp != NULL)		{		ret=fp->func(argc,argv);		}	else if ((strcmp(argv[0],"quit") == 0) ||		(strcmp(argv[0],"q") == 0) ||		(strcmp(argv[0],"exit") == 0) ||		(strcmp(argv[0],"bye") == 0))		{		ret= -1;		goto end;		}	else if ((strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0) ||		(strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0) ||		(strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0))		{		int list_type;		BIO *bio_stdout;		if (strcmp(argv[0],LIST_STANDARD_COMMANDS) == 0)			list_type = FUNC_TYPE_GENERAL;		else if (strcmp(argv[0],LIST_MESSAGE_DIGEST_COMMANDS) == 0)			list_type = FUNC_TYPE_MD;		else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */			list_type = FUNC_TYPE_CIPHER;		bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);				for (fp=functions; fp->name != NULL; fp++)			if (fp->type == list_type)				BIO_printf(bio_stdout, "%s\n", fp->name);		BIO_free(bio_stdout);		ret=0;		goto end;		}	else		{		BIO_printf(bio_err,"openssl:Error: '%s' is an invalid command.\n",			argv[0]);		BIO_printf(bio_err, "\nStandard commands");		i=0;		tp=0;		for (fp=functions; fp->name != NULL; fp++)			{			nl=0;			if (((i++) % 5) == 0)				{				BIO_printf(bio_err,"\n");				nl=1;				}			if (fp->type != tp)				{				tp=fp->type;				if (!nl) BIO_printf(bio_err,"\n");				if (tp == FUNC_TYPE_MD)					{					i=1;					BIO_printf(bio_err,						"\nMessage Digest commands (see the `dgst' command for more details)\n");					}				else if (tp == FUNC_TYPE_CIPHER)					{					i=1;					BIO_printf(bio_err,"\nCipher commands (see the `enc' command for more details)\n");					}				}			BIO_printf(bio_err,"%-15s",fp->name);			}		BIO_printf(bio_err,"\n\n");		ret=0;		}end:	return(ret);	}