* committing fixes for shaver
* header pointer is now set XPT_DoHeader
* fixed assertion error in CHECK_COUNT macro
This commit is contained in:
coop%netscape.com 1999-01-30 01:03:54 +00:00
Родитель 6db99a172d
Коммит 30a0f2ae51
4 изменённых файлов: 34 добавлений и 34 удалений

Просмотреть файл

@ -97,9 +97,8 @@ XPT_DoHeader(XPTCursor *cursor, XPTHeader **headerp)
header = PR_NEWZAP(XPTHeader);
if (!header)
return PR_FALSE;
} else {
header = *headerp;
}
}
*headerp = header;
if (mode == XPT_ENCODE) {
/* IDEs appear after header, including annotations */

Просмотреть файл

@ -45,20 +45,21 @@
#endif
/* XXX fail if XPT_DATA and !state->data_offset */
#define CHECK_COUNT_(cursor, space) \
/* if we're in the header, then exceeding the data_offset is illegal */ \
((cursor)->pool == XPT_HEADER ? \
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset \
? (DBG(("no space left in HEADER %d + %d > %d\n", (cursor)->offset, \
(space), (cursor)->state->data_offset)), PR_FALSE) \
: PR_TRUE) : \
/* if we're in the data area and we're about to exceed the allocation */ \
(CURS_POOL_OFFSET(cursor) + (space) > (cursor)->state->pool->allocated ? \
/* then grow if we're in ENCODE mode */ \
(ENCODING(cursor) ? XPT_GrowPool((cursor)->state->pool) \
/* and fail if we're in DECODE mode */ \
: (DBG(("can't extend in DECODE")), PR_FALSE)) \
/* otherwise we're OK */ \
#define CHECK_COUNT_(cursor, space) \
/* if we're in the header, then exceeding the data_offset is illegal */ \
((cursor)->pool == XPT_HEADER ? \
(ENCODING(cursor) && \
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset) \
? (DBG(("no space left in HEADER %d + %d > %d\n", (cursor)->offset, \
(space), (cursor)->state->data_offset)), PR_FALSE) \
: PR_TRUE) : \
/* if we're in the data area and we're about to exceed the allocation */ \
(CURS_POOL_OFFSET(cursor) + (space) > (cursor)->state->pool->allocated ? \
/* then grow if we're in ENCODE mode */ \
(ENCODING(cursor) ? XPT_GrowPool((cursor)->state->pool) \
/* and fail if we're in DECODE mode */ \
: (DBG(("can't extend in DECODE")), PR_FALSE)) \
/* otherwise we're OK */ \
: PR_TRUE))
#define CHECK_COUNT(cursor, space) \

Просмотреть файл

@ -97,9 +97,8 @@ XPT_DoHeader(XPTCursor *cursor, XPTHeader **headerp)
header = PR_NEWZAP(XPTHeader);
if (!header)
return PR_FALSE;
} else {
header = *headerp;
}
}
*headerp = header;
if (mode == XPT_ENCODE) {
/* IDEs appear after header, including annotations */

Просмотреть файл

@ -45,20 +45,21 @@
#endif
/* XXX fail if XPT_DATA and !state->data_offset */
#define CHECK_COUNT_(cursor, space) \
/* if we're in the header, then exceeding the data_offset is illegal */ \
((cursor)->pool == XPT_HEADER ? \
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset \
? (DBG(("no space left in HEADER %d + %d > %d\n", (cursor)->offset, \
(space), (cursor)->state->data_offset)), PR_FALSE) \
: PR_TRUE) : \
/* if we're in the data area and we're about to exceed the allocation */ \
(CURS_POOL_OFFSET(cursor) + (space) > (cursor)->state->pool->allocated ? \
/* then grow if we're in ENCODE mode */ \
(ENCODING(cursor) ? XPT_GrowPool((cursor)->state->pool) \
/* and fail if we're in DECODE mode */ \
: (DBG(("can't extend in DECODE")), PR_FALSE)) \
/* otherwise we're OK */ \
#define CHECK_COUNT_(cursor, space) \
/* if we're in the header, then exceeding the data_offset is illegal */ \
((cursor)->pool == XPT_HEADER ? \
(ENCODING(cursor) && \
((cursor)->offset - 1 + (space) > (cursor)->state->data_offset) \
? (DBG(("no space left in HEADER %d + %d > %d\n", (cursor)->offset, \
(space), (cursor)->state->data_offset)), PR_FALSE) \
: PR_TRUE) : \
/* if we're in the data area and we're about to exceed the allocation */ \
(CURS_POOL_OFFSET(cursor) + (space) > (cursor)->state->pool->allocated ? \
/* then grow if we're in ENCODE mode */ \
(ENCODING(cursor) ? XPT_GrowPool((cursor)->state->pool) \
/* and fail if we're in DECODE mode */ \
: (DBG(("can't extend in DECODE")), PR_FALSE)) \
/* otherwise we're OK */ \
: PR_TRUE))
#define CHECK_COUNT(cursor, space) \