forked from Imagelibrary/rtems
2002-07-01 Joel Sherrill <joel@OARcorp.com>
* rtems_webserver/misc.c: Per PR236 eliminate definition of strnlen().
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2002-07-01 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* rtems_webserver/misc.c: Per PR236 eliminate definition of strnlen().
|
||||||
|
|
||||||
2002-06-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2002-06-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* wrapup/Makefile.am: Build libnetapps.a.
|
* wrapup/Makefile.am: Build libnetapps.a.
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ enum flag {
|
|||||||
|
|
||||||
static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg,
|
static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg,
|
||||||
int msize);
|
int msize);
|
||||||
static int strnlen(char_t *s, unsigned int n);
|
|
||||||
static void put_char(strbuf_t *buf, char_t c);
|
static void put_char(strbuf_t *buf, char_t c);
|
||||||
static void put_string(strbuf_t *buf, char_t *s, int len,
|
static void put_string(strbuf_t *buf, char_t *s, int len,
|
||||||
int width, int prec, enum flag f);
|
int width, int prec, enum flag f);
|
||||||
@@ -407,19 +406,6 @@ static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg, int msize)
|
|||||||
return buf.count;
|
return buf.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
/*
|
|
||||||
* Return the length of a string limited by a given length
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int strnlen(char_t *s, unsigned int n)
|
|
||||||
{
|
|
||||||
unsigned int len;
|
|
||||||
|
|
||||||
len = gstrlen(s);
|
|
||||||
return min(len, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Add a character to a string buffer
|
* Add a character to a string buffer
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ enum flag {
|
|||||||
|
|
||||||
static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg,
|
static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg,
|
||||||
int msize);
|
int msize);
|
||||||
static int strnlen(char_t *s, unsigned int n);
|
|
||||||
static void put_char(strbuf_t *buf, char_t c);
|
static void put_char(strbuf_t *buf, char_t c);
|
||||||
static void put_string(strbuf_t *buf, char_t *s, int len,
|
static void put_string(strbuf_t *buf, char_t *s, int len,
|
||||||
int width, int prec, enum flag f);
|
int width, int prec, enum flag f);
|
||||||
@@ -407,19 +406,6 @@ static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg, int msize)
|
|||||||
return buf.count;
|
return buf.count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
/*
|
|
||||||
* Return the length of a string limited by a given length
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int strnlen(char_t *s, unsigned int n)
|
|
||||||
{
|
|
||||||
unsigned int len;
|
|
||||||
|
|
||||||
len = gstrlen(s);
|
|
||||||
return min(len, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Add a character to a string buffer
|
* Add a character to a string buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user