]>
git.ipfire.org Git - thirdparty/openssl.git/blob - apps/lib/columns.c
2 * Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
14 void calculate_columns(FUNCTION
*functions
, DISPLAY_COLUMNS
*dc
)
19 for (f
= functions
; f
->name
!= NULL
; ++f
)
20 if (f
->type
== FT_general
|| f
->type
== FT_md
|| f
->type
== FT_cipher
)
21 if ((len
= strlen(f
->name
)) > maxlen
)
24 dc
->width
= maxlen
+ 2;
25 dc
->columns
= (80 - 1) / dc
->width
;