change all length agruments and return types to size_t or ssize_t

This commit is contained in:
2018-06-11 14:19:21 +02:00
parent 7cdf39d61c
commit 0c5227dfc5

View File

@ -38,8 +38,8 @@
class RegexpConverter : public StreamFormatConverter class RegexpConverter : public StreamFormatConverter
{ {
int parse (const StreamFormat& fmt, StreamBuffer&, const char*&, bool); int parse (const StreamFormat& fmt, StreamBuffer&, const char*&, bool);
long scanString(const StreamFormat& fmt, const char*, char*, unsigned long&); ssize_t scanString(const StreamFormat& fmt, const char*, char*, unsigned long&);
long scanPseudo(const StreamFormat& fmt, StreamBuffer& input, long& cursor); ssize_t scanPseudo(const StreamFormat& fmt, StreamBuffer& input, size_t& cursor);
bool printPseudo(const StreamFormat& fmt, StreamBuffer& output); bool printPseudo(const StreamFormat& fmt, StreamBuffer& output);
}; };
@ -115,9 +115,9 @@ parse(const StreamFormat& fmt, StreamBuffer& info,
return string_format; return string_format;
} }
long RegexpConverter:: ssize_t RegexpConverter::
scanString(const StreamFormat& fmt, const char* input, scanString(const StreamFormat& fmt, const char* input,
char* value, unsigned long& size) char* value, size_t& size)
{ {
int ovector[30]; int ovector[30];
int rc; int rc;
@ -229,8 +229,8 @@ static void regsubst(const StreamFormat& fmt, StreamBuffer& buffer, long start)
} }
} }
long RegexpConverter:: ssize_t RegexpConverter::
scanPseudo(const StreamFormat& fmt, StreamBuffer& input, long& cursor) scanPseudo(const StreamFormat& fmt, StreamBuffer& input, ssize_t& cursor)
{ {
/* re-write input buffer */ /* re-write input buffer */
regsubst(fmt, input, cursor); regsubst(fmt, input, cursor);