diff Modules/stdwinmodule.c @ 1191:38f0054f44a7 legacy-trunk

Added separate main program for the Mac: macmain.c stdwinmodule.c: wsetfont can now return an error Makefile: add CL_USE and CL_LIB*S; config.c: move CL part around New things in imgfile; also in Makefile. longobject.c: fix comparison of negative long ints... [REAL BUG!] marshal.c: add dumps() and loads() to read/write strings timemodule.c: make sure there's always a floatsleep() posixmodule.c: rationalize struct returned by times() Makefile: add test target, disable imgfile by default thread.c: Improved coexistance with dl module (sjoerd) stdwinmodule.c: Change include stdwin.h if macintosh rotormodule.c: added missing last argument to RTR_?_region calls confic.c: merged with configmac.c, added 1993 to copyright message fileobject.c: int compared to NULL in writestring(); change fopenRF ifdef timemodule.c: simplify times() using mkvalue; include myselect.h earlier (for sequent). posixmodule: for sequent, include unistd.h instead of explicit extern definitions and don't define rename() Makefile: change misleading/wrong MD5 comments
author Guido van Rossum <guido@python.org>
date Thu, 21 Jan 1993 16:07:51 +0000
parents f54e64c8b9b7
children 2937897a7d8b
line wrap: on
line diff
--- a/Modules/stdwinmodule.c	Thu Jan 21 15:36:40 1993 +0000
+++ b/Modules/stdwinmodule.c	Thu Jan 21 16:07:51 1993 +0000
@@ -1,6 +1,6 @@
 /***********************************************************
-Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
-Netherlands.
+Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
+Amsterdam, The Netherlands.
 
                         All Rights Reserved
 
@@ -66,7 +66,11 @@
 #include "modsupport.h"
 #include "ceval.h"
 
+#ifdef macintosh
+#include ":::src:stdwin:H:stdwin.h"
+#else /* !macintosh */
 #include "stdwin.h"
+#endif /* !macintosh */
 
 #ifdef USE_THREAD
 
@@ -585,8 +589,12 @@
 				return NULL;
 		}
 	}
-	if (font != NULL)
-		wsetfont(font);
+	if (font != NULL) {
+		if (!wsetfont(font)) {
+			err_setstr(StdwinError, "font not found");
+			return NULL;
+		}
+	}
 	if (size != 0)
 		wsetsize(size);
 	switch (style) {