/*
- * "$Id$"
- *
* Raster error handling for CUPS.
*
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2015 by Apple Inc.
* Copyright 2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
ssize_t bytes; /* Bytes in message string */
+ DEBUG_printf(("_cupsRasterAddError(f=\"%s\", ...)", f));
+
va_start(ap, f);
bytes = vsnprintf(s, sizeof(s), f, ap);
va_end(ap);
if (bytes <= 0)
return;
+ DEBUG_printf(("1_cupsRasterAddError: %s", s));
+
bytes ++;
if ((size_t)bytes >= sizeof(s))
* Initialize the global data exactly once...
*/
- DEBUG_puts("get_error_buffer()");
+ DEBUG_puts("3get_error_buffer()");
pthread_once(&raster_key_once, raster_init);
if ((buf = (_cups_raster_error_t *)pthread_getspecific(raster_key))
== NULL)
{
- DEBUG_puts("get_error_buffer: allocating memory for thread...");
+ DEBUG_puts("4get_error_buffer: allocating memory for thread.");
/*
* No, allocate memory as set the pointer for the key...
buf = calloc(1, sizeof(_cups_raster_error_t));
pthread_setspecific(raster_key, buf);
- DEBUG_printf((" buf=%p\n", buf));
+ DEBUG_printf(("4get_error_buffer: buf=%p", (void *)buf));
}
/*
{
pthread_key_create(&raster_key, raster_destructor);
- DEBUG_printf(("raster_init(): raster_key=%x(%u)\n", (unsigned)raster_key,
- (unsigned)raster_key));
+ DEBUG_printf(("3raster_init(): raster_key=%x(%u)", (unsigned)raster_key, (unsigned)raster_key));
}
/* Error buffer */
- DEBUG_printf(("raster_destructor(value=%p)\n", value));
+ DEBUG_printf(("3raster_destructor(value=%p)", value));
if (buf->start)
free(buf->start);
return (&buf);
}
#endif /* HAVE_PTHREAD_H */
-
-
-/*
- * End of "$Id$".
- */