mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-21 22:00:24 +02:00
This adds simple support for unit testing, starting with the LZ77 compressor. - Unit tests run on a separate GitHub Actions workflow - Remove CTest commands from shared build workflow
69 lines
1.8 KiB
C
69 lines
1.8 KiB
C
/*
|
|
===========================================================================
|
|
Copyright (C) 2025 the OpenMoHAA team
|
|
|
|
This file is part of OpenMoHAA source code.
|
|
|
|
OpenMoHAA source code is free software; you can redistribute it
|
|
and/or modify it under the terms of the GNU General Public License as
|
|
published by the Free Software Foundation; either version 2 of the License,
|
|
or (at your option) any later version.
|
|
|
|
OpenMoHAA source code is distributed in the hope that it will be
|
|
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with OpenMoHAA source code; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
===========================================================================
|
|
*/
|
|
|
|
#include "q_shared.h"
|
|
#include <stdarg.h>
|
|
|
|
void QDECL Com_Printf( const char *fmt, ... ) {
|
|
va_list argptr;
|
|
char text[1024];
|
|
|
|
va_start(argptr, text);
|
|
Q_vsnprintf(text, sizeof(text), text, argptr);
|
|
va_end(argptr);
|
|
|
|
printf("%s", text);
|
|
}
|
|
|
|
void QDECL Com_DPrintf( const char *fmt, ...) {
|
|
va_list argptr;
|
|
char text[1024];
|
|
|
|
va_start(argptr, text);
|
|
Q_vsnprintf(text, sizeof(text), text, argptr);
|
|
va_end(argptr);
|
|
|
|
printf("%s", text);
|
|
}
|
|
|
|
void QDECL Com_DPrintf2( const char *fmt, ...) {
|
|
va_list argptr;
|
|
char text[1024];
|
|
|
|
va_start(argptr, text);
|
|
Q_vsnprintf(text, sizeof(text), text, argptr);
|
|
va_end(argptr);
|
|
|
|
printf("%s", text);
|
|
}
|
|
|
|
void QDECL Com_Error( int code, const char *fmt, ... ) {
|
|
va_list argptr;
|
|
char text[1024];
|
|
|
|
va_start(argptr, text);
|
|
Q_vsnprintf(text, sizeof(text), text, argptr);
|
|
va_end(argptr);
|
|
|
|
fprintf(stderr, "%s", text);
|
|
}
|