summaryrefslogtreecommitdiffstats
path: root/converter/source/printdir.c
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-02 22:03:16 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-02 22:03:16 +0200
commitf85f83df7f9d69a76671fa9b1396932f34736e55 (patch)
tree69a93ef27c21656cdde67d7ad62e27ad5468ebb5 /converter/source/printdir.c
parentRavines: implemented proper caching - another 10 % in generator speedup :) (diff)
downloadcuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.gz
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.bz2
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.lz
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.xz
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.zst
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.zip
Diffstat (limited to 'converter/source/printdir.c')
-rw-r--r--converter/source/printdir.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/converter/source/printdir.c b/converter/source/printdir.c
deleted file mode 100644
index d163be380..000000000
--- a/converter/source/printdir.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#if 0
-
-/* list contents of a directory */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include "wdirent.h"
-
-int main (int argc, char *argv[]) {
- int i;
-
- /* check command line arguments */
- if (argc <= 1) {
- fprintf (stderr, "usage: printdir directory\n");
- return EXIT_FAILURE;
- }
-
- /* print contents of directories listed in command line */
- i = 1;
- while (i < argc) {
- DIR *dir;
- struct dirent *ent;
-
- /* open directory stream */
- dir = opendir (argv[i]);
- if (dir != NULL) {
-
- /* print all the files and directories within directory */
- while ((ent = readdir (dir)) != NULL) {
- switch (ent->d_type) {
- case DT_REG:
- printf ("%*.*s\n", ent->d_namlen, ent->d_namlen, ent->d_name);
- break;
-
- case DT_DIR:
- printf ("%s (dir)\n", ent->d_name);
- break;
-
- default:
- printf ("%s:\n", ent->d_name);
- }
- }
-
- closedir (dir);
- } else {
- /* could not open directory */
- perror ("");
- return EXIT_FAILURE;
- }
- i++;
- }
- return EXIT_SUCCESS;
-}
-
-
-#endif \ No newline at end of file