Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
2836-snmp-Types-and-specs-for-snmp-print_versio...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2836-snmp-Types-and-specs-for-snmp-print_versions-1-2.patch of Package erlang
From 386d5eeb655758abb926185f0d35a656adf6f450 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Wed, 10 Jan 2024 17:15:35 +0100 Subject: [PATCH 16/67] [snmp] Types and specs for snmp:print_versions/1,2 --- lib/snmp/doc/src/snmp.xml | 13 ++++--------- lib/snmp/src/app/snmp.erl | 9 +++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/snmp/doc/src/snmp.xml b/lib/snmp/doc/src/snmp.xml index e6b38bab32..ce067b6691 100644 --- a/lib/snmp/doc/src/snmp.xml +++ b/lib/snmp/doc/src/snmp.xml @@ -564,18 +564,13 @@ </func> <func> - <name since="">print_versions(VersionInfo) -> void()</name> - <name since="">print_versions(Prefix, VersionInfo) -> void()</name> + <name name="print_versions" arity="1" clause_i="1" since=""/> + <name name="print_versions" arity="2" clause_i="1" since=""/> <fsummary>Formatted print of result of the versions functions</fsummary> - <type> - <v>VersionInfo = [version_info()]</v> - <v>version_info() = term()</v> - <v>Prefix = string() | integer()</v> - </type> <desc> <p>Utility function to produce a formatted printout of the versions - info generated by the <c>versions1</c> and <c>versions2</c> - functions</p> + info generated by the <c>versions1</c> and <c>versions2</c> + functions</p> <p>Example: </p> <pre> {ok, V} = snmp:versions1(), diff --git a/lib/snmp/src/app/snmp.erl b/lib/snmp/src/app/snmp.erl index 4cbc9405a1..53a3a46922 100644 --- a/lib/snmp/src/app/snmp.erl +++ b/lib/snmp/src/app/snmp.erl @@ -453,9 +453,18 @@ print_version_info(Prefix) -> {ok, Vs} = versions1(), print_versions(Prefix, Vs). +-spec print_versions(Versions) -> void() when + Versions :: [VersionInfo], + VersionInfo :: term(). + print_versions(Versions) -> print_versions("", Versions). +-spec print_versions(Prefix, Versions) -> void() when + Prefix :: string() | non_neg_integer(), + Versions :: [VersionInfo], + VersionInfo :: term(). + print_versions(Prefix, Versions) when is_list(Prefix) andalso is_list(Versions) -> do_print_versions(Prefix, Versions); -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor