mirror of
https://github.com/libssh2/libssh2.git
synced 2025-08-01 11:26:53 +03:00
man: fixups
- add missing `.fi` tags. - fix misplaced `.nf` tags. - add `.nf`/`.fi` tags `SYNOPSIS` where missing. - fix missing/wrong function name from `SH NAME`. - fix wrong function name in `TH`. - keep return values in a separate line. - indent. - fold long lines. - deleted `libssh2_channel_direct_streamlocal()`, there is no such function. - add missing types. - add missing headers. Closes #949
This commit is contained in:
@ -5,9 +5,11 @@ libssh2_session_supported_algs - get list of supported algorithms
|
||||
.nf
|
||||
#include <libssh2.h>
|
||||
|
||||
int libssh2_session_supported_algs(LIBSSH2_SESSION* session,
|
||||
int method_type,
|
||||
const char*** algs);
|
||||
int
|
||||
libssh2_session_supported_algs(LIBSSH2_SESSION* session,
|
||||
int method_type,
|
||||
const char*** algs);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
\fIsession\fP - An instance of initialized LIBSSH2_SESSION (the function will
|
||||
use its pointer to the memory allocation function). \fImethod_type\fP -
|
||||
@ -41,11 +43,11 @@ session = libssh2_session_init();
|
||||
rc = libssh2_session_supported_algs(session,
|
||||
LIBSSH2_METHOD_CRYPT_CS,
|
||||
&algorithms);
|
||||
if (rc>0) {
|
||||
if(rc > 0) {
|
||||
/* the call succeeded, do sth. with the list of algorithms
|
||||
(e.g. list them)... */
|
||||
printf("Supported symmetric algorithms:\\n");
|
||||
for ( i=0; i<rc; i++ )
|
||||
for(i = 0; i < rc; i++)
|
||||
printf("\\t%s\\n", algorithms[i]);
|
||||
|
||||
/* ... and free the allocated memory when not needed anymore */
|
||||
@ -54,6 +56,7 @@ if (rc>0) {
|
||||
else {
|
||||
/* call failed, error handling */
|
||||
}
|
||||
.fi
|
||||
.SH RETURN VALUE
|
||||
On success, a number of returned algorithms (i.e a positive number will be
|
||||
returned). In case of a failure, an error code (a negative number, see below)
|
||||
|
Reference in New Issue
Block a user