1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

Fix a would-be problem in an #ifdef-ed out section of the patch.

This commit is contained in:
Mikhail Teterin 2006-12-04 16:12:02 +00:00
parent 0d2a4ca76e
commit 8774182aa2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=178831

View File

@ -127,16 +127,16 @@ Use freely and get yourself a pademelon...
- fileByName++;
- if ((filePtr = fopen(Tcl_GetString(objv[2]),"rb")) == NULL) {
+
+ if (cmd[10] == 'X' && cmd[11] == 'P' && cmd[12] == 'M')
+ if (cmd[10] == 'X' && cmd[11] == 'P' && cmd[12] == 'M') {
+#ifdef NOX11
+ Tcl_SetResult(interp, "Support for XPM-files not "
+ "compiled in");
+ "compiled in", TCL_STATIC);
+ return TCL_ERROR;
+#else
+ /* gdImageCreateFromXpm() takes fileNAME */
+ im = gdImageCreateFromXpm(arg2);
+#endif
+ else {
+ } else {
+ if (Tcl_GetOpenFile(interp, arg2, 0, 1, &clientdata)
+ == TCL_OK) {
+ filePtr = (FILE *)clientdata;