sftp docs: show macro on macro page, only function on function page

The individual man pages for macros now show the full convenience
macro as defined, and then the man page for the actual function
only shows the function.
This commit is contained in:
Daniel Stenberg 2010-06-14 20:02:55 +02:00
parent 2fd044fdf5
commit 897f8463d8
6 changed files with 26 additions and 32 deletions

View File

@ -2,12 +2,14 @@
.\" .\"
.TH libssh2_sftp_readlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual" .TH libssh2_sftp_readlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual"
.SH NAME .SH NAME
libssh2_sftp_readlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP calls libssh2_sftp_readlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP
.SH SYNOPSIS .SH SYNOPSIS
.nf
#include <libssh2.h> #include <libssh2.h>
libssh2_sftp_readlink(arguments) #define libssh2_sftp_readlink(sftp, path, target, maxlen) \\
libssh2_sftp_symlink_ex((sftp), (path), strlen(path), (target), (maxlen), \\
LIBSSH2_SFTP_READLINK)
.SH DESCRIPTION .SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. underlying function \fIlibssh2_sftp_symlink_ex(3)\fP.

View File

@ -2,12 +2,14 @@
.\" .\"
.TH libssh2_sftp_realpath 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual" .TH libssh2_sftp_realpath 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual"
.SH NAME .SH NAME
libssh2_sftp_realpath - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP calls libssh2_sftp_realpath - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP
.SH SYNOPSIS .SH SYNOPSIS
.nf
#include <libssh2.h> #include <libssh2.h>
libssh2_sftp_realpath(arguments) #define libssh2_sftp_realpath(sftp, path, target, maxlen) \\
libssh2_sftp_symlink_ex((sftp), (path), strlen(path), (target), (maxlen), \\
LIBSSH2_SFTP_REALPATH)
.SH DESCRIPTION .SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. underlying function \fIlibssh2_sftp_symlink_ex(3)\fP.

View File

@ -2,12 +2,13 @@
.\" .\"
.TH libssh2_sftp_rmdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual" .TH libssh2_sftp_rmdir 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual"
.SH NAME .SH NAME
libssh2_sftp_rmdir - convenience macro for \fIlibssh2_sftp_rmdir_ex(3)\fP calls libssh2_sftp_rmdir - convenience macro for \fIlibssh2_sftp_rmdir_ex(3)\fP
.SH SYNOPSIS .SH SYNOPSIS
.nf
#include <libssh2.h> #include <libssh2.h>
libssh2_sftp_rmdir(arguments) #define libssh2_sftp_rmdir(sftp, path) \\
libssh2_sftp_rmdir_ex((sftp), (path), strlen(path))
.SH DESCRIPTION .SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_sftp_rmdir_ex(3)\fP. underlying function \fIlibssh2_sftp_rmdir_ex(3)\fP.

View File

@ -4,30 +4,26 @@
.SH NAME .SH NAME
libssh2_sftp_rmdir_ex - remove an SFTP directory libssh2_sftp_rmdir_ex - remove an SFTP directory
.SH SYNOPSIS .SH SYNOPSIS
.nf
#include <libssh2.h> #include <libssh2.h>
#include <libssh2_sftp.h> #include <libssh2_sftp.h>
int int libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, const char *path,
libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len); unsigned int path_len);
int
libssh2_sftp_rmdir_ex(LIBSSH2_SFTP *sftp, const char *path);
.SH DESCRIPTION .SH DESCRIPTION
Remove a directory from the remote file system.
\fIsftp\fP - SFTP instance as returned by \fIsftp\fP - SFTP instance as returned by
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)
\fIsourcefile\fP - Full path of the existing directory to remove. \fIsourcefile\fP - Full path of the existing directory to remove.
\fIsourcefile_len\fP - Length of the full path of the existing directory to remove. \fIsourcefile_len\fP - Length of the full path of the existing directory to
remove.
Remove a directory from the remote file system.
.SH RETURN VALUE .SH RETURN VALUE
Return 0 on success or negative on failure. It returns Return 0 on success or negative on failure. It returns
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
.SH ERRORS .SH ERRORS
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
@ -38,6 +34,5 @@ LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
\fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
received on the socket, or an SFTP operation caused an errorcode to received on the socket, or an SFTP operation caused an errorcode to
be returned by the server. be returned by the server.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_sftp_init(3) .BR libssh2_sftp_init(3)

View File

@ -2,12 +2,14 @@
.\" .\"
.TH libssh2_sftp_symlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual" .TH libssh2_sftp_symlink 3 "20 Feb 2010" "libssh2 1.2.4" "libssh2 manual"
.SH NAME .SH NAME
libssh2_sftp_symlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP calls libssh2_sftp_symlink - convenience macro for \fIlibssh2_sftp_symlink_ex(3)\fP
.SH SYNOPSIS .SH SYNOPSIS
.nf
#include <libssh2.h> #include <libssh2.h>
libssh2_sftp_symlink(arguments) #define libssh2_sftp_symlink(sftp, orig, linkpath) \\
libssh2_sftp_symlink_ex((sftp), (orig), strlen(orig), (linkpath), \\
strlen(linkpath), LIBSSH2_SFTP_SYMLINK)
.SH DESCRIPTION .SH DESCRIPTION
This is a macro defined in a public libssh2 header file that is using the This is a macro defined in a public libssh2 header file that is using the
underlying function \fIlibssh2_sftp_symlink_ex(3)\fP. underlying function \fIlibssh2_sftp_symlink_ex(3)\fP.

View File

@ -12,14 +12,6 @@ int
libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path, libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path,
unsigned int path_len, char *target, unsigned int path_len, char *target,
unsigned int target_len, int link_type); unsigned int target_len, int link_type);
int
libssh2_sftp_symlink(LIBSSH2_SFTP *sftp, const char *path, char *target);
int
libssh2_sftp_readlink(LIBSSH2_SFTP *sftp, const char *path, char *target,
unsigned int target_len);
int int
libssh2_sftp_realpath(LIBSSH2_SFTP *sftp, const char *path, char *target, libssh2_sftp_realpath(LIBSSH2_SFTP *sftp, const char *path, char *target,
unsigned int target_len); unsigned int target_len);