forked from AppleWin/AppleWin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLog.cpp
More file actions
61 lines (44 loc) · 1.62 KB
/
Copy pathLog.cpp
File metadata and controls
61 lines (44 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
AppleWin : An Apple //e emulator for Windows
Copyright (C) 1994-1996, Michael O'Brien
Copyright (C) 1999-2001, Oliver Schmidt
Copyright (C) 2002-2005, Tom Charlesworth
Copyright (C) 2006-2007, Tom Charlesworth, Michael Pohoreski, Nick Westgate
AppleWin 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.
AppleWin 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 AppleWin; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Description: Log
*
* Author: Nick Westgate
*/
#include "StdAfx.h"
//---------------------------------------------------------------------------
void LogOutput(LPCTSTR format, ...)
{
TCHAR output[256];
va_list args;
va_start(args, format);
_vsntprintf(output, sizeof(output) - 1, format, args);
OutputDebugString(output);
}
//---------------------------------------------------------------------------
extern FILE* g_fh; // Filehandle for log file
void LogFileOutput(LPCTSTR format, ...)
{
if (!g_fh)
return;
TCHAR output[256];
va_list args;
va_start(args, format);
_vsntprintf(output, sizeof(output) - 1, format, args);
fprintf(g_fh, "%s", output);
}