VirtualBox

source: vbox/trunk/src/libs/openssl-3.0.7/apps/lib/columns.c@ 99376

最後變更 在這個檔案從99376是 94320,由 vboxsync 提交於 3 年 前

libs/openssl-3.0.1: Export to OSE and fix copyright headers in Makefiles, bugref:10128

檔案大小: 785 位元組
 
1/*
2 * Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
3 *
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
8 */
9
10#include <string.h>
11#include "apps.h"
12#include "function.h"
13
14void calculate_columns(FUNCTION *functions, DISPLAY_COLUMNS *dc)
15{
16 FUNCTION *f;
17 int len, maxlen = 0;
18
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)
22 maxlen = len;
23
24 dc->width = maxlen + 2;
25 dc->columns = (80 - 1) / dc->width;
26}
27
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette