Diff for /xmil/win9xc/trace.cpp between versions 1.2 and 1.3

version 1.2, 2004/08/09 02:47:02 version 1.3, 2004/08/20 08:41:41
Line 1 Line 1
 #include        "compiler.h"  #include        "compiler.h"
 #include        <stdarg.h>  #include        <stdarg.h>
 #include        "strres.h"  #include        "strres.h"
   #include        "profile.h"
 #include        "xmil.h"  #include        "xmil.h"
 #include        "dosio.h"  #include        "dosio.h"
 #include        "ini.h"  #include        "ini.h"
Line 45  enum { Line 46  enum {
         IDM_TRACECL          IDM_TRACECL
 };  };
   
 static const char       ProgTitle[] = "console";  static const OEMCHAR ProgTitle[] = "console";
 static const char       ClassName[] = "TRACE-console";  static const OEMCHAR ClassName[] = "TRACE-console";
 static const char       ClassEdit[] = "EDIT";  static const OEMCHAR ClassEdit[] = "EDIT";
 static const char       trace1[] = "TRACE";  static const OEMCHAR trace1[] = "TRACE";
 static const char       trace2[] = "VERBOSE";  static const OEMCHAR trace2[] = "VERBOSE";
 static const char       traceen[] = "Enable";  static const OEMCHAR traceen[] = "Enable";
 static const char       tracefh[] = "File out";  static const OEMCHAR tracefh[] = "File out";
 static const char       tracecl[] = "Clear";  static const OEMCHAR tracecl[] = "Clear";
 static const char       crlf[] = "\r\n";  static const OEMCHAR crlf[] = "\r\n";
   
 static  TRACEWIN        tracewin;  static  TRACEWIN        tracewin;
 static  HWND            hView = NULL;  static  HWND            hView = NULL;
Line 62  static HBRUSH  hBrush = NULL; Line 63  static HBRUSH  hBrush = NULL;
 static  char            szView[VIEW_BUFFERSIZE];  static  char            szView[VIEW_BUFFERSIZE];
 static  TRACECFG        tracecfg;  static  TRACECFG        tracecfg;
   
 static const char       np2trace[] = "np2trace.ini";  static const char inititle[] = "TRACE";
 static const char       inititle[] = "TRACE";  static const PFTBL initbl[4] = {
 static const INITBL     initbl[4] = {                          {"posx",        PFTYPE_SINT32,  &tracecfg.posx,         0},
                         {"posx",        INITYPE_SINT32, &tracecfg.posx,         0},                          {"posy",        PFTYPE_SINT32,  &tracecfg.posy,         0},
                         {"posy",        INITYPE_SINT32, &tracecfg.posy,         0},                          {"width",       PFTYPE_SINT32,  &tracecfg.width,        0},
                         {"width",       INITYPE_SINT32, &tracecfg.width,        0},                          {"height",      PFTYPE_SINT32,  &tracecfg.height,       0}};
                         {"height",      INITYPE_SINT32, &tracecfg.height,       0}};  
   
 static void View_ScrollToBottom(HWND hWnd) {  static void View_ScrollToBottom(HWND hWnd) {
   
Line 344  static LRESULT CALLBACK traceproc(HWND h Line 344  static LRESULT CALLBACK traceproc(HWND h
 void trace_init(void) {  void trace_init(void) {
   
         HWND    hwnd;          HWND    hwnd;
           OEMCHAR path[MAX_PATH];
   
         if (!hPreI) {          if (!hPreI) {
                 WNDCLASS wc;                  WNDCLASS wc;
Line 375  void trace_init(void) { Line 376  void trace_init(void) {
         tracecfg.posy = CW_USEDEFAULT;          tracecfg.posy = CW_USEDEFAULT;
         tracecfg.width = CW_USEDEFAULT;          tracecfg.width = CW_USEDEFAULT;
         tracecfg.height = CW_USEDEFAULT;          tracecfg.height = CW_USEDEFAULT;
         ini_read(file_getcd(np2trace), inititle, initbl, 4);          initgetfile(path, NELEMENTS(path));
           profile_iniread(path, inititle, initbl, NELEMENTS(initbl), NULL);
   
         hwnd = CreateWindowEx(WS_EX_CONTROLPARENT,          hwnd = CreateWindowEx(WS_EX_CONTROLPARENT,
                                                         ClassName, ProgTitle,                                                          ClassName, ProgTitle,
Line 393  void trace_init(void) { Line 395  void trace_init(void) {
   
 void trace_term(void) {  void trace_term(void) {
   
           OEMCHAR path[MAX_PATH];
   
         if (tracewin.fh != FILEH_INVALID) {          if (tracewin.fh != FILEH_INVALID) {
                 trfh_close();                  trfh_close();
         }          }
         if (tracewin.hwnd) {          if (tracewin.hwnd) {
                 DestroyWindow(tracewin.hwnd);                  DestroyWindow(tracewin.hwnd);
                 tracewin.hwnd = NULL;                  tracewin.hwnd = NULL;
                 ini_write(file_getcd(np2trace), inititle, initbl, 4);                  initgetfile(path, NELEMENTS(path));
                   profile_iniwrite(path, inititle, initbl, NELEMENTS(initbl), NULL);
         }          }
 }  }
   

Removed from v.1.2  
changed lines
  Added in v.1.3


RetroPC.NET-CVS <cvs@retropc.net>