From 34fbe0438a0f9b87108fb087f3d21c3d01399a58 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 1 Feb 2021 16:17:49 +0000 Subject: Fix [44eaf9a908]: 'make distclean' fails on trunk --- unix/Makefile.in | 3 ++- win/Makefile.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index 8a11b53..6015487 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -951,7 +951,8 @@ Makefile: $(UNIX_DIR)/Makefile.in clean: rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out \ errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc \ - *.zip *.vfs + *.zip + rm -rf *.vfs distclean: clean rm -rf Makefile config.status config.cache config.log tkConfig.sh \ diff --git a/win/Makefile.in b/win/Makefile.in index a02dbc2..bc9a064 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -792,7 +792,8 @@ cleanhelp: clean: cleanhelp $(RM) *.lib *.a *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(WISH) $(TKTEST) $(CAT32) - $(RM) *.pch *.ilk *.pdb + $(RM) *.pch *.ilk *.pdb *.zip + $(RMDIR) *.vfs distclean: clean $(RM) Makefile config.status config.cache config.log tkConfig.sh \ -- cgit v0.12 From 9c29a905fa4d7ec4c5aa8528475f312dc3d39dab Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 2 Feb 2021 15:40:48 +0000 Subject: More implicit type-casts, for C++ compatibility. --- generic/tkCanvas.c | 8 +++++-- macosx/tkMacOSXBitmap.c | 4 ++-- macosx/tkMacOSXButton.c | 12 +++++------ macosx/tkMacOSXColor.h | 2 +- macosx/tkMacOSXCursor.c | 2 +- macosx/tkMacOSXDialog.c | 29 +++++++++++++------------ macosx/tkMacOSXDraw.c | 52 +++++++++++++++++++++++---------------------- macosx/tkMacOSXEmbed.c | 12 +++++------ macosx/tkMacOSXFont.c | 2 +- macosx/tkMacOSXImage.c | 10 ++++----- macosx/tkMacOSXKeyEvent.c | 10 ++++----- macosx/tkMacOSXKeyboard.c | 40 +++++++++++++++++----------------- macosx/tkMacOSXKeysyms.h | 2 +- macosx/tkMacOSXMenu.c | 8 +++---- macosx/tkMacOSXMenubutton.c | 12 +++++------ macosx/tkMacOSXNotify.c | 2 +- macosx/tkMacOSXPrivate.h | 4 ++-- macosx/tkMacOSXScrlbr.c | 12 +++++------ macosx/tkMacOSXSubwindows.c | 4 ++-- macosx/tkMacOSXTest.c | 2 +- macosx/tkMacOSXWm.c | 22 +++++++++---------- macosx/ttkMacOSXTheme.c | 24 ++++++++++----------- 22 files changed, 141 insertions(+), 134 deletions(-) diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 2ce5e50..0e4e872 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -2450,6 +2450,10 @@ DisplayCanvas( Tk_Item *itemPtr; Pixmap pixmap; int screenX1, screenX2, screenY1, screenY2, width, height; +#ifdef MAC_OSX_TK + TkWindow *winPtr; + MacDrawable *macWin; +#endif if (canvasPtr->tkwin == NULL) { return; @@ -2464,8 +2468,8 @@ DisplayCanvas( * If drawing is disabled, all we need to do is * clear the REDRAW_PENDING flag. */ - TkWindow *winPtr = (TkWindow *)(canvasPtr->tkwin); - MacDrawable *macWin = winPtr->privatePtr; + winPtr = (TkWindow *)(canvasPtr->tkwin); + macWin = winPtr->privatePtr; if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){ canvasPtr->flags &= ~REDRAW_PENDING; return; diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c index 4c77d92..4f51fc6 100644 --- a/macosx/tkMacOSXBitmap.c +++ b/macosx/tkMacOSXBitmap.c @@ -257,7 +257,7 @@ TkpGetNativeAppBitmap( if (iconBitmapTable.buckets && (hPtr = Tcl_FindHashEntry(&iconBitmapTable, name))) { OSType type; - IconBitmap *iconBitmap = Tcl_GetHashValue(hPtr); + IconBitmap *iconBitmap = (IconBitmap *)Tcl_GetHashValue(hPtr); name = NULL; size = NSMakeSize(iconBitmap->width, iconBitmap->height); switch (iconBitmap->kind) { @@ -403,7 +403,7 @@ TkMacOSXIconBitmapObjCmd( } hPtr = Tcl_CreateHashEntry(&iconBitmapTable, name, &isNew); if (!isNew) { - iconBitmap = Tcl_GetHashValue(hPtr); + iconBitmap = (IconBitmap *)Tcl_GetHashValue(hPtr); ckfree(iconBitmap->value); } else { iconBitmap = (IconBitmap *)ckalloc(sizeof(IconBitmap)); diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index 857ce34..b083531 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -181,8 +181,8 @@ void TkpDisplayButton( ClientData clientData) /* Information about widget. */ { - MacButton *macButtonPtr = clientData; - TkButton *butPtr = clientData; + MacButton *macButtonPtr = (MacButton *)clientData; + TkButton *butPtr = (TkButton *)clientData; Tk_Window tkwin = butPtr->tkwin; Pixmap pixmap; DrawParams* dpPtr = &macButtonPtr->drawParams; @@ -901,8 +901,8 @@ ButtonEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { - TkButton *buttonPtr = clientData; - MacButton *mbPtr = clientData; + TkButton *buttonPtr = (TkButton *)clientData; + MacButton *mbPtr = (MacButton *)clientData; if (eventPtr->type == ActivateNotify || eventPtr->type == DeactivateNotify) { @@ -957,7 +957,7 @@ TkMacOSXComputeButtonParams( *btnkind = kThemePushButton; } - if ((butPtr->image == None) && (butPtr->bitmap == None)) { + if ((butPtr->image == NULL) && (butPtr->bitmap == None)) { switch (butPtr->type) { case TYPE_BUTTON: *btnkind = kThemePushButton; @@ -1174,7 +1174,7 @@ TkMacOSXComputeButtonDrawParams( static void PulseDefaultButtonProc(ClientData clientData) { - MacButton *mbPtr = clientData; + MacButton *mbPtr = (MacButton *)clientData; TkpDisplayButton(clientData); /* diff --git a/macosx/tkMacOSXColor.h b/macosx/tkMacOSXColor.h index 0f4518d..deffbbc 100644 --- a/macosx/tkMacOSXColor.h +++ b/macosx/tkMacOSXColor.h @@ -250,7 +250,7 @@ static SystemColorDatum systemColorData[] = { {"PlaceholderTextColor", semantic, 0, "grayColor", 0, NULL }, {"SeparatorColor", semantic, 0, "grayColor", 0, NULL }, {"UnemphasizedSelectedTextBackgroundColor", semantic, 0, "grayColor", 0, NULL }, -{NULL, 0, 0, NULL, 0, NULL } +{NULL, rgbColor, 0, NULL, 0, NULL } }; #endif diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c index 191aa7e..dc5b61a 100644 --- a/macosx/tkMacOSXCursor.c +++ b/macosx/tkMacOSXCursor.c @@ -551,7 +551,7 @@ TkpSetCursor( return; } - if (cursor == None) { + if (cursor == NULL) { /* * This is a little tricky. We can't really tell whether * gCurrentCursor is NULL because it was NULL last time around or diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 89035ab..4bcaedf 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -221,7 +221,7 @@ getFileURL( returnCode: (NSModalResponse) returnCode contextInfo: (void *) contextInfo { - FilePanelCallbackInfo *callbackInfo = contextInfo; + FilePanelCallbackInfo *callbackInfo = (FilePanelCallbackInfo *)contextInfo; if (returnCode == modalOK) { Tcl_Obj *resultObj; @@ -266,7 +266,7 @@ getFileURL( - (void) tkAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo { - AlertCallbackInfo *callbackInfo = contextInfo; + AlertCallbackInfo *callbackInfo = (AlertCallbackInfo *)contextInfo; if (returnCode >= NSAlertFirstButtonReturn) { Tcl_Obj *resultObj = Tcl_NewStringObj(alertButtonStrings[ @@ -422,7 +422,7 @@ Tk_ChooseColorObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int result = TCL_ERROR; - Tk_Window parent, tkwin = clientData; + Tk_Window parent, tkwin = (Tk_Window)clientData; const char *title = NULL; int i; NSColor *color = nil, *initialColor = nil; @@ -677,7 +677,7 @@ Tk_GetOpenFileObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - Tk_Window tkwin = clientData; + Tk_Window tkwin = (Tk_Window)clientData; char *str; int i, result = TCL_ERROR, haveParentOption = 0; int index, len, multiple = 0; @@ -1679,10 +1679,10 @@ FontchooserEvent( if (!fontchooserInterp) { return; } - fcdPtr = Tcl_GetAssocData(fontchooserInterp, "::tk::fontchooser", NULL); + fcdPtr = (FontchooserData *)Tcl_GetAssocData(fontchooserInterp, "::tk::fontchooser", NULL); switch (kind) { case FontchooserClosed: - if (fcdPtr->parent != None) { + if (fcdPtr->parent != NULL) { TkSendVirtualEvent(fcdPtr->parent, "TkFontchooserVisibility", NULL); fontchooserInterp = NULL; } @@ -1738,7 +1738,7 @@ FontchooserCget( switch(optionIndex) { case FontchooserParent: - if (fcdPtr->parent != None) { + if (fcdPtr->parent != NULL) { resObj = Tcl_NewStringObj( ((TkWindow *)fcdPtr->parent)->pathName, -1); } else { @@ -1801,7 +1801,7 @@ FontchooserConfigureCmd( Tcl_Obj *const objv[]) { Tk_Window tkwin = (Tk_Window)clientData; - FontchooserData *fcdPtr = Tcl_GetAssocData(interp, "::tk::fontchooser", + FontchooserData *fcdPtr = (FontchooserData *)Tcl_GetAssocData(interp, "::tk::fontchooser", NULL); int i, r = TCL_OK; @@ -1858,7 +1858,7 @@ FontchooserConfigureCmd( Tk_Window parent = Tk_NameToWindow(interp, Tcl_GetString(objv[i+1]), tkwin); - if (parent == None) { + if (parent == NULL) { return TCL_ERROR; } if (fcdPtr->parent) { @@ -1885,7 +1885,7 @@ FontchooserConfigureCmd( fcdPtr->titleObj = NULL; } break; - case FontchooserFont: + case FontchooserFont: { Tcl_GetStringFromObj(objv[i+1], &len); if (len) { Tk_Font f = Tk_AllocFontFromObj(interp, tkwin, objv[i+1]); @@ -1919,6 +1919,7 @@ FontchooserConfigureCmd( "TkFontchooserFontChanged", NULL); } break; + } case FontchooserCmd: if (fcdPtr->cmdObj) { Tcl_DecrRefCount(fcdPtr->cmdObj); @@ -1964,10 +1965,10 @@ FontchooserShowCmd( TCL_UNUSED(int), TCL_UNUSED(Tcl_Obj *const *)) { - FontchooserData *fcdPtr = Tcl_GetAssocData(interp, "::tk::fontchooser", + FontchooserData *fcdPtr = (FontchooserData *)Tcl_GetAssocData(interp, "::tk::fontchooser", NULL); - if (fcdPtr->parent == None) { + if (fcdPtr->parent == NULL) { fcdPtr->parent = (Tk_Window)clientData; Tk_CreateEventHandler(fcdPtr->parent, StructureNotifyMask, FontchooserParentEventHandler, fcdPtr); @@ -2042,7 +2043,7 @@ FontchooserParentEventHandler( ClientData clientData, XEvent *eventPtr) { - FontchooserData *fcdPtr = clientData; + FontchooserData *fcdPtr = (FontchooserData *)clientData; if (eventPtr->type == DestroyNotify) { Tk_DeleteEventHandler(fcdPtr->parent, StructureNotifyMask, @@ -2074,7 +2075,7 @@ DeleteFontchooserData( ClientData clientData, Tcl_Interp *interp) { - FontchooserData *fcdPtr = clientData; + FontchooserData *fcdPtr = (FontchooserData *)clientData; if (fcdPtr->titleObj) { Tcl_DecrRefCount(fcdPtr->titleObj); diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 22b6a45..ac5c721 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -1355,35 +1355,37 @@ TkMacOSXSetupDrawingContext( * Finish configuring the drawing context. */ - CGAffineTransform t = { - .a = 1, .b = 0, - .c = 0, .d = -1, - .tx = 0, - .ty = dc.portBounds.size.height - }; - - dc.portBounds.origin.x += macDraw->xOff; - dc.portBounds.origin.y += macDraw->yOff; - CGContextSaveGState(dc.context); - CGContextSetTextDrawingMode(dc.context, kCGTextFill); - CGContextConcatCTM(dc.context, t); - if (dc.clipRgn) { + { + CGAffineTransform t = { + .a = 1, .b = 0, + .c = 0, .d = -1, + .tx = 0, + .ty = dc.portBounds.size.height + }; -#ifdef TK_MAC_DEBUG_DRAWING + dc.portBounds.origin.x += macDraw->xOff; + dc.portBounds.origin.y += macDraw->yOff; CGContextSaveGState(dc.context); - ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context); - CGContextSetRGBFillColor(dc.context, 1.0, 0.0, 0.0, 0.1); - CGContextEOFillPath(dc.context); - CGContextRestoreGState(dc.context); -#endif /* TK_MAC_DEBUG_DRAWING */ + CGContextSetTextDrawingMode(dc.context, kCGTextFill); + CGContextConcatCTM(dc.context, t); + if (dc.clipRgn) { - CGRect r; - CGRect b = CGRectApplyAffineTransform( - CGContextGetClipBoundingBox(dc.context), t); - if (!HIShapeIsRectangular(dc.clipRgn) || - !CGRectContainsRect(*HIShapeGetBounds(dc.clipRgn, &r), b)) { +#ifdef TK_MAC_DEBUG_DRAWING + CGContextSaveGState(dc.context); ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context); - CGContextEOClip(dc.context); + CGContextSetRGBFillColor(dc.context, 1.0, 0.0, 0.0, 0.1); + CGContextEOFillPath(dc.context); + CGContextRestoreGState(dc.context); +#endif /* TK_MAC_DEBUG_DRAWING */ + + CGRect r; + CGRect b = CGRectApplyAffineTransform( + CGContextGetClipBoundingBox(dc.context), t); + if (!HIShapeIsRectangular(dc.clipRgn) || + !CGRectContainsRect(*HIShapeGetBounds(dc.clipRgn, &r), b)) { + ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context); + CGContextEOClip(dc.context); + } } } if (gc) { diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c index dc43726..4af2e75 100644 --- a/macosx/tkMacOSXEmbed.c +++ b/macosx/tkMacOSXEmbed.c @@ -739,7 +739,7 @@ EmbeddedEventProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { - TkWindow *winPtr = clientData; + TkWindow *winPtr = (TkWindow *)clientData; if (eventPtr->type == DestroyNotify) { EmbedWindowDeleted(winPtr); @@ -774,7 +774,7 @@ ContainerEventProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { - TkWindow *winPtr = clientData; + TkWindow *winPtr = (TkWindow *)clientData; Container *containerPtr; Tk_ErrorHandler errHandler; @@ -882,7 +882,7 @@ EmbedStructureProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { - Container *containerPtr = clientData; + Container *containerPtr = (Container *)clientData; Tk_ErrorHandler errHandler; if (eventPtr->type == ConfigureNotify) { @@ -891,7 +891,7 @@ EmbedStructureProc( * Send a ConfigureNotify to the embedded application. */ - if (containerPtr->embeddedPtr != None) { + if (containerPtr->embeddedPtr != NULL) { TkDoConfigureNotify(containerPtr->embeddedPtr); } if (containerPtr->embedded != None) { @@ -936,7 +936,7 @@ EmbedActivateProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { - Container *containerPtr = clientData; + Container *containerPtr = (Container *)clientData; if (containerPtr->embeddedPtr != NULL) { if (eventPtr->type == ActivateNotify) { @@ -971,7 +971,7 @@ EmbedFocusProc( ClientData clientData, /* Token for container window. */ XEvent *eventPtr) /* ResizeRequest event. */ { - Container *containerPtr = clientData; + Container *containerPtr = (Container *)clientData; Display *display; XEvent event; diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index ca370f3..2a28f73 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -112,7 +112,7 @@ static int CreateNamedSystemFont(Tcl_Interp *interp, self = [self init]; if (self) { Tcl_DStringInit(&_ds); - Tcl_UtfToUniCharDString(bytes, len, &_ds); + Tcl_UtfToUniCharDString((const char *)bytes, len, &_ds); _string = [[NSString alloc] initWithCharactersNoCopy:(unichar *)Tcl_DStringValue(&_ds) length:Tcl_DStringLength(&_ds)>>1 diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 74c0115..69967af 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -82,7 +82,7 @@ TkMacOSXCreateCGImageWithXImage( *destPtr++ = xBitReverseTable[(unsigned char)(*(srcPtr++))]; } } else { - data = memcpy(ckalloc(len), image->data + image->xoffset, len); + data = (char *)memcpy(ckalloc(len), image->data + image->xoffset, len); } if (data) { provider = CGDataProviderCreateWithData(data, data, len, @@ -112,7 +112,7 @@ TkMacOSXCreateCGImageWithXImage( bitmapInfo = (image->byte_order == MSBFirst ? kCGBitmapByteOrder32Little : kCGBitmapByteOrder32Big); bitmapInfo |= kCGImageAlphaLast; - data = memcpy(ckalloc(len), image->data + image->xoffset, len); + data = (char *)memcpy(ckalloc(len), image->data + image->xoffset, len); if (data) { provider = CGDataProviderCreateWithData(data, data, len, releaseData); @@ -332,7 +332,7 @@ XCreateImage( XImage *ximage; display->request++; - ximage = ckalloc(sizeof(XImage)); + ximage = (XImage *)ckalloc(sizeof(XImage)); ximage->height = height; ximage->width = width; @@ -645,7 +645,7 @@ XGetImage( NSBitmapImageRep* bitmapRep = nil; NSUInteger bitmap_fmt = 0; XImage* imagePtr = NULL; - char* bitmap = NULL; + char *bitmap = NULL; char R, G, B, A; int depth = 32, offset = 0, bitmap_pad = 0; unsigned int bytes_per_row, size, row, n, m; @@ -668,7 +668,7 @@ XGetImage( bitmap_fmt = [bitmapRep bitmapFormat]; size = [bitmapRep bytesPerPlane]; bytes_per_row = [bitmapRep bytesPerRow]; - bitmap = ckalloc(size); + bitmap = (char *)ckalloc(size); if (!bitmap || (bitmap_fmt != 0 && bitmap_fmt != 1) || [bitmapRep samplesPerPixel] != 4 diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c index 1dc3982..8d93cd4 100644 --- a/macosx/tkMacOSXKeyEvent.c +++ b/macosx/tkMacOSXKeyEvent.c @@ -53,7 +53,7 @@ static NSUInteger textInputModifiers; TkWindow *winPtr = TkMacOSXGetTkWindow(w), *grabWinPtr, *focusWinPtr; Tk_Window tkwin = (Tk_Window)winPtr; NSEventType type = [theEvent type]; - NSUInteger virtual = [theEvent keyCode]; + NSUInteger virt = [theEvent keyCode]; NSUInteger modifiers = ([theEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask); XEvent xEvent; @@ -126,7 +126,7 @@ static NSUInteger textInputModifiers; TKLog(@"-[%@(%p) %s] repeat=%d mods=%x char=%x code=%lu c=%d type=%d", [self class], self, _cmd, (type == NSKeyDown) && [theEvent isARepeat], modifiers, keychar, - virtual, w, type); + virt, w, type); #endif } @@ -215,7 +215,7 @@ static NSUInteger textInputModifiers; macKC.v.o_s = ((modifiers & NSShiftKeyMask ? INDEX_SHIFT : 0) | (modifiers & NSAlternateKeyMask ? INDEX_OPTION : 0)); - macKC.v.virtual = virtual; + macKC.v.virt = virt; switch (type) { case NSFlagsChanged: @@ -349,9 +349,9 @@ static NSUInteger textInputModifiers; UniChar lowChar = [str characterAtIndex:++i]; macKC.v.keychar = CFStringGetLongCharacterForSurrogatePair( (UniChar)keychar, lowChar); - macKC.v.virtual = NON_BMP_VIRTUAL; + macKC.v.virt = NON_BMP_VIRTUAL; } else if (repRange.location == 0 || sendingIMEText) { - macKC.v.virtual = REPLACEMENT_VIRTUAL; + macKC.v.virt = REPLACEMENT_VIRTUAL; } else { macKC.uint = TkMacOSXAddVirtual(macKC.uint); xEvent.xkey.state |= INDEX2STATE(macKC.x.xvirtual); diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c index b9bf3be..9aca9e1 100644 --- a/macosx/tkMacOSXKeyboard.c +++ b/macosx/tkMacOSXKeyboard.c @@ -143,7 +143,7 @@ static BOOL keyboardChanged = YES; static void InitHashTables(void); static void UpdateKeymaps(void); static int KeyDataToUnicode(UniChar *uniChars, int maxChars, - UInt16 keyaction, UInt32 virtual, UInt32 modifiers, + UInt16 keyaction, UInt32 virt, UInt32 modifiers, UInt32 * deadKeyStatePtr); #pragma mark TKApplication(TKKeyboard) @@ -190,15 +190,15 @@ InitHashTables(void) Tcl_InitHashTable(&special2keysym, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(&keysym2keycode, TCL_ONE_WORD_KEYS); - for (kPtr = keyArray; kPtr->virtual != 0; kPtr++) { + for (kPtr = keyArray; kPtr->virt != 0; kPtr++) { MacKeycode macKC; macKC.v.o_s = 0; - hPtr = Tcl_CreateHashEntry(&special2keysym, INT2PTR(kPtr->virtual), + hPtr = Tcl_CreateHashEntry(&special2keysym, INT2PTR(kPtr->virt), &dummy); Tcl_SetHashValue(hPtr, INT2PTR(kPtr->keysym)); hPtr = Tcl_CreateHashEntry(&keysym2keycode, INT2PTR(kPtr->keysym), &dummy); - macKC.v.virtual = kPtr->virtual; + macKC.v.virt = kPtr->virt; macKC.v.keychar = kPtr->keychar; Tcl_SetHashValue(hPtr, INT2PTR(macKC.uint)); @@ -254,7 +254,7 @@ UpdateKeymaps() { static Bool keymapInitialized = false; Tcl_HashEntry *hPtr; - int virtual, index, dummy; + int virt, index, dummy; if (!keymapInitialized) { Tcl_InitHashTable(&unichar2xvirtual, TCL_ONE_WORD_KEYS); @@ -270,12 +270,12 @@ UpdateKeymaps() */ for (index = 3; index >= 0; index--) { - for (virtual = 0; virtual < 128; virtual++) { + for (virt = 0; virt < 128; virt++) { MacKeycode macKC; - macKC.v = (keycode_v) {.virtual = virtual, .o_s = index, .keychar = 0}; + macKC.v = (keycode_v) {.virt = virt, .o_s = index, .keychar = 0}; int modifiers = INDEX2CARBON(index), result; UniChar keychar = 0; - result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, virtual, + result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, virt, modifiers, NULL); if (keychar == 0x10) { @@ -286,7 +286,7 @@ UpdateKeymaps() continue; } macKC.v.keychar = keychar; - if (! ON_KEYPAD(virtual)) { + if (! ON_KEYPAD(virt)) { hPtr = Tcl_CreateHashEntry(&unichar2xvirtual, INT2PTR(macKC.x.keychar), &dummy); Tcl_SetHashValue(hPtr, INT2PTR(macKC.x.xvirtual)); @@ -328,7 +328,7 @@ KeyDataToUnicode( UniChar *uniChars, int maxChars, UInt16 keyaction, - UInt32 virtual, + UInt32 virt, UInt32 modifiers, UInt32 *deadKeyStatePtr) { @@ -357,14 +357,14 @@ KeyDataToUnicode( UInt32 dummyState; OSStatus err; - virtual &= 0xFF; + virt &= 0xFF; modifiers = (modifiers >> 8) & 0xFF; if (!deadKeyStatePtr) { options = kUCKeyTranslateNoDeadKeysMask; dummyState = 0; deadKeyStatePtr = &dummyState; } - err = ChkErr(UCKeyTranslate, layoutData, virtual, keyaction, modifiers, + err = ChkErr(UCKeyTranslate, (const UCKeyboardLayout *)layoutData, virt, keyaction, modifiers, keyboardType, options, deadKeyStatePtr, maxChars, &actuallength, uniChars); if (!actuallength && *deadKeyStatePtr) { @@ -426,7 +426,7 @@ XkbKeycodeToKeysym( * an Fn function key or Tab, Backspace, Home, End, etc. */ - hPtr = Tcl_FindHashEntry(&special2keysym, INT2PTR(macKC.v.virtual)); + hPtr = Tcl_FindHashEntry(&special2keysym, INT2PTR(macKC.v.virt)); if (hPtr != NULL) { return (KeySym) Tcl_GetHashValue(hPtr); } @@ -437,7 +437,7 @@ XkbKeycodeToKeysym( * keysym. */ - if (macKC.v.virtual > 127) { + if (macKC.v.virt > 127) { hPtr = Tcl_FindHashEntry(&unichar2keysym, INT2PTR(macKC.v.keychar)); if (hPtr != NULL) { return (KeySym) Tcl_GetHashValue(hPtr); @@ -452,7 +452,7 @@ XkbKeycodeToKeysym( */ modifiers = INDEX2CARBON(macKC.v.o_s); - result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, macKC.v.virtual, + result = KeyDataToUnicode(&keychar, 1, kUCKeyActionDown, macKC.v.virt, modifiers, NULL); if (result) { hPtr = Tcl_FindHashEntry(&unichar2keysym, INT2PTR(keychar)); @@ -639,7 +639,7 @@ XKeysymToKeycode( hPtr = Tcl_FindHashEntry(&keysym2keycode, INT2PTR(keysym)); if (hPtr != NULL) { - return (KeyCode) Tcl_GetHashValue(hPtr); + return (KeyCode) PTR2INT(Tcl_GetHashValue(hPtr)); } /* @@ -647,7 +647,7 @@ XKeysymToKeycode( * else. */ - macKC.v.virtual = NO_VIRTUAL; + macKC.v.virt = NO_VIRTUAL; macKC.v.o_s = 0; macKC.v.keychar = 0; @@ -721,7 +721,7 @@ TkpSetKeycodeAndState( if (macKC.v.keychar < 0xF700) { UniChar keychar = macKC.v.keychar; NSString *str, *lower, *upper; - if (macKC.v.virtual != NO_VIRTUAL) { + if (macKC.v.virt != NO_VIRTUAL) { macKC.x.keychar = xvirtual2unichar[macKC.x.xvirtual]; } else { str = [[NSString alloc] initWithCharacters:&keychar length:1]; @@ -783,7 +783,7 @@ TkpGetKeySym( */ if (macKC.v.keychar == MOD_KEYCHAR) { - switch (macKC.v.virtual) { + switch (macKC.v.virt) { case 54: return XK_Meta_R; case 55: @@ -955,7 +955,7 @@ TkMacOSXAddVirtual( unsigned long data = (unsigned long) Tcl_GetHashValue(hPtr); macKC.x.xvirtual = (unsigned int) data; } else { - macKC.v.virtual = NO_VIRTUAL; + macKC.v.virt = NO_VIRTUAL; } return macKC.uint; } diff --git a/macosx/tkMacOSXKeysyms.h b/macosx/tkMacOSXKeysyms.h index da364ea..0b528f3 100644 --- a/macosx/tkMacOSXKeysyms.h +++ b/macosx/tkMacOSXKeysyms.h @@ -31,7 +31,7 @@ */ typedef struct { - int virtual; /* value of [NSEvent keyCode] */ + int virt; /* value of [NSEvent keyCode] */ KeySym keysym; /* X11 keysym */ KeyCode keychar; /* XEvent keycode & 0xFFFF */ } KeyInfo; diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 8c7ef52..1af18c4 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -236,7 +236,7 @@ TKBackgroundLoop *backgroundLoop = nil; - (TkMenu *) tkMenu { - return _tkMenu; + return (TkMenu *)_tkMenu; } - (int) tkIndexOfItem: (NSMenuItem *) menuItem @@ -413,7 +413,7 @@ TKBackgroundLoop *backgroundLoop = nil; (void)menu; if (_tkMenu) { - RecursivelyClearActiveMenu(_tkMenu); + RecursivelyClearActiveMenu((TkMenu *)_tkMenu); } } @@ -437,7 +437,7 @@ TKBackgroundLoop *backgroundLoop = nil; Tcl_Preserve(interp); Tcl_Preserve(menuPtr); - int result = TkPostCommand(_tkMenu); + int result = TkPostCommand(menuPtr); if (result!=TCL_OK && result!=TCL_CONTINUE && result!=TCL_BREAK) { Tcl_AddErrorInfo(interp, "\n (menu preprocess)"); @@ -695,7 +695,7 @@ TkpConfigureMenuEntry( Tk_SizeOfImage(mePtr->image, &imageWidth, &imageHeight); image = TkMacOSXGetNSImageFromTkImage(mePtr->menuPtr->display, mePtr->image, imageWidth, imageHeight); - } else if (mePtr->bitmapPtr != None) { + } else if (mePtr->bitmapPtr != NULL) { Pixmap bitmap = Tk_GetBitmapFromObj(mePtr->menuPtr->tkwin, mePtr->bitmapPtr); diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c index 2fad3cb..6291596 100644 --- a/macosx/tkMacOSXMenubutton.c +++ b/macosx/tkMacOSXMenubutton.c @@ -165,8 +165,8 @@ void TkpDisplayMenuButton( ClientData clientData) /* Information about widget. */ { - MacMenuButton *mbPtr = clientData; - TkMenuButton *butPtr = clientData; + MacMenuButton *mbPtr = (MacMenuButton *)clientData; + TkMenuButton *butPtr = (TkMenuButton *)clientData; Tk_Window tkwin = butPtr->tkwin; Pixmap pixmap; DrawParams *dpPtr = &mbPtr->drawParams; @@ -240,8 +240,8 @@ TkpDestroyMenuButton( */ void -TkpComputeMenuButtonGeometry(butPtr) - TkMenuButton *butPtr; /* Widget record for menu button. */ +TkpComputeMenuButtonGeometry( + TkMenuButton *butPtr) /* Widget record for menu button. */ { int width, height, avgWidth, haveImage = 0, haveText = 0; int txtWidth, txtHeight; @@ -689,8 +689,8 @@ MenuButtonEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { - TkMenuButton *buttonPtr = clientData; - MacMenuButton *mbPtr = clientData; + TkMenuButton *buttonPtr = (TkMenuButton *)clientData; + MacMenuButton *mbPtr = (MacMenuButton *)clientData; if (eventPtr->type == ActivateNotify || eventPtr->type == DeactivateNotify) { diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 6834354..f32fa76 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -50,7 +50,7 @@ typedef struct ThreadSpecificData { } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; -#define TSD_INIT() ThreadSpecificData *tsdPtr = \ +#define TSD_INIT() ThreadSpecificData *tsdPtr = (ThreadSpecificData *) \ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)) static void TkMacOSXNotifyExitHandler(ClientData clientData); diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h index ea53e5f..ed24255 100644 --- a/macosx/tkMacOSXPrivate.h +++ b/macosx/tkMacOSXPrivate.h @@ -135,7 +135,7 @@ typedef struct keycode_v_t { unsigned keychar: 22; /* UCS-32 character */ unsigned o_s: 2; /* State of Option and Shift keys. */ - unsigned virtual: 8; /* 8-bit virtual keycode - identifies a key. */ + unsigned virt: 8; /* 8-bit virtual keycode - identifies a key. */ } keycode_v; typedef struct keycode_x_t { @@ -157,7 +157,7 @@ typedef union MacKeycode_t { * Note that 0x7f is del and 0xF8FF is the Apple Logo character. */ -#define ON_KEYPAD(virtual) ((virtual >= 0x41) && (virtual <= 0x5C)) +#define ON_KEYPAD(virt) ((virt >= 0x41) && (virt <= 0x5C)) #define IS_PRINTABLE(keychar) ((keychar >= 0x20) && (keychar != 0x7f) && \ ((keychar < 0xF700) || keychar >= 0xF8FF)) diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c index 2d9a038..b6e3298 100644 --- a/macosx/tkMacOSXScrlbr.c +++ b/macosx/tkMacOSXScrlbr.c @@ -246,7 +246,7 @@ void TkpDisplayScrollbar( ClientData clientData) /* Information about window. */ { - TkScrollbar *scrollPtr = clientData; + TkScrollbar *scrollPtr = (TkScrollbar *)clientData; MacScrollbar *msPtr = (MacScrollbar *) scrollPtr; Tk_Window tkwin = scrollPtr->tkwin; TkWindow *winPtr = (TkWindow *) tkwin; @@ -456,10 +456,10 @@ TkpDestroyScrollbar( { MacScrollbar *macScrollPtr = (MacScrollbar *) scrollPtr; - if (macScrollPtr->troughGC != None) { + if (macScrollPtr->troughGC != NULL) { Tk_FreeGC(scrollPtr->display, macScrollPtr->troughGC); } - if (macScrollPtr->copyGC != None) { + if (macScrollPtr->copyGC != NULL) { Tk_FreeGC(scrollPtr->display, macScrollPtr->copyGC); } } @@ -769,7 +769,7 @@ ScrollbarEventProc( ClientData clientData, /* Information about window. */ XEvent *eventPtr) /* Information about event. */ { - TkScrollbar *scrollPtr = clientData; + TkScrollbar *scrollPtr = (TkScrollbar *)clientData; switch (eventPtr->type) { case UnmapNotify: @@ -783,10 +783,10 @@ ScrollbarEventProc( case ButtonRelease: case EnterNotify: case LeaveNotify: - ScrollbarEvent(clientData, eventPtr); + ScrollbarEvent(scrollPtr, eventPtr); break; default: - TkScrollbarEventProc(clientData, eventPtr); + TkScrollbarEventProc(scrollPtr, eventPtr); } } diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 280c041..6cd1fe5 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -982,7 +982,7 @@ InvalViewRect( void *ref) { static CGAffineTransform t; - TKContentView *view = ref; + TKContentView *view = (TKContentView *)ref; NSRect dirtyRect; if (!view) { @@ -1467,7 +1467,7 @@ Tk_FreePixmap( display->request++; if (macPix->context) { - char *data = CGBitmapContextGetData(macPix->context); + char *data = (char *)CGBitmapContextGetData(macPix->context); if (data) { ckfree(data); diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c index 7981f7e..5d7e626 100644 --- a/macosx/tkMacOSXTest.c +++ b/macosx/tkMacOSXTest.c @@ -376,7 +376,7 @@ InjectKeyEventObjCmd( characters:chars charactersIgnoringModifiers:unmod isARepeat:NO - keyCode:macKC.v.virtual]; + keyCode:macKC.v.virt]; [NSApp postEvent:keyEvent atStart:NO]; return TCL_OK; } diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 045d8d2..3c23308 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1482,7 +1482,7 @@ WmSetAttribute( } break; case WMATT_TITLEPATH: { - const char *path = Tcl_FSGetNativePath(value); + const char *path = (const char *)Tcl_FSGetNativePath(value); NSString *filename = @""; if (path && *path) { @@ -1636,7 +1636,7 @@ WmAttributesCmd( Tcl_ListObjAppendElement(NULL, result, Tcl_NewStringObj(WmAttributeNames[attribute], -1)); Tcl_ListObjAppendElement(NULL, result, - WmGetAttribute(winPtr, macWindow, attribute)); + WmGetAttribute(winPtr, macWindow, (WmAttribute)attribute)); } Tcl_SetObjResult(interp, result); } else if (objc == 4) { /* wm attributes $win -attribute */ @@ -1644,7 +1644,7 @@ WmAttributesCmd( sizeof(char *), "attribute", 0, &attribute) != TCL_OK) { return TCL_ERROR; } - Tcl_SetObjResult(interp, WmGetAttribute(winPtr, macWindow, attribute)); + Tcl_SetObjResult(interp, WmGetAttribute(winPtr, macWindow, (WmAttribute)attribute)); } else if ((objc - 3) % 2 == 0) { /* wm attributes $win -att value... */ int i; @@ -1653,7 +1653,7 @@ WmAttributesCmd( sizeof(char *), "attribute", 0, &attribute) != TCL_OK) { return TCL_ERROR; } - if (WmSetAttribute(winPtr, macWindow, interp, attribute, objv[i+1]) + if (WmSetAttribute(winPtr, macWindow, interp, (WmAttribute)attribute, objv[i+1]) != TCL_OK) { return TCL_ERROR; } @@ -4128,7 +4128,7 @@ TopLevelEventProc( ClientData clientData, /* Window for which event occurred. */ XEvent *eventPtr) /* Event that just happened. */ { - TkWindow *winPtr = clientData; + TkWindow *winPtr = (TkWindow *)clientData; winPtr->wmInfoPtr->flags |= WM_VROOT_OFFSET_STALE; if (eventPtr->type == DestroyNotify) { @@ -4214,7 +4214,7 @@ static void UpdateGeometryInfo( ClientData clientData) /* Pointer to the window's record. */ { - TkWindow *winPtr = clientData; + TkWindow *winPtr = (TkWindow *)clientData; WmInfo *wmPtr = winPtr->wmInfoPtr; int x, y, width, height, min, max; @@ -5593,8 +5593,8 @@ TkMacOSXZoomToplevel( void *whichWindow, /* The Macintosh window to zoom. */ short zoomPart) /* Either inZoomIn or inZoomOut */ { - NSWindow *window = whichWindow; - TkWindow *winPtr = TkMacOSXGetTkWindow(window); + NSWindow *window = (NSWindow *)whichWindow; + TkWindow *winPtr = (TkWindow *)TkMacOSXGetTkWindow(window); WmInfo *wmPtr; if (!winPtr || !winPtr->wmInfoPtr) { @@ -5651,7 +5651,7 @@ TkUnsupported1ObjCmd( enum SubCmds { TKMWS_STYLE, TKMWS_TABID, TKMWS_APPEARANCE, TKMWS_ISDARK }; - Tk_Window tkwin = clientData; + Tk_Window tkwin = (Tk_Window)clientData; TkWindow *winPtr; int index; @@ -6717,7 +6717,7 @@ TkWmStackorderToplevel( for (NSWindow *w in backToFront) { hPtr = Tcl_FindHashEntry(&table, (char*) w); if (hPtr != NULL) { - childWinPtr = Tcl_GetHashValue(hPtr); + childWinPtr = (TkWindow *)Tcl_GetHashValue(hPtr); *windowPtr++ = childWinPtr; } } @@ -7042,7 +7042,7 @@ ApplyContainerOverrideChanges( [macWindow setExcludedFromWindowsMenu:NO]; wmPtr->flags &= ~WM_TOPMOST; } - if (wmPtr->container != None) { + if (wmPtr->container != NULL) { TkWindow *containerWinPtr = (TkWindow *)wmPtr->container; if (containerWinPtr && (containerWinPtr->window != None) diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 1d65b3c..92c5156 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1379,7 +1379,7 @@ static void ButtonElementSize( int *minHeight, Ttk_Padding *paddingPtr) { - ThemeButtonParams *params = clientData; + ThemeButtonParams *params = (ThemeButtonParams *)clientData; const HIThemeButtonDrawInfo info = computeButtonDrawInfo(params, 0, tkwin); static const CGRect scratchBounds = {{0, 0}, {100, 100}}; @@ -1425,7 +1425,7 @@ static void ButtonElementDraw( Ttk_Box b, Ttk_State state) { - ThemeButtonParams *params = clientData; + ThemeButtonParams *params = (ThemeButtonParams *)clientData; CGRect bounds = BoxToRect(d, b); HIThemeButtonDrawInfo info = computeButtonDrawInfo(params, state, tkwin); @@ -1769,7 +1769,7 @@ static void EntryElementDraw( Ttk_Box b, Ttk_State state) { - EntryElement *e = elementRecord; + EntryElement *e = (EntryElement *)elementRecord; Ttk_Box inner = Ttk_PadBox(b, Ttk_UniformPadding(3)); CGRect bounds = BoxToRect(d, inner); NSColor *background; @@ -2142,8 +2142,8 @@ static void TrackElementDraw( Ttk_Box b, Ttk_State state) { - TrackElementData *data = clientData; - TrackElement *elem = elementRecord; + TrackElementData *data = (TrackElementData *)clientData; + TrackElement *elem = (TrackElement *)elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; double from = 0, to = 100, value = 0, factor; CGRect bounds; @@ -2288,7 +2288,7 @@ static void PbarElementDraw( Ttk_Box b, Ttk_State state) { - PbarElement *pbar = elementRecord; + PbarElement *pbar = (PbarElement *)elementRecord; int orientation = TTK_ORIENT_HORIZONTAL, phase = 0, kind; /* @@ -2387,7 +2387,7 @@ static void TroughElementSize( int *minHeight, Ttk_Padding *paddingPtr) { - ScrollbarElement *scrollbar = elementRecord; + ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; SInt32 thickness = 15; @@ -2428,7 +2428,7 @@ static void TroughElementDraw( Ttk_Box b, TCL_UNUSED(Ttk_State)) { - ScrollbarElement *scrollbar = elementRecord; + ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; CGRect bounds = BoxToRect(d, b); NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; @@ -2470,7 +2470,7 @@ static void ThumbElementSize( int *minHeight, TCL_UNUSED(Ttk_Padding *)) { - ScrollbarElement *scrollbar = elementRecord; + ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); @@ -2491,7 +2491,7 @@ static void ThumbElementDraw( Ttk_Box b, Ttk_State state) { - ScrollbarElement *scrollbar = elementRecord; + ScrollbarElement *scrollbar = (ScrollbarElement *)elementRecord; int orientation = TTK_ORIENT_HORIZONTAL; Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation); @@ -2906,7 +2906,7 @@ static void FieldElementDraw( Ttk_Box b, TCL_UNUSED(Ttk_State)) { - FieldElement *e = elementRecord; + FieldElement *e = (FieldElement *)elementRecord; Tk_3DBorder backgroundPtr = Tk_Get3DBorderFromObj(tkwin, e->backgroundObj); @@ -2998,7 +2998,7 @@ static void TreeHeaderElementDraw( Ttk_Box b, Ttk_State state) { - ThemeButtonParams *params = clientData; + ThemeButtonParams *params = (ThemeButtonParams *)clientData; CGRect bounds = BoxToRect(d, b); const HIThemeButtonDrawInfo info = { .version = 0, -- cgit v0.12 From 860ffe5f9af35a0d54fef347d3aacb8b3585800a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 3 Feb 2021 09:48:39 +0000 Subject: New macro TK_OPTION_UNDERLINE_DEF, which simplifies the default handling for "-underline" options. --- generic/tkButton.c | 8 ++++---- generic/tkInt.h | 1 + generic/tkMenu.c | 2 +- generic/tkMenubutton.c | 3 +-- macosx/tkMacOSXDefault.h | 3 --- unix/tkUnixDefault.h | 3 --- win/tkWinDefault.h | 3 --- 7 files changed, 7 insertions(+), 16 deletions(-) diff --git a/generic/tkButton.c b/generic/tkButton.c index 04c9d78..03496bb 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -144,7 +144,7 @@ static const Tk_OptionSpec labelOptionSpecs[] = { DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INT, "-underline", "underline", "Underline", - DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0}, + TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0}, {TK_OPTION_STRING, "-width", "width", "Width", DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", @@ -245,7 +245,7 @@ static const Tk_OptionSpec buttonOptionSpecs[] = { DEF_BUTTON_TEXT_VARIABLE, offsetof(TkButton, textVarNamePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INT, "-underline", "underline", "Underline", - DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0}, + TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0}, {TK_OPTION_STRING, "-width", "width", "Width", DEF_BUTTON_WIDTH, offsetof(TkButton, widthPtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_PIXELS, "-wraplength", "wrapLength", "WrapLength", @@ -355,7 +355,7 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = { {TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue", DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_INT, "-underline", "underline", "Underline", - DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0}, + TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0}, {TK_OPTION_STRING, "-variable", "variable", "Variable", DEF_CHECKBUTTON_VARIABLE, offsetof(TkButton, selVarNamePtr), TCL_INDEX_NONE, TK_OPTION_NULL_OK, 0, 0}, @@ -465,7 +465,7 @@ static const Tk_OptionSpec radiobuttonOptionSpecs[] = { {TK_OPTION_STRING, "-tristatevalue", "tristateValue", "TristateValue", DEF_BUTTON_TRISTATE_VALUE, offsetof(TkButton, tristateValuePtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_INT, "-underline", "underline", "Underline", - DEF_BUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkButton, underline), 0, 0, 0}, + TK_OPTION_UNDERLINE_DEF(TkButton, underline), 0}, {TK_OPTION_STRING, "-value", "value", "Value", DEF_BUTTON_VALUE, offsetof(TkButton, onValuePtr), TCL_INDEX_NONE, 0, 0, 0}, {TK_OPTION_STRING, "-variable", "variable", "Variable", diff --git a/generic/tkInt.h b/generic/tkInt.h index 68838b7..cc29660 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1378,6 +1378,7 @@ MODULE_SCOPE void TkRotatePoint(double originX, double originY, MODULE_SCOPE int TkGetIntForIndex(Tcl_Obj *, TkSizeT, int lastOK, TkSizeT*); #define TkNewIndexObj(value) Tcl_NewWideIntObj((Tcl_WideInt)(value + 1) - 1) +#define TK_OPTION_UNDERLINE_DEF(type, field) "-1", TCL_INDEX_NONE, offsetof(type, field), 0, NULL #ifdef _WIN32 #define TkParseColor XParseColor diff --git a/generic/tkMenu.c b/generic/tkMenu.c index a7e6363..da5815f 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -161,7 +161,7 @@ static const Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { TCL_INDEX_NONE, offsetof(TkMenuEntry, state), 0, (ClientData) menuStateStrings, 0}, {TK_OPTION_INT, "-underline", NULL, NULL, - DEF_MENU_ENTRY_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuEntry, underline), 0, NULL, 0}, + TK_OPTION_UNDERLINE_DEF(TkMenuEntry, underline), 0}, {TK_OPTION_END, NULL, NULL, NULL, 0, 0, 0, 0, NULL, 0} }; diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index dbf6208..ede28dd 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -145,8 +145,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_MENUBUTTON_TEXT_VARIABLE, TCL_INDEX_NONE, offsetof(TkMenuButton, textVarName), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_INT, "-underline", "underline", "Underline", - DEF_MENUBUTTON_UNDERLINE, TCL_INDEX_NONE, offsetof(TkMenuButton, underline), - 0, 0, 0}, + TK_OPTION_UNDERLINE_DEF(TkMenuButton, underline), 0}, {TK_OPTION_STRING, "-width", "width", "Width", DEF_MENUBUTTON_WIDTH, TCL_INDEX_NONE, offsetof(TkMenuButton, widthString), 0, 0, 0}, diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 1df20f7..fb1292d 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -105,7 +105,6 @@ #define DEF_BUTTON_TAKE_FOCUS NULL #define DEF_BUTTON_TEXT "" #define DEF_BUTTON_TEXT_VARIABLE "" -#define DEF_BUTTON_UNDERLINE "-1" #define DEF_BUTTON_VALUE "" #define DEF_BUTTON_WIDTH "0" #define DEF_BUTTON_WRAP_LENGTH "0" @@ -296,7 +295,6 @@ #define DEF_MENU_ENTRY_CHECK_VARIABLE NULL #define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton" #define DEF_MENU_ENTRY_SELECT NULL -#define DEF_MENU_ENTRY_UNDERLINE "-1" /* * Defaults for menus overall: @@ -361,7 +359,6 @@ #define DEF_MENUBUTTON_TAKE_FOCUS "0" #define DEF_MENUBUTTON_TEXT "" #define DEF_MENUBUTTON_TEXT_VARIABLE "" -#define DEF_MENUBUTTON_UNDERLINE "-1" #define DEF_MENUBUTTON_WIDTH "0" #define DEF_MENUBUTTON_WRAP_LENGTH "0" diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index b59f7ae..3cae17b 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -88,7 +88,6 @@ #define DEF_BUTTON_TAKE_FOCUS NULL #define DEF_BUTTON_TEXT "" #define DEF_BUTTON_TEXT_VARIABLE "" -#define DEF_BUTTON_UNDERLINE "-1" #define DEF_BUTTON_VALUE "" #define DEF_BUTTON_WIDTH "0" #define DEF_BUTTON_WRAP_LENGTH "0" @@ -268,7 +267,6 @@ #define DEF_MENU_ENTRY_CHECK_VARIABLE NULL #define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton" #define DEF_MENU_ENTRY_SELECT NULL -#define DEF_MENU_ENTRY_UNDERLINE "-1" /* * Defaults for menus overall: @@ -333,7 +331,6 @@ #define DEF_MENUBUTTON_TAKE_FOCUS "0" #define DEF_MENUBUTTON_TEXT "" #define DEF_MENUBUTTON_TEXT_VARIABLE "" -#define DEF_MENUBUTTON_UNDERLINE "-1" #define DEF_MENUBUTTON_WIDTH "0" #define DEF_MENUBUTTON_WRAP_LENGTH "0" diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index eaceb42..0a747d9 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -91,7 +91,6 @@ #define DEF_BUTTON_TEXT "" #define DEF_BUTTON_TEXT_VARIABLE "" #define DEF_BUTTON_TRISTATE_VALUE "" -#define DEF_BUTTON_UNDERLINE "-1" #define DEF_BUTTON_VALUE "" #define DEF_BUTTON_WIDTH "0" #define DEF_BUTTON_WRAP_LENGTH "0" @@ -270,7 +269,6 @@ #define DEF_MENU_ENTRY_CHECK_VARIABLE NULL #define DEF_MENU_ENTRY_RADIO_VARIABLE "selectedButton" #define DEF_MENU_ENTRY_SELECT NULL -#define DEF_MENU_ENTRY_UNDERLINE "-1" /* * Defaults for menus overall: @@ -335,7 +333,6 @@ #define DEF_MENUBUTTON_TAKE_FOCUS "0" #define DEF_MENUBUTTON_TEXT "" #define DEF_MENUBUTTON_TEXT_VARIABLE "" -#define DEF_MENUBUTTON_UNDERLINE "-1" #define DEF_MENUBUTTON_WIDTH "0" #define DEF_MENUBUTTON_WRAP_LENGTH "0" -- cgit v0.12 From 32c2307bef0cc4cd15610a2dff7e729e46220f7a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 3 Feb 2021 17:40:28 +0000 Subject: Fix [effc24d25b]: Mac OS: compilation error reported (even though it's only a warning) --- macosx/tkMacOSXSysTray.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c index 563b58f..953965a 100644 --- a/macosx/tkMacOSXSysTray.c +++ b/macosx/tkMacOSXSysTray.c @@ -437,7 +437,11 @@ typedef TkStatusItem** StatusItemInfo; */ DEBUG_LOG("willPresentNotification\n"); - completionHandler(ALERT_OPTION); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000 + if (@available(macOS 11.0, *)) { + completionHandler(ALERT_OPTION); + } +#endif } - (void) userNotificationCenter:(UNUserNotificationCenter *)center -- cgit v0.12 From a863d3b9c66311d89d572a0bafe3f300af22c9a6 Mon Sep 17 00:00:00 2001 From: marc_culler Date: Wed, 3 Feb 2021 18:59:40 +0000 Subject: Actually, the @available directive was available in XCode 10.9 (for macOS 10.14) --- macosx/tkMacOSXSysTray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c index 953965a..a0f0829 100644 --- a/macosx/tkMacOSXSysTray.c +++ b/macosx/tkMacOSXSysTray.c @@ -437,7 +437,7 @@ typedef TkStatusItem** StatusItemInfo; */ DEBUG_LOG("willPresentNotification\n"); -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 if (@available(macOS 11.0, *)) { completionHandler(ALERT_OPTION); } -- cgit v0.12 From 35166b815b524f015c27c908257e19e12c0686e1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 4 Feb 2021 11:34:40 +0000 Subject: Sync */tcl.m4 with Tcl --- unix/configure | 65 +++++++++++++++++++++++++++++++++++++++-------------- unix/tcl.m4 | 70 ++++++++++++++++++++++++++++++++-------------------------- win/configure | 35 ++++++++++++++++++++++++++++- win/tcl.m4 | 10 ++++++++- 4 files changed, 131 insertions(+), 49 deletions(-) diff --git a/unix/configure b/unix/configure index f8c7186..192993a 100755 --- a/unix/configure +++ b/unix/configure @@ -4401,7 +4401,7 @@ fi then : CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" case "${CC}" in *++|*++-*) ;; @@ -6113,11 +6113,11 @@ then : fi - # See if the compiler supports casting to a union type. - # This is used to stop gcc from printing a compiler - # warning when initializing a union member. + # See if the compiler supports casting to a union type. + # This is used to stop gcc from printing a compiler + # warning when initializing a union member. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 printf %s "checking for cast to union support... " >&6; } if test ${tcl_cv_cast_to_union+y} then : @@ -6130,8 +6130,8 @@ int main (void) { - union foo { int i; double d; }; - union foo f = (union foo) (int) 0; + union foo { int i; double d; }; + union foo f = (union foo) (int) 0; ; return 0; @@ -6148,13 +6148,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5 printf "%s\n" "$tcl_cv_cast_to_union" >&6; } - if test "$tcl_cv_cast_to_union" = "yes"; then + if test "$tcl_cv_cast_to_union" = "yes"; then printf "%s\n" "#define HAVE_CAST_TO_UNION 1" >>confdefs.h - fi - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -fno-lto" >&5 + fi + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -fno-lto" >&5 printf %s "checking for working -fno-lto... " >&6; } if test ${ac_cv_nolto+y} then : @@ -6182,12 +6182,45 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nolto" >&5 printf "%s\n" "$ac_cv_nolto" >&6; } + CFLAGS=$hold_cflags + if test "$ac_cv_nolto" = "yes" ; then + CFLAGS_NOLTO="-fno-lto" + else + CFLAGS_NOLTO="" + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5 +printf %s "checking if the compiler understands -finput-charset... " >&6; } +if test ${tcl_cv_cc_input_charset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + tcl_cv_cc_input_charset=yes +else $as_nop + tcl_cv_cc_input_charset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$hold_cflags - if test "$ac_cv_nolto" = "yes" ; then - CFLAGS_NOLTO="-fno-lto" - else - CFLAGS_NOLTO="" - fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5 +printf "%s\n" "$tcl_cv_cc_input_charset" >&6; } + if test $tcl_cv_cc_input_charset = yes; then + CFLAGS="$CFLAGS -finput-charset=UTF-8" + fi ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" if test "x$ac_cv_header_stdbool_h" = xyes diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 08c1907..a8911f8 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -960,7 +960,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g AS_IF([test "$GCC" = yes], [ CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" case "${CC}" in *++|*++-*) ;; @@ -1838,36 +1838,44 @@ dnl # preprocessing tests use only CPPFLAGS. TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"]) AC_SUBST(TCL_LIBS) - # See if the compiler supports casting to a union type. - # This is used to stop gcc from printing a compiler - # warning when initializing a union member. - - AC_CACHE_CHECK(for cast to union support, - tcl_cv_cast_to_union, - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ - union foo { int i; double d; }; - union foo f = (union foo) (int) 0; - ]])], - [tcl_cv_cast_to_union=yes], - [tcl_cv_cast_to_union=no]) - ) - if test "$tcl_cv_cast_to_union" = "yes"; then - AC_DEFINE(HAVE_CAST_TO_UNION, 1, - [Defined when compiler supports casting to union type.]) - fi - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" - AC_CACHE_CHECK(for working -fno-lto, - ac_cv_nolto, - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], - [ac_cv_nolto=yes], - [ac_cv_nolto=no]) - ) - CFLAGS=$hold_cflags - if test "$ac_cv_nolto" = "yes" ; then - CFLAGS_NOLTO="-fno-lto" - else - CFLAGS_NOLTO="" - fi + # See if the compiler supports casting to a union type. + # This is used to stop gcc from printing a compiler + # warning when initializing a union member. + + AC_CACHE_CHECK(for cast to union support, + tcl_cv_cast_to_union, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ + union foo { int i; double d; }; + union foo f = (union foo) (int) 0; + ]])], + [tcl_cv_cast_to_union=yes], + [tcl_cv_cast_to_union=no]) + ) + if test "$tcl_cv_cast_to_union" = "yes"; then + AC_DEFINE(HAVE_CAST_TO_UNION, 1, + [Defined when compiler supports casting to union type.]) + fi + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" + AC_CACHE_CHECK(for working -fno-lto, + ac_cv_nolto, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [ac_cv_nolto=yes], + [ac_cv_nolto=no]) + ) + CFLAGS=$hold_cflags + if test "$ac_cv_nolto" = "yes" ; then + CFLAGS_NOLTO="-fno-lto" + else + CFLAGS_NOLTO="" + fi + AC_CACHE_CHECK([if the compiler understands -finput-charset], + tcl_cv_cc_input_charset, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no]) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_input_charset = yes; then + CFLAGS="$CFLAGS -finput-charset=UTF-8" + fi AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have ?])],) diff --git a/win/configure b/win/configure index dcbfede..d80d32d 100755 --- a/win/configure +++ b/win/configure @@ -4432,6 +4432,39 @@ printf "%s\n" "$ac_cv_nolto" >&6; } else CFLAGS_NOLTO="" fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5 +printf %s "checking if the compiler understands -finput-charset... " >&6; } +if test ${tcl_cv_cc_input_charset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + tcl_cv_cc_input_charset=yes +else $as_nop + tcl_cv_cc_input_charset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5 +printf "%s\n" "$tcl_cv_cc_input_charset" >&6; } + if test $tcl_cv_cc_input_charset = yes; then + extra_cflags="$extra_cflags -finput-charset=UTF-8" + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5 @@ -4495,7 +4528,7 @@ printf "%s\n" "using shared flags" >&6; } CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= diff --git a/win/tcl.m4 b/win/tcl.m4 index 852aa33..b9a164c 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -617,6 +617,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ else CFLAGS_NOLTO="" fi + AC_CACHE_CHECK([if the compiler understands -finput-charset], + tcl_cv_cc_input_charset, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no]) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_input_charset = yes; then + extra_cflags="$extra_cflags -finput-charset=UTF-8" + fi fi AC_MSG_CHECKING([compiler flags]) @@ -677,7 +685,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= -- cgit v0.12