代码拉取完成,页面将自动刷新
#ifndef _SCRATCHPAD_H
#define _SCRATCHPAD_H
/* Tim Hollebeek
*
* The data must also consist of zero terminated chunks, with lengths in the
* range 0 < len < 256. Longer things can be handled, but they're just
* malloc'ed.
*
* Designed to be used by the compile stack (if pointers get popped off due
* to errors, we don't have to worry about them b/c we'll reclaim the space
* when we throw away the scratchpad; this is another advantage), it could
* be used by other things as well.
*/
#define SCRATCHPAD_SIZE 4096
#define SDEBUG(x)
#define SDEBUG2(x)
#define SCRATCH_MAGIC ((unsigned char)0xbb)
typedef struct sp_block_s {
struct sp_block_s *next, *prev;
char block[2]; /* block[0] must be nonzero, usually SCRATCH_MAGIC */
} sp_block_t;
#define scratch_free_last() \
scr_tail = --scr_last; \
scr_last -= *scr_tail; \
while (!(*scr_last) && scr_tail != scr_last) { \
/* check if the one before was already freed */ \
scr_tail = --scr_last; \
scr_last -= *scr_tail; \
}
extern unsigned char *scr_last;
extern unsigned char *scr_tail;
extern unsigned char *scratch_end;
/*
* scratchpad.c
*/
void scratch_destroy PROT((void));
char *scratch_copy PROT((char *));
char *scratch_alloc PROT((int));
void scratch_free PROT((char *));
char *scratch_join PROT((char *, char *));
char *scratch_join2 PROT((char *, char *));
char *scratch_realloc PROT((char *, int));
char *scratch_copy_string PROT((char *));
char *scratch_large_alloc PROT((int));
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。