diff options
author | Ben Laurie <ben@openssl.org> | 1999-01-09 19:15:59 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-01-09 19:15:59 +0000 |
commit | 50acf46b925adb9fcaa0fb5e0ba592c5de37f580 (patch) | |
tree | c9fddba4c66a9a5bbd21f2c0aae02e8cf5609cd5 /apps | |
parent | 7f9b7b074dd0fd8213947ec08802cdabaeb4ea41 (diff) | |
download | openssl-50acf46b925adb9fcaa0fb5e0ba592c5de37f580.tar.gz |
Sort openssl functions by name.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/openssl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index e4bf362fa0..dfa23d674e 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -318,10 +318,26 @@ end: 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() { LHASH *ret; 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); |