mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
Add ENABLE_LOGGING define so logging can be used on non-debug builds, e.g. to trace opening of non-debug saved games and prefs files.
This commit is contained in:
parent
eee7fd01b0
commit
0b5a14c424
10 changed files with 36 additions and 15 deletions
|
@ -201,6 +201,12 @@ typedef struct CommonPrefs {
|
|||
# define XP_UNUSED_DBG(x) XP_UNUSED(x)
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_LOGGING
|
||||
# define XP_UNUSED_LOG(x) x
|
||||
#else
|
||||
# define XP_UNUSED_LOG(x) XP_UNUSED(x)
|
||||
#endif
|
||||
|
||||
#ifdef XWFEATURE_RELAY
|
||||
# define XP_UNUSED_RELAY(x) x
|
||||
#else
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ENABLE_LOGGING
|
||||
|
||||
#include "dbgutil.h"
|
||||
|
||||
|
@ -67,5 +67,5 @@ BoardObjectType_2str( BoardObjectType obj )
|
|||
|
||||
#undef CASESTR
|
||||
|
||||
#endif /* DEBUG */
|
||||
#endif /* ENABLE_LOGGING */
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
ifeq ($(MEMDEBUG),TRUE)
|
||||
DEFINES = -DMEM_DEBUG -DDEBUG
|
||||
DEFINES = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING
|
||||
CFLAGS += -g $(GPROFFLAG) -Wall -Wunused-parameter -Wcast-align -Werror
|
||||
CFLAGS += -DDEBUG_TS
|
||||
PLATFORM = obj_linux_memdbg
|
||||
|
|
|
@ -20,7 +20,7 @@ PLATFORM=obj_palm
|
|||
SVNREV = $(shell svnversion -n .. | tr ':' '_')
|
||||
|
||||
ifeq ($(MEMDEBUG),TRUE)
|
||||
DEBUG = -DMEM_DEBUG -DDEBUG
|
||||
DEBUG = -DMEM_DEBUG -DDEBUG -DENABLE_LOGGING
|
||||
PLATFORM := $(PLATFORM)_memdebug
|
||||
CFLAGS += $(DEBUG) -g -O0
|
||||
CSFLAGS += -O0 -g
|
||||
|
|
|
@ -96,8 +96,14 @@ CFLAGS += -DDICTS_MOVED_ALERT
|
|||
CFLAGS += -DKEYBOARD_NAV
|
||||
CFLAGS += -DPERIMETER_FOCUS
|
||||
|
||||
# This is normally part of MEM_DEBUG, but sometimes we want logging in
|
||||
# a release build, e.g. to figure out why opening a saved game isn't
|
||||
# working. So normally it's commented out here.
|
||||
# LOGGING_FLAG = -DENABLE_LOGGING
|
||||
|
||||
ifeq ($(DEBUG),TRUE)
|
||||
MEM_DEBUG_FLAG=-DMEM_DEBUG
|
||||
LOGGING_FLAG = -DENABLE_LOGGING
|
||||
DEBUG_FLAG=-DDEBUG
|
||||
CFLAGS += -g -DDEBUG_TS
|
||||
OBJDIR = obj_$(TARGET_OS)_dbg
|
||||
|
@ -148,7 +154,7 @@ XW_BOTH_DEFINES = \
|
|||
-DXWFEATURE_HINT_CONFIG \
|
||||
-DPOINTER_SUPPORT -DKEY_SUPPORT -D__LITTLE_ENDIAN \
|
||||
-DCEFEATURE_CANSCROLL -DUNICODE \
|
||||
$(DEBUG_FLAG) $(MEM_DEBUG_FLAG) \
|
||||
$(DEBUG_FLAG) $(MEM_DEBUG_FLAG) $(LOGGING_FLAG) \
|
||||
|
||||
CFLAGS += $(XW_BOTH_DEFINES) -DARM
|
||||
RESFLAGS += $(XW_BOTH_DEFINES) $(STANDALONE) $(BLUETOOTH) $(RELAY) \
|
||||
|
|
|
@ -2420,15 +2420,15 @@ RECTtoXPR( XP_Rect* dest, RECT* src )
|
|||
} /* RECTtoXPR */
|
||||
|
||||
void
|
||||
wince_assert( XP_UCHAR* XP_UNUSED_DBG(s), int XP_UNUSED_DBG(line),
|
||||
char* XP_UNUSED_DBG(fileName) )
|
||||
wince_assert( XP_UCHAR* XP_UNUSED_LOG(s), int XP_UNUSED_LOG(line),
|
||||
char* XP_UNUSED_LOG(fileName) )
|
||||
{
|
||||
XP_WARNF( "ASSERTION FAILED %s: file %s, line %d\n", s, fileName, line );
|
||||
} /* wince_assert */
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ENABLE_LOGGING
|
||||
static void
|
||||
makeTimeStamp( XP_UCHAR* timeStamp, XP_U16 size )
|
||||
makeTimeStamp( XP_UCHAR* timeStamp, XP_U16 XP_UNUSED_DBG(size) )
|
||||
{
|
||||
SYSTEMTIME st;
|
||||
DWORD tid;
|
||||
|
@ -2546,7 +2546,7 @@ messageToBuf( UINT message, char* buf, int bufSize )
|
|||
snprintf( buf, bufSize, "%s", str );
|
||||
}
|
||||
} /* messageToBuf */
|
||||
#endif
|
||||
#endif /* ENABLE_LOGGING */
|
||||
|
||||
XP_U16
|
||||
wince_snprintf( XP_UCHAR* buf, XP_U16 len, const XP_UCHAR* format, ... )
|
||||
|
|
|
@ -59,7 +59,8 @@ enum { CE_BONUS1_COLOR,
|
|||
CE_NUM_COLORS /* last */
|
||||
};
|
||||
|
||||
#define CUR_CE_PREFS_FLAGS 0x0003
|
||||
#define CUR_CE_PREFS_FLAGS 0x0003 /* adds CE_FOCUS_COLOR */
|
||||
|
||||
typedef struct CEAppPrefs {
|
||||
XP_U16 versionFlags;
|
||||
CommonPrefs cp;
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
#define TPLWRD_LABEL 1076
|
||||
#define EMPTYCELL_LABEL 1077
|
||||
#define TILEBACK_LABEL 1078
|
||||
#define FOCURCLR_LABEL 1079
|
||||
#define FOCUSCLR_LABEL 1079
|
||||
|
||||
/* editor dlg: assumption is that the edit field's ID is one more
|
||||
than the corresponding slider's */
|
||||
|
|
|
@ -94,7 +94,7 @@ typedef XP_U32 XP_Time;
|
|||
#define XP_STATUSF XP_DEBUGF
|
||||
#define XP_WARNF XP_DEBUGF
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef ENABLE_LOGGING
|
||||
#define XP_DEBUGF(...) wince_debugf(__VA_ARGS__)
|
||||
#define XP_LOGF(...) wince_debugf(__VA_ARGS__)
|
||||
#else
|
||||
|
|
|
@ -167,12 +167,20 @@ CAPTION "About Crosswords"
|
|||
FONT 8, "System"
|
||||
BEGIN
|
||||
ICON IDI_XWORDS4,IDC_STATIC,5,17,20,20
|
||||
/* For some reason, the mingw compiler (win32) doesn't like my
|
||||
string concatenation trick any more. Need to fix or file a bug
|
||||
or something. */
|
||||
#ifdef _WIN32_WCE
|
||||
LTEXT "Crosswords 4.2b1 (rev " SVN_REV ") "\
|
||||
"for PocketPC. Copyright 1998-2008 by "\
|
||||
"Eric House. This software is released under the GNU "\
|
||||
"Public License.\r\r"\
|
||||
"For dictionaries, a manual, or source code go to "\
|
||||
"http://xwords.sf.net or http://eehouse.org/xwords/.",
|
||||
"http://xwords.sf.net or http://eehouse.org/xwords/."
|
||||
#else
|
||||
LTEXT "Crosswords 4.2b1"
|
||||
#endif
|
||||
,
|
||||
IDC_STATIC,29,4,95,101,SS_NOPREFIX
|
||||
END
|
||||
|
||||
|
@ -533,7 +541,7 @@ BEGIN
|
|||
PUSHBUTTON "",TBACK_BUTTON,CLR_COL_4,CLR_ROW_3,CLR_BUT_WIDTH,
|
||||
CLR_BUT_HT,BS_OWNERDRAW
|
||||
|
||||
LTEXT "Focus color:",FOCURCLR_LABEL,CLR_COL_1,CLR_ROW_4,
|
||||
LTEXT "Focus color:",FOCUSCLR_LABEL,CLR_COL_1,CLR_ROW_4,
|
||||
CLR_LAB_WIDTH,CLR_LAB_HT
|
||||
PUSHBUTTON "",FOCUS_BUTTON,CLR_COL_2,CLR_ROW_4,CLR_BUT_WIDTH,
|
||||
CLR_BUT_HT,BS_OWNERDRAW
|
||||
|
|
Loading…
Reference in a new issue