/* File: qmainrec.c Copyright (C) 1998-2013 Christophe GRENIER This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #include "qphotorec.h" #include "log.h" #include "misc.h" #include "dir.h" #include "ext2_dir.h" #include "ewf.h" #include "file_jpg.h" #include "ntfs_dir.h" static void display_help(void) { printf("\nUsage: qphotorec\n"\ " qphotorec /version\n" \ "\n" \ "QPhotoRec searches various file formats (JPEG, Office...), it stores them\n" \ "in recup_dir directory.\n"); } static void display_version(void) { printf("QPhotoRec %s, Data Recovery Utility, %s\nChristophe GRENIER \nhttps://www.cgsecurity.org\n",VERSION,TESTDISKDATE); printf("\n"); printf("Version: %s\n", VERSION); printf("Compiler: %s\n", get_compiler()); #ifdef RECORD_COMPILATION_DATE printf("Compilation date: %s\n", get_compilation_date()); #endif printf("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s\n", td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version()); printf("OS: %s\n" , get_os()); } int main(int argc, char *argv[]) { int log_errno=0; time_t my_time; int i; for(i=1; i\nhttps://www.cgsecurity.org\n", VERSION, TESTDISKDATE); log_info("OS: %s\n" , get_os()); log_info("Compiler: %s\n", get_compiler()); #ifdef RECORD_COMPILATION_DATE log_info("Compilation date: %s\n", get_compilation_date()); #endif log_info("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s\n", td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version()); QPhotorec *p = new QPhotorec(); p->showMaximized(); p->show(); int ret=a.exec(); delete p; log_info("QPhotoRec exited normally.\n"); log_close(); return ret; }