summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-08-19 05:05:54 (GMT)
committernijtmans <nijtmans>2010-08-19 05:05:54 (GMT)
commit6e6da6f513209d1b8877bbf4d285bbb5aec6437e (patch)
treedb40ff3cdc6e9cc0634a5566ecc6e350ebf6bd40 /generic/ttk
parent429c4539b16387d44e982748807d1207dbc7be79 (diff)
downloadtk-6e6da6f513209d1b8877bbf4d285bbb5aec6437e.zip
tk-6e6da6f513209d1b8877bbf4d285bbb5aec6437e.tar.gz
tk-6e6da6f513209d1b8877bbf4d285bbb5aec6437e.tar.bz2
[Patch 3034251] partly: remove some more unneeded ifdeffery from stub header files
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttkDecls.h68
-rw-r--r--generic/ttk/ttkGenStubs.tcl28
2 files changed, 10 insertions, 86 deletions
diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h
index cc4809d..2f30835 100644
--- a/generic/ttk/ttkDecls.h
+++ b/generic/ttk/ttkDecls.h
@@ -1,5 +1,5 @@
/*
- * $Id: ttkDecls.h,v 1.14 2010/06/22 07:53:59 nijtmans Exp $
+ * $Id: ttkDecls.h,v 1.15 2010/08/19 05:05:55 nijtmans Exp $
*
* This file is (mostly) automatically generated from ttk.decls.
*/
@@ -25,8 +25,6 @@ extern const char *TtkInitializeStubs(
#define TTK_STUBS_EPOCH 0
#define TTK_STUBS_REVISION 31
-#if !defined(USE_TTK_STUBS)
-
/*
* Exported function declarations:
*/
@@ -133,8 +131,6 @@ TTKAPI Tcl_Obj * Ttk_NewBoxObj(Ttk_Box box);
TTKAPI int Ttk_GetOrientFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, int *orient);
-#endif /* !defined(USE_TTK_STUBS) */
-
typedef struct TtkStubs {
int magic;
int epoch;
@@ -198,140 +194,78 @@ extern const TtkStubs *ttkStubsPtr;
* Inline function declarations:
*/
-#ifndef Ttk_GetTheme
#define Ttk_GetTheme \
(ttkStubsPtr->ttk_GetTheme) /* 0 */
-#endif
-#ifndef Ttk_GetDefaultTheme
#define Ttk_GetDefaultTheme \
(ttkStubsPtr->ttk_GetDefaultTheme) /* 1 */
-#endif
-#ifndef Ttk_GetCurrentTheme
#define Ttk_GetCurrentTheme \
(ttkStubsPtr->ttk_GetCurrentTheme) /* 2 */
-#endif
-#ifndef Ttk_CreateTheme
#define Ttk_CreateTheme \
(ttkStubsPtr->ttk_CreateTheme) /* 3 */
-#endif
-#ifndef Ttk_RegisterCleanup
#define Ttk_RegisterCleanup \
(ttkStubsPtr->ttk_RegisterCleanup) /* 4 */
-#endif
-#ifndef Ttk_RegisterElementSpec
#define Ttk_RegisterElementSpec \
(ttkStubsPtr->ttk_RegisterElementSpec) /* 5 */
-#endif
-#ifndef Ttk_RegisterElement
#define Ttk_RegisterElement \
(ttkStubsPtr->ttk_RegisterElement) /* 6 */
-#endif
-#ifndef Ttk_RegisterElementFactory
#define Ttk_RegisterElementFactory \
(ttkStubsPtr->ttk_RegisterElementFactory) /* 7 */
-#endif
-#ifndef Ttk_RegisterLayout
#define Ttk_RegisterLayout \
(ttkStubsPtr->ttk_RegisterLayout) /* 8 */
-#endif
/* Slot 9 is reserved */
-#ifndef Ttk_GetStateSpecFromObj
#define Ttk_GetStateSpecFromObj \
(ttkStubsPtr->ttk_GetStateSpecFromObj) /* 10 */
-#endif
-#ifndef Ttk_NewStateSpecObj
#define Ttk_NewStateSpecObj \
(ttkStubsPtr->ttk_NewStateSpecObj) /* 11 */
-#endif
-#ifndef Ttk_GetStateMapFromObj
#define Ttk_GetStateMapFromObj \
(ttkStubsPtr->ttk_GetStateMapFromObj) /* 12 */
-#endif
-#ifndef Ttk_StateMapLookup
#define Ttk_StateMapLookup \
(ttkStubsPtr->ttk_StateMapLookup) /* 13 */
-#endif
-#ifndef Ttk_StateTableLookup
#define Ttk_StateTableLookup \
(ttkStubsPtr->ttk_StateTableLookup) /* 14 */
-#endif
/* Slot 15 is reserved */
/* Slot 16 is reserved */
/* Slot 17 is reserved */
/* Slot 18 is reserved */
/* Slot 19 is reserved */
-#ifndef Ttk_GetPaddingFromObj
#define Ttk_GetPaddingFromObj \
(ttkStubsPtr->ttk_GetPaddingFromObj) /* 20 */
-#endif
-#ifndef Ttk_GetBorderFromObj
#define Ttk_GetBorderFromObj \
(ttkStubsPtr->ttk_GetBorderFromObj) /* 21 */
-#endif
-#ifndef Ttk_GetStickyFromObj
#define Ttk_GetStickyFromObj \
(ttkStubsPtr->ttk_GetStickyFromObj) /* 22 */
-#endif
-#ifndef Ttk_MakePadding
#define Ttk_MakePadding \
(ttkStubsPtr->ttk_MakePadding) /* 23 */
-#endif
-#ifndef Ttk_UniformPadding
#define Ttk_UniformPadding \
(ttkStubsPtr->ttk_UniformPadding) /* 24 */
-#endif
-#ifndef Ttk_AddPadding
#define Ttk_AddPadding \
(ttkStubsPtr->ttk_AddPadding) /* 25 */
-#endif
-#ifndef Ttk_RelievePadding
#define Ttk_RelievePadding \
(ttkStubsPtr->ttk_RelievePadding) /* 26 */
-#endif
-#ifndef Ttk_MakeBox
#define Ttk_MakeBox \
(ttkStubsPtr->ttk_MakeBox) /* 27 */
-#endif
-#ifndef Ttk_BoxContains
#define Ttk_BoxContains \
(ttkStubsPtr->ttk_BoxContains) /* 28 */
-#endif
-#ifndef Ttk_PackBox
#define Ttk_PackBox \
(ttkStubsPtr->ttk_PackBox) /* 29 */
-#endif
-#ifndef Ttk_StickBox
#define Ttk_StickBox \
(ttkStubsPtr->ttk_StickBox) /* 30 */
-#endif
-#ifndef Ttk_AnchorBox
#define Ttk_AnchorBox \
(ttkStubsPtr->ttk_AnchorBox) /* 31 */
-#endif
-#ifndef Ttk_PadBox
#define Ttk_PadBox \
(ttkStubsPtr->ttk_PadBox) /* 32 */
-#endif
-#ifndef Ttk_ExpandBox
#define Ttk_ExpandBox \
(ttkStubsPtr->ttk_ExpandBox) /* 33 */
-#endif
-#ifndef Ttk_PlaceBox
#define Ttk_PlaceBox \
(ttkStubsPtr->ttk_PlaceBox) /* 34 */
-#endif
-#ifndef Ttk_NewBoxObj
#define Ttk_NewBoxObj \
(ttkStubsPtr->ttk_NewBoxObj) /* 35 */
-#endif
/* Slot 36 is reserved */
/* Slot 37 is reserved */
/* Slot 38 is reserved */
/* Slot 39 is reserved */
-#ifndef Ttk_GetOrientFromObj
#define Ttk_GetOrientFromObj \
(ttkStubsPtr->ttk_GetOrientFromObj) /* 40 */
-#endif
#endif /* defined(USE_TTK_STUBS) */
diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl
index 359edcc..d0f8c0d 100644
--- a/generic/ttk/ttkGenStubs.tcl
+++ b/generic/ttk/ttkGenStubs.tcl
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# $Id: ttkGenStubs.tcl,v 1.8 2010/06/22 07:53:59 nijtmans Exp $
+# $Id: ttkGenStubs.tcl,v 1.9 2010/08/19 05:05:55 nijtmans Exp $
#
# SOURCE: tcl/tools/genStubs.tcl, revision 1.20
#
@@ -468,10 +468,7 @@ proc genStubs::makeDecl {name decl index} {
append line ")"
}
}
- append text $line
-
- append text ";\n"
- return $text
+ return "$text$line;\n"
}
# genStubs::makeMacro --
@@ -492,14 +489,12 @@ proc genStubs::makeMacro {name decl index} {
set lfname [string tolower [string index $fname 0]]
append lfname [string range $fname 1 end]
- set text "#ifndef $fname\n#define $fname"
+ set text "#define $fname \\\n\t("
if {$args == ""} {
- append text " \\\n\t(*${name}StubsPtr->$lfname)"
- append text " /* $index */\n#endif\n"
- return $text
+ append text "*"
}
- append text " \\\n\t(${name}StubsPtr->$lfname)"
- append text " /* $index */\n#endif\n"
+ append text "${name}StubsPtr->$lfname)"
+ append text " /* $index */\n"
return $text
}
@@ -661,15 +656,10 @@ proc genStubs::ifdeffed {macro text} {
# None.
proc genStubs::emitDeclarations {name textVar} {
- variable libraryName
upvar $textVar text
- set upName [string toupper $libraryName]
- append text "\n#if !defined(USE_${upName}_STUBS)\n"
append text "\n/*\n * Exported function declarations:\n */\n\n"
forAllStubs $name makeDecl noGuard text
- append text "\n#endif /* !defined(USE_${upName}_STUBS) */\n"
-
return
}
@@ -691,7 +681,7 @@ proc genStubs::emitMacros {name textVar} {
set upName [string toupper $libraryName]
append text "\n#if defined(USE_${upName}_STUBS)\n"
append text "\n/*\n * Inline function declarations:\n */\n\n"
-
+
forAllStubs $name makeMacro addGuard text
append text "\n#endif /* defined(USE_${upName}_STUBS) */\n"
@@ -742,9 +732,9 @@ proc genStubs::emitHeader {name} {
emitSlots $name text
- append text "} ${capName}Stubs;\n"
+ append text "} ${capName}Stubs;\n\n"
- append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
+ append text "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
append text "extern const ${capName}Stubs *${name}StubsPtr;\n"
append text "#ifdef __cplusplus\n}\n#endif\n"