]> git.saurik.com Git - apt.git/blobdiff - test/interactive-helper/test_udevcdrom.cc
warn if apt-key is used in scripts/its output parsed
[apt.git] / test / interactive-helper / test_udevcdrom.cc
index 577e2d013c35d363e72493eef6b248b613e29fb2..b87dcd935a85f31fe95d9ceac05d1855a25fd841 100644 (file)
@@ -1,19 +1,23 @@
+#include <config.h>
+
 #include <apt-pkg/cdrom.h>
-#include <stdio.h>
+
+#include <stddef.h>
+#include <string>
 #include <assert.h>
+#include <vector>
+#include <iostream>
 
 int main()
 {
-   int i;
    pkgUdevCdromDevices c;
    assert(c.Dlopen());
 
-   vector<CdromDevice> l;
+   std::vector<CdromDevice> l;
    l = c.Scan();
    assert(l.empty() == false);
-   for (i=0;i<l.size();i++)
+   for (size_t i = 0; i < l.size(); ++i)
       std::cerr << l[i].DeviceName << " " 
                << l[i].Mounted << " " 
                << l[i].MountPath << std::endl;
-   
 }