Revert some of binki's evil machinations from bugs 691 and 745
authormathnerd314 <mathnerd314@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Tue, 8 Mar 2011 00:14:40 +0000 (00:14 +0000)
committermathnerd314 <mathnerd314@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Tue, 8 Mar 2011 00:14:40 +0000 (00:14 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6680 837edb03-e0f3-0310-88ca-d4d4e8b29345

src/supertux/main.cpp

index bb0a829..41dc622 100644 (file)
@@ -23,7 +23,6 @@
 #include <binreloc.h>
 #include <tinygettext/log.hpp>
 #include <boost/format.hpp>
-#include <unistd.h>
 
 #include "supertux/main.hpp"
 
@@ -277,25 +276,11 @@ Main::pre_parse_commandline(int argc, char** argv)
        * line. Then exit. Intended for use by the supertux-editor.
        */
       char **sp;
-      char *writeptr;
-      ssize_t write_ret;
       size_t sp_index;
       sp = PHYSFS_getSearchPath();
       if (sp)
-       for (sp_index = 0; sp[sp_index]; sp_index ++)
-         {
-           writeptr = sp[sp_index];
-           write_ret = 0;
-           while (*writeptr)
-             {
-               write_ret = write(STDOUT_FILENO, writeptr, strlen(writeptr));
-               if (write_ret == -1)
-                 break;
-               writeptr += write_ret;
-             }
-           write(STDOUT_FILENO, "\n", 1);
-           /* std::cout << sp[sp_index] << std::endl; */
-         }
+        for (sp_index = 0; sp[sp_index]; sp_index++)
+          std::cout << sp[sp_index] << std::endl;
       PHYSFS_freeList(sp);
       return true;
     }