| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/Main/linux/lnxmono.cpp $ |
| 21 | * $Revision: 1.3 $ |
| 22 | * $Date: 2004/02/23 03:03:48 $ |
| 23 | * $Author: ryan $ |
| 24 | * |
| 25 | * Linux monochrome routines |
| 26 | * |
| 27 | * $Log: lnxmono.cpp,v $ |
| 28 | * Revision 1.3 2004/02/23 03:03:48 ryan |
| 29 | * Patched to compile with gcc3 and a modern linux distro... |
| 30 | * |
| 31 | * Revision 1.2 2000/05/29 05:39:59 icculus |
| 32 | * Changed some exit() calls to _exit(). |
| 33 | * |
| 34 | * Revision 1.1.1.1 2000/04/18 00:00:39 icculus |
| 35 | * initial checkin |
| 36 | * |
| 37 | * |
| 38 | * 13 8/22/99 5:52a Jeff |
| 39 | * remote monochrome server code added |
| 40 | * |
| 41 | * 12 7/14/99 9:09p Jeff |
| 42 | * added comment header |
| 43 | * |
| 44 | * $NoKeywords: $ |
| 45 | */ |
| 46 | |
| 47 | #include <cstdarg> |
| 48 | #include <cstdio> |
| 49 | #include <memory.h> |
| 50 | |
| 51 | #include "debug.h"cxx . . $ `<file>/ddebug/debug.h`/ |
| 52 | #include "mono.h"cxx . . $ `<file>/ddebug/mono.h`/ |
| 53 | |
| 54 | static char Mono_buffercxx . . $ Mono_buffer.[MAX_MONO_LENGTHcxx . . $ `ddebug/mono.h:69:9`!]; |
| 55 | |
| 56 | void Debug_ConsolePrintfcxx . . $ Debug_ConsolePrintf(afcfcee7634adf7d).(int n, const char *format, ...) { |
| 57 | va_listcxx . . $ va_list# marker; |
| 58 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(marker, format); |
| 59 | stdcxx . . $ std/::vsnprintfcxx . . $ std/vsnprintf(348eb892742d8727).(Mono_buffercxx . . $ Mono_buffer., MAX_MONO_LENGTHcxx . . $ `ddebug/mono.h:69:9`!, format, marker); |
| 60 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(marker); |
| 61 | |
| 62 | Debug_LogWritecxx . . $ Debug_LogWrite(85c52e162fed56f9).(Mono_buffercxx . . $ Mono_buffer.); |
| 63 | |
| 64 | if (n == 0) { |
| 65 | printf("%s", Mono_buffercxx . . $ Mono_buffer.); |
| 66 | |
| 67 | int end = strlen(Mono_buffercxx . . $ Mono_buffer.) - 1; |
| 68 | if ((end > 1) && (Mono_buffercxx . . $ Mono_buffer.[end] != 0x0a) && (Mono_buffercxx . . $ Mono_buffer.[end] != 0x0d)) { |
| 69 | printf("\n"); |
| 70 | Debug_LogWritecxx . . $ Debug_LogWrite(85c52e162fed56f9).("\n"); |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void Debug_ConsolePrintfAtcxx . . $ Debug_ConsolePrintfAt(e6b86272566182ce).(int n, int row, int col, const char *format, ...) {} |