This may break the SUNOS4 build, but it's no longer relevant.
# include <string.h>
# define _mesa_malloc(b) malloc(b)
# define _mesa_free(m) free(m)
-# define _mesa_memset memset
#else
# ifdef XFree86Server
# include <os.h>
# include <string.h>
# define _mesa_malloc(b) xalloc(b)
# define _mesa_free(m) xfree(m)
-# define _mesa_memset memset
# else
# include <X11/Xlibint.h>
-# define _mesa_memset memset
# define _mesa_malloc(b) Xmalloc(b)
# define _mesa_free(m) Xfree(m)
# endif /* XFree86Server */
{
__GLcontextModes *const next = mode->next;
- (void) _mesa_memset(mode, 0, sizeof(__GLcontextModes));
+ (void) memset(mode, 0, sizeof(__GLcontextModes));
mode->next = next;
mode->visualID = config->vid;
break;
}
- (void) _mesa_memset(*next, 0, size);
+ (void) memset(*next, 0, size);
(*next)->visualID = GLX_DONT_CARE;
(*next)->visualType = GLX_DONT_CARE;
(*next)->visualRating = GLX_NONE;
* state atoms are ordered correctly in the list.
*/
struct brw_state_flags examined, prev;
- _mesa_memset(&examined, 0, sizeof(examined));
+ memset(&examined, 0, sizeof(examined));
prev = *state;
for (i = 0; i < Elements(atoms); i++) {
dri_bo *sdc_bo,
struct brw_sampler_state *sampler)
{
- _mesa_memset(sampler, 0, sizeof(*sampler));
+ memset(sampler, 0, sizeof(*sampler));
switch (key->minfilter) {
case GL_NEAREST:
_mesa_init_renderbuffer
_mesa_initialize_context
_mesa_make_current
- _mesa_memset
_mesa_new_array_object
_mesa_new_framebuffer
_mesa_new_program
_mesa_init_driver_functions
_mesa_initialize_context
_mesa_make_current
- _mesa_memset
_mesa_new_buffer_object
_mesa_new_texture_object
_mesa_problem
GLuint *ptr4 = (GLuint *) xrb->ximage->data;
if (pixel == 0) {
/* common case */
- _mesa_memset(ptr4, pixel, 4 * n);
+ memset(ptr4, pixel, 4 * n);
}
else {
GLuint i;
print '\t_mesa_init_default_imports'
print '\t_mesa_initialize_context'
print '\t_mesa_make_current'
- print '\t_mesa_memset'
print '\t_mesa_new_buffer_object'
print '\t_mesa_new_texture_object'
print '\t_mesa_problem'
*/
#define BITSET_COPY(x, y) memcpy( (x), (y), sizeof (x) )
#define BITSET_EQUAL(x, y) (_mesa_memcmp( (x), (y), sizeof (x) ) == 0)
-#define BITSET_ZERO(x) _mesa_memset( (x), 0, sizeof (x) )
-#define BITSET_ONES(x) _mesa_memset( (x), 0xff, sizeof (x) )
+#define BITSET_ZERO(x) memset( (x), 0, sizeof (x) )
+#define BITSET_ONES(x) memset( (x), 0xff, sizeof (x) )
#define BITSET_BITWORD(b) ((b) / BITSET_WORDBITS)
#define BITSET_BIT(b) (1 << ((b) % BITSET_WORDBITS))
{
struct tnl_program p;
- _mesa_memset(&p, 0, sizeof(p));
+ memset(&p, 0, sizeof(p));
p.state = key;
p.program = program;
p.eye_position = undef;
return newBuffer;
}
-/** Wrapper around memset() */
-void
-_mesa_memset( void *dst, int val, size_t n )
-{
-#if defined(SUNOS4)
- memset( (char *) dst, (int) val, (int) n );
-#else
- memset(dst, val, n);
-#endif
-}
-
/**
* Fill memory with a constant 16bit word.
* \param dst destination pointer.
/** Copy \p BYTES bytes from \p SRC into \p DST */
#define MEMCPY( DST, SRC, BYTES) memcpy(DST, SRC, BYTES)
/** Set \p N bytes in \p DST to \p VAL */
-#define MEMSET( DST, VAL, N ) _mesa_memset(DST, VAL, N)
+#define MEMSET( DST, VAL, N ) memset(DST, VAL, N)
/*@}*/
extern void *
_mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize );
-extern void
-_mesa_memset( void *dst, int val, size_t n );
-
extern void
_mesa_memset16( unsigned short *dst, unsigned short val, size_t n );
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
if (!mask && val0 == val1 && val1 == val2) {
/* optimized case */
- _mesa_memset(dst, val0, 3 * count);
+ memset(dst, val0, 3 * count);
}
else {
GLuint i;
}
}
else {
- _mesa_memset(dst, val, count);
+ memset(dst, val, count);
}
}
} hist[N_TEXELS];
GLint lenh = 0;
- _mesa_memset(hist, 0, sizeof(hist));
+ memset(hist, 0, sizeof(hist));
for (k = 0; k < n; k++) {
GLint l;
if (comps == 3) {
/* make the whole block opaque */
- _mesa_memset(input, -1, sizeof(input));
+ memset(input, -1, sizeof(input));
}
/* 8 texels each line */
GLuint unit;
struct ureg cf, out;
- _mesa_memset(&p, 0, sizeof(p));
+ memset(&p, 0, sizeof(p));
p.state = key;
p.program = program;
{
static char ret_str[1024];
- _mesa_memset(ret_str, 0, 1024);
+ memset(ret_str, 0, 1024);
if (mod & GL_2X_BIT_ATI)
strncat(ret_str, "|2X", 1024);
size = cache->size * 3;
items = (struct cache_item**) _mesa_malloc(size * sizeof(*items));
- _mesa_memset(items, 0, size * sizeof(*items));
+ memset(items, 0, size * sizeof(*items));
for (i = 0; i < cache->size; i++)
for (c = cache->items[i]; c; c = next) {
paramList->NumParameters = oldNum + sz4;
- _mesa_memset(¶mList->Parameters[oldNum], 0,
- sz4 * sizeof(struct gl_program_parameter));
+ memset(¶mList->Parameters[oldNum], 0,
+ sz4 * sizeof(struct gl_program_parameter));
for (i = 0; i < sz4; i++) {
struct gl_program_parameter *p = paramList->Parameters + oldNum + i;
{
GLuint i, j;
- _mesa_memset(used, 0, usedSize);
+ memset(used, 0, usedSize);
for (i = 0; i < prog->NumInstructions; i++) {
const struct prog_instruction *inst = prog->Instructions + i;
/* optimized case */
GLushort *dst = (GLushort *) rb->GetPointer(ctx, rb, x, y);
GLuint len = width * height * sizeof(GLushort);
- _mesa_memset(dst, (clearValue & 0xff), len);
+ memset(dst, (clearValue & 0xff), len);
}
else {
/* general case */
span->writeAll = GL_FALSE;
}
else {
- _mesa_memset(span->array->mask, 1, span->end);
+ memset(span->array->mask, 1, span->end);
span->writeAll = GL_TRUE;
}
span->writeAll = GL_FALSE;
}
else {
- _mesa_memset(span->array->mask, 1, span->end);
+ memset(span->array->mask, 1, span->end);
span->writeAll = GL_TRUE;
}
/* Note: bottom-to-top raster assumed! */
GLubyte *stencil = (GLubyte *) rb->GetPointer(ctx, rb, x, y);
GLuint len = width * height * sizeof(GLubyte);
- _mesa_memset(stencil, clearVal, len);
+ memset(stencil, clearVal, len);
}
else {
/* general case */
for (i = 0; i < height; i++) {
GLvoid *stencil = rb->GetPointer(ctx, rb, x, y + i);
if (rb->DataType == GL_UNSIGNED_BYTE) {
- _mesa_memset(stencil, clearVal, width);
+ memset(stencil, clearVal, width);
}
else {
_mesa_memset16((short unsigned int*) stencil, clearVal, width);
return;
}
- _mesa_memset(&p, 0, sizeof(p));
+ memset(&p, 0, sizeof(p));
p.ctx = ctx;
p.inputs_safe = 0; /* for now */
return;
}
- _mesa_memset(&p, 0, sizeof(p));
+ memset(&p, 0, sizeof(p));
p.vf = vf;
p.inputs_safe = 0; /* for now */