testprogs: print datatypes info levels in EnumPrintProcessorDatatypes() spoolss tests.
authorGünther Deschner <gd@samba.org>
Tue, 9 Feb 2010 14:59:29 +0000 (15:59 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 9 Feb 2010 15:39:35 +0000 (16:39 +0100)
Guenther

testprogs/win32/spoolss/printlib.c
testprogs/win32/spoolss/spoolss.c

index a5d2342ce8b63d2c612638b6a2aa499a19f2c323..11c672f598626962e9fa793a63d028ac9fb3ed95 100644 (file)
@@ -668,6 +668,44 @@ void print_printprocessor_info_bylevel(DWORD level, LPBYTE buffer, DWORD count)
        }
 }
 
        }
 }
 
+void print_datatypes_info_1(PDATATYPES_INFO_1 info)
+{
+       printf("\tDataTypes Name\t= %s\n", info->pName);
+
+       return;
+}
+
+void print_datatypes_info_bylevel(DWORD level, LPBYTE buffer, DWORD count)
+{
+       DWORD i;
+       PDATATYPES_INFO_1 buffer1 = NULL;
+
+       if (!buffer) {
+               return;
+       }
+
+       switch (level) {
+       case 1:
+               buffer1 = (PDATATYPES_INFO_1)buffer;
+               break;
+       default:
+               break;
+       }
+
+       printf("DataTypes Info Level %d:\n", level);
+
+       switch (level) {
+       case 1:
+               for (i=0; i<count; i++) {
+                       print_datatypes_info_1(&buffer1[i]);
+                       printf("\n");
+               }
+               break;
+       default:
+               break;
+       }
+}
+
 void print_driver_info_1(PDRIVER_INFO_1 info)
 {
        printf("\tDriver Name\t= %s\n\n",       info->pName);
 void print_driver_info_1(PDRIVER_INFO_1 info)
 {
        printf("\tDriver Name\t= %s\n\n",       info->pName);
index 4e1672e67c52ababa0dc06c7b3af3f3f8b85d419..ae8fc0fb129f4dd05fcba79d53bb2cd6c2fbf302 100644 (file)
@@ -466,6 +466,10 @@ static BOOL test_EnumPrintProcessorDatatypes(struct torture_context *tctx,
                        }
                }
 
                        }
                }
 
+               if (tctx->print) {
+                       print_datatypes_info_bylevel(levels[i], buffer, returned);
+               }
+
                free(buffer);
                buffer = NULL;
        }
                free(buffer);
                buffer = NULL;
        }