#pragma ident "@(#)gfx_vts.c 1.1 09/04/01 SMI"
/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <stdarg.h> /* va_end(), va_start(), vfprintf() */
#include <stdio.h> /* fprintf() */
#include <stdlib.h> /* free(), getenv(), malloc() */
#include <string.h> /* strdup() */
#include "graphicstest.h"
#include "gfx_vts.h" /* VTS Graphics Tests common routines */
/*
* gfx_vts_set_debug_mask()
*
* Set the gfx_vts_debug_mask bits according to environment variables.
*/
void
gfx_vts_set_debug_mask(void)
{
if (getenv("GRAPHICS_VTS_DEBUG")) {
}
if (getenv("GRAPHICS_VTS_DEV")) {
}
if (getenv("GRAPHICS_VTS_MEM_OFF")) {
}
if (getenv("GRAPHICS_VTS_CHIP_OFF")) {
}
if (getenv("GRAPHICS_VTS_SLOCK_OFF")) {
}
} /* gfx_vts_set_debug_mask() */
/*
* TraceMessage()
*
* Write a variable format debug message to stderr, prefixed by the
* calling function name.
*/
void
int flags, /* Current debug categories bit mask */
const char *func, /* Name of function to report */
const char *format, /* printf()-style format string */
...) /* printf()-style variable arguments */
{
if (flags & gfx_vts_debug_mask) {
}
} /* TraceMessage() */
/*
* gfx_vts_add_message()
*
* Add a message to the existing VTS test return packet.
* Grow the arrays (this doesn't happen often enough to call for
* linked lists).
*
*/
static
int
int count,
int mesg_num,
char *string) /* Message string, else NULL */
{
int i;
int *tmp_codes;
char **tmp_strings;
if (mesg_num >= 6000) {
}
rp->message_codes =
}
}
}
} /* gfx_vts_add_message() */
/*
* gfx_vts_set_message()
*
* Initialize the message in the VTS test return packet.
* The "count" parameter allows for reporting the number of messages
* encountered, whereas the array size allows for multiple messages.
*/
int
int count,
int mesg_num,
char *string) /* Message string, else NULL */
{
if (rp->number_of_message_codes > 0) {
} else {
if (mesg_num >= 6000) {
}
}
}
}
} /* gfx_vts_set_message() */
/*
* gfx_vts_check_fd()
*
* See whether the specified file descriptor number looks valid. If
* invalid, prepare a message in the return packet and return 1.
* Otherwise return zero.
*/
int
int fd, /* File descriptor number */
{
if (fd < 0) {
return (1);
}
return (0);
} /* gfx_vts_check_fd() */
/*
* gfx_vts_free_tests()
*
* Free any and all dynamically allocated memory to which the test
* structure points.
*/
void
{
}
} /* gfx_vts_free_tests() */
/*
* gfx_vts_console_interrupt()
*
* See whether a console interrupt (Ctrl-C or ^C) has been typed.
* If so, send a SIGINT signal to our own PID. Otherwise just
* return.
*/
void
{
int i; /* Loop counter / keystr[] index */
for (i = 0; i < len; i += 1) {
}
}
}
}
}
} /* gfx_vts_console_interrupt() */
/* End of gfx_vts_common.c */