Simplify gestalt checking code
authorP. F. Chimento <philip.chimento@gmail.com>
Wed, 20 Apr 2011 11:15:31 +0000 (13:15 +0200)
committerP. F. Chimento <philip.chimento@gmail.com>
Wed, 20 Apr 2011 11:15:31 +0000 (13:15 +0200)
libchimara/gestalt.c

index e2eceefdfced743b2e965560aa85d6bfcf348f96..eef77489990aae324282325892a387e94a239f38 100644 (file)
@@ -96,18 +96,6 @@ glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
                                return gestalt_CharOutput_CannotPrint;
                        /* Can print all other characters */
                        return gestalt_CharOutput_ExactPrint;
-               
-               /* Unicode capabilities present */
-               case gestalt_Unicode:
-                       return 1;
-
-               /* Timer capabilities present */
-               case gestalt_Timer:
-                       return 1;
-
-               /* Hyperlink capabilities present */
-               case gestalt_Hyperlinks:
-                       return 1;
 
                /* Hyperlinks supported on textbuffers and textgrids */
                case gestalt_HyperlinkInput:
@@ -117,15 +105,15 @@ glk_gestalt_ext(glui32 sel, glui32 val, glui32 *arr, glui32 arrlen)
                case gestalt_MouseInput:
                        return val == wintype_TextGrid;
 
-               case gestalt_Graphics:
-                       return 1;
-
                case gestalt_DrawImage:
                        return val == wintype_Graphics || val == wintype_TextBuffer;
 
+               /* Capabilities that are simply supported */
+               case gestalt_Unicode:
+               case gestalt_Timer:
+               case gestalt_Hyperlinks:
+               case gestalt_Graphics:
                case gestalt_GraphicsTransparency:
-                       return 1;
-
                case gestalt_DateTime:
                        return 1;