Commit a8843f68 authored by Niels Möller's avatar Niels Möller
Browse files

* src/sftp/sftp_c.c: Constness fixes.

* src/sftp/sftp_c.h (struct sftp_mem): Use UINT32, instead of
signed int.
(sftp_callback_func): New typedef.
(struct sftp_callback): Changed prototype for nextfun. Changed
UINT64 to off_t.
Changed all prototypes to not pass and return structs without
using pointers.

* src/sftp/sftp_c.c: General change of calling conventions. Pass
struct * and const struct *, instead of passing and returning
structures "by-value".

Rev: src/sftp/sftp_c.c:1.3
Rev: src/sftp/sftp_c.h:1.3
parent 48d53f81
......@@ -265,9 +265,9 @@ sftp_rename_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *srcname,
const UINT8 *srcname,
UINT32 srclen,
UINT8 *dstname,
const UINT8 *dstname,
UINT32 dstlen)
{
UINT32 id;
......@@ -294,9 +294,9 @@ sftp_symlink_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *linkname,
const UINT8 *linkname,
UINT32 linklen,
UINT8 *targetname,
const UINT8 *targetname,
UINT32 targetlen)
{
UINT32 id;
......@@ -321,7 +321,7 @@ sftp_remove_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen)
{
UINT32 id;
......@@ -346,7 +346,7 @@ sftp_mkdir_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_attrib *a)
{
......@@ -379,7 +379,7 @@ sftp_realpath_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen)
{
UINT32 id;
......@@ -404,7 +404,7 @@ sftp_readlink_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen)
{
UINT32 id;
......@@ -429,7 +429,7 @@ sftp_rmdir_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen)
{
UINT32 id;
......@@ -454,7 +454,7 @@ sftp_stat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen)
{
UINT32 id;
......@@ -481,7 +481,7 @@ sftp_lstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen)
{
UINT32 id;
......@@ -506,7 +506,7 @@ sftp_fstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *handle,
const UINT8 *handle,
UINT32 handlelen)
{
UINT32 id;
......@@ -530,7 +530,7 @@ sftp_setstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_attrib* attrib)
{
......@@ -556,7 +556,7 @@ sftp_fsetstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input* in UNUSED,
struct sftp_output* out,
UINT8 *handle,
const UINT8 *handle,
UINT32 handlelen,
struct sftp_attrib* attrib)
{
......@@ -585,7 +585,7 @@ sftp_get_mem_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_mem *mem,
off_t startat)
......@@ -735,7 +735,7 @@ sftp_put_mem_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_mem *mem,
off_t startat,
......@@ -920,9 +920,9 @@ sftp_get_file_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
UINT8 *fname,
const UINT8 *fname,
/* FIXME: fnamelen not used??? */
UINT32 fnamelen,
int cont)
......@@ -1217,9 +1217,9 @@ sftp_put_file_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
UINT8 *fname,
const UINT8 *fname,
/* FIXME: fnamelen not used??? */
UINT32 fnamelen,
int cont)
......@@ -1515,7 +1515,7 @@ sftp_ls_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in UNUSED,
struct sftp_output *out,
UINT8 *dir,
const UINT8 *dir,
UINT32 dirlen)
{
sftp_null_state(state);
......
......@@ -131,9 +131,9 @@ sftp_symlink_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *linkname,
const UINT8 *linkname,
UINT32 linklen,
UINT8 *targetname,
const UINT8 *targetname,
UINT32 targetlen);
......@@ -143,9 +143,9 @@ sftp_rename_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *srcname,
const UINT8 *srcname,
UINT32 srclen,
UINT8 *dstname,
const UINT8 *dstname,
UINT32 dstlen);
......@@ -155,7 +155,7 @@ sftp_remove_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen);
void
......@@ -163,7 +163,7 @@ sftp_mkdir_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_attrib* a);
......@@ -172,7 +172,7 @@ sftp_rmdir_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen);
......@@ -181,7 +181,7 @@ sftp_realpath_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen);
void
......@@ -189,7 +189,7 @@ sftp_readlink_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen);
......@@ -198,7 +198,7 @@ sftp_stat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen);
......@@ -207,7 +207,7 @@ sftp_lstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen);
void
......@@ -215,7 +215,7 @@ sftp_fstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *handle,
const UINT8 *handle,
UINT32 handlelen);
......@@ -224,7 +224,7 @@ sftp_setstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_attrib* attrib);
......@@ -234,7 +234,7 @@ sftp_fsetstat_init(struct sftp_callback *state,
int op_id,
struct sftp_input* in,
struct sftp_output* out,
UINT8 *handle,
const UINT8 *handle,
UINT32 handlelen,
struct sftp_attrib* attrib);
......@@ -247,7 +247,7 @@ sftp_get_mem_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_mem *mem,
off_t startat);
......@@ -278,9 +278,9 @@ sftp_get_file_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
UINT8 *fname,
const UINT8 *fname,
UINT32 fnamelen,
int cont);
......@@ -318,9 +318,9 @@ sftp_put_file_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
UINT8 *fname,
const UINT8 *fname,
UINT32 fnamelen,
int cont);
......@@ -370,7 +370,7 @@ sftp_put_mem_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *name,
const UINT8 *name,
UINT32 namelen,
struct sftp_mem *mem,
off_t startat,
......@@ -401,7 +401,7 @@ sftp_ls_init(struct sftp_callback *state,
int op_id,
struct sftp_input *in,
struct sftp_output *out,
UINT8 *dir,
const UINT8 *dir,
UINT32 dirlen);
void
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment