modified: makefile
[GalaxyCodeBases.git] / c_cpp / etc / rarcrack / rarcrack.h
bloba0506dd21293fc5eb0d126762ac06f8a69b5aa4b
1 /*
2 * Copyright (C) 2007 by David Zoltan Kedves
3 * kedazo@gmail.com
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #include <stdio.h> //Standard headers
22 #include <string.h>
23 #include <stdlib.h>
24 #include <unistd.h>
25 #include <libxml/xmlmemory.h> //libxml2 headers
26 #include <libxml/parser.h>
27 #include <libxml/parserInternals.h>
28 #include <libxml/tree.h>
29 #include <libxml/threads.h>
30 #include <pthread.h> //POSIX threads
32 char default_ABC[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
34 const char CMD_DETECT[] = "file -i -b %s"; //this command return what is the file mime type
36 const char* TYPE[] = {"rar", "7z", "zip", ""}; //the last "" signing this is end of the list
37 const char* MIME[] = {"application/x-rar", "application/octet-stream", "application/x-zip", ""};
38 const char* CMD[] = {"unrar t -y -p'%s' %s 2>&1", "7z t -y -p'%s' %s 2>&1", "unzip -P'%s' -t %s 2>&1", ""};
40 #define PWD_LEN 100