Hi,

I'd like to propose a patch against glxinfo. Instead of separating the extensions by a comma, it creates a new line. It's visually easier to read through the extensions. Also, when doing a diff between supported extensions by classic driver and gallium driver, it's a lot simpler to compare the results.

I attached the patch.

Cheers,

--
Alexandre Demers

diff --git a/src/xdemos/glxinfo.c b/src/xdemos/glxinfo.c
index e4ff3d5..d0903c0 100644
--- a/src/xdemos/glxinfo.c
+++ b/src/xdemos/glxinfo.c
@@ -114,7 +114,6 @@ print_extension_list(const char *ext)
 {
    const char *indentString = "    ";
    const int indent = 4;
-   const int max = 79;
    int width, i, j;
 
    if (!ext || !ext[0])
@@ -127,12 +126,6 @@ print_extension_list(const char *ext)
       if (ext[j] == ' ' || ext[j] == 0) {
          /* found end of an extension name */
          const int len = j - i;
-         if (width + len > max) {
-            /* start a new line */
-            printf("\n");
-            width = indent;
-            printf("%s", indentString);
-         }
          /* print the extension name between ext[i] and ext[j] */
          while (i < j) {
             printf("%c", ext[i]);
@@ -148,8 +141,9 @@ print_extension_list(const char *ext)
             j++;
             if (ext[j] == 0)
                break;
-            printf(", ");
-            width += 2;
+            printf("\n");
+            width = indent;
+            printf("%s", indentString);
          }
       }
       j++;
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to