]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/loclass/fileutils.c
This was resynthezised along with my hf-changes. Nothing changed though
[proxmark3-svn] / client / loclass / fileutils.c
index 255aa313700ef12ced86f1b79d9c2f0584bd3277..206d9695c0e37f4f8decd168a667fb9d5208b5b4 100644 (file)
  * @return
  */
 int fileExists(const char *filename) {
+
+#ifdef _WIN32
+       struct _stat st;
+       int result = _stat(filename, &st);
+#else
        struct stat st;
        int result = stat(filename, &st);
+#endif
        return result == 0;
 }
 
@@ -40,7 +46,7 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si
        }
        fwrite(data, 1, datalen, fileHandle);
        fclose(fileHandle);
-       PrintAndLog(">Saved data to '%s'", fileName);
+       PrintAndLog("Saved data to '%s'", fileName);
 
        free(fileName);
 
@@ -57,11 +63,11 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si
  */
 void prnlog(char *fmt, ...)
 {
-
+       char buffer[2048] = {0};
        va_list args;
        va_start(args,fmt);
-    PrintAndLog(fmt, args);
-    //vprintf(fmt,args);
+       vsprintf (buffer,fmt, args);
        va_end(args);
-    //printf("\n");
+       PrintAndLog(buffer);
+
 }
Impressum, Datenschutz