Sort openssl functions by name.

This commit is contained in:
Ben Laurie 1999-01-09 19:15:59 +00:00
parent 7f9b7b074d
commit 50acf46b92
2 changed files with 19 additions and 0 deletions

View file

@ -5,6 +5,9 @@
Changes between 0.9.1c and 0.9.2 Changes between 0.9.1c and 0.9.2
*) Sort openssl functions by name.
[Ben Laurie]
*) Get the gendsa program working (hopefully) and add it to app list. Remove *) Get the gendsa program working (hopefully) and add it to app list. Remove
encryption from sample DSA keys (in case anyone is interested the password encryption from sample DSA keys (in case anyone is interested the password
was "1234"). was "1234").

View file

@ -318,10 +318,26 @@ end:
return(ret); return(ret);
} }
static int SortFnByName(const void *_f1,const void *_f2)
{
const FUNCTION *f1=_f1;
const FUNCTION *f2=_f2;
if(f1->type != f2->type)
return f1->type-f2->type;
return strcmp(f1->name,f2->name);
}
static LHASH *prog_init() static LHASH *prog_init()
{ {
LHASH *ret; LHASH *ret;
FUNCTION *f; FUNCTION *f;
int i;
/* Purely so it looks nice when the user hits ? */
for(i=0,f=functions ; f->name != NULL ; ++f,++i)
;
qsort(functions,i,sizeof *functions,SortFnByName);
if ((ret=lh_new(hash,cmp)) == NULL) return(NULL); if ((ret=lh_new(hash,cmp)) == NULL) return(NULL);