Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

archlib_vice.c

Go to the documentation of this file.
00001 /*
00002  *      This program is free software; you can redistribute it and/or
00003  *      modify it under the terms of the GNU General Public License
00004  *      as published by the Free Software Foundation; either version
00005  *      2 of the License, or (at your option) any later version.
00006  *
00007  *  Copyright 2005-2006 Spiro Trikaliotis
00008  *
00009 */
00010 
00021 #include <windows.h>
00022 #include <windowsx.h>
00023 
00025 #define DBG_USERMODE
00026 
00028 #define DBG_DLL
00029 
00031 #define DBG_PROGNAME "OPENCBM.DLL"
00032 
00034 #define DBG_IS_DEBUG_C
00035 
00036 #include "debug.h"
00037 
00038 #include <winioctl.h>
00039 #include "cbmioctl.h"
00040 
00041 #include <stdlib.h>
00042 
00044 #define DLL
00045 #include "i_opencbm.h"
00046 #include "archlib.h"
00047 
00048 #include "arch.h"
00049 #include "vice_comm.h"
00050 
00051 
00052 static void
00053 DbgOut(const char * const Format, ...)
00054 {
00055     va_list arg_ptr;
00056     int n;
00057     
00058 
00059     // Get a pointer to the current position in the given DebugBuffer
00060 
00061     char buffer[2048];
00062 
00063     va_start(arg_ptr, Format);
00064 
00065     // If there is some space left in the DebugBuffer, append the contents
00066 
00067     // Output at most the number of bytes which are left in the DebugBuffer
00068 
00069     n = _vsnprintf(buffer, sizeof(buffer) - 1, Format, arg_ptr);
00070 
00071     // Was the buffer too small? If yes, the number of bytes
00072     // inserted is the size of the remaining buffer, so, set
00073     // this value
00074 
00075     if (n<0) 
00076         n = sizeof(buffer);
00077 
00078     if (n < sizeof(buffer))
00079         buffer[n++] = '\n';
00080 
00081     buffer[n] = 0;
00082 
00083     va_end(arg_ptr);
00084 
00085     OutputDebugString(buffer);
00086 }
00087 
00088 static void
00089 DbgLineStatus(const unsigned char Value)
00090 {
00142 
00167 
00212 
00244 
00269 
00301 
00359 
00429 
00482 
00549 
00577 
00605 
00643 
00682 
00719 
00760 
00770 
00793 
00840 
00882 
00937 
00965 
01002 
01075 

Generated on Sun Apr 30 18:45:43 2006 for opencbm by  doxygen 1.4.2