/*1* Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.2*3* Licensed under the Apache License 2.0 (the "License"). You may not use4* this file except in compliance with the License. You can obtain a copy5* in the file LICENSE in the source distribution or at6* https://www.openssl.org/source/license.html7*/89#include <string.h>10#include "apps.h"11#include "function.h"1213void calculate_columns(FUNCTION *functions, DISPLAY_COLUMNS *dc)14{15FUNCTION *f;16int len, maxlen = 0;1718for (f = functions; f->name != NULL; ++f)19if (f->type == FT_general || f->type == FT_md || f->type == FT_cipher)20if ((len = strlen(f->name)) > maxlen)21maxlen = len;2223dc->width = maxlen + 2;24dc->columns = (80 - 1) / dc->width;25}26272829