OSDN Git Service

[Refactor] #37353 SUPPORT_GAMMA のプリプロが有効であることを前提とし、プリプロ自体は削除 / Removed SUPPORT_GAMMA...
authorHourier <hourier@users.sourceforge.jp>
Sun, 26 Jan 2020 13:25:48 +0000 (22:25 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 26 Jan 2020 13:25:48 +0000 (22:25 +0900)
src/h-config.h
src/maid-x11.c
src/util.c
src/util.h

index 38461fc..923dfcc 100644 (file)
 
 
 /*
- * OPTION: Gamma correct X11 colours.
- */
-#define SUPPORT_GAMMA
-
-/*
  * Hack -- Mach-O (native binary format of OS X) is basically a Un*x
  * but has Mac OS/Windows-like user interface
  */
index 39d06e6..f1fd1ac 100644 (file)
   ((unsigned)(keysym) >= 0xFF00)
 
 
-#ifdef SUPPORT_GAMMA
 static bool gamma_table_ready = FALSE;
 static int gamma_val = 0;
-#endif /* SUPPORT_GAMMA */
 
 
 /*
@@ -81,9 +79,6 @@ static unsigned long create_pixel(Display *dpy, byte red, byte green, byte blue)
 {
        Colormap cmap = DefaultColormapOfScreen(DefaultScreenOfDisplay(dpy));
        XColor xcolour;
-
-#ifdef SUPPORT_GAMMA
-
        if (!gamma_table_ready)
        {
                concptr str = getenv("ANGBAND_X11_GAMMA");
@@ -103,8 +98,6 @@ static unsigned long create_pixel(Display *dpy, byte red, byte green, byte blue)
                blue = gamma_table[blue];
        }
 
-#endif /* SUPPORT_GAMMA */
-
        /* Build the color */
        
        xcolour.red = red * 255;
index 1e24481..7f66bb4 100644 (file)
@@ -4919,8 +4919,6 @@ void tag_sort(tag_type elements[], int number)
        quicksort(elements, 0, number - 1);
 }
 
-#ifdef SUPPORT_GAMMA
-
 /* Table of gamma values */
 byte gamma_table[256];
 
@@ -5014,8 +5012,6 @@ void build_gamma_table(int gamma)
        }
 }
 
-#endif /* SUPPORT_GAMMA */
-
 
 /*
  * Add a series of keypresses to the "queue".
index d040e50..c8c09f3 100644 (file)
@@ -424,10 +424,8 @@ extern void roff_to_buf(concptr str, int wlen, char *tbuf, size_t bufsize);
 
 extern void tag_sort(tag_type elements[], int number);
 
-#ifdef SUPPORT_GAMMA
 extern byte gamma_table[256];
 extern void build_gamma_table(int gamma);
-#endif /* SUPPORT_GAMMA */
 
 extern size_t my_strcpy(char *buf, concptr src, size_t bufsize);
 extern size_t my_strcat(char *buf, concptr src, size_t bufsize);