mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 07:15:58 +08:00
Update to FreeBSD head 2017-08-01
Git mirror commit f5002f5e5f78cae9f0269d812dc0aedb0339312c. Update #3472.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -101,6 +101,8 @@ typedef unsigned long long xo_xof_flags_t;
|
||||
#define XOF_RETAIN_ALL XOF_BIT(30) /** Force use of XOEF_RETAIN */
|
||||
#define XOF_RETAIN_NONE XOF_BIT(31) /** Prevent use of XOEF_RETAIN */
|
||||
|
||||
#define XOF_COLOR_MAP XOF_BIT(32) /** Color map has been initialized */
|
||||
|
||||
typedef unsigned xo_emit_flags_t; /* Flags to xo_emit() and friends */
|
||||
#define XOEF_RETAIN (1<<0) /* Retain parsed formatting information */
|
||||
|
||||
|
@@ -133,7 +133,7 @@ xo_buf_has_room (xo_buffer_t *xbp, ssize_t len)
|
||||
static inline void
|
||||
xo_buf_append (xo_buffer_t *xbp, const char *str, ssize_t len)
|
||||
{
|
||||
if (!xo_buf_has_room(xbp, len))
|
||||
if (str == NULL || len == 0 || !xo_buf_has_room(xbp, len))
|
||||
return;
|
||||
|
||||
memcpy(xbp->xb_curp, str, len);
|
||||
|
@@ -311,7 +311,7 @@ xo_encoder_init (xo_handle_t *xop, const char *name)
|
||||
|
||||
xo_set_encoder(xop, xep->xe_handler);
|
||||
|
||||
return xo_encoder_handle(xop, XO_OP_CREATE, NULL, NULL);
|
||||
return xo_encoder_handle(xop, XO_OP_CREATE, NULL, NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -337,7 +337,7 @@ xo_encoder_create (const char *name, xo_xof_flags_t flags)
|
||||
|
||||
int
|
||||
xo_encoder_handle (xo_handle_t *xop, xo_encoder_op_t op,
|
||||
const char *name, const char *value)
|
||||
const char *name, const char *value, xo_xof_flags_t flags)
|
||||
{
|
||||
void *private = xo_get_private(xop);
|
||||
xo_encoder_func_t func = xo_get_encoder(xop);
|
||||
@@ -345,7 +345,7 @@ xo_encoder_handle (xo_handle_t *xop, xo_encoder_op_t op,
|
||||
if (func == NULL)
|
||||
return -1;
|
||||
|
||||
return func(xop, op, name, value, private);
|
||||
return func(xop, op, name, value, private, flags);
|
||||
}
|
||||
|
||||
const char *
|
||||
@@ -416,7 +416,7 @@ xo_encoder_create (const char *name, xo_xof_flags_t flags)
|
||||
|
||||
int
|
||||
xo_encoder_handle (xo_handle_t *xop, xo_encoder_op_t op,
|
||||
const char *name, const char *value)
|
||||
const char *name, const char *value, xo_xof_flags_t flags)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@@ -50,7 +50,8 @@ typedef unsigned xo_encoder_op_t;
|
||||
xo_encoder_op_t op __attribute__ ((__unused__)), \
|
||||
const char *name __attribute__ ((__unused__)), \
|
||||
const char *value __attribute__ ((__unused__)), \
|
||||
void *private __attribute__ ((__unused__))
|
||||
void *private __attribute__ ((__unused__)), \
|
||||
xo_xof_flags_t flags __attribute__ ((__unused__))
|
||||
|
||||
typedef int (*xo_encoder_func_t)(XO_ENCODER_HANDLER_ARGS);
|
||||
|
||||
@@ -105,7 +106,7 @@ xo_encoder_create (const char *name, xo_xof_flags_t flags);
|
||||
|
||||
int
|
||||
xo_encoder_handle (xo_handle_t *xop, xo_encoder_op_t op,
|
||||
const char *name, const char *value);
|
||||
const char *name, const char *value, xo_xof_flags_t flags);
|
||||
|
||||
void
|
||||
xo_encoders_clean (void);
|
||||
|
Reference in New Issue
Block a user