Skip to content

Commit

Permalink
Merge 8.6. Make some functions MODULE_SCOPE or static
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Mar 17, 2024
2 parents c5b9cd5 + be28f51 commit 73a13ad
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions macosx/tkMacOSXDialog.c
Expand Up @@ -3,11 +3,11 @@
*
* Contains the Mac implementation of the common dialog boxes.
*
* Copyright (c) 1996-1997 Sun Microsystems, Inc.
* Copyright (c) 2001-2009, Apple Inc.
* Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright (c) 2017 Christian Gollwitzer
* Copyright (c) 2022 Marc Culler
* Copyright © 1996-1997 Sun Microsystems, Inc.
* Copyright © 2001-2009, Apple Inc.
* Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright © 2017 Christian Gollwitzer
* Copyright © 2022 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
Expand Down
19 changes: 11 additions & 8 deletions macosx/tkMacOSXImage.c
Expand Up @@ -4,10 +4,10 @@
* The code in this file provides an interface for XImages, and
* implements the nsimage image type.
*
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
* Copyright (c) 2001-2009, Apple Inc.
* Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright (c) 2017-2021 Marc Culler.
* Copyright © 1995-1997 Sun Microsystems, Inc.
* Copyright © 2001-2009, Apple Inc.
* Copyright © 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright © 2017-2021 Marc Culler.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Expand Down Expand Up @@ -502,6 +502,9 @@ TkMacOSXPutImage(
MacDrawable *macDraw = (MacDrawable *)drawable;
int result = Success;

if (width <= 0 || height <= 0) {
return Success; /* Is OK. Nothing to see here, literally. */
}
LastKnownRequestProcessed(display)++;
if (!TkMacOSXSetupDrawingContext(drawable, gc, &dc)) {
return BadDrawable;
Expand Down Expand Up @@ -623,7 +626,7 @@ int TkpPutRGBAImage(
*----------------------------------------------------------------------
*/

CGImageRef
static CGImageRef
CreateCGImageFromDrawableRect(
Drawable drawable,
int x,
Expand Down Expand Up @@ -736,7 +739,7 @@ CreatePDFFromDrawableRect(
*----------------------------------------------------------------------
*/

CGImageRef
static CGImageRef
CreateCGImageFromPixmap(
Drawable pixmap)
{
Expand Down Expand Up @@ -1096,12 +1099,12 @@ struct TkMacOSXNSImageModel {
int radius; /* Radius for rounded corners. */
int ring; /* Thickness of the focus ring. */
double alpha; /* Transparency, between 0.0 and 1.0*/
bool pressed; /* Image is for use in a pressed button.*/
bool templ; /* Image is for use as a template.*/
char *imageName ; /* Malloc'ed image name. */
char *source; /* Malloc'ed string describing the image. */
char *as; /* Malloc'ed interpretation of source */
int flags; /* Sundry flags, defined below. */
bool pressed; /* Image is for use in a pressed button.*/
bool templ; /* Image is for use as a template.*/
TkMacOSXNSImageInstance *instancePtr; /* Start of list of instances associated
* with this model. */
NSImage *image; /* The underlying NSImage object. */
Expand Down
5 changes: 1 addition & 4 deletions macosx/tkMacOSXImage.h
Expand Up @@ -18,8 +18,5 @@
* Function prototypes
*/

CGImageRef CreateCGImageFromPixmap(Drawable pixmap);
CGImageRef CreateCGImageFromDrawableRect( Drawable drawable,
int x, int y, unsigned int width, unsigned int height);
CFDataRef CreatePDFFromDrawableRect( Drawable drawable,
MODULE_SCOPE CFDataRef CreatePDFFromDrawableRect( Drawable drawable,
int x, int y, unsigned int width, unsigned int height);
2 changes: 1 addition & 1 deletion macosx/tkMacOSXPrint.c
Expand Up @@ -22,7 +22,7 @@
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <tkMacOSXImage.h>
#include "tkMacOSXImage.h"
#include "tkMacOSXPrivate.h"

NSString * fileName = nil;
Expand Down
12 changes: 6 additions & 6 deletions macosx/ttkMacOSXTheme.c
Expand Up @@ -3,12 +3,12 @@
*
* Tk theme engine for Mac OSX, using the Appearance Manager API.
*
* Copyright (c) 2004 Joe English
* Copyright (c) 2005 Neil Madden
* Copyright (c) 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright (c) 2008-2009 Apple Inc.
* Copyright (c) 2009 Kevin Walzer/WordTech Communications LLC.
* Copyright (c) 2019 Marc Culler
* Copyright © 2004 Joe English
* Copyright © 2005 Neil Madden
* Copyright © 2006-2009 Daniel A. Steffen <das@users.sourceforge.net>
* Copyright © 2008-2009 Apple Inc.
* Copyright © 2009 Kevin Walzer/WordTech Communications LLC.
* Copyright © 2019 Marc Culler
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Expand Down

0 comments on commit 73a13ad

Please sign in to comment.