202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
};
typedef struct Buffer Buffer;
static int thBufferWrite(Th_Interp *interp, Buffer *, const char *, int);
static void thBufferInit(Buffer *);
static void thBufferFree(Th_Interp *interp, Buffer *);
/*
** This version of memcpy() allows the first are second argument to
** be NULL as long as the number of bytes to copy is zero.
*/
static void *th_memcpy(void *dest, const void *src, size_t n){
return n>0 ? memcpy(dest,src,n) : dest;
}
/*
|
|
|
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
};
typedef struct Buffer Buffer;
static int thBufferWrite(Th_Interp *interp, Buffer *, const char *, int);
static void thBufferInit(Buffer *);
static void thBufferFree(Th_Interp *interp, Buffer *);
/*
** This version of memcpy() allows the first and second argument to
** be NULL as long as the number of bytes to copy is zero.
*/
static void *th_memcpy(void *dest, const void *src, size_t n){
return n>0 ? memcpy(dest,src,n) : dest;
}
/*
|