]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/trace/lib_trace.c
ncurses 5.7 - patch 20100925
[ncurses.git] / ncurses / trace / lib_trace.c
index 799d3afc156c7ad40de5cab757e30bb8ed9d7a1a..c1859b2ab7a161c51f45e8fca229f9d4b7b81be3 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -47,7 +47,7 @@
 
 #include <ctype.h>
 
 
 #include <ctype.h>
 
-MODULE_ID("$Id: lib_trace.c,v 1.73 2009/10/24 21:56:58 tom Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.75 2010/09/25 22:16:12 juergen Exp $")
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
@@ -184,7 +184,11 @@ _nc_va_tracef(const char *fmt, va_list ap)
 # if USE_WEAK_SYMBOLS
        if ((pthread_self))
 # endif
 # if USE_WEAK_SYMBOLS
        if ((pthread_self))
 # endif
+#ifdef __MINGW32__
+           fprintf(TraceFP, "%#lx:", (long) (void *) pthread_self().p);
+#else
            fprintf(TraceFP, "%#lx:", (long) (void *) pthread_self());
            fprintf(TraceFP, "%#lx:", (long) (void *) pthread_self());
+#endif
 #endif
        if (before || after) {
            int n;
 #endif
        if (before || after) {
            int n;
@@ -220,6 +224,14 @@ _nc_retrace_bool(NCURSES_BOOL code)
     return code;
 }
 
     return code;
 }
 
+/* Trace 'char' return-values */
+NCURSES_EXPORT(char)
+_nc_retrace_char(char code)
+{
+    T((T_RETURN("%c"), code));
+    return code;
+}
+
 /* Trace 'int' return-values */
 NCURSES_EXPORT(int)
 _nc_retrace_int(int code)
 /* Trace 'int' return-values */
 NCURSES_EXPORT(int)
 _nc_retrace_int(int code)