Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
create_zen_ar.c
Go to the documentation of this file.
1
2/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3
4 #2023 X March 21 19:50 PM Brasília Time
5
6* *
7* Licença de Copia (C) <2024> <Aurora Boreal> *
8* *
9* Este programa e software livre: voce pode redistribuir isto e/ou *
10* modificar isto sobre os termos do GNU Licensa Geral Pública como 25
11* publicado pela Fundacao de Software Livre, tanto a versão 3 da *
12* Licensa, ou (dependendo da sua opcao) qualquer versao posterior. *
13* *
14* Este programa e distribuido na esperanca que isto vai ser util, *
15* mas SEM QUALQUER GARANTIA; sem ate mesmo a implicada garantia de *
16* COMERCIALIZAcaO ou CABIMENTO PARA UM FIM PARTICULAR. Veja a *
17* Licensa Geral Publica para mais detalhes. *
18* *
19* Você deve ter recebido uma cópia da LICENSA GERAL PUBLICA e a GNU *
20* Licensa Publica Menor junto com este programa *
21* Se não, veja <http://www.gnu.org/licenses/>. *
22* *
23* Suporte: sourceforge.net github.com *
24* *
25* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
26
27* Pereira: arsoftware25@gmail.com ricardo@arsoftware.net.br *
28* xcx: arsoftware10@gmail.com charli@arsoftware.net.br *
29 Yasmin: yasmin@arsoftware.net.br *
30 pereira1001@users.sourceforge.net
31 */
32
34// defines...
35
37
39
40bool use_encryption_i = false;
48int amanda_s_smart_ape(__attribute__((unused)) char *initial_path_amanda_s_smart_ape,
49 bool recurse_on_subfolders_amanda_s_smart_ape, enum amanda__mode amanda_mode, bool);
50
51void get_timestamp_arp(char *file_arp, __time64_t *s_arp, VAL_data *VAL_data_arp);
52
54
55int64_t bytes_read_p = 0; // oi
56
58
60
61int __fastcall split_in_multiple_volumes_p(char *filename_utf_8_p);
62
63#define SHOW_DEBUG_SPEED_Z show_debug_z
64
70double
72{
73 LARGE_INTEGER first;
74 LARGE_INTEGER second;
75 QueryPerformanceFrequency(&first);
76 double a = first.QuadPart;
77 QueryPerformanceCounter(&second);
78 double b = second.QuadPart;
79 return b / a;
80}
81
82int first_step = 0;
83
84enum z_encryption_method internal_encryption_z_method = Z_NEW_MODE; // default to the new method, obviously
85
97{
98 int ret_arp_ = 0;
99 static char temp_file_in_z[AMANDA__SIZE];
100 static int64_t temp_long_long;
101
102 first_step = 2;
103
104#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
105 if (false)
106 {
107#else
108 if (true)
109 {
110#endif
112 {
113 if (!createtempfilename_and_keep_z(ar_gettemppath_z(), temp_file_in_z, L"EN_"))
114 {
115 fatal_exit_k = 30004;
116 strcpy(error_message_k, "Cannot create final encrypted file\n");
117 return 1;
118 }
119
120 update_progress_arp(&temp_long_long);
121
123 {
124 ret_arp_ = encrypt_arp(original_filename_z,
125 temp_file_in_z,
127 ARP_AES,
129 }
131 {
132 pedro_dprintf(-1, "method rc4\n");
133 ret_arp_ = encrypt_arp(original_filename_z,
134 temp_file_in_z,
136 ARP_RC4,
138 }
140 {
141 ret_arp_ = encrypt_arp(original_filename_z,
142 temp_file_in_z,
146 }
148 {
149 ret_arp_ = encrypt_arp(original_filename_z,
150 temp_file_in_z,
152 ARP_MARS,
154 }
156 {
157 ret_arp_ = encrypt_arp(original_filename_z,
158 temp_file_in_z,
160 ARP_RC6,
162 }
164 {
165 ret_arp_ = encrypt_arp(original_filename_z,
166 temp_file_in_z,
170 }
172 {
173 ret_arp_ = encrypt_arp(original_filename_z,
174 temp_file_in_z,
178 }
180 {
181 pedro_dprintf(-1, "method rc4\n");
182 ret_arp_ = encrypt_arp(original_filename_z,
183 temp_file_in_z,
187 }
189 {
190 ret_arp_ = encrypt_arp(original_filename_z,
191 temp_file_in_z,
195 }
197 {
198 ret_arp_ = encrypt_arp(original_filename_z,
199 temp_file_in_z,
203 }
205 {
206 ret_arp_ = encrypt_arp(original_filename_z,
207 temp_file_in_z,
211 }
213 {
214 ret_arp_ = encrypt_arp(original_filename_z,
215 temp_file_in_z,
219 }
220 else
221 {
222 assert(0 && "Unsupported encryption method\n");
223 exit(27);
224 }
225 {
226 int r_temp = size_of_WCHAR_mem_r(original_filename_z);
227 WCHAR *ar_temp = (void *)malloc(r_temp);
228 WCHAR *ar_temp2 = (void *)malloc(r_temp);
229
230 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_filename_z, ar_temp), ar_temp2));
231
232 free(ar_temp);
233 free(ar_temp2);
234 }
235
236 {
237 int r_temp = size_of_WCHAR_mem_r(temp_file_in_z);
238 WCHAR *ar_temp = (void *)malloc(r_temp);
239 WCHAR *ar_temp2 = (void *)malloc(r_temp);
240 int r_temp2 = size_of_WCHAR_mem_r(original_filename_z);
241 WCHAR *ar_temp3 = (void *)malloc(r_temp2);
242 WCHAR *ar_temp4 = (void *)malloc(r_temp2);
243
244 _wrename(permissive_name_m_(amanda_utf8towide_2_(temp_file_in_z, ar_temp), ar_temp2), permissive_name_m_v27(amanda_asciitowide_1_(original_filename_z, ar_temp3), ar_temp4));
245
246 free(ar_temp);
247 free(ar_temp2);
248 free(ar_temp3);
249 free(ar_temp4);
250 }
251
252 if (119 == ret_arp_)
253 {
254 int r_temp = size_of_WCHAR_mem_r(original_filename_z);
255 WCHAR *ar_temp = (void *)malloc(r_temp);
256 WCHAR *ar_temp2 = (void *)malloc(r_temp);
257
258 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_filename_z, ar_temp), ar_temp2));
259
260 free(ar_temp);
261 free(ar_temp2);
262 }
263 }
264 }
265
266 return ret_arp_;
267}
268
269int threads_z = 1;
270// threads with up to 128
271
282int __stdcall set_thread_number(int value_z)
283{
284
285 if (0 > value_z)
286 {
287 value_z = 0; // will be based on the number of cpus detected
288 threads_z_v27 = 0;
289 }
290 threads_z_v27 = value_z;
291
292 if (128 < threads_z_v27)
293 {
294 threads_z_v27 = 128;
295 }
296
297 if (8 < value_z)
298 {
299 value_z = 8; // limit
300 }
301
302 number_of_threads_p = value_z;
303
304 threads_z = value_z;
305 return 0;
306}
307
309bool flag_iso_arp = false;
310
315
316#pragma pack(push, 1)
317
318typedef struct _amanda_
319{
320 char global_patern_ar[1024]; // need to change soon...
323 // int files_that_cannot_read ;
329
330#pragma pack(pop)
331
336
337int dump_regular_file_VAL_arp(int fd_arp, VAL_data *my_VAL_data);
338void dump_diretory_VAL_arp(VAL_data *my_VAL_data);
339int __cdecl create_archive_internal_ar_VAL(char *path_with_the_files_ar);
342
343static union block *
344write_ustar_long_name(const char *name);
345
346void xheader_store(char const *keyword, struct tar_stat_info *st,
347 void const *data);
348
350
352
355
358
365
368
370
371int has_itens = 0;
372
374
383void add_more_one(char *data_ar)
384{
385 struct my_struct_for_list_ar *aak_ptr;
386
387 if (!has_itens)
388 {
389 aak_ = calloc(1, sizeof(struct my_struct_for_list_ar));
392 aak_->filename_ar = malloc(strlen(data_ar) + 1);
393 strcpy(aak_->filename_ar, data_ar);
394 aak_->next_ar = calloc(1, sizeof(struct my_struct_for_list_ar));
395 has_itens = 1;
397 aak_ = aak_->next_ar;
398 }
399 else
400 {
401 aak_ptr = aak_;
402 pedro_dprintf(-1, "em uso memoria %p\n", aak_ptr);
403 assert(aak_ptr);
404 assert(8 < sizeof(struct my_struct_for_list_ar));
405 aak_ptr->next_ar = calloc(1, sizeof(struct my_struct_for_list_ar));
406 aak_ptr->filename_ar = malloc(strlen(data_ar) + 1);
407 strcpy(aak_ptr->filename_ar, data_ar);
408 aak_ = aak_ptr->next_ar;
409 has_itens++;
411 }
412}
413
414int clean_list__ar(void);
415
427int get_list_itens(char *data_out_ar)
428{
429 if (!has_itens_copy)
430 {
432 return 0;
433 }
434 strcpy(data_out_ar, aak_pointer_->filename_ar);
438 return 1;
439}
440
450int __stdcall get_last_process_information_ar(char *data_out_ar)
451{
452 data_out_ar[0] = 0;
453 pedro_dprintf(-1, "antes");
454 return get_list_itens(data_out_ar);
455}
456
463{
464 struct my_struct_for_list_ar *my_ptr_ar;
465 struct my_struct_for_list_ar *my_ptr2_ar;
466
467 my_ptr2_ar = aak_inicio_;
468 my_ptr_ar = aak_inicio_;
469inicio_ar:;
470 if (!has_itens)
471 {
472 has_itens_copy = 0;
473 return 0;
474 }
475 my_ptr2_ar = my_ptr_ar;
476 my_ptr_ar = my_ptr_ar->next_ar;
477
478 if (1 == has_itens)
479 {
480 free(my_ptr2_ar->next_ar);
481 }
482 free(my_ptr2_ar->filename_ar);
483 free(my_ptr2_ar);
484
485 has_itens--;
486
487 goto inicio_ar;
488 return 1;
489}
490
492
500void __stdcall get_create_warning_ar(char *message_ar)
501{
502 strcpy(message_ar, warning_message_k);
503 return;
504}
505
507
515void __stdcall get_create_process_ar(char *message_ar)
516{
517 strcpy(message_ar, process_message_k);
518 return;
519}
520
529long int
530get_stat_ctime_ns(__attribute__((unused)) struct _stat const *st)
531{
532#if defined STAT_TIMESPEC
533 return STAT_TIMESPEC(st, st_ctim).tv_nsec;
534#elif defined STAT_TIMESPEC_NS
535 return STAT_TIMESPEC_NS(st, st_ctim);
536#else
537 return 0;
538#endif
539}
540
549struct timespec
550get_stat_ctime(struct _stat const *st)
551{
552#ifdef STAT_TIMESPEC
553 return STAT_TIMESPEC(st, st_ctim);
554#else
555 struct timespec t;
556 t.tv_sec = st->st_ctime;
557 t.tv_nsec = get_stat_ctime_ns(st);
558 return t;
559#endif
560}
561
570long int
571get_stat_mtime_ns(__attribute__((unused)) struct _stat const *st)
572{
573#if defined STAT_TIMESPEC
574 return STAT_TIMESPEC(st, st_mtim).tv_nsec;
575#elif defined STAT_TIMESPEC_NS
576 return STAT_TIMESPEC_NS(st, st_mtim);
577#else
578 return 0;
579#endif
580}
581
590struct timespec
591get_stat_mtime(struct _stat const *st)
592{
593#ifdef STAT_TIMESPEC
594 return STAT_TIMESPEC(st, st_mtim);
595#else
596 struct timespec t;
597 t.tv_sec = st->st_mtime;
598 t.tv_nsec = get_stat_mtime_ns(st);
599 return t;
600#endif
601}
602
611long int
612get_stat_atime_ns(__attribute__((unused)) struct _stat const *st)
613{
614#if defined STAT_TIMESPEC
615 return STAT_TIMESPEC(st, st_atim).tv_nsec;
616#elif defined STAT_TIMESPEC_NS
617 return STAT_TIMESPEC_NS(st, st_atim);
618#else
619 return 0;
620#endif
621}
622
631struct timespec
632get_stat_atime(struct _stat const *st)
633{
634#ifdef STAT_TIMESPEC
635 return STAT_TIMESPEC(st, st_atim);
636#else
637 struct timespec t;
638 t.tv_sec = st->st_atime;
639 t.tv_nsec = get_stat_atime_ns(st);
640 return t;
641#endif
642}
643
644void close_archive(void);
645
646union block *
647write_extended(bool global, struct tar_stat_info *st, union block *old_header);
648
649void dump_file_new_ar(struct tar_stat_info *parent, char const *name, char *initial_path_ar);
650
651static bool
652to_chars(int negative, uintmax_t value, size_t valsize,
653 uintmax_t (*substitute)(int *),
654 char *where, size_t size, const char *type);
655
656/* Override actual mtime if set to FORCE_MTIME or CLAMP_MTIME */
658
659void tar_copy_str(char *dst, const char *src, size_t len);
660
669void strtolower_ar(char *path)
670{
671 /*
672 * funcao para passar um tolower na string inteira, september 1992
673 */
674 int ret;
675 int i;
676
677 ret = strlen(path);
678 if (ret)
679 {
680 for (i = 0; i < ret; i++)
681 {
682 path[i] = tolower(path[i]);
683 }
684 return;
685 }
686}
687
692static void
693string_to_chars(char const *str, char *p, size_t s)
694{
695 tar_copy_str(p, str, s);
696 p[s - 1] = '\0';
697}
698
703static bool
704to_chars(int negative, uintmax_t value, size_t valsize,
705 uintmax_t (*substitute)(int *),
706 char *where, size_t size, const char *type);
707
712static uintmax_t
713uid_substitute(int *negative)
714{
715 uid_t r;
716
717#ifdef UID_NOBODY
718 r = UID_NOBODY;
719#else
720 static uid_t uid_nobody;
721 if (!uid_nobody && !0)
722 uid_nobody = -2;
723 r = uid_nobody;
724#endif
725 *negative = r < 0;
726 return r;
727}
728
733static bool
734uintmax_to_chars(uintmax_t v, char *p, size_t s)
735{
736 return to_chars(0, v, sizeof v, 0, p, s, "uintmax_t");
737}
738
744{
745 size_t i;
746 int sum;
747 char *p;
748
749 memcpy(header->header.chksum, CHKBLANKS, sizeof header->header.chksum);
750
751 sum = 0;
752 p = header->buffer;
753 for (i = sizeof *header; i-- != 0;)
754 /* We can't use unsigned char here because of old compilers, e.g. V7. */
755 sum += 0xFF & *p++;
756
757 /* Fill in the checksum field. It's formatted differently from the
758 other fields: it has [6] digits, a null, then a space -- rather than
759 digits, then a null. We use to_chars.
760 The final space is already there, from
761 checksumming, and to_chars doesn't modify it.
762
763 This is a fast way to do:
764
765 sprintf(header->header.chksum, "%6o", sum); */
766
767 uintmax_to_chars((uintmax_t)sum, header->header.chksum, 7);
768 pedro_dprintf(-1, "veja !!!");
770}
771
776union block *
777write_extended(__attribute__((unused)) bool global, struct tar_stat_info *st, union block *old_header)
778{
779 union block *header = NULL;
780 if (st->xhdr.buffer || st->xhdr.stk == NULL)
781 return old_header;
782 assert(0);
783 return header;
784}
785
790bool string_ascii_p(char const *p)
791{
792 for (; *p; p++)
793 if (*p & ~0x7f)
794 return false;
795 return true;
796}
797
802static bool
803uid_to_chars(int v, char *p, size_t s)
804{
805 return to_chars(v < 0, (uintmax_t)v, sizeof v, uid_substitute, p, s, "uid_t");
806}
807
812static uintmax_t
813gid_substitute(int *negative)
814{
815 int r;
816
817#ifdef GID_NOBODY
818 r = GID_NOBODY;
819#else
820#if 0
821 static gid_t gid_nobody;
822 if (!gid_nobody && !gname_to_gid("nobody", &gid_nobody))
823 gid_nobody = -2;
824 r = gid_nobody;
825#endif
826
827 r = 1;
828#endif
829 *negative = r < 0;
830 return r;
831}
832
837static bool
838gid_to_chars(int v, char *p, size_t s)
839{
840 return to_chars(v < 0, (uintmax_t)v, sizeof v, gid_substitute, p, s, "gid_t");
841}
842
847static bool
848mode_to_chars(mode_t v, char *p, size_t s)
849{
850 /* In the common case where the internal and external mode bits are the same,
851 and we are not using POSIX or GNU format,
852 propagate all unknown bits to the external mode.
853 This matches historical practice.
854 Otherwise, just copy the bits we know about. */
855 int negative;
856 uintmax_t u;
857 int vv = (int)v;
858#if 1
860 {
861 negative = vv < 0;
862 u = v;
863 }
864 else
865#endif
866 {
867 negative = 0;
868 u = ((v & S_ISUID ? TSUID : 0) | (v & S_ISGID ? TSGID : 0) | (v & S_ISVTX ? TSVTX : 0) | (v & S_IRUSR ? TUREAD : 0) | (v & S_IWUSR ? TUWRITE : 0) | (v & S_IXUSR ? TUEXEC : 0) | (v & S_IRGRP ? TGREAD : 0) | (v & S_IWGRP ? TGWRITE : 0) | (v & S_IXGRP ? TGEXEC : 0) | (v & S_IROTH ? TOREAD : 0) | (v & S_IWOTH ? TOWRITE : 0) | (v & S_IXOTH ? TOEXEC : 0));
869 }
870 return to_chars(negative, u, sizeof v, 0, p, s, "mode_t");
871}
872
877static bool
878to_chars(int negative, uintmax_t value, size_t valsize,
879 uintmax_t (*substitute)(int *),
880 char *where, size_t size, const char *type);
881
886bool time_to_chars(time_t v, char *p, size_t s)
887{
888 return to_chars(v < 0, (uintmax_t)v, sizeof v, 0, p, s, "time_t");
889}
890
892
893/* List of keyword patterns set by delete= option */
894static struct keyword_list *keyword_pattern_list;
895
896/* List of keyword/value pairs set by 'keyword=value' option */
897static struct keyword_list *keyword_global_override_list;
898
899int __stdcall create_archive_ar(char *tar_filename_ar, char *path_with_the_files_ar, char *patern_ar, int compression_mode_external_ar);
900
902
903void dump_file(struct tar_stat_info *parent, char const *name,
904 char const *fullname);
905
906static bool
907to_chars(int negative, uintmax_t value, size_t valsize,
908 uintmax_t (*substitute)(int *),
909 char *where, size_t size, const char *type);
910
912
913#if (2 <= __GNUC__ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) || (0x5110 <= __SUNPRO_C && !__STDC__))
914#define _GL_HAVE___TYPEOF__ 1
915#else
916#define _GL_HAVE___TYPEOF__ 0
917#endif
918
919/* Return 1 if the integer type or expression T might be signed. Return 0
920 if it is definitely unsigned. This macro does not evaluate its argument,
921 and expands to an integer constant expression. */
922#if _GL_HAVE___TYPEOF__
923// # define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED(__typeof__ (t))
924#else
925#define _GL_SIGNED_TYPE_OR_EXPR(t) 1
926#endif
927
928/* Bound on length of the string representing an unsigned integer
929 value representable in B bits. log10 (2.0) < 146/485. The
930 smallest value of B where this bound is not tight is 2621. */
931#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
932
933/* Bound on length of the string representing an integer type or expression T.
934 Subtract 1 for the sign bit if T is signed, and then add 1 more for
935 a minus sign if needed.
936
937 Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
938 signed, this macro may overestimate the true bound by one byte when
939 applied to unsigned types of size 2, 4, 16, ... bytes. */
940
941/*
942#define INT_STRLEN_BOUND(t) \
943 (INT_BITS_STRLEN_BOUND(TYPE_WIDTH(t) - _GL_SIGNED_TYPE_OR_EXPR(t)) \
944 + _GL_SIGNED_TYPE_OR_EXPR(t))
945*/
946
951char *
952umaxtostr(uintmax_t i, char *buf)
953{
954
955#pragma GCC diagnostic push
956#pragma GCC diagnostic ignored "-Wstringop-overflow="
957
958 char *p = buf + INT_STRLEN_BOUND(uintmax_t);
959
960 *p = 0;
961
962 if ((int)i < 0)
963 {
964 do
965 *--p = '0' - i % 10;
966 while ((i /= 10) != 0);
967
968 *--p = '-';
969 }
970 else
971 {
972 do
973 *--p = '0' + i % 10;
974 while ((i /= 10) != 0);
975 }
976
977 return p;
978
979#pragma GCC diagnostic pop
980}
981
986static bool
987to_chars_subst(int negative, int gnu_format, uintmax_t value, size_t valsize,
988 uintmax_t (*substitute)(int *),
989 char *where, size_t size, const char *type)
990{
991 uintmax_t maxval = (gnu_format
994 char valbuf[5000 + 1];
995 char minbuf[5000 + 1];
996
997 if (gnu_format)
998 {
999 uintmax_t m = maxval + 1 ? maxval + 1 : maxval / 2 + 1;
1000 char *p = STRINGIFY_BIGINT(m, minbuf + 1);
1001 *--p = '-';
1002 // minval_string = p;
1003 }
1004 else
1005 {
1006 ; // minval_string = "0";
1007 }
1008 if (negative)
1009 {
1010 char *p = STRINGIFY_BIGINT(-value, valbuf + 1);
1011 *--p = '-';
1012 // value_string = p;
1013 }
1014 else
1015 {
1016 ; // value_string = STRINGIFY_BIGINT (value, valbuf);
1017 }
1018
1019 if (substitute)
1020 {
1021 int negsub;
1022 uintmax_t sub = substitute(&negsub) & maxval;
1023 /* NOTE: This is one of the few places where GNU_FORMAT differs from
1024 OLDGNU_FORMAT. The actual differences are:
1025
1026 1. In OLDGNU_FORMAT all strings in a tar header end in \0
1027 2. Incremental archives use oldgnu_header.
1028
1029 Apart from this they are completely identical. */
1030 uintmax_t s = (negsub &= archive_format == GNU_FORMAT) ? -sub : sub;
1031 char subbuf[5000 + 1];
1032 char *sub_string = STRINGIFY_BIGINT(s, subbuf + 1);
1033 if (negsub)
1034 *--sub_string = '-';
1035
1036 pedro_dprintf(2, "value out of range");
1037
1038 return to_chars(negsub, s, valsize, 0, where, size, type);
1039 }
1040 else
1041 {
1042 pedro_dprintf(2, "value out of range ***************** cheque");
1043 return false;
1044 }
1045}
1046
1047/* Convert NEGATIVE VALUE to a base-256 representation suitable for
1048 tar headers. NEGATIVE is 1 if VALUE was negative before being cast
1049 to uintmax_t, 0 otherwise. Output to buffer WHERE with size SIZE.
1050 The result is undefined if SIZE is 0 or if VALUE is too large to
1051 fit. */
1052
1057void to_base256(int negative, uintmax_t value, char *where, size_t size)
1058{
1059 uintmax_t v = value;
1060 uintmax_t propagated_sign_bits =
1061 ((uintmax_t)-negative << (CHAR_BIT * sizeof v - LG_256));
1062 size_t i = size;
1063
1064 do
1065 {
1066 where[--i] = v & ((1 << LG_256) - 1);
1067 v = propagated_sign_bits | (v >> LG_256);
1068 } while (i);
1069}
1070
1071/* Convert VALUE to an octal representation suitable for tar headers.
1072 Output to buffer WHERE with size SIZE.
1073 The result is undefined if SIZE is 0 or if VALUE is too large to fit. */
1074
1079void to_octal(uintmax_t value, char *where, size_t size)
1080{
1081 uintmax_t v = value;
1082 size_t i = size;
1083
1084 do
1085 {
1086 where[--i] = '0' + (v & ((1 << LG_8) - 1));
1087 v >>= LG_8;
1088 } while (i);
1089}
1090
1095bool to_chars(int negative, uintmax_t value, size_t valsize,
1096 uintmax_t (*substitute)(int *),
1097 char *where, size_t size, const char *type)
1098{
1099 int gnu_format = (archive_format == GNU_FORMAT || archive_format == OLDGNU_FORMAT);
1100
1101 /* Generate the POSIX octal representation if the number fits. */
1102 if (!negative && value <= MAX_VAL_WITH_DIGITS(size - 1, LG_8))
1103 {
1104 where[size - 1] = '\0';
1105 to_octal(value, where, size - 1);
1106 return true;
1107 }
1108 else if (gnu_format)
1109 {
1110 /* Try to cope with the number by using traditional GNU format
1111 methods */
1112
1113 /* Generate the base-256 representation if the number fits. */
1114 if (((negative ? -1 - value : value) <= MAX_VAL_WITH_DIGITS(size - 1, LG_256)))
1115 {
1116 where[0] = negative ? -1 : 1 << (LG_256 - 1);
1117 to_base256(negative, value, where + 1, size - 1);
1118 return true;
1119 }
1120
1121 /* Otherwise, if the number is negative, and if it would not cause
1122 ambiguity on this host by confusing positive with negative
1123 values, then generate the POSIX octal representation of the value
1124 modulo 2**(field bits). The resulting tar file is
1125 machine-dependent, since it depends on the host word size. Yuck!
1126 But this is the traditional behavior. */
1127 else if (negative && valsize * CHAR_BIT <= (size - 1) * LG_8)
1128 {
1129 static int warned_once;
1130 if (!warned_once)
1131 {
1132 warned_once = 1;
1133 }
1134 where[size - 1] = '\0';
1135 to_octal(value & MAX_VAL_WITH_DIGITS(valsize * CHAR_BIT, 1),
1136 where, size - 1);
1137 return true;
1138 }
1139 /* Otherwise fall back to substitution, if possible: */
1140 }
1141 else
1142 substitute = NULL; /* No substitution for formats, other than GNU */
1143
1144 return to_chars_subst(negative, gnu_format, value, valsize, substitute,
1145 where, size, type);
1146}
1147
1152bool off_to_chars(off_t v, char *p, size_t s)
1153{
1154 return to_chars(v < 0, (uintmax_t)v, sizeof v, 0, p, s, "off_t");
1155}
1156
1162{
1163 memset(st, 0, sizeof(*st));
1164}
1165
1171{
1172 if (keyword_global_override_list)
1173 {
1174 pedro_dprintf(-1, "item 1 call ");
1175#if 1
1176 struct keyword_list *kp;
1177
1178 xheader_init(xhdr);
1179 for (kp = keyword_global_override_list; kp; kp = kp->next)
1180 code_string(kp->value, kp->pattern, xhdr);
1181#endif
1182 }
1183 if (xhdr->stk)
1184 {
1185 pedro_dprintf(-1, "item 1 call ");
1186#if 1
1187 char *name;
1188
1189 xheader_finish(xhdr);
1191 xheader_write(XGLTYPE, name, start_time.tv_sec, xhdr);
1192 free(name);
1193#endif
1194 }
1195}
1196
1197static struct tar_stat_info dummy;
1198
1204{
1206}
1207/* Compute and return the block ordinal at current_block. */
1208
1214{
1215 return record_start_block + (current_block - record_start);
1216}
1217
1218/* Copy at most LEN bytes from the string SRC to DST. Terminate with
1219 NUL unless SRC is LEN or more bytes long. */
1220
1225void tar_copy_str(char *dst, const char *src, size_t len)
1226{
1227 size_t i;
1228
1229 for (i = 0; i < len; i++)
1230 if (!(dst[i] = src[i]))
1231 break;
1232}
1233
1234/* Same as tar_copy_str, but always terminate with NUL if using
1235 is OLDGNU format */
1236
1241void tar_name_copy_str(char *dst, const char *src, size_t len)
1242{
1245 dst[len - 1] = 0;
1246}
1247
1248/* Given GID, find the corresponding GNAME. */
1249
1254void gid_to_gname(__attribute__((unused)) int gid, char **gname)
1255{
1256 *gname = strdup("");
1257 return;
1258}
1259
1260/* Create a new header and store there at most NAME_FIELD_SIZE bytes of
1261 the file name */
1262
1267union block *
1269{
1270 union block *header = find_next_block();
1271
1272 memset(header->buffer, 0, sizeof(union block));
1274 return header;
1275}
1276
1277/* Write a GNUTYPE_LONGLINK or GNUTYPE_LONGNAME block. */
1278
1283static void
1284write_gnu_long_link(struct tar_stat_info *st, const char *p, char type)
1285{
1286 size_t size = strlen(p) + 1;
1287 size_t bufsize;
1288 union block *header;
1289
1290 header = start_private_header("././@LongLink", size, 0);
1291
1292#if 1
1294 {
1295 static char *uname, *gname;
1296 if (!uname)
1297 {
1298 uid_to_uname(0, &uname);
1299 gid_to_gname(0, &gname);
1300 }
1301 UNAME_TO_CHARS(uname, header->header.uname);
1302 GNAME_TO_CHARS(gname, header->header.gname);
1303 }
1304#endif
1305
1306 strcpy(header->buffer + offsetof(struct posix_header, magic),
1307 OLDGNU_MAGIC);
1308 header->header.typeflag = type;
1309 finish_header(st, header, -1);
1310
1312
1313 bufsize = available_space_after(header);
1314
1315 while (bufsize < size)
1316 {
1317 memcpy(header->buffer, p, bufsize);
1318 p += bufsize;
1319 size -= bufsize;
1320 set_next_block_after(header + (bufsize - 1) / BLOCKSIZE);
1322 bufsize = available_space_after(header);
1323 }
1324 memcpy(header->buffer, p, size);
1325 memset(header->buffer + size, 0, bufsize - size);
1327}
1328
1333static union block *
1334write_ustar_long_name(const char *name)
1335{
1336 size_t length = strlen(name);
1337 size_t i, nlen;
1338 union block *header;
1339
1340 if (length > PREFIX_FIELD_SIZE + NAME_FIELD_SIZE + 1)
1341 {
1342 pedro_dprintf(2, "%s: file name is too long (max %d); not dumped",
1344 return NULL;
1345 }
1346
1347 i = split_long_name(name, length);
1348 if (i == 0 || (nlen = length - i - 1) > NAME_FIELD_SIZE || nlen == 0)
1349 {
1350 pedro_dprintf(2, "%s: file name is too long (cannot be split); not dumped",
1351 name);
1352 return NULL;
1353 }
1354
1356 memset(header->buffer, 0, sizeof(header->buffer));
1357 memcpy(header->header.prefix, name, i);
1358 memcpy(header->header.name, name + i + 1, length - i - 1);
1359
1360 return header;
1361}
1362
1367static union block *
1368write_long_name(struct tar_stat_info *st)
1369{
1370 switch (archive_format)
1371 {
1372 case POSIX_FORMAT:
1373 xheader_store("path", st, NULL);
1374 break;
1375
1376 case V7_FORMAT:
1377 if (strlen(st->file_name) > NAME_FIELD_SIZE - 1)
1378 {
1379 return NULL;
1380 }
1381 break;
1382
1383#if 1
1384 case USTAR_FORMAT:
1385 case STAR_FORMAT:
1386
1387 return write_ustar_long_name(st->file_name);
1388#endif
1389 case OLDGNU_FORMAT:
1390 case GNU_FORMAT:
1391 write_gnu_long_link(st, st->file_name, GNUTYPE_LONGNAME);
1392 break;
1393
1394 default:
1395 abort(); /*FIXME*/ // ok, we will fix it
1396 }
1397 return write_short_name(st);
1398}
1399
1405{
1406 union block *blk = NULL;
1407 off_t block_ordinal = current_block_ordinal();
1408 st->stat.st_size = 0; /* force 0 size on dir */
1409 blk = start_header(st);
1410 if (!blk)
1411 {
1412 return;
1413 }
1414 blk->header.typeflag = DIRTYPE;
1415 finish_header(st, blk, block_ordinal);
1416 return;
1417}
1418
1424{
1425 int ret;
1426 char aqui;
1427 int i;
1428
1429 ret = strlen(path);
1430 if (ret)
1431 {
1432 for (i = 0; i < ret; i++)
1433 {
1434 aqui = path[i];
1435 if (aqui == '\\')
1436 {
1437 path[i] = '/';
1438 }
1439 }
1440 }
1441}
1442
1447size_t
1448blocking_read(int fd, void *buf, size_t count)
1449{
1450 int bytes;
1451
1453 {
1454 bytes = read(fd, buf, min(count, bytes_left_in_the_update_file_arp));
1455 if (0 <= (int)bytes)
1456 {
1458 }
1459 }
1460 else
1461 bytes = read(fd, buf, count);
1462#if defined F_SETFL && O_NONBLOCK
1463 if (bytes == SAFE_READ_ERROR && errno == EAGAIN)
1464 {
1465 int flags = fcntl(fd, F_GETFL);
1466 if (0 <= flags && flags & O_NONBLOCK && fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) != -1)
1467 bytes = safe_read(fd, buf, count);
1468 }
1469#endif
1470 return bytes;
1471}
1472
1477void pad_archive(off_t size_left)
1478{
1479 union block *blk;
1480
1481 while (size_left > 0)
1482 {
1483 blk = find_next_block();
1484 memset(blk->buffer, 0, BLOCKSIZE);
1486 size_left -= BLOCKSIZE;
1487 }
1488}
1489
1494static enum dump_status
1495dump_regular_file(int fd, struct tar_stat_info *st)
1496{
1497 off_t size_left = st->stat.st_size;
1498 off_t block_ordinal;
1499 union block *blk;
1500
1501 block_ordinal = current_block_ordinal();
1502 blk = start_header(st);
1503 if (!blk)
1504 {
1505 pedro_dprintf(-1, "error in dump_regular_file\n");
1506 return dump_status_fail;
1507 }
1508#if 1
1509 /* Mark contiguous files, if we support them. */
1510 if (archive_format != V7_FORMAT && S_ISCTG(st->stat.st_mode))
1511 blk->header.typeflag = CONTTYPE;
1512#endif
1513 finish_header(st, blk, block_ordinal);
1514
1515 mv_begin_write(st->file_name, st->stat.st_size, st->stat.st_size);
1516 while (size_left > 0)
1517 {
1518 size_t bufsize, count, count2 = -1;
1519
1520 int icount;
1521
1522 blk = find_next_block();
1523 bufsize = available_space_after(blk);
1524
1525 if ((int64_t)size_left < (int64_t)bufsize)
1526 {
1527 /* Last read -- zero out area beyond. */
1528 bufsize = size_left;
1529 count = bufsize % BLOCKSIZE;
1530 if (count)
1531 memset(blk->buffer + size_left, 0, BLOCKSIZE - count);
1532 }
1533
1534 icount = count = (fd <= 0) ? bufsize : blocking_read(fd, blk->buffer, bufsize);
1535
1536 if (0 < icount)
1537 {
1539 {
1540 ricrdo_bytes_read += count / 2;
1541 }
1542 else
1543 {
1544 ricrdo_bytes_read += count;
1545 }
1546 }
1547
1548 if (count2 == count)
1549 {
1550 pad_archive(size_left);
1551 return dump_status_short;
1552 }
1553 size_left -= count;
1554 set_next_block_after(blk + (bufsize - 1) / BLOCKSIZE);
1555
1556 if (count != bufsize)
1557 {
1558 memset(blk->buffer + count, 0, bufsize - count);
1559 pedro_dprintf(2, "File shrank by a few bytes\n");
1560 pad_archive(size_left - (bufsize - count));
1561 return dump_status_short;
1562 }
1563 }
1564 return dump_status_ok;
1565}
1566
1567#include "libarchive_update_i.c"
1568
1581 char const *girlfriend_name,
1582 char *initial_path_ar)
1583{
1584 static VAL_data my_VAL_data;
1585 static VAL_data my_VAL_data_copy_i;
1586
1587 HANDLE hFile;
1588 enum dump_status status;
1589 DWORD attributes;
1590 __time64_t mtime_tv_sec_arp = 0;
1591 static char filename_k_arp[AMANDA__SIZE];
1592 static char file_or_folder_to_process[AMANDA__SIZE];
1593 static char file_or_folder_to_process_copy[AMANDA__SIZE];
1594 static char tar_file_copy[AMANDA__SIZE];
1595 bool is_dir_ar = false;
1596 bool don_t_free_dl = false;
1597 int fd_ar;
1598
1599 memset(filename_k_arp, 0, sizeof(filename_k_arp));
1600 memset(file_or_folder_to_process, 0, sizeof(file_or_folder_to_process));
1601 memset(file_or_folder_to_process_copy, 0, sizeof(file_or_folder_to_process_copy));
1602 memset(tar_file_copy, 0, sizeof(tar_file_copy));
1603
1604 memset(&my_VAL_data, 0, sizeof(my_VAL_data));
1605 memset(&my_VAL_data_copy_i, 0, sizeof(my_VAL_data_copy_i));
1606
1607 strcpy(file_or_folder_to_process, initial_path_ar);
1608
1609 if (strlen(file_or_folder_to_process))
1610 {
1611 if ('\\' != file_or_folder_to_process[strlen(file_or_folder_to_process) - 1])
1612 {
1613 strcat(file_or_folder_to_process, "\\");
1614 }
1615 }
1616 else
1617 {
1618 assert(0 && "path cannot be empty");
1619 }
1620
1621 strcat(file_or_folder_to_process, girlfriend_name);
1622
1623 pedro_dprintf(-1, "***************************\n");
1624 pedro_dprintf(-1, " folder e name %s %s\n", initial_path_ar, girlfriend_name);
1625 pedro_dprintf(-1, " total %s\n", file_or_folder_to_process);
1626
1627 strcpy(file_or_folder_to_process_copy, file_or_folder_to_process);
1628 trocadordebackslashtras(file_or_folder_to_process_copy);
1629 strtolower_ar(file_or_folder_to_process_copy);
1630 strcpy(tar_file_copy, archive_name_array_filename);
1631 strtolower_ar(tar_file_copy);
1632 if (0 == strcmp(tar_file_copy, file_or_folder_to_process_copy))
1633 {
1634 strcpy(warning_message_k, "Cannot add himself to the tar(VAL) file, skipping...");
1636 return;
1637 }
1638
1639 if (my_VAL_data.VAL_filename_dl)
1640 {
1641 assert(0 && "cannot be allocated at this point");
1642 }
1643
1644 my_VAL_data.VAL_filename_dl = calloc(strlen(girlfriend_name) + 4, 1);
1645
1646 strcpy(my_VAL_data.VAL_filename_dl, girlfriend_name);
1647
1648 // strcpy(my_VAL_data.VAL_filename, girlfriend_name);
1649 trocadordebackslashfrente((char *)girlfriend_name);
1650 assign_string(&st->orig_file_name, girlfriend_name);
1651 assign_string(&st->file_name, girlfriend_name);
1652 {
1653 int r_temp = size_of_WCHAR_mem_r(file_or_folder_to_process);
1654 WCHAR *ar_temp = (void *)malloc(r_temp);
1655 WCHAR *ar_temp2 = (void *)malloc(r_temp);
1656
1657 attributes = GetFileAttributesW(permissive_name_m_(amanda_asciitowide_1_(file_or_folder_to_process, ar_temp), ar_temp2));
1658
1659 free(ar_temp);
1660 free(ar_temp2);
1661 }
1662 if (INVALID_FILE_ATTRIBUTES == attributes)
1663 {
1665 sprintf(warning_message_k, "File %s has invalid attributes, skipping", file_or_folder_to_process);
1667 return;
1668 }
1669 if (attributes & FILE_ATTRIBUTE_DIRECTORY)
1670 {
1671 is_dir_ar = true;
1672 pedro_dprintf(-1, "is dir -> true\n");
1673 }
1674 else
1675 {
1676 if ((attributes & FILE_ATTRIBUTE_NORMAL) ||
1677 (attributes & FILE_ATTRIBUTE_READONLY) ||
1678 (attributes & FILE_ATTRIBUTE_HIDDEN) ||
1679 (attributes & FILE_ATTRIBUTE_ENCRYPTED) ||
1680 (attributes & FILE_ATTRIBUTE_COMPRESSED) ||
1681 (attributes & FILE_ATTRIBUTE_SYSTEM) ||
1682 (attributes & FILE_ATTRIBUTE_ARCHIVE))
1683 {
1684 my_VAL_data.VAL_attributes = attributes;
1685 pedro_dprintf(-1, "is dir -> false\n");
1686 }
1687 else
1688 {
1690 sprintf(warning_message_k, "File %s has invalid attributes, skipping...", file_or_folder_to_process);
1692 return;
1693 }
1694 }
1695
1696 if (true == is_dir_ar)
1697 {
1698 my_VAL_data.VAL_is_dir = true;
1700 {
1701 strcpy(filename_k_arp, st->file_name);
1702 }
1703
1704 if ('/' != st->file_name[strlen(st->file_name) - 1])
1705 {
1706 static char temp_ar[AMANDA__SIZE];
1707 strcpy(temp_ar, st->file_name);
1708 strcat(temp_ar, "/");
1709 assign_string(&st->file_name, temp_ar);
1710 assign_string(&st->orig_file_name, temp_ar);
1711 pedro_dprintf(-1, "pronto %s\n", st->file_name);
1712 }
1713 FILETIME lpCreationTime___jumior;
1714 FILETIME lpLastAccessTime_junior;
1715 FILETIME lpLastWriteTime__junior;
1716
1717 {
1718 int r_temp = size_of_WCHAR_mem_r(file_or_folder_to_process);
1719 WCHAR *ar_temp = (void *)malloc(r_temp);
1720 WCHAR *ar_temp2 = (void *)malloc(r_temp);
1721
1722 hFile =
1723 CreateFileW(permissive_name_m_(amanda_asciitowide_1_(file_or_folder_to_process, ar_temp), ar_temp2),
1724 /*
1725 GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
1726 NULL,
1727 OPEN_EXISTING,
1728 FILE_FLAG_BACKUP_SEMANTICS,
1729 NULL);
1730 */
1731 GENERIC_READ,
1732 FILE_SHARE_READ, NULL,
1733 OPEN_EXISTING,
1734 FILE_FLAG_BACKUP_SEMANTICS,
1735 NULL);
1736
1737 free(ar_temp);
1738 free(ar_temp2);
1739 }
1740
1741 if (INVALID_HANDLE_VALUE != hFile)
1742 {
1743 if (GetFileTime(
1744 hFile,
1745 &lpCreationTime___jumior,
1746 &lpLastAccessTime_junior,
1747 &lpLastWriteTime__junior))
1748 {
1749 my_VAL_data.CreationTime___junior = lpCreationTime___jumior;
1750 my_VAL_data.LastAccessTime_junior = lpLastAccessTime_junior;
1751 my_VAL_data.LastWriteTime__junior = lpLastWriteTime__junior;
1752
1753 {
1754 struct timespec t;
1755
1756 // ret_ar = 0;
1757 {
1758 __time64_t s_arp_3;
1759 get_timestamp_arp(/* already have permissive_name_m_ call */ file_or_folder_to_process, &s_arp_3, &my_VAL_data_copy_i);
1760
1761 t.tv_sec = s_arp_3;
1762 my_VAL_data.VAL_timestamp = s_arp_3;
1763 my_VAL_data.VAL_timestamp64 = s_arp_3;
1764 mtime_tv_sec_arp = t.tv_sec;
1765 t.tv_nsec = 0;
1766 st->atime = t;
1767 st->mtime = t;
1768 st->ctime = t;
1769 }
1770 }
1771 }
1772 else
1773 {
1774 pedro_dprintf(2, "Cannot access timestamp of %s", file_or_folder_to_process);
1775 }
1776
1777 CloseHandle(hFile);
1778 }
1779 else
1780 {
1781 pedro_dprintf(2, "%s: Cannot get filetime on folder\n", file_or_folder_to_process);
1782 }
1783
1785 {
1786 if (!mode_is_VAL_arp)
1787 {
1788 dump_directory(st); // Later we extend the Tar format to long paths...
1789 }
1790 else
1791 {
1792 // aqui
1794 {
1795 dump_diretory_VAL_arp(&my_VAL_data);
1796
1797 if (false == don_t_free_dl)
1798 {
1799 free(my_VAL_data.VAL_filename_dl);
1800 my_VAL_data.VAL_filename_dl = NULL;
1801 }
1802 }
1803 else
1804 {
1805 int r_temp = size_of_WCHAR_mem_r(file_or_folder_to_process);
1806 // SetCurrentDirectoryW(amanda_asciitowide_1_(initial_path_ar));
1807
1808 WCHAR *ar_temp = (void *)malloc(r_temp);
1809 WCHAR *ar_temp2 = (void *)malloc(r_temp);
1810 char *ar_temp3 = (void *)malloc(r_temp * 6);
1811
1812 libarchive_process_p_func((my_VAL_data.VAL_filename_dl), valquiria_wide_to_utf8(permissive_name_m_(amanda_asciitowide_1_(file_or_folder_to_process, ar_temp), ar_temp2), ar_temp3));
1813 // SetCurrentDirectoryW(amanda_path);
1814
1815 if (false == don_t_free_dl)
1816 {
1817 free(my_VAL_data.VAL_filename_dl);
1818 my_VAL_data.VAL_filename_dl = NULL;
1819 }
1820
1821 free(ar_temp);
1822 free(ar_temp2);
1823 free(ar_temp3);
1824 }
1825 }
1826 }
1828 {
1829 int found_arp = 0;
1830 char *temp_arp_1 = malloc(AMANDA__SIZE);
1831 char *temp_arp_2 = malloc(AMANDA__SIZE);
1832 char *temp_arp_3 = malloc(AMANDA__SIZE);
1833 int has_itens_is_amanda_update_internal = has_itens_is_amanda_update_internal_b_arp;
1836 trocadordebackslashfrente(filename_k_arp);
1837 strcpy(temp_arp_3, filename_k_arp);
1838 strtolower_ar(filename_k_arp);
1839
1840 while (has_itens_is_amanda_update_internal--)
1841 {
1843 strcpy(temp_arp_1, aak_ptr->filename_k);
1844 strtolower_ar(temp_arp_1);
1845
1846 if (0 == strcmp(temp_arp_1, filename_k_arp))
1847 {
1848 found_arp++;
1849 break;
1850 }
1851 aak_ptr = aak_ptr->next_ar;
1852 }
1853
1854 if (!found_arp)
1855 {
1856 if (0 == my_VAL_data.VAL_timestamp64)
1857 {
1858 my_VAL_data.VAL_timestamp64 = mtime_tv_sec_arp;
1859 }
1861 temp_arp_3,
1862 0,
1864 true,
1865 0,
1866 0,
1867 0,
1868 my_VAL_data.VAL_timestamp64,
1869 &my_VAL_data);
1870 don_t_free_dl = true;
1871 }
1872
1873 free(temp_arp_1), free(temp_arp_2), free(temp_arp_3);
1874 }
1875 }
1876 else
1877 {
1878 {
1879 void get_timestamp_arp(char *file_arp, __time64_t *s_arp, VAL_data *VAL_data_arp);
1880 __time64_t s_arp_3;
1881 {
1882 int r_temp = size_of_WCHAR_mem_r(file_or_folder_to_process);
1883 WCHAR *ar_temp = (void *)malloc(r_temp);
1884 WCHAR *ar_temp2 = (void *)malloc(r_temp);
1885 _wstat(permissive_name_m_(amanda_asciitowide_1_(file_or_folder_to_process, ar_temp), ar_temp2), &st->stat);
1886
1887 free(ar_temp);
1888 free(ar_temp2);
1889 }
1890 mtime_tv_sec_arp = st->mtime.tv_sec;
1891 get_timestamp_arp(file_or_folder_to_process, &s_arp_3, &my_VAL_data);
1892 mtime_tv_sec_arp = s_arp_3;
1893 st->atime.tv_sec = s_arp_3;
1894 st->atime.tv_nsec = 0;
1895 st->mtime.tv_sec = s_arp_3; // only this is relevant
1896 st->mtime.tv_nsec = 0;
1897 st->ctime.tv_sec = s_arp_3;
1898 st->ctime.tv_nsec = 0;
1899 my_VAL_data.VAL_timestamp = s_arp_3;
1900 my_VAL_data.VAL_timestamp64 = s_arp_3;
1901 my_VAL_data.VAL_file_size = getfilesize_ar(file_or_folder_to_process);
1902
1903 pedro_dprintf(-1, "size %lld\n", (int64_t)my_VAL_data.VAL_file_size);
1904
1905 my_VAL_data.VAL_is_dir = false;
1906 my_VAL_data.VAL_is_encrypted = false;
1908 {
1909 my_VAL_data.VAL_is_encrypted = true;
1910 my_VAL_data.VAL_file_size += 4 + 64 + 8;
1911 }
1912 }
1913
1915 {
1916 st->stat.st_size += 4 + 64 + 8; // magic value...
1917 }
1918
1919 st->archive_file_size = st->stat.st_size;
1920
1921 st->archive_file_size = my_VAL_data.VAL_file_size;
1922
1923 st->stat.st_size = my_VAL_data.VAL_file_size;
1924
1925 pedro_dprintf(-1, "2 size %lld\n", (int64_t)st->archive_file_size);
1926
1928 {
1929
1930#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
1931
1932 if (true == message_box_flag_m)
1933 {
1934 while (true)
1935 {
1936 Sleep(50);
1937 }
1938 }
1939 message_box_flag_m = true;
1940 mprintf___arp("Cannot encrypt or unencrypt files when not in 'full' DLL mode, exiting...");
1941 exit(27);
1942#endif
1944
1946 {
1947 my_VAL_data.VAL_encryption_method = ARP_AES;
1948 ret_arp_ = encrypt_arp(file_or_folder_to_process,
1951 ARP_AES,
1953 }
1955 {
1956 my_VAL_data.VAL_encryption_method = ARP_RC4;
1957 ret_arp_ = encrypt_arp(file_or_folder_to_process,
1960 ARP_RC4,
1962 }
1964 {
1965 my_VAL_data.VAL_encryption_method = ARP_SERPENT;
1966 ret_arp_ = encrypt_arp(file_or_folder_to_process,
1971 }
1973 {
1974 my_VAL_data.VAL_encryption_method = ARP_MARS;
1975 ret_arp_ = encrypt_arp(file_or_folder_to_process,
1978 ARP_MARS,
1980 }
1982 {
1983 my_VAL_data.VAL_encryption_method = ARP_RC6;
1984 ret_arp_ = encrypt_arp(file_or_folder_to_process,
1987 ARP_RC6,
1989 }
1991 {
1992 my_VAL_data.VAL_encryption_method = ARP_TWOFISH;
1993 ret_arp_ = encrypt_arp(file_or_folder_to_process,
1998 }
2000 {
2001 my_VAL_data.VAL_encryption_method = ARP_AES_MT;
2002 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2005 ARP_AES_MT,
2007 }
2009 {
2010 my_VAL_data.VAL_encryption_method = ARP_RC4_MT;
2011 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2014 ARP_RC4_MT,
2016 }
2018 {
2020 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2025 }
2027 {
2028 my_VAL_data.VAL_encryption_method = ARP_MARS_MT;
2029 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2034 }
2036 {
2037 my_VAL_data.VAL_encryption_method = ARP_RC6_MT;
2038 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2041 ARP_RC6_MT,
2043 }
2045 {
2047 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2052 }
2053 else
2054 {
2055 assert(0 && "Unsupported encryption method\n");
2056 }
2057
2058 {
2060 WCHAR *ar_temp = (void *)malloc(r_temp);
2061 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2062 fd_ar = _wopen(permissive_name_m_(amanda_asciitowide_1_(temp_encrypted_file_arp, ar_temp), ar_temp2), O_RDONLY | O_BINARY,
2063 _S_IREAD);
2064
2065 free(ar_temp);
2066 free(ar_temp2);
2067 }
2068 }
2069 else
2070 {
2071 int r_temp = size_of_WCHAR_mem_r(file_or_folder_to_process);
2072 WCHAR *ar_temp = (void *)malloc(r_temp);
2073 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2074
2075 fd_ar = _wopen(permissive_name_m_(amanda_asciitowide_1_(file_or_folder_to_process, ar_temp), ar_temp2), O_RDONLY | O_BINARY,
2076 _S_IREAD);
2077
2078 free(ar_temp);
2079 free(ar_temp2);
2080 }
2081
2082 if (-1 == fd_ar)
2083 {
2085 pedro_dprintf(2, "Error openning %s---\n", file_or_folder_to_process);
2086 }
2087
2089 {
2090 {
2091 int found_arp = 0;
2092 char *temp_arp_1 = malloc(AMANDA__SIZE);
2093 // char *temp_arp_2 = malloc(AMANDA__SIZE);
2094 char *temp_arp_3 = malloc(AMANDA__SIZE);
2095 int has_itens_is_amanda_update_internal = has_itens_is_amanda_update_internal_b_arp;
2098 strcpy(filename_k_arp, st->file_name);
2099 strcpy(temp_arp_3, filename_k_arp);
2100 strtolower_ar(filename_k_arp);
2101 while (has_itens_is_amanda_update_internal--)
2102 {
2104 strcpy(temp_arp_1, aak_ptr->filename_k);
2105 strtolower_ar(temp_arp_1);
2106
2107 if (0 == strcmp(temp_arp_1, filename_k_arp))
2108 {
2109 strcpy(aak_ptr->filename_k, "");
2110 found_arp++;
2111 break;
2112 }
2113 aak_ptr = aak_ptr->next_ar;
2114 }
2115
2116 if (1)
2117 {
2119 st->file_name,
2122 false,
2124 my_VAL_data.VAL_attributes,
2125 my_VAL_data.VAL_is_encrypted,
2126 my_VAL_data.VAL_timestamp64,
2127 &my_VAL_data);
2128 don_t_free_dl = true;
2129 }
2130 free(temp_arp_1), /* free(temp_arp_2),*/ free(temp_arp_3);
2131 }
2132 }
2133
2134 if (-1 == fd_ar)
2135 {
2137 {
2139 WCHAR *ar_temp = (void *)malloc(r_temp);
2140 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2142 free(ar_temp);
2143 free(ar_temp2);
2144 }
2145 pedro_dprintf(-1, "Cannot open size %d\n", strlen(file_or_folder_to_process));
2146 sprintf(warning_message_k, "Cannot open %s to write", file_or_folder_to_process);
2148 return;
2149 }
2150
2152 {
2153 if (!mode_is_VAL_arp)
2154 {
2155 pedro_dprintf(-1, "ddd\n");
2156 status = dump_regular_file(fd_ar, st);
2157 switch (status)
2158 {
2159 case dump_status_ok:
2160 case dump_status_short:;
2161 break;
2162
2163 case dump_status_fail:
2164
2165 sprintf(warning_message_k, "Cannot process file %s", file_or_folder_to_process);
2167
2168 break;
2169
2171 assert(0);
2172 }
2173 }
2174 else
2175 {
2176
2177 // aqui
2179 {
2180 if (dump_regular_file_VAL_arp(fd_ar, &my_VAL_data))
2181 {
2182 sprintf(warning_message_k, "Cannot process file %s", file_or_folder_to_process);
2184 }
2185
2186 if (false == don_t_free_dl)
2187 {
2188 free(my_VAL_data.VAL_filename_dl);
2189 my_VAL_data.VAL_filename_dl = NULL;
2190 }
2191 }
2192 else
2193 {
2194 int r_temp = size_of_WCHAR_mem_r(file_or_folder_to_process);
2195 WCHAR *ar_temp = (void *)malloc(r_temp);
2196 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2197 char *ar_temp3 = (void *)malloc(r_temp * 6);
2198
2199 libarchive_process_p_func((my_VAL_data.VAL_filename_dl), valquiria_wide_to_utf8(permissive_name_m_(amanda_asciitowide_1_(file_or_folder_to_process, ar_temp), ar_temp2), ar_temp3));
2200
2201 if (false == don_t_free_dl)
2202 {
2203 free(my_VAL_data.VAL_filename_dl);
2204 my_VAL_data.VAL_filename_dl = NULL;
2205 }
2206
2207 free(ar_temp);
2208 free(ar_temp2);
2209 free(ar_temp3);
2210 }
2211 }
2212 }
2213
2214 close(fd_ar);
2215
2217 {
2219 WCHAR *ar_temp = (void *)malloc(r_temp);
2220 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2222 free(ar_temp);
2223 free(ar_temp2);
2224 }
2225
2227 {
2228 int salvou_arp = 0;
2229#define AMANDA_SIZE__ 500000
2230 char *buf_arp = malloc(AMANDA_SIZE__);
2231 assert(buf_arp);
2232
2233 int len_arp;
2235
2237 {
2238
2239#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
2240
2241 if (true == message_box_flag_m)
2242 {
2243 while (true)
2244 {
2245 Sleep(50);
2246 }
2247 }
2248 message_box_flag_m = true;
2249 mprintf___arp("Cannot encrypt or unencrypt files when not in 'full' DLL mode, exiting...");
2250 exit(27);
2251#endif
2252
2253 int64_t ricrdo_bytes_read_ = 0;
2254 update_progress_arp_func(&ricrdo_bytes_read_);
2255
2257 {
2258 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2261 ARP_AES,
2263 }
2265 {
2266 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2269 ARP_RC4,
2271 }
2273 {
2274 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2279 }
2281 {
2282 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2285 ARP_MARS,
2287 }
2289 {
2290 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2293 ARP_RC6,
2295 }
2297 {
2298 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2303 }
2305 {
2306 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2309 ARP_AES_MT,
2311 }
2313 {
2314 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2317 ARP_RC4_MT,
2319 }
2321 {
2322 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2327 }
2329 {
2330 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2335 }
2337 {
2338 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2341 ARP_RC6_MT,
2343 }
2345 {
2346 ret_arp_ = encrypt_arp(file_or_folder_to_process,
2351 }
2352 else
2353 {
2354 assert(0 && "Unsupported encryption method\n");
2355 }
2356
2357 {
2359 WCHAR *ar_temp = (void *)malloc(r_temp);
2360 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2361 fd_ar = _wopen(permissive_name_m_(amanda_asciitowide_1_(temp_encrypted_file_arp, ar_temp), ar_temp2), O_RDONLY | O_BINARY,
2362 _S_IREAD);
2363 free(ar_temp);
2364 free(ar_temp2);
2365 }
2366 }
2367 else
2368 {
2369 int r_temp = size_of_WCHAR_mem_r(file_or_folder_to_process);
2370 WCHAR *ar_temp = (void *)malloc(r_temp);
2371 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2372 fd_ar = _wopen(permissive_name_m_(amanda_asciitowide_1_(file_or_folder_to_process, ar_temp), ar_temp2), O_RDONLY | O_BINARY,
2373 _S_IREAD);
2374 free(ar_temp);
2375 free(ar_temp2);
2376 }
2377 if (-1 != fd_ar)
2378 {
2379 while (0 < (len_arp = read(fd_ar, buf_arp, AMANDA_SIZE__)))
2380 {
2381 if (0 > len_arp) // it is not redundant? maybe...
2382 {
2383 break;
2384 }
2385 salvou_arp += _write(
2387 buf_arp,
2388 len_arp);
2389 }
2390
2391 free(buf_arp);
2392 close(fd_ar);
2393 }
2395 {
2397 WCHAR *ar_temp = (void *)malloc(r_temp);
2398 WCHAR *ar_temp2 = (void *)malloc(r_temp);
2400 free(ar_temp);
2401 free(ar_temp2);
2402 }
2403 }
2404 }
2406 {
2407 // aqui name
2408 if (use_name_i)
2409 {
2410 sprintf(process_message_k, "Processing %s", girlfriend_name);
2411 }
2412 else
2413 sprintf(process_message_k, "Processing %s", file_or_folder_to_process);
2415 }
2416}
2417
2418#include "iso_support_arp.c"
2419#include "update_arp_k.c"
2420
2432void dump_file_new_ar(struct tar_stat_info *parent, char const *name, char *initial_path_ar)
2433{
2434 struct tar_stat_info st;
2435 tar_stat_init(&st);
2436 st.parent = parent;
2437 dump_file_or_folder(&st, name, initial_path_ar);
2438 tar_stat_destroy(&st);
2439}
2440
2450{
2451 struct tar_stat_info st;
2452 tar_stat_init(&st);
2453 st.parent = parent;
2455 tar_stat_destroy(&st);
2456}
2457
2458/* Write the EOT block(s). Zero at least two blocks, through the end
2459 of the record. Old tar, as previous versions of GNU tar, writes
2460 garbage after two zeroed blocks. */
2461
2466void write_eot(void)
2467{
2468 union block *pointer = find_next_block();
2469 memset(pointer->buffer, 0, BLOCKSIZE);
2470 set_next_block_after(pointer);
2471 pointer = find_next_block();
2472 memset(pointer->buffer, 0, available_space_after(pointer));
2473 set_next_block_after(pointer);
2474}
2475
2493bool strmatch(char str[], char pattern[], int n, int m)
2494{
2495 // empty pattern can only match with
2496 // empty string
2497 if (m == 0)
2498 return (n == 0);
2499
2500 // lookup table for storing results of
2501 // subproblems
2502 bool lookup[n + 1][m + 1];
2503
2504 // initailze lookup table to false
2505 memset(lookup, false, sizeof(lookup));
2506
2507 // empty pattern can match with empty string
2508 lookup[0][0] = true;
2509
2510 // Only '*' can match with empty string
2511 for (int j = 1; j <= m; j++)
2512 if (pattern[j - 1] == '*')
2513 lookup[0][j] = lookup[0][j - 1];
2514
2515 // fill the table in bottom-up fashion
2516 for (int i = 1; i <= n; i++)
2517 {
2518 for (int j = 1; j <= m; j++)
2519 {
2520 // Two cases if we see a '*'
2521 // a) We ignore ‘*’ character and move
2522 // to next character in the pattern,
2523 // i.e., ‘*’ indicates an empty sequence.
2524 // b) '*' character matches with ith
2525 // character in input
2526 if (pattern[j - 1] == '*')
2527 lookup[i][j] = lookup[i][j - 1] || lookup[i - 1][j];
2528
2529 // Current characters are considered as
2530 // matching in two cases
2531 // (a) current character of pattern is '?'
2532 // (b) characters actually match
2533 else if (pattern[j - 1] == '?' || str[i - 1] == pattern[j - 1])
2534 lookup[i][j] = lookup[i - 1][j - 1];
2535
2536 // If characters don't match
2537 else
2538 lookup[i][j] = false;
2539 }
2540 }
2541
2542 return lookup[n][m];
2543}
2544
2547
2560void fix_path_ar(char *initial_path, char *composed_path, char *exit_path_ar)
2561{
2562 char temp_ar[1024];
2563 strcpy(temp_ar, &composed_path[strlen(initial_path) + 1]);
2564 strcpy(exit_path_ar, temp_ar);
2565}
2566
2569
2585bool EnumerateFolder(char *lpcszFolder_ar, __attribute__((unused)) int first_call, bool only_get_number_of_files_ar)
2586{
2587 char *szDir = malloc(AMANDA__SIZE);
2588 char *lpcszFolder = malloc(AMANDA__SIZE);
2589
2590 strcpy(lpcszFolder, lpcszFolder_ar);
2591 trocadordebackslashtras(lpcszFolder);
2592
2593 if (strlen(lpcszFolder))
2594 {
2595 if ('\\' == lpcszFolder[strlen(lpcszFolder) - 1])
2596 {
2597 lpcszFolder[strlen(lpcszFolder) - 1] = 0;
2598 }
2599 }
2600
2601 memset(fixo_path_ar, 0, sizeof(fixo_path_ar));
2602 strcpy(fixo_path_ar, lpcszFolder);
2603
2604 if (2 == strlen(lpcszFolder))
2605 {
2606 if (':' == fixo_path_ar[1])
2607 {
2608 goto ok_ar_v27;
2609 }
2610 }
2611
2612 if (':' == fixo_path_ar[1] && '\\' == fixo_path_ar[2])
2613 {
2614 goto ok_ar_v27;
2615 }
2616
2617 if ('\\' == fixo_path_ar[0] && '\\' == fixo_path_ar[1])
2618 {
2619 goto ok_ar_v27;
2620 }
2621
2622 fatal_exit_k = 101;
2623 strcpy(error_message_k, "Invalid path");
2624
2625 free(szDir);
2626 free(lpcszFolder);
2627
2628 return false;
2629
2630ok_ar_v27:;
2631
2632 only_get_number_of_files_ar_v27 = only_get_number_of_files_ar;
2633
2636 false);
2637
2638 free(szDir);
2639 free(lpcszFolder);
2640
2641 return true;
2642}
2643
2644#ifdef WIN64
2645#define MYCAST __int64
2646#else
2647#define MYCAST int
2648#endif
2649
2652
2655char patern__ar[20000];
2657int __stdcall create_archive_internal_ar(char *tar_filename_ar, char *path_with_the_files_ar, char *patern_ar);
2658
2659int __stdcall startapi(int parameter);
2660
2661int __stdcall set_compression_level_p(char *level_m)
2662{
2663
2664 parolin_compression_level_p = atoi(level_m);
2665
2667 {
2669 }
2670
2672 {
2674 }
2675
2676 return 27;
2677}
2705int __stdcall create_archive_ar_v2(char *tar_filename_ar,
2706 char *path_with_the_files_ar,
2707 char *patern_ar,
2708 int compression_mode_external_ar,
2709 int recurse_in_subfolders_arp,
2710 enum mode_is_include_or_exclude the__patern_ar__mode)
2711{
2712 if (AMANDA__SIZE < strlen(tar_filename_ar)) // aqui?...
2713 {
2714 running_update = 0;
2715 return 2;
2716 }
2717 if (AMANDA__SIZE < strlen(path_with_the_files_ar))
2718 {
2719 running_update = 0;
2720 return 2;
2721 }
2722 if (19999 < strlen(patern_ar))
2723 {
2724 running_update = 0;
2725 return 2;
2726 }
2727 if (running_ar)
2728 {
2729 running_update = 0;
2730 return 1;
2731 }
2732 mode_is_include_or_exclude__ = the__patern_ar__mode;
2734 if (recurse_in_subfolders_arp)
2735 {
2737 }
2738 mode_is_parolin_p = true;
2739 return create_archive_ar(tar_filename_ar, path_with_the_files_ar, patern_ar, compression_mode_external_ar);
2740}
2741
2789int __stdcall libarchive_create_archive_ar_v2(char *tar_filename_ar,
2790 char *path_with_the_files_ar,
2791 char *patern_ar,
2792 int compression_mode_external_ar,
2793 int recurse_in_subfolders_arp,
2794 enum mode_is_include_or_exclude the__patern_ar__mode,
2795 char * /* for your pleasure... */ compression_level_p_)
2796{
2797
2798#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
2799
2800 if (true == message_box_flag_m)
2801 {
2802 while (true)
2803 {
2804 Sleep(50);
2805 }
2806 }
2807 message_box_flag_m = true;
2808 mprintf___arp("Cannot use libarchive when not in 'full' DLL mode, exiting...");
2809 exit(27);
2810#endif
2811
2812 if (MAX_PATH < strlen(tar_filename_ar))
2813 {
2815 running_update = 0;
2816 return 2;
2817 }
2818 if (MAX_PATH < strlen(path_with_the_files_ar))
2819 {
2821 running_update = 0;
2822 return 2;
2823 }
2824
2825 if (19999 < strlen(patern_ar))
2826 {
2828 running_update = 0;
2829 return 2;
2830 }
2831
2832 if (running_ar)
2833 {
2834 running_update = 0;
2835 return 1;
2836 }
2837
2838 mode_is_include_or_exclude__ = the__patern_ar__mode;
2840 if (recurse_in_subfolders_arp)
2841 {
2843 }
2844
2845 compression_mode_p = compression_mode_external_ar;
2846 mode_is_parolin_p = false;
2847
2849
2850 strcpy(compression_level_p, compression_level_p_);
2851
2852 return create_archive_ar(tar_filename_ar, path_with_the_files_ar, patern_ar, AAKP_MODE_VAL);
2853}
2854
2859int __stdcall create_archive_ar(char *tar_filename_ar,
2860 char *path_with_the_files_ar,
2861 char *patern_ar,
2862 int compression_mode_external_ar)
2863{
2864 if (AMANDA__SIZE < strlen(tar_filename_ar))
2865 {
2866 running_update = 0;
2867 return 2;
2868 }
2869 if (AMANDA__SIZE < strlen(path_with_the_files_ar))
2870 {
2871 running_update = 0;
2872 return 2;
2873 }
2874 if (19999 < strlen(patern_ar))
2875 {
2876 running_update = 0;
2877 return 2;
2878 }
2879 if (running_ar)
2880 {
2881 running_update = 0;
2882 return 1;
2883 }
2884
2885 pedro_dprintf(0, "entrou");
2886 running_ar = 1;
2887 running_update = 0;
2888 strcpy(tar_filename__ar, tar_filename_ar);
2889 strcpy(path_with_the_files__ar, path_with_the_files_ar);
2890 strcpy(patern__ar, patern_ar);
2891 compression_mode_ar = compression_mode_external_ar;
2892
2893 HANDLE myhandle;
2894 MYCAST ThreadId;
2895 MYCAST parameter = 1;
2896
2897 myhandle = CreateThread((LPSECURITY_ATTRIBUTES)0, // nao agora...amor...
2898 (SIZE_T)0,
2899 (void *)startapi,
2900 (LPVOID)parameter,
2901 (DWORD)0,
2902 (LPDWORD)&ThreadId);
2903
2904 CloseHandle(myhandle);
2905 return 0;
2906}
2907
2917int __stdcall startapi(__attribute__((unused)) int parameter)
2918{
2919
2920 {
2922 }
2923
2924 if (0 == return_value_ar)
2925 {
2926 pedro_dprintf(0, "vai chamar\n");
2928 }
2929
2930 // remove_temp_folder_i();
2931
2932 mode_is_parolin_p = true;
2933 use_name_i = false;
2934 running_ar = 0;
2936 return 0;
2937}
2938
2945int __stdcall GetStatus_ar(void)
2946{
2947 if (2 == (running_ar + running_update)) // hack as usual...
2948 {
2949 return 1;
2950 }
2951 return running_ar + running_update;
2952}
2953
2960int __stdcall GetReturnValue_ar(void)
2961{
2962 return return_value_ar;
2963}
2964
2970int getpor_10000(int max, int fatia)
2971{
2972 double maxa;
2973 double fatiaa;
2974 maxa = (double)max;
2975 fatiaa = (double)fatia;
2976 if (max == 0 || fatia == 0)
2977 {
2978 return 0;
2979 }
2980 maxa = ((double)10000 / maxa * fatiaa);
2981 return (int)maxa;
2982}
2983
2991int __stdcall GetProgress_ar(void)
2992{
2993 int val_ar;
2994
2996 {
2998 {
2999
3000#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3001
3002 if (true == message_box_flag_m)
3003 {
3004 while (true)
3005 {
3006 Sleep(50);
3007 }
3008 }
3009 message_box_flag_m = true;
3010 mprintf___arp("Cannot encrypt or unencrypt files when not in 'full' DLL mode, exiting...");
3011 exit(27);
3012#endif
3013
3014 if (0 == first_step)
3015 {
3017 }
3018 else
3019 {
3020 val_ar = 5000 + (internal_progress_z() / 2);
3021 }
3022 }
3023 else
3024 {
3026 }
3027
3028 if (0 > val_ar)
3029 {
3030 val_ar = 0;
3031 }
3032
3033 if (10000 < val_ar)
3034 {
3035 val_ar = 10000;
3036 }
3037
3038 return val_ar;
3039 }
3041 {
3042
3043#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3044
3045 if (true == message_box_flag_m)
3046 {
3047 while (true)
3048 {
3049 Sleep(50);
3050 }
3051 }
3052 message_box_flag_m = true;
3053 mprintf___arp("Cannot use gzip files when not in 'full' DLL mode, exiting...");
3054 exit(27);
3055#endif
3056
3057 if (0 == first_step)
3058 {
3060 {
3061 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3062 (double)3.33333)),
3064 }
3065 else
3066 {
3068 }
3069 if (0 > val_ar)
3070 {
3071 val_ar = 0;
3072 }
3073
3074 if (10000 < val_ar)
3075 {
3076 val_ar = 10000;
3077 }
3078
3079 return val_ar;
3080 }
3081 else
3082 {
3084 {
3086 {
3087 if (1 == first_step)
3088 {
3089 val_ar = 3333 + ((int)(double)((double)GetProgress_gzip_ar_func() * (double)33.3333));
3090 }
3091 else
3092 {
3093 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3094 }
3095 }
3096 else
3097 {
3098 val_ar = 5000 + (GetProgress_gzip_ar_func() * 50);
3099 }
3100 if (0 > val_ar)
3101 {
3102 val_ar = 0;
3103 }
3104
3105 if (10000 < val_ar)
3106 {
3107 val_ar = 10000;
3108 }
3109
3110 return val_ar;
3111 }
3112 return 0;
3113 }
3114 }
3116 {
3117
3118#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3119
3120 if (true == message_box_flag_m)
3121 {
3122 while (true)
3123 {
3124 Sleep(50);
3125 }
3126 }
3127 message_box_flag_m = true;
3128 mprintf___arp("Cannot use gzip2 files when not in 'full' DLL mode, exiting...");
3129 exit(27);
3130#endif
3131
3132 if (0 == first_step)
3133 {
3135 {
3136 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3137 (double)3.0)),
3139 }
3140 else
3141 {
3143 }
3144
3145 if (0 > val_ar)
3146 {
3147 val_ar = 0;
3148 }
3149
3150 if (10000 < val_ar)
3151 {
3152 val_ar = 10000;
3153 }
3154
3155 return val_ar;
3156 }
3157 else
3158 {
3160 {
3162 {
3163 if (1 == first_step)
3164 {
3165 val_ar = 3333 + ((int)(double)((double)get_progress_g2___ar_func() / (double)3.0));
3166 }
3167 else
3168 {
3169 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3170 }
3171 }
3172 else
3173 {
3174 val_ar = 5000 + (get_progress_g2___ar_func() / 2);
3175 }
3176 if (0 > val_ar)
3177 {
3178 val_ar = 0;
3179 }
3180
3181 if (10000 < val_ar)
3182 {
3183 val_ar = 10000;
3184 }
3185
3186 return val_ar;
3187 }
3188 return 0;
3189 }
3190 }
3192 {
3193
3194#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3195
3196 if (true == message_box_flag_m)
3197 {
3198 while (true)
3199 {
3200 Sleep(50);
3201 }
3202 }
3203 message_box_flag_m = true;
3204 mprintf___arp("Cannot use lzip files when not in 'full' DLL mode, exiting...");
3205 exit(27);
3206#endif
3207
3208 if (0 == first_step)
3209 {
3211 {
3212 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3213 (double)3.0)),
3215 }
3216 else
3217 {
3219 }
3220 if (0 > val_ar)
3221 {
3222 val_ar = 0;
3223 }
3224
3225 if (10000 < val_ar)
3226 {
3227 val_ar = 10000;
3228 }
3229
3230 return val_ar;
3231 }
3232 else
3233 {
3235 {
3237 {
3238 if (1 == first_step)
3239 {
3240 val_ar = 3333 + ((int)(double)((double)get_progress_lzip_ar_func() / (double)3.0));
3241 }
3242 else
3243 {
3244 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3245 }
3246 }
3247 else
3248 {
3249 val_ar = 5000 + (get_progress_lzip_ar_func() / 2);
3250 }
3251 pedro_dprintf(-1, "prog %d\n", get_progress_lzip_ar_func());
3252 if (0 > val_ar)
3253 {
3254 val_ar = 0;
3255 }
3256
3257 if (10000 < val_ar)
3258 {
3259 val_ar = 10000;
3260 }
3261
3262 return val_ar;
3263 }
3264 return 0;
3265 }
3266 }
3268 {
3269
3270#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3271
3272 if (true == message_box_flag_m)
3273 {
3274 while (true)
3275 {
3276 Sleep(50);
3277 }
3278 }
3279 message_box_flag_m = true;
3280 mprintf___arp("Cannot use lzma files when not in 'full' DLL mode, exiting...");
3281 exit(27);
3282#endif
3283
3284 if (0 == first_step)
3285 {
3287 {
3288 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3289 (double)3.0)),
3291 }
3292 else
3293 {
3295 }
3296
3297 if (0 > val_ar)
3298 {
3299 val_ar = 0;
3300 }
3301
3302 if (10000 < val_ar)
3303 {
3304 val_ar = 10000;
3305 }
3306
3307 return val_ar;
3308 }
3309 else
3310 {
3312 {
3314 {
3315 if (1 == first_step)
3316 {
3317 val_ar = 3333 + ((int)(double)((double)get_progress_lzma_ar_func() / (double)3.0));
3318 }
3319 else
3320 {
3321 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3322 }
3323 }
3324 else
3325 {
3326 val_ar = 5000 + (get_progress_lzma_ar_func() / 2);
3327 }
3328 pedro_dprintf(-1, "prog %d\n", get_progress_lzma_ar_func());
3329 if (0 > val_ar)
3330 {
3331 val_ar = 0;
3332 }
3333
3334 if (10000 < val_ar)
3335 {
3336 val_ar = 10000;
3337 }
3338
3339 return val_ar;
3340 }
3341 return 0;
3342 }
3343 }
3345 {
3346
3347#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3348
3349 if (true == message_box_flag_m)
3350 {
3351 while (true)
3352 {
3353 Sleep(50);
3354 }
3355 }
3356 message_box_flag_m = true;
3357 mprintf___arp("Cannot use xz files when not in 'full' DLL mode, exiting...");
3358 exit(27);
3359#endif
3360
3361 if (0 == first_step)
3362 {
3364 {
3365 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3366 (double)3.0)),
3368 }
3369 else
3370 {
3372 }
3373
3374 if (0 > val_ar)
3375 {
3376 val_ar = 0;
3377 }
3378
3379 if (10000 < val_ar)
3380 {
3381 val_ar = 10000;
3382 }
3383
3384 return val_ar;
3385 }
3386 else
3387 {
3389 {
3391 {
3392 if (1 == first_step)
3393 {
3394 val_ar = 3333 + ((int)(double)((double)get_progress_xz___ar_func() / (double)3.0));
3395 }
3396 else
3397 {
3398 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3399 }
3400 }
3401 else
3402 {
3403 val_ar = 5000 + (get_progress_xz___ar_func() / 2);
3404 }
3405
3406 pedro_dprintf(-1, "prog %d\n", get_progress_xz___ar_func());
3407 if (0 > val_ar)
3408 {
3409 val_ar = 0;
3410 }
3411
3412 if (10000 < val_ar)
3413 {
3414 val_ar = 10000;
3415 }
3416
3417 return val_ar;
3418 }
3419 return 0;
3420 }
3421 }
3423 {
3424
3425#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3426
3427 if (true == message_box_flag_m)
3428 {
3429 while (true)
3430 {
3431 Sleep(50);
3432 }
3433 }
3434 message_box_flag_m = true;
3435 mprintf___arp("Cannot use compress files when not in 'full' DLL mode, exiting...");
3436 exit(27);
3437#endif
3438
3439 if (0 == first_step)
3440 {
3442 {
3443 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3444 (double)3.0)),
3446 }
3447 else
3448 {
3450 }
3451 if (0 > val_ar)
3452 {
3453 val_ar = 0;
3454 }
3455
3456 if (10000 < val_ar)
3457 {
3458 val_ar = 10000;
3459 }
3460
3461 return val_ar;
3462 }
3463 else
3464 {
3466 {
3468 {
3469 if (1 == first_step)
3470 {
3471 val_ar = 3333 + ((int)(double)((double)get_progress_co___ar_func() / (double)3.0));
3472 }
3473 else
3474 {
3475 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3476 }
3477 }
3478 else
3479 {
3480 val_ar = 5000 + (get_progress_co___ar_func() / 2);
3481 }
3482
3483 pedro_dprintf(-1, "prog %d\n", get_progress_co___ar_func());
3484 if (0 > val_ar)
3485 {
3486 val_ar = 0;
3487 }
3488
3489 if (10000 < val_ar)
3490 {
3491 val_ar = 10000;
3492 }
3493
3494 return val_ar;
3495 }
3496 return 0;
3497 }
3498 }
3500 {
3501
3502#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3503
3504 if (true == message_box_flag_m)
3505 {
3506 while (true)
3507 {
3508 Sleep(50);
3509 }
3510 }
3511 message_box_flag_m = true;
3512 mprintf___arp("Cannot use lzop2 files when not in 'full' DLL mode, exiting...");
3513 exit(27);
3514#endif
3515
3516 if (0 == first_step)
3517 {
3519 {
3520 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3521 (double)3.0)),
3523 }
3524 else
3525 {
3527 }
3528
3529 if (0 > val_ar)
3530 {
3531 val_ar = 0;
3532 }
3533
3534 if (10000 < val_ar)
3535 {
3536 val_ar = 10000;
3537 }
3538
3539 return val_ar;
3540 }
3541 else
3542 {
3544 {
3546 {
3547 if (1 == first_step)
3548 {
3549 val_ar = 3333 + ((int)(double)((double)get_progress_ju___ar_func() / (double)3.0));
3550 }
3551 else
3552 {
3553 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3554 }
3555 }
3556 else
3557 {
3558 val_ar = 5000 + (get_progress_ju___ar_func() / 2);
3559 }
3560
3561 pedro_dprintf(-1, "prog %d\n", get_progress_ju___ar_func());
3562 if (0 > val_ar)
3563 {
3564 val_ar = 0;
3565 }
3566
3567 if (10000 < val_ar)
3568 {
3569 val_ar = 10000;
3570 }
3571
3572 return val_ar;
3573 }
3574 return 0;
3575 }
3576 }
3578 {
3579
3580#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3581
3582 if (true == message_box_flag_m)
3583 {
3584 while (true)
3585 {
3586 Sleep(50);
3587 }
3588 }
3589 message_box_flag_m = true;
3590 mprintf___arp("Cannot use lz4 files when not in 'full' DLL mode, exiting...");
3591 exit(27);
3592#endif
3593
3594 if (0 == first_step)
3595 {
3597 {
3598 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3599 (double)3.0)),
3601 }
3602 else
3603 {
3605 }
3606
3607 if (0 > val_ar)
3608 {
3609 val_ar = 0;
3610 }
3611
3612 if (10000 < val_ar)
3613 {
3614 val_ar = 10000;
3615 }
3616
3617 return val_ar;
3618 }
3619 else
3620 {
3622 {
3624 {
3625 if (1 == first_step)
3626 {
3627 val_ar = 3333 + ((int)(double)((double)get_progress_l4___ar_func() / (double)3.0));
3628 }
3629 else
3630 {
3631 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3632 }
3633 }
3634 else
3635 {
3636 val_ar = 5000 + (get_progress_l4___ar_func() / 2);
3637 }
3638
3639 pedro_dprintf(-1, "prog %d\n", get_progress_l4___ar_func());
3640 if (0 > val_ar)
3641 {
3642 val_ar = 0;
3643 }
3644
3645 if (10000 < val_ar)
3646 {
3647 val_ar = 10000;
3648 }
3649
3650 return val_ar;
3651 }
3652 return 0;
3653 }
3654 }
3656 {
3657
3658#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3659
3660 if (true == message_box_flag_m)
3661 {
3662 while (true)
3663 {
3664 Sleep(50);
3665 }
3666 }
3667 message_box_flag_m = true;
3668 mprintf___arp("Cannot use zstandard files when not in 'full' DLL mode, exiting...");
3669 exit(27);
3670#endif
3671
3672 if (0 == first_step)
3673 {
3675 {
3676 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3677 (double)3.0)),
3679 }
3680 else
3681 {
3683 }
3684
3685 if (0 > val_ar)
3686 {
3687 val_ar = 0;
3688 }
3689
3690 if (10000 < val_ar)
3691 {
3692 val_ar = 10000;
3693 }
3694
3695 return val_ar;
3696 }
3697 else
3698 {
3700 {
3702 {
3703 if (1 == first_step)
3704 {
3705 val_ar = 3333 + ((int)(double)((double)get_progress_zs___ar_func() / (double)3.0));
3706 }
3707 else
3708 {
3709 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3710 }
3711 }
3712 else
3713 {
3714 val_ar = 5000 + (get_progress_zs___ar_func() / 2);
3715 }
3716
3717 pedro_dprintf(-1, "prog %d\n", get_progress_zs___ar_func());
3718 if (0 > val_ar)
3719 {
3720 val_ar = 0;
3721 }
3722
3723 if (10000 < val_ar)
3724 {
3725 val_ar = 10000;
3726 }
3727
3728 return val_ar;
3729 }
3730 return 0;
3731 }
3732 }
3734 {
3735
3736#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3737
3738 if (true == message_box_flag_m)
3739 {
3740 while (true)
3741 {
3742 Sleep(50);
3743 }
3744 }
3745 message_box_flag_m = true;
3746 mprintf___arp("Cannot use brotli files when not in 'full' DLL mode, exiting...");
3747 exit(27);
3748#endif
3749
3750 if (0 == first_step)
3751 {
3753 {
3754 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3755 (double)3.0)),
3757 }
3758 else
3759 {
3761 }
3762
3763 if (0 > val_ar)
3764 {
3765 val_ar = 0;
3766 }
3767
3768 if (10000 < val_ar)
3769 {
3770 val_ar = 10000;
3771 }
3772
3773 return val_ar;
3774 }
3775 else
3776 {
3778 {
3780 {
3781 if (1 == first_step)
3782 {
3783 val_ar = 3333 + ((int)(double)((double)get_progress_br___ar_func() / (double)3.0));
3784 }
3785 else
3786 {
3787 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3788 }
3789 }
3790 else
3791 {
3792 val_ar = 5000 + (get_progress_br___ar_func() / 2);
3793 }
3794
3795 pedro_dprintf(-1, "prog %d\n", get_progress_br___ar_func());
3796 if (0 > val_ar)
3797 {
3798 val_ar = 0;
3799 }
3800
3801 if (10000 < val_ar)
3802 {
3803 val_ar = 10000;
3804 }
3805
3806 return val_ar;
3807 }
3808 return 0;
3809 }
3810 }
3812 {
3813
3814#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3815
3816 if (true == message_box_flag_m)
3817 {
3818 while (true)
3819 {
3820 Sleep(50);
3821 }
3822 }
3823 message_box_flag_m = true;
3824 mprintf___arp("Cannot use bzip2 files when not in 'full' DLL mode, exiting...");
3825 exit(27);
3826#endif
3827
3828 if (0 == first_step)
3829 {
3831 {
3832 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3833 (double)3.0)),
3835 }
3836 else
3837 {
3839 }
3840
3841 if (0 > val_ar)
3842 {
3843 val_ar = 0;
3844 }
3845
3846 if (10000 < val_ar)
3847 {
3848 val_ar = 10000;
3849 }
3850
3851 return val_ar;
3852 }
3853 else
3854 {
3856 {
3858 {
3859 if (1 == first_step)
3860 {
3861 val_ar = 3333 + ((int)(double)((double)((double)GetProgress_bzip2_ar_func() *
3862 (double)100.0) /
3863 (double)3.0));
3864 }
3865 else
3866 {
3867 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3868 }
3869 }
3870 else
3871 {
3872 val_ar = 5000 + (GetProgress_bzip2_ar_func() * 50);
3873 }
3874
3875 if (0 > val_ar)
3876 {
3877 val_ar = 0;
3878 }
3879
3880 if (10000 < val_ar)
3881 {
3882 val_ar = 10000;
3883 }
3884
3885 return val_ar;
3886 }
3887 return 0;
3888 }
3889 }
3890
3892 {
3893
3894#if 0x0 == AMANDA_MODE
3895
3896 if (true == message_box_flag_m)
3897 {
3898 while (true)
3899 {
3900 Sleep(50);
3901 }
3902 }
3903 message_box_flag_m = true;
3904 mprintf___arp("Cannot use bzip3 files when in 'basic' DLL mode, exiting...");
3905 exit(27);
3906#endif
3907
3908 if (0 == first_step)
3909 {
3911 {
3912
3913#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3914
3915 if (true == message_box_flag_m)
3916 {
3917 while (true)
3918 {
3919 Sleep(50);
3920 }
3921 }
3922 message_box_flag_m = true;
3923 mprintf___arp("Cannot encrypt or unencrypt files when not in 'full' DLL mode, exiting...");
3924 exit(27);
3925#endif
3926
3927 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
3928 (double)3.0)),
3930 }
3931 else
3932 {
3934 }
3935
3936 if (0 > val_ar)
3937 {
3938 val_ar = 0;
3939 }
3940
3941 if (10000 < val_ar)
3942 {
3943 val_ar = 10000;
3944 }
3945
3946 return val_ar;
3947 }
3948 else
3949 {
3951 {
3953 {
3954
3955#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
3956
3957 if (true == message_box_flag_m)
3958 {
3959 while (true)
3960 {
3961 Sleep(50);
3962 }
3963 }
3964 message_box_flag_m = true;
3965 mprintf___arp("Cannot encrypt or unencrypt files when not in 'full' DLL mode, exiting...");
3966 exit(27);
3967#endif
3968
3969 if (1 == first_step)
3970 {
3971 val_ar = 3333 + ((int)(double)((double)get_progress_b3___ar_func() / (double)3.0));
3972 }
3973 else
3974 {
3975 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
3976 }
3977 }
3978 else
3979 {
3980 val_ar = 5000 + (get_progress_b3___ar_func() / 2);
3981 }
3982
3983 if (0 > val_ar)
3984 {
3985 val_ar = 0;
3986 }
3987
3988 if (10000 < val_ar)
3989 {
3990 val_ar = 10000;
3991 }
3992
3993 return val_ar;
3994 }
3995 return 0;
3996 }
3997 }
3998
4000 {
4001
4002#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4003
4004 if (true == message_box_flag_m)
4005 {
4006 while (true)
4007 {
4008 Sleep(50);
4009 }
4010 }
4011 message_box_flag_m = true;
4012 mprintf___arp("Cannot use lzop2 files when not in 'full' DLL mode, exiting...");
4013 exit(27);
4014#endif
4015
4016 if (0 == first_step)
4017 {
4019 {
4020 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
4021 (double)3.0)),
4023 }
4024 else
4025 {
4027 }
4028
4029 if (0 > val_ar)
4030 {
4031 val_ar = 0;
4032 }
4033
4034 if (10000 < val_ar)
4035 {
4036 val_ar = 10000;
4037 }
4038
4039 return val_ar;
4040 }
4041 else
4042 {
4044 {
4046 {
4047 if (1 == first_step)
4048 {
4049 val_ar = 3333 + ((int)(double)((double)get_progress_l3___ar_func() / (double)3.0));
4050 }
4051 else
4052 {
4053 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
4054 }
4055 }
4056 else
4057 {
4058 val_ar = 5000 + (get_progress_l3___ar_func() / 2);
4059 }
4060
4061 if (0 > val_ar)
4062 {
4063 val_ar = 0;
4064 }
4065
4066 if (10000 < val_ar)
4067 {
4068 val_ar = 10000;
4069 }
4070
4071 return val_ar;
4072 }
4073 return 0;
4074 }
4075 }
4076
4078 {
4079
4080#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4081
4082 if (true == message_box_flag_m)
4083 {
4084 while (true)
4085 {
4086 Sleep(50);
4087 }
4088 }
4089 message_box_flag_m = true;
4090 mprintf___arp("Cannot use lz5 files when not in 'full' DLL mode, exiting...");
4091 exit(27);
4092#endif
4093
4094 if (0 == first_step)
4095 {
4097 {
4098 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
4099 (double)3.0)),
4101 }
4102 else
4103 {
4105 }
4106
4107 if (0 > val_ar)
4108 {
4109 val_ar = 0;
4110 }
4111
4112 if (10000 < val_ar)
4113 {
4114 val_ar = 10000;
4115 }
4116
4117 return val_ar;
4118 }
4119 else
4120 {
4122 {
4124 {
4125 if (1 == first_step)
4126 {
4127 val_ar = 3333 + ((int)(double)((double)get_progress_l5___ar_func() / (double)3.0));
4128 }
4129 else
4130 {
4131 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
4132 }
4133 }
4134 else
4135 {
4136 val_ar = 5000 + (get_progress_l5___ar_func() / 2);
4137 }
4138
4139 if (0 > val_ar)
4140 {
4141 val_ar = 0;
4142 }
4143
4144 if (10000 < val_ar)
4145 {
4146 val_ar = 10000;
4147 }
4148
4149 return val_ar;
4150 }
4151 return 0;
4152 }
4153 }
4154
4156 {
4157
4158#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4159
4160 if (true == message_box_flag_m)
4161 {
4162 while (true)
4163 {
4164 Sleep(50);
4165 }
4166 }
4167 message_box_flag_m = true;
4168 mprintf___arp("Cannot use brotli2 files when not in 'full' DLL mode, exiting...");
4169 exit(27);
4170#endif
4171
4172 if (0 == first_step)
4173 {
4175 {
4176 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
4177 (double)3.0)),
4179 }
4180 else
4181 {
4183 }
4184
4185 if (0 > val_ar)
4186 {
4187 val_ar = 0;
4188 }
4189
4190 if (10000 < val_ar)
4191 {
4192 val_ar = 10000;
4193 }
4194
4195 return val_ar;
4196 }
4197 else
4198 {
4200 {
4202 {
4203 if (1 == first_step)
4204 {
4205 val_ar = 3333 + ((int)(double)((double)get_progress_bb___ar_func() / (double)3.0));
4206 }
4207 else
4208 {
4209 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
4210 }
4211 }
4212 else
4213 {
4214 val_ar = 5000 + (get_progress_bb___ar_func() / 2);
4215 }
4216
4217 if (0 > val_ar)
4218 {
4219 val_ar = 0;
4220 }
4221
4222 if (10000 < val_ar)
4223 {
4224 val_ar = 10000;
4225 }
4226
4227 return val_ar;
4228 }
4229 return 0;
4230 }
4231 }
4232
4234 {
4235
4236#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4237
4238 if (true == message_box_flag_m)
4239 {
4240 while (true)
4241 {
4242 Sleep(50);
4243 }
4244 }
4245 message_box_flag_m = true;
4246 mprintf___arp("Cannot use compress2 files when not in 'full' DLL mode, exiting...");
4247 exit(27);
4248#endif
4249
4250 if (0 == first_step)
4251 {
4253 {
4254 val_ar = getpor_10000_int64_t_ar((int64_t)((double)((double)amanda_pereira_total_size *
4255 (double)3.0)),
4257 }
4258 else
4259 {
4261 }
4262
4263 if (0 > val_ar)
4264 {
4265 val_ar = 0;
4266 }
4267
4268 if (10000 < val_ar)
4269 {
4270 val_ar = 10000;
4271 }
4272
4273 return val_ar;
4274 }
4275 else
4276 {
4278 {
4280 {
4281 if (1 == first_step)
4282 {
4283 val_ar = 3333 + ((int)(double)((double)get_progress_c5___ar_func() / (double)3.0));
4284 }
4285 else
4286 {
4287 val_ar = 6666 + ((int)(double)((double)internal_progress_z() / (double)3.0));
4288 }
4289 }
4290 else
4291 {
4292 val_ar = 5000 + (get_progress_c5___ar_func() / 2);
4293 }
4294
4295 if (0 > val_ar)
4296 {
4297 val_ar = 0;
4298 }
4299
4300 if (10000 < val_ar)
4301 {
4302 val_ar = 10000;
4303 }
4304
4305 return val_ar;
4306 }
4307 return 0;
4308 }
4309 }
4310
4312 {
4313
4314 assert(0 && "Cannot handle iso anymore in Parolin, only libarchive");
4315 /*
4316 if (global_ptr_our_map_arp)
4317 {
4318 static int old_value_arp = 0;
4319
4320 if (time_point_arp < (int) GetTickCount())
4321 {
4322 time_point_arp = GetTickCount() + 50;
4323 old_value_arp = global_ptr_our_map_arp->progress_arp;
4324 return old_value_arp;
4325 }
4326 return old_value_arp;
4327 }
4328 */
4329
4330 return 0;
4331 }
4332 else
4333 {
4334 pedro_dprintf(2, "Invalid format, file: %s, line: %d\n", __FILE__, __LINE__);
4335 assert(0 && "see debugview");
4336 exit(27);
4337 }
4338 return 0;
4339}
4340
4348int __stdcall Pause_ar(void)
4349{
4350
4351#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4352
4354 {
4355 // pause_b3___aakp_b3___ar_func();
4356 }
4357
4358 return 0;
4359
4360#endif
4361
4363 {
4365 /*
4366 PauseCompress_bzip2_ar_func();
4367 pause_lzip_aakp_lzip_ar_func();
4368 pause_lzma_aakp_lzma_ar_func();
4369 pause_xz___aakp_xz___ar_func();
4370 pause_co___aakp_co___ar_func();
4371 pause_ju___aakp_ju___ar_func();
4372 pause_l4___aakp_l4___ar_func();
4373 pause_zs___aakp_zs___ar_func();
4374 pause_br___aakp_br___ar_func();
4375 pause_g2___aakp_g2___ar_func();
4376 pause_b3___aakp_b3___ar_func();
4377 pause_l3___aakp_l3___ar_func();
4378 pause_l5___aakp_l5___ar_func();
4379 pause_bb___aakp_bb___ar_func();
4380 pause_c5___aakp_c5___ar_func();
4381 */
4382 }
4383
4386
4387 extract_pause__flag = true;
4388
4389 pause_flag_ar = 1;
4390
4392 {
4394 }
4395
4396 return 0;
4397}
4398
4405int __stdcall Resume_ar(void)
4406{
4407 pedro_dprintf(0, "-99.777");
4408#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4409
4411 {
4412 // resume_b3___aakp_b3___ar_func();
4413 }
4414 return 0;
4415
4416#endif
4417
4419 {
4421 /*
4422 ResumeCompress_bzip2_ar_func();
4423 resume_lzip_aakp_lzip_ar_func();
4424 resume_lzma_aakp_lzma_ar_func();
4425 resume_xz___aakp_xz___ar_func();
4426 resume_co___aakp_co___ar_func();
4427 resume_ju___aakp_ju___ar_func();
4428 resume_l4___aakp_l4___ar_func();
4429 resume_zs___aakp_zs___ar_func();
4430 resume_br___aakp_br___ar_func();
4431 resume_g2___aakp_g2___ar_func();
4432 resume_b3___aakp_b3___ar_func();
4433 resume_l3___aakp_l3___ar_func();
4434 resume_l5___aakp_l5___ar_func();
4435 resume_bb___aakp_bb___ar_func();
4436 resume_c5___aakp_c5___ar_func();
4437 */
4438 }
4439
4442
4443 extract_pause__flag = false;
4444
4446 {
4448 }
4449 pause_flag_ar = 0;
4450
4451 return 0;
4452}
4453
4460int __stdcall Cancel_ar(void)
4461{
4462
4463 pedro_dprintf(0, "-99.");
4464#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4465
4467 {
4468 // cancel_b3___aakp_b3___ar_func();
4469 }
4470 return 0;
4471
4472#endif
4474 {
4476 /*
4477 CancelCompress_bzip2_ar_func();
4478 cancel_lzip_aakp_lzip_ar_func();
4479 cancel_lzma_aakp_lzma_ar_func();
4480 cancel_xz___aakp_xz___ar_func();
4481 cancel_co___aakp_co___ar_func();
4482 cancel_ju___aakp_ju___ar_func();
4483 cancel_l4___aakp_l4___ar_func();
4484 cancel_zs___aakp_zs___ar_func();
4485 cancel_br___aakp_br___ar_func();
4486 cancel_g2___aakp_g2___ar_func();
4487 cancel_b3___aakp_b3___ar_func();
4488 cancel_l3___aakp_l3___ar_func();
4489 cancel_l5___aakp_l5___ar_func();
4490 cancel_bb___aakp_bb___ar_func();
4491 cancel_c5___aakp_c5___ar_func();
4492 */
4493 }
4494 pedro_dprintf(0, "-99.1");
4496 pedro_dprintf(0, "-99.2");
4498 pedro_dprintf(0, "-99.3");
4499 extract_cancel_flag = true;
4500
4502 {
4504 }
4505 pedro_dprintf(0, "-99.4");
4506 pause_flag_ar = 0;
4507 strcpy(error_message_k, "User cancel");
4508 fatal_exit_k = 27;
4509 return 0;
4510}
4511
4521void __fastcall clean_up_update_ARP(void)
4522{
4524 {
4525 mode_is_update_arp = false;
4527 {
4530 }
4531 if (-1 != our_update_file_open__arp)
4532 {
4535 }
4536 if (strlen(update_filename_arp))
4537 {
4539 WCHAR *ar_temp = (void *)malloc(r_temp);
4540 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4541
4542 _wunlink(permissive_name_m_(amanda_asciitowide_1_(update_filename_arp, ar_temp), ar_temp2));
4543
4544 free(ar_temp);
4545 free(ar_temp2);
4546 }
4547 }
4548}
4549
4556{
4558}
4559
4567int __stdcall get_cannot_read_warnings(void)
4568{
4569
4570 int ret_val_i;
4573
4574 return ret_val_i;
4575}
4581bool check_valid_path_i(char *data_i)
4582{
4583
4584 if (4 > strlen(data_i))
4585 {
4586
4587 if (3 != strlen(data_i))
4588 {
4589 return false;
4590 }
4591
4592 if (('a' <= tolower(data_i[0]) && 'z' >= tolower(data_i[0])) && (':' == data_i[1]) && ('\\' == data_i[2] || '/' == data_i[2]))
4593 {
4594 return true;
4595 }
4596
4597 if (('\\' == data_i[0]) && ('\\' == data_i[1]))
4598 {
4599 return true;
4600 }
4601
4602 return false;
4603 }
4604
4605 if (('a' <= tolower(data_i[0]) && 'z' >= tolower(data_i[0])) && (':' == data_i[1]) && ('\\' == data_i[2] || '/' == data_i[2]))
4606 {
4607 return true;
4608 }
4609
4610 if (('\\' == data_i[0]) && ('\\' == data_i[1]))
4611 {
4612 return true;
4613 }
4614
4615 return false;
4616}
4617
4634int __stdcall create_archive_internal_ar(char *tar_filename_ar, char *path_with_the_files_ar, char *patern_ar)
4635{
4636 static int64_t bytes_read_p_amandinha;
4637 FILE *my_val_file_p;
4638 int64_t file_size_p;
4641 mode_is_VAL_arp = false;
4642 static char original_destination_tar_file[AMANDA__SIZE];
4643 static char copy_ar[AMANDA__SIZE];
4644 DWORD attributes;
4645 static char exit_data_ar[AMANDA__SIZE];
4646 bool delete_temp_folder_z = false;
4649 pedro_dprintf(0, "-9");
4650#if 0x0 == AMANDA_MODE
4651
4653 {
4654 ; //
4655 }
4656 else
4657 {
4658
4659 if (true == message_box_flag_m)
4660 {
4661 while (true)
4662 {
4663 Sleep(50);
4664 }
4665 }
4666 message_box_flag_m = true;
4667
4668 mprintf___arp("Cannot use compression files when not in 'full' or 'minimalist' DLL mode, exiting...");
4669 exit(27);
4670 }
4671
4672#endif
4673
4674#if 0x2 == AMANDA_MODE
4675
4677 {
4678 ; //
4679 }
4680 else
4681 {
4682
4683 if (true == message_box_flag_m)
4684 {
4685 while (true)
4686 {
4687 Sleep(50);
4688 }
4689 }
4690 message_box_flag_m = true;
4691 mprintf___arp("Cannot use compression other than bzip3 (minimalist) when not in 'full' DLL mode, exiting...");
4692 exit(27);
4693 }
4694
4695#endif
4696
4697 memset(original_destination_tar_file, 0, sizeof(original_destination_tar_file));
4698 memset(copy_ar, 0, sizeof(copy_ar));
4699 memset(exit_data_ar, 0, sizeof(exit_data_ar));
4700 pedro_dprintf(0, "-9.1");
4702 {
4703
4704#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
4705
4706 if (true == message_box_flag_m)
4707 {
4708 while (true)
4709 {
4710 Sleep(50);
4711 }
4712 }
4713 message_box_flag_m = true;
4714 mprintf___arp("Cannot use libarchive when not in 'full' DLL mode, exiting...");
4715 exit(27);
4716#endif
4717
4718 FILE *temp_file_i = NULL;
4719 FILE *writ_file_i = NULL;
4720
4721 int64_t remaining_i;
4722 int len_i;
4723
4724 char *buf_i;
4725
4726 static char temp_i[AMANDA__SIZE];
4727 static char temp_i_f[AMANDA__SIZE];
4728
4729 memset(temp_i, 0, sizeof(temp_i));
4730 memset(temp_i_f, 0, sizeof(temp_i_f));
4731
4733
4734 while (get_list_itens(exit_data_ar))
4735 {
4736 ;
4737 }
4738 pedro_dprintf(0, "0");
4739 dllinit_arp();
4740
4741 fatal_exit_k = 0;
4742 pedro_dprintf(0, "1");
4743 if (false == check_valid_path_i(tar_filename_ar))
4744 {
4745
4747 {
4749 mode_is_update_arp = false;
4750 }
4751
4752 strcpy(error_message_k, "Invalid file to create, cannot be relative");
4754 {
4756 WCHAR *ar_temp = (void *)malloc(r_temp);
4757 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4758
4759 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_file_update_i, ar_temp), ar_temp2));
4760
4761 free(ar_temp);
4762 free(ar_temp2);
4763 }
4764 return 1001;
4765 }
4766
4768 {
4769
4770 strcpy(error_message_k, "Cannot create temporary file");
4771 mode_is_VAL_arp = false;
4772
4774 {
4776 mode_is_update_arp = false;
4777 }
4778
4780 {
4782 WCHAR *ar_temp = (void *)malloc(r_temp);
4783 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4784
4785 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_file_update_i, ar_temp), ar_temp2));
4786
4787 free(ar_temp);
4788 free(ar_temp2);
4789 }
4790 return 30003;
4791 }
4792
4793 bytes_read_p_amandinha = 0;
4794 set_progress_p_func(&bytes_read_p_amandinha);
4795
4797
4798 if (1 == ret_arp_)
4799 {
4800 fatal_exit_k = 200001;
4801 strcpy(error_message_k, "Invalid compression mode for a libarchive format for the moment");
4802 // clean_up_update_ARP();
4803 mode_is_VAL_arp = false;
4804
4806 {
4808 mode_is_update_arp = false;
4809 }
4810
4812 {
4814 WCHAR *ar_temp = (void *)malloc(r_temp);
4815 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4816
4817 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_file_update_i, ar_temp), ar_temp2));
4818
4819 free(ar_temp);
4820 free(ar_temp2);
4821 }
4822 return fatal_exit_k;
4823 }
4824
4825 if (2 == ret_arp_)
4826 {
4827 fatal_exit_k = 200002;
4828 strcpy(error_message_k, "Missing the password for the zip compressed file (cannot be empty), click 'Options' and set the password");
4829 // clean_up_update_ARP();
4830 mode_is_VAL_arp = false;
4831
4833 {
4835 mode_is_update_arp = false;
4836 }
4837
4839 {
4841 WCHAR *ar_temp = (void *)malloc(r_temp);
4842 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4843
4844 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_file_update_i, ar_temp), ar_temp2));
4845
4846 free(ar_temp);
4847 free(ar_temp2);
4848 }
4849 return fatal_exit_k;
4850 }
4851
4852 if (3 == ret_arp_)
4853 {
4854 fatal_exit_k = 200003;
4855 strcpy(error_message_k, "Invalid compression level for this format");
4856 // clean_up_update_ARP();
4857 mode_is_VAL_arp = false;
4858
4860 {
4862 mode_is_update_arp = false;
4863 }
4865 {
4867 WCHAR *ar_temp = (void *)malloc(r_temp);
4868 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4869
4870 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_file_update_i, ar_temp), ar_temp2));
4871
4872 free(ar_temp);
4873 free(ar_temp2);
4874 }
4875 return fatal_exit_k;
4876 }
4877
4878 strcpy(temp_i, ar_gettemppath_z());
4879 strcat(temp_i, "d");
4880 {
4881 int r_temp = size_of_WCHAR_mem_r(temp_i);
4882 WCHAR *ar_temp = (void *)malloc(r_temp);
4883 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4884
4885 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_i, ar_temp), ar_temp2));
4886
4887 free(ar_temp);
4888 free(ar_temp2);
4889 }
4890 rspmakedir_v2(temp_i);
4891
4892 strcpy(temp_i_f, ar_gettemppath_z());
4893 strcat(temp_i_f, "a");
4894 {
4895 int r_temp = size_of_WCHAR_mem_r(temp_i_f);
4896 WCHAR *ar_temp = (void *)malloc(r_temp);
4897 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4898 if (!SetFileAttributesW(permissive_name_m_(
4899 amanda_asciitowide_1_(temp_i_f, ar_temp), ar_temp2),
4901 {
4902 ;
4903
4904 // exit(27);
4905 }
4906 free(ar_temp);
4907 free(ar_temp2);
4908 }
4909 {
4911 WCHAR *ar_temp = (void *)malloc(r_temp);
4912 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4913
4914 temp_file_i = _wfopen(permissive_name_m_(amanda_asciitowide_1_(temp_file_update_i, ar_temp), ar_temp2), L"rb");
4915
4916 free(ar_temp);
4917 free(ar_temp2);
4918 }
4919 if (NULL == temp_file_i)
4920 {
4922 fatal_exit_k = 300007;
4923 strcpy(error_message_k, "Cannot open temp file");
4924 goto exit_amanda;
4925 }
4926
4927 {
4929 int i_z;
4930
4932 for (i_z = 0; i_z < has_itens_is_amanda_update_june_24; i_z++)
4933 {
4934
4936
4937 if (my_ptr_ar->in_use_i)
4938 {
4939
4940 sprintf(process_message_k, "Processing %s", my_ptr_ar->item_entry_i);
4942
4943 if (my_ptr_ar->is_dir_i)
4944 {
4945 void TimetToFileTime(time_t t, LPFILETIME pft);
4946 // aqui amor...
4947
4948 {
4949 time_t s = my_ptr_ar->mtime_i;
4950
4951 if (!gmtime(&s))
4952 {
4953 s = time(NULL);
4954 }
4955
4956 HANDLE hFile;
4957 FILETIME ftime = {0};
4958 FILETIME ftime_in = {0};
4959 TimetToFileTime(s, &ftime_in);
4960 FileTimeToLocalFileTime(
4961 &ftime_in,
4962 &ftime);
4963 {
4964 int r_temp = size_of_WCHAR_mem_r(temp_i);
4965 WCHAR *ar_temp = (void *)malloc(r_temp);
4966 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4967
4968 hFile =
4969 CreateFileW(permissive_name_m_(amanda_asciitowide_1_(temp_i, ar_temp), ar_temp2),
4970 GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
4971 NULL,
4972 OPEN_EXISTING,
4973 FILE_FLAG_BACKUP_SEMANTICS,
4974 NULL);
4975
4976 free(ar_temp);
4977 free(ar_temp2);
4978 }
4979 if (INVALID_HANDLE_VALUE != hFile)
4980 {
4981 SetFileTime(hFile, &ftime_in, NULL, &ftime_in);
4982 CloseHandle(hFile);
4983 }
4984 }
4985 {
4986 int r_temp = size_of_WCHAR_mem_r(temp_i);
4987 WCHAR *ar_temp = (void *)malloc(r_temp);
4988 WCHAR *ar_temp2 = (void *)malloc(r_temp);
4989 char *ar_temp3 = (void *)malloc(r_temp * 6);
4991
4992 free(ar_temp);
4993 free(ar_temp2);
4994 free(ar_temp3);
4995 }
4996 }
4997 else
4998 {
4999 _fseeki64(
5000 temp_file_i,
5001 my_ptr_ar->file_offset_i,
5002 SEEK_SET);
5003 {
5004 int r_temp = size_of_WCHAR_mem_r(temp_i_f);
5005 WCHAR *ar_temp = (void *)malloc(r_temp);
5006 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5007
5008 writ_file_i = _wfopen(permissive_name_m_(amanda_asciitowide_1_(temp_i_f, ar_temp), ar_temp2), L"wb");
5009
5010 free(ar_temp);
5011 free(ar_temp2);
5012 }
5013 if (NULL == writ_file_i)
5014 {
5016 fatal_exit_k = 300008;
5017 strcpy(error_message_k, "Cannot open temp file to write");
5019 goto exit_amanda;
5020 }
5021 {
5022 buf_i = malloc((1 << 17));
5023 remaining_i = my_ptr_ar->filesize_i;
5024 while ((len_i = fread(buf_i, 1, min(remaining_i, (1 << 17)), temp_file_i)))
5025 {
5026
5027 fwrite(buf_i, 1, len_i, writ_file_i);
5028 remaining_i -= len_i;
5029 }
5030
5031 free(buf_i);
5032
5033 fclose(writ_file_i);
5034 }
5035
5036 {
5037 void TimetToFileTime(time_t t, LPFILETIME pft);
5038 time_t s = my_ptr_ar->mtime_i;
5039
5040 if (!gmtime(&s))
5041 {
5042 s = time(NULL);
5043 }
5044
5045 HANDLE hFile;
5046 FILETIME ftime = {0};
5047 FILETIME ftime_in = {0};
5048 TimetToFileTime(s, &ftime_in);
5049 FileTimeToLocalFileTime(
5050 &ftime_in,
5051 &ftime);
5052 {
5053 int r_temp = size_of_WCHAR_mem_r(temp_i_f);
5054 WCHAR *ar_temp = (void *)malloc(r_temp);
5055 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5056
5057 hFile =
5058 CreateFileW(permissive_name_m_(amanda_asciitowide_1_(temp_i_f, ar_temp), ar_temp2),
5059 GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
5060 NULL,
5061 OPEN_EXISTING,
5062 FILE_FLAG_BACKUP_SEMANTICS,
5063 NULL);
5064
5065 free(ar_temp);
5066 free(ar_temp2);
5067 }
5068 if (INVALID_HANDLE_VALUE != hFile)
5069 {
5070 SetFileTime(hFile, &ftime_in, NULL, &ftime_in);
5071 CloseHandle(hFile);
5072 }
5073 }
5074 {
5075 int r_temp = size_of_WCHAR_mem_r(temp_i_f);
5076 WCHAR *ar_temp = (void *)malloc(r_temp);
5077 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5078
5079 if (!SetFileAttributesW(permissive_name_m_(
5080 amanda_asciitowide_1_(temp_i_f, ar_temp), ar_temp2),
5081 my_ptr_ar->attributes_i))
5082 {
5083 ;
5084
5085 // exit(27);
5086 }
5087
5088 free(ar_temp);
5089 free(ar_temp2);
5090 }
5091 {
5092 int r_temp = size_of_WCHAR_mem_r(temp_i_f);
5093 WCHAR *ar_temp = (void *)malloc(r_temp);
5094 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5095 char *ar_temp3 = (void *)malloc(r_temp * 6);
5096
5098
5099 free(ar_temp);
5100 free(ar_temp2);
5101 free(ar_temp3);
5102 }
5103 {
5104 int r_temp = size_of_WCHAR_mem_r(temp_i_f);
5105 WCHAR *ar_temp = (void *)malloc(r_temp);
5106 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5107
5108 if (!SetFileAttributesW(
5109 permissive_name_m_(amanda_asciitowide_1_(temp_i_f, ar_temp), ar_temp2),
5111 {
5112 ;
5113
5114 // exit(27);
5115 }
5116
5117 free(ar_temp);
5118 free(ar_temp2);
5119 }
5120 }
5121 }
5122
5123 my_ptr_ar = my_ptr_ar->next_ar;
5124 }
5125 }
5126
5128
5129 if (1 == ret_arp_)
5130 {
5131 fatal_exit_k = 200007;
5132 strcpy(error_message_k, "Fatal error in the compression function, can be a wrong combination of the number of threads and compression level, please verify");
5133 }
5134 if (0 == ret_arp_)
5135 {
5136 {
5137 int r_temp = size_of_WCHAR_mem_r(tar_filename_ar);
5138 WCHAR *ar_temp = (void *)malloc(r_temp);
5139 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5140
5141 _wunlink(permissive_name_m_(amanda_asciitowide_1_(tar_filename_ar, ar_temp), ar_temp2));
5142
5143 free(ar_temp);
5144 free(ar_temp2);
5145 }
5146 {
5148 WCHAR *ar_temp = (void *)malloc(r_temprr1);
5149 WCHAR *ar_temp2 = (void *)malloc(r_temprr1);
5150 int r_temprr2 = size_of_WCHAR_mem_r(tar_filename_ar);
5151 WCHAR *ar_temp3 = (void *)malloc(r_temprr2);
5152 WCHAR *ar_temp4 = (void *)malloc(r_temprr2);
5153
5154 _wrename(permissive_name_m_(amanda_utf8towide_2_(archive_name_array_filename, ar_temp), ar_temp2), permissive_name_m_v27(amanda_asciitowide_1_(tar_filename_ar, ar_temp3), ar_temp4));
5155
5156 free(ar_temp);
5157 free(ar_temp2);
5158 free(ar_temp3);
5159 free(ar_temp4);
5160 }
5161 }
5162
5163 exit_amanda:;
5164
5165 mode_is_VAL_arp = false;
5166
5168 {
5170 mode_is_update_arp = false;
5171 }
5172
5174
5175 if (temp_file_i)
5176 {
5177 fclose(temp_file_i);
5178 }
5179
5180 {
5182 WCHAR *ar_temp = (void *)malloc(r_temp);
5183 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5184
5185 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_file_update_i, ar_temp), ar_temp2));
5186
5187 free(ar_temp);
5188 free(ar_temp2);
5189 }
5190
5191 if (writ_file_i)
5192 {
5193 fclose(writ_file_i);
5194 writ_file_i = NULL;
5195 }
5196 {
5197 int r_temp = size_of_WCHAR_mem_r(temp_i_f);
5198 WCHAR *ar_temp = (void *)malloc(r_temp);
5199 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5200
5201 _wunlink(permissive_name_m_(amanda_asciitowide_1_(temp_i_f, ar_temp), ar_temp2));
5202
5203 free(ar_temp);
5204 free(ar_temp2);
5205 }
5207 {
5208 int r_temp = size_of_WCHAR_mem_r(temp_i);
5209 WCHAR *ar_temp = (void *)malloc(r_temp);
5210 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5211
5212 RemoveDirectoryW(permissive_name_m_(amanda_asciitowide_1_(temp_i, ar_temp), ar_temp2));
5213
5214 free(ar_temp);
5215 free(ar_temp2);
5216 }
5217 return fatal_exit_k;
5218 }
5219 pedro_dprintf(0, "-9.2");
5220 while (get_list_itens(exit_data_ar))
5221 {
5222 ;
5223 }
5224 pedro_dprintf(0, "-9.21");
5225 if (false == check_valid_path_i(tar_filename_ar))
5226 {
5227
5229 {
5231 }
5232
5233 strcpy(error_message_k, "Invalid file to create, cannot be relative");
5234
5235 return 1001;
5236 }
5237 pedro_dprintf(0, "-9.22");
5238 if (false == check_valid_path_i(path_with_the_files_ar))
5239 {
5240
5242 {
5244 }
5245
5246 strcpy(error_message_k, "Invalid folder with files, cannot be relative");
5247
5248 return 1002;
5249 }
5250 pedro_dprintf(0, "-9.23");
5251 first_step = 0;
5252
5253 amanda_itens = 0;
5255 strncpy_z(global_patern_ar, patern_ar, 19999);
5256
5258 warning_flag = 0;
5259 pause_flag_ar = 0;
5260 files_count = 0;
5261 folders_count = 0;
5262 error_message_k[0] = 0;
5263
5266 record_index = 0;
5267 read_full_records = read_full_records_option;
5268 hit_eof = false;
5269 record_start_block = 0;
5270 error_message_k[0] = 0;
5271 pedro_dprintf(0, "-9.24");
5273 {
5274 fatal_exit_k = 0;
5276 {
5277 strcpy(error_message_k, "Cannot update already existent ISO file for the moment, only in the future");
5279 return 28001;
5280 }
5281 assert(0 && "Don't support ISO anymore, only in libarchive mode");
5282 return 0;
5283 }
5284 pedro_dprintf(0, "-9.25");
5286 {
5287 strcpy(archive_name_array_filename, tar_filename_ar);
5288 }
5289
5291 {
5292 pedro_dprintf(0, "-9.26");
5293 delete_temp_folder_z = true;
5294 strcpy(original_destination_tar_file, tar_filename_ar);
5296 {
5298 {
5300 }
5301
5302 strcpy(error_message_k, "Cannot create temporary file");
5303 return 30003;
5304 }
5305 pedro_dprintf(0, "-9.3");
5306 }
5307
5309 {
5310 delete_temp_folder_z = true;
5311 strcpy(original_destination_tar_file, tar_filename_ar);
5312
5314 {
5316 {
5318 }
5319
5320 strcpy(error_message_k, "Cannot create temporary file");
5321 return 30003;
5322 }
5323 }
5324
5326 {
5327 pedro_dprintf(0, "-9.261");
5328 delete_temp_folder_z = true;
5329 strcpy(original_destination_tar_file, tar_filename_ar);
5330
5332 {
5334 {
5336 }
5337
5338 strcpy(error_message_k, "Cannot create temporary file");
5339 return 30003;
5340 }
5341 mode_is_VAL_arp = true;
5342 }
5343
5345 {
5346 delete_temp_folder_z = true;
5347 strcpy(original_destination_tar_file, tar_filename_ar);
5348
5350 {
5352 {
5354 }
5355
5356 strcpy(error_message_k, "Cannot create temporary file");
5357 return 30003;
5358 }
5359
5360 mode_is_VAL_arp = true;
5361 }
5362
5364 {
5365 delete_temp_folder_z = true;
5366 strcpy(original_destination_tar_file, tar_filename_ar);
5367
5369 {
5371 {
5373 }
5374
5375 strcpy(error_message_k, "Cannot create temporary file");
5376 return 30003;
5377 }
5378 }
5379
5381 {
5382 delete_temp_folder_z = true;
5383 strcpy(original_destination_tar_file, tar_filename_ar);
5384
5386 {
5388 {
5390 }
5391
5392 strcpy(error_message_k, "Cannot create temporary file");
5393 return 30003;
5394 }
5395 mode_is_VAL_arp = true;
5396 }
5397
5399 {
5400 delete_temp_folder_z = true;
5401 strcpy(original_destination_tar_file, tar_filename_ar);
5402
5404 {
5406 {
5408 }
5409
5410 strcpy(error_message_k, "Cannot create temporary file");
5411 return 30003;
5412 }
5413 }
5414
5416 {
5417 delete_temp_folder_z = true;
5418 strcpy(original_destination_tar_file, tar_filename_ar);
5419
5421 {
5423 {
5425 }
5426
5427 strcpy(error_message_k, "Cannot create temporary file");
5428 return 30003;
5429 }
5430 mode_is_VAL_arp = true;
5431 }
5432
5434 {
5435 delete_temp_folder_z = true;
5436 strcpy(original_destination_tar_file, tar_filename_ar);
5437
5439 {
5441 {
5443 }
5444
5445 strcpy(error_message_k, "Cannot create temporary file");
5446 return 30003;
5447 }
5448 }
5449
5451 {
5452 delete_temp_folder_z = true;
5453 strcpy(original_destination_tar_file, tar_filename_ar);
5454
5456 {
5458 {
5460 }
5461
5462 strcpy(error_message_k, "Cannot create temporary file");
5463 return 30003;
5464 }
5465 mode_is_VAL_arp = true;
5466 }
5467
5469 {
5470 delete_temp_folder_z = true;
5471 strcpy(original_destination_tar_file, tar_filename_ar);
5472
5474 {
5476 {
5478 }
5479
5480 strcpy(error_message_k, "Cannot create temporary file");
5481 return 30003;
5482 }
5483 }
5484
5486 {
5487 delete_temp_folder_z = true;
5488 strcpy(original_destination_tar_file, tar_filename_ar);
5489
5491 {
5493 {
5495 }
5496
5497 strcpy(error_message_k, "Cannot create temporary file");
5498 return 30003;
5499 }
5500 mode_is_VAL_arp = true;
5501 }
5502
5504 {
5505 delete_temp_folder_z = true;
5506 strcpy(original_destination_tar_file, tar_filename_ar);
5507
5509 {
5511 {
5513 }
5514
5515 strcpy(error_message_k, "Cannot create temporary file");
5516 return 30003;
5517 }
5518 }
5519
5521 {
5522 delete_temp_folder_z = true;
5523 strcpy(original_destination_tar_file, tar_filename_ar);
5524
5526 {
5528 {
5530 }
5531
5532 strcpy(error_message_k, "Cannot create temporary file");
5533 return 30003;
5534 }
5535 mode_is_VAL_arp = true;
5536 }
5537
5539 {
5540 delete_temp_folder_z = true;
5541 strcpy(original_destination_tar_file, tar_filename_ar);
5542
5544 {
5546 {
5548 }
5549
5550 strcpy(error_message_k, "Cannot create temporary file");
5551 return 30003;
5552 }
5553 }
5555 {
5556 delete_temp_folder_z = true;
5557 strcpy(original_destination_tar_file, tar_filename_ar);
5558
5560 {
5562 {
5564 }
5565
5566 strcpy(error_message_k, "Cannot create temporary file");
5567 return 30003;
5568 }
5569 mode_is_VAL_arp = true;
5570 }
5571
5573 {
5574 delete_temp_folder_z = true;
5575 strcpy(original_destination_tar_file, tar_filename_ar);
5576
5578 {
5580 {
5582 }
5583
5584 strcpy(error_message_k, "Cannot create temporary file");
5585 return 30003;
5586 }
5587 }
5588
5590 {
5591 delete_temp_folder_z = true;
5592 strcpy(original_destination_tar_file, tar_filename_ar);
5593
5595 {
5597 {
5599 }
5600
5601 strcpy(error_message_k, "Cannot create temporary file");
5602 return 30003;
5603 }
5604 mode_is_VAL_arp = true;
5605 }
5606
5608 {
5609 delete_temp_folder_z = true;
5610 strcpy(original_destination_tar_file, tar_filename_ar);
5611
5613 {
5615 {
5617 }
5618
5619 strcpy(error_message_k, "Cannot create temporary file");
5620 return 30003;
5621 }
5622 }
5623
5625 {
5626 delete_temp_folder_z = true;
5627 strcpy(original_destination_tar_file, tar_filename_ar);
5628
5630 {
5632 {
5634 }
5635
5636 strcpy(error_message_k, "Cannot create temporary file");
5637 return 30003;
5638 }
5639 mode_is_VAL_arp = true;
5640 }
5642 {
5643 delete_temp_folder_z = true;
5644 strcpy(original_destination_tar_file, tar_filename_ar);
5645
5647 {
5649 {
5651 }
5652
5653 strcpy(error_message_k, "Cannot create temporary file");
5654 return 30003;
5655 }
5656 }
5657
5659 {
5660 delete_temp_folder_z = true;
5661 strcpy(original_destination_tar_file, tar_filename_ar);
5662
5664 {
5666 {
5668 }
5669
5670 strcpy(error_message_k, "Cannot create temporary file");
5671 return 30003;
5672 }
5673 mode_is_VAL_arp = true;
5674 }
5675
5677 {
5678 delete_temp_folder_z = true;
5679 strcpy(original_destination_tar_file, tar_filename_ar);
5680
5682 {
5684 {
5686 }
5687
5688 strcpy(error_message_k, "Cannot create temporary file");
5689 return 30003;
5690 }
5691 }
5692
5694 {
5695 delete_temp_folder_z = true;
5696 strcpy(original_destination_tar_file, tar_filename_ar);
5697
5699 {
5701 {
5703 }
5704
5705 strcpy(error_message_k, "Cannot create temporary file");
5706 return 30003;
5707 }
5708 mode_is_VAL_arp = true;
5709 }
5710
5712 {
5713 delete_temp_folder_z = true;
5714 strcpy(original_destination_tar_file, tar_filename_ar);
5715
5717 {
5719 {
5721 }
5722
5723 strcpy(error_message_k, "Cannot create temporary file");
5724 return 30003;
5725 }
5726 }
5727
5729 {
5730 delete_temp_folder_z = true;
5731 strcpy(original_destination_tar_file, tar_filename_ar);
5732
5734 {
5736 {
5738 }
5739
5740 strcpy(error_message_k, "Cannot create temporary file");
5741 return 30003;
5742 }
5743 mode_is_VAL_arp = true;
5744 }
5745
5747 {
5748 delete_temp_folder_z = true;
5749 strcpy(original_destination_tar_file, tar_filename_ar);
5750
5752 {
5754 {
5756 }
5757
5758 strcpy(error_message_k, "Cannot create temporary file");
5759 return 30003;
5760 }
5761 }
5762
5764 {
5765 delete_temp_folder_z = true;
5766 strcpy(original_destination_tar_file, tar_filename_ar);
5767
5769 {
5771 {
5773 }
5774
5775 strcpy(error_message_k, "Cannot create temporary file");
5776 return 30003;
5777 }
5778 mode_is_VAL_arp = true;
5779 }
5780
5782 {
5783 delete_temp_folder_z = true;
5784 strcpy(original_destination_tar_file, tar_filename_ar);
5785
5787 {
5789 {
5791 }
5792
5793 strcpy(error_message_k, "Cannot create temporary file");
5794 return 30003;
5795 }
5796 }
5797
5799 {
5800 delete_temp_folder_z = true;
5801 strcpy(original_destination_tar_file, tar_filename_ar);
5802
5804 {
5806 {
5808 }
5809
5810 strcpy(error_message_k, "Cannot create temporary file");
5811 return 30003;
5812 }
5813 mode_is_VAL_arp = true;
5814 }
5816 {
5817 delete_temp_folder_z = true;
5818 strcpy(original_destination_tar_file, tar_filename_ar);
5819
5821 {
5823 {
5825 }
5826
5827 strcpy(error_message_k, "Cannot create temporary file");
5828 return 30003;
5829 }
5830 }
5831
5833 {
5834 delete_temp_folder_z = true;
5835 strcpy(original_destination_tar_file, tar_filename_ar);
5836
5838 {
5840 {
5842 }
5843
5844 strcpy(error_message_k, "Cannot create temporary file");
5845 return 30003;
5846 }
5847 mode_is_VAL_arp = true;
5848 }
5849
5851 {
5852 mode_is_VAL_arp = true;
5853 strcpy(archive_name_array_filename, tar_filename_ar);
5854 }
5855
5856 else
5857 {
5858 assert(0 && "Unknown file format");
5859 exit(27);
5860 }
5861 pedro_dprintf(0, "-9.262");
5863 {
5864
5865#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
5866
5867 if (true == message_box_flag_m)
5868 {
5869 while (true)
5870 {
5871 Sleep(50);
5872 }
5873 }
5874 message_box_flag_m = true;
5875 mprintf___arp("Cannot encrypt or unencrypt files when not in 'full' DLL mode, exiting...");
5876 exit(27);
5877#endif
5878
5880 {
5882 {
5884 }
5885
5886 if (delete_temp_folder_z)
5887 {
5889 WCHAR *ar_temp = (void *)malloc(r_temp);
5890 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5891
5893
5894 free(ar_temp);
5895 free(ar_temp2);
5896 }
5897
5898 strcpy(error_message_k, "Cannot create temporary file");
5899 return 30003;
5900 }
5902 }
5903
5904 fatal_exit_k = 0;
5905
5906 archive = -1;
5907 {
5908 int r_temp = size_of_WCHAR_mem_r(path_with_the_files_ar);
5909 WCHAR *ar_temp = (void *)malloc(r_temp);
5910 WCHAR *ar_temp2 = (void *)malloc(r_temp);
5911
5912 attributes = GetFileAttributesW(permissive_name_m_(amanda_asciitowide_1_(path_with_the_files_ar, ar_temp), ar_temp2));
5913
5914 free(ar_temp);
5915 free(ar_temp2);
5916 }
5917 if (INVALID_FILE_ATTRIBUTES == attributes)
5918 {
5919 fatal_exit_k = 13;
5920 sprintf(copy_ar, "Path %s is invalid", path_with_the_files_ar);
5921 strcpy(error_message_k, copy_ar);
5923 mode_is_VAL_arp = false;
5924 return fatal_exit_k;
5925 }
5926 else
5927 {
5928 if ((attributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
5929 {
5930 fatal_exit_k = 14;
5931 sprintf(copy_ar, "Path %s is valid but not a directory", path_with_the_files_ar);
5932 strcpy(error_message_k, copy_ar);
5934 mode_is_VAL_arp = false;
5935 return fatal_exit_k;
5936 }
5937 }
5938 pedro_dprintf(0, "-9.264");
5939 dllinit_arp();
5940 pedro_dprintf(0, "-9.265");
5941 // pedro_dprintfW(0, L"amanda path %ls\n", amanda_path);
5942
5943 if (fatal_exit_k)
5944 {
5946 mode_is_VAL_arp = false;
5947 return fatal_exit_k;
5948 }
5949 pedro_dprintf(0, "-9.266");
5951 pedro_dprintf(0, "-9.267");
5952 if (fatal_exit_k)
5953 {
5954 snprintf(copy_ar, 600, " %d, %s\n", (int)fatal_exit_k, error_message_k);
5955 strcpy(error_message_k, copy_ar);
5956 if (-1 != archive)
5957 {
5958 close(archive);
5959 archive = -1;
5960 }
5962 mode_is_VAL_arp = false;
5963 return fatal_exit_k;
5964 }
5965
5966 if (!mode_is_parolin_p)
5967 {
5968
5969#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
5970
5971 if (true == message_box_flag_m)
5972 {
5973 while (true)
5974 {
5975 Sleep(50);
5976 }
5977 }
5978 message_box_flag_m = true;
5979 mprintf___arp("Cannot use libarchive when not in 'full' DLL mode, exiting...");
5980 exit(27);
5981#endif
5982
5983 if (-1 != archive)
5984 {
5985 close(archive);
5986 archive = -1;
5987 }
5988
5990
5992
5993 if (1 == ret_arp_)
5994 {
5995 fatal_exit_k = 200001;
5996 strcpy(error_message_k, "Invalid compression mode for a libarchive format for the moment");
5998 mode_is_VAL_arp = false;
5999 return fatal_exit_k;
6000 }
6001
6002 if (2 == ret_arp_)
6003 {
6004 fatal_exit_k = 200002;
6005 strcpy(error_message_k, "Missing the password for the zip compressed file (cannot be empty), click 'Options' and set the password");
6007 mode_is_VAL_arp = false;
6008 return fatal_exit_k;
6009 }
6010
6011 if (3 == ret_arp_)
6012 {
6013 fatal_exit_k = 200003;
6014 strcpy(error_message_k, "Invalid compression level for this format");
6016 mode_is_VAL_arp = false;
6017 return fatal_exit_k;
6018 }
6019 }
6020
6021 amanda_itens = 0;
6023 if (!mode_is_update_arp)
6024 {
6026 }
6027 else
6028 {
6030 }
6031
6032 if (mode_is_VAL_arp)
6033 {
6034 first_pass_VAL_p = true;
6035 }
6036 pedro_dprintf(0, "-9.3");
6037 EnumerateFolder(path_with_the_files_ar, 1, true);
6038 if (0 == fatal_exit_k)
6039 {
6040 EnumerateFolder(path_with_the_files_ar, 1, false);
6042 {
6046 {
6048 WCHAR *ar_temp = (void *)malloc(r_temp);
6049 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6050
6052 _S_IREAD);
6053
6054 free(ar_temp);
6055 free(ar_temp2);
6056 }
6057 if (-1 == our_update_file_open__arp)
6058 {
6059 fatal_exit_k = 10003;
6060 strcpy(error_message_k, "Cannot open temporary file to the update process");
6061 goto pula_arp;
6062 }
6064 }
6065 }
6066
6067pula_arp:;
6068 if (!mode_is_VAL_arp)
6069 {
6070 write_eot();
6071 }
6072
6073 close_archive();
6074 pedro_dprintf(0, "-9.31");
6075 if (!mode_is_parolin_p)
6076 {
6078
6079 if (1 == ret_arp_)
6080 {
6081
6082 fatal_exit_k = 200007;
6083 strcpy(error_message_k, "Fatal error in the compression function, can be a wrong combination of the number of threads and compression level, please verify");
6084 }
6085 }
6086
6087#define fseek _fseeki64
6088#define ftell _ftelli64
6089
6090 if (!mode_is_VAL_arp)
6091 {
6093 {
6094
6095#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
6096
6097 if (true == message_box_flag_m)
6098 {
6099 while (true)
6100 {
6101 Sleep(50);
6102 }
6103 }
6104 message_box_flag_m = true;
6105 mprintf___arp("Cannot encrypt or unencrypt files when not in 'full' DLL mode, exiting...");
6106 exit(27);
6107#endif
6108
6109 int64_t file_size_arp;
6110 FILE *amanda_file;
6112
6113 if (512 < file_size_arp)
6114 {
6115 {
6117 WCHAR *ar_temp = (void *)malloc(r_temp);
6118 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6119
6120 amanda_file = _wfopen(permissive_name_m_(amanda_asciitowide_1_(archive_name_array_filename, ar_temp), ar_temp2), L"rb+");
6121
6122 free(ar_temp);
6123 free(ar_temp2);
6124 }
6125 if (amanda_file)
6126 {
6128 {
6129 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6130 char buf_amanda[1];
6131 buf_amanda[0] = ARP_RC4;
6132 fwrite(buf_amanda, 1, 1, amanda_file);
6133 }
6135 {
6136 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6137 char buf_amanda[1];
6138 buf_amanda[0] = ARP_SERPENT;
6139 fwrite(buf_amanda, 1, 1, amanda_file);
6140 }
6142 {
6143 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6144 char buf_amanda[1];
6145 buf_amanda[0] = ARP_MARS;
6146 fwrite(buf_amanda, 1, 1, amanda_file);
6147 }
6149 {
6150 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6151 char buf_amanda[1];
6152 buf_amanda[0] = ARP_RC6;
6153 fwrite(buf_amanda, 1, 1, amanda_file);
6154 }
6156 {
6157 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6158 char buf_amanda[1];
6159 buf_amanda[0] = ARP_TWOFISH;
6160 fwrite(buf_amanda, 1, 1, amanda_file);
6161 }
6163 {
6164 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6165 char buf_amanda[1];
6166 buf_amanda[0] = ARP_AES_MT;
6167 fwrite(buf_amanda, 1, 1, amanda_file);
6168 }
6170 {
6171 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6172 char buf_amanda[1];
6173 buf_amanda[0] = ARP_RC4_MT;
6174 fwrite(buf_amanda, 1, 1, amanda_file);
6175 }
6177 {
6178 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6179 char buf_amanda[1];
6180 buf_amanda[0] = ARP_SERPENT_MT;
6181 fwrite(buf_amanda, 1, 1, amanda_file);
6182 }
6184 {
6185 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6186 char buf_amanda[1];
6187 buf_amanda[0] = ARP_MARS_MT;
6188 fwrite(buf_amanda, 1, 1, amanda_file);
6189 }
6191 {
6192 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6193 char buf_amanda[1];
6194 buf_amanda[0] = ARP_RC6_MT;
6195 fwrite(buf_amanda, 1, 1, amanda_file);
6196 }
6198 {
6199 fseek(amanda_file, file_size_arp - 5, SEEK_SET);
6200 char buf_amanda[1];
6201 buf_amanda[0] = ARP_TWOFISH_MT;
6202 fwrite(buf_amanda, 1, 1, amanda_file);
6203 }
6204
6205 fseek(amanda_file, file_size_arp - 4, SEEK_SET);
6206 fwrite("misl", 1, 4, amanda_file);
6207 fclose(amanda_file);
6208 }
6209 }
6210 }
6211 }
6212 pedro_dprintf(0, "-9.32");
6213 if (0 == fatal_exit_k)
6214 {
6215
6216 if (mode_is_parolin_p) // se nao for libarchive
6217 {
6218 if (mode_is_VAL_arp)
6219 {
6220 // aqui
6221
6223 {
6225 WCHAR *ar_temp = (void *)malloc(r_temp);
6226 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6227
6228 my_val_file_p = _wfopen(permissive_name_m_(amanda_asciitowide_1_(archive_name_array_filename, ar_temp), ar_temp2), L"rb+");
6229
6230 free(ar_temp);
6231 free(ar_temp2);
6232 }
6233 if (my_val_file_p)
6234 {
6235 _fseeki64(my_val_file_p, 24, SEEK_SET);
6236 fwrite(&file_size_p, 1, 8, my_val_file_p);
6237 fclose(my_val_file_p);
6238 }
6239 else
6240 {
6241 fatal_exit_k = 5117;
6242 strcpy(error_message_k, "Cannot write the file size in VAL file");
6243 }
6244 }
6245 }
6246 }
6247 pedro_dprintf(0, "-9.33");
6249 {
6250 ; // fascinante....
6251 first_step = 1;
6252 if (0 == fatal_exit_k)
6253 {
6255
6256 switch (fatal_exit_k)
6257 {
6258 case 0:
6259
6260 break;
6261 case 2:
6262 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
6263 break;
6264 case 3:
6265 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
6266 break;
6267 case 4:
6268 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
6269 break;
6270 case 8:
6271 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
6272 break;
6273 case 14:
6274 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
6275 break;
6276 case 19:
6277 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
6278 break;
6279 case 80:
6280 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
6281 break;
6282 case 81:
6283 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
6284 break;
6285 case 119:
6286 strcpy(error_message_k, "119 - User cancel");
6287 break;
6288 case 140:
6289 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
6290 break;
6291 case 160:
6292 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
6293 break;
6294 case 401:
6295 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
6296 break;
6297 case 402:
6298 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
6299 break;
6300 case 404:
6301 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
6302 break;
6303 case 430:
6304 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
6305 break;
6306 case 441:
6307 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
6308 break;
6309 default:
6310 break;
6311 }
6312 }
6313 else
6314 {
6316 WCHAR *ar_temp = (void *)malloc(r_temp);
6317 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6318
6320
6321 free(ar_temp);
6322 free(ar_temp2);
6323 }
6324 }
6326 {
6327 volatile int returnvalue_ar = 0;
6328 if (0 == fatal_exit_k)
6329 {
6330 first_step = 1;
6331 inittimer2(0);
6332
6334 {
6336 }
6338 {
6340 }
6341
6342 // CompressGzip_utf8_k UncompressGzip_utf8_k
6343 //
6345
6346 // pedro_dprintf(0, "-9.51 %p %p", GetFinished_gzip_ar_func, Compress_gzip_ar_func);
6347 while (0 == GetFinished_gzip_ar_func())
6348 {
6349 Sleep(5);
6350 }
6351 Sleep(5);
6352 // pedro_dprintf(0, "-9.6");
6353 // pedro_dprintf(SHOW_DEBUG_SPEED_Z, "gzip compressed required %.3f seconds\n", inittimer2(1));
6354 returnvalue_ar = GetReturnValue_gzip_ar_func();
6355 switch (returnvalue_ar)
6356 {
6357 case 0:;
6358 break;
6359
6360 case 7:
6361 fatal_exit_k = 52;
6362 strcpy(error_message_k, "Cannot open file to read");
6363 break;
6364
6365 case 8:
6366 fatal_exit_k = 51;
6367 strcpy(error_message_k, "Cannot open file to write");
6368 break;
6369
6370 case 14:
6371 fatal_exit_k = 54;
6372 strcpy(error_message_k, "Unable to write to output file");
6373 break;
6374
6375 case 19:
6376 fatal_exit_k = 119;
6377 strcpy(error_message_k, "User cancel");
6378 break;
6379
6380 default:
6381 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
6382 "not handled correctly by the programmer",
6383 returnvalue_ar);
6385 fatal_exit_k = returnvalue_ar;
6386 break;
6387 }
6388 }
6389 {
6391 WCHAR *ar_temp = (void *)malloc(r_temp);
6392 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6393
6395
6396 free(ar_temp);
6397 free(ar_temp2);
6398 }
6399 if (0 == fatal_exit_k)
6400 {
6401 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
6402
6403 switch (fatal_exit_k)
6404 {
6405 case 0:
6406
6407 break;
6408 case 2:
6409 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
6410 break;
6411 case 3:
6412 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
6413 break;
6414 case 4:
6415 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
6416 break;
6417 case 8:
6418 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
6419 break;
6420 case 14:
6421 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
6422 break;
6423 case 19:
6424 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
6425 break;
6426 case 80:
6427 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
6428 break;
6429 case 81:
6430 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
6431 break;
6432 case 119:
6433 strcpy(error_message_k, "119 - User cancel");
6434 break;
6435 case 140:
6436 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
6437 break;
6438 case 160:
6439 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
6440 break;
6441 case 401:
6442 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
6443 break;
6444 case 402:
6445 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
6446 break;
6447 case 404:
6448 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
6449 break;
6450 case 430:
6451 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
6452 break;
6453 case 441:
6454 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
6455 break;
6456 default:
6457 break;
6458 }
6459 }
6460 else
6461 {
6462 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
6463 WCHAR *ar_temp = (void *)malloc(r_temp);
6464 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6465
6466 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
6467
6468 free(ar_temp);
6469 free(ar_temp2);
6470 }
6471 }
6473 {
6474 double time_charli;
6475 volatile int returnvalue_ar = 0;
6476
6477 if (0 == fatal_exit_k)
6478 {
6479 first_step = 1;
6480 inittimer2(0);
6481 pedro_dprintf(-1, "na entrada é %d", threads_z_v27);
6482
6484
6486
6488 {
6490 }
6492 {
6494 }
6495 time_charli = get_bucaneiro_tick();
6496
6497 //compress_g2___rspk_ar_func == compress_g2___rspk_ar uncompress_g2___rspk_ar
6498 // zcompress_sha512_k__5
6500 original_destination_tar_file,
6504 yasmin_charlotte_pereira_dprintf(0, "tempo de compressao gzip2 %f", get_bucaneiro_tick() - time_charli);
6505 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "gzip2 compressed required %.3f seconds\n", inittimer2(1));
6506 switch (returnvalue_ar)
6507 {
6508 case 0:;
6509 break;
6510
6511 case 7:
6512 fatal_exit_k = 1407;
6513 strcpy(error_message_k, "Cannot open input file");
6514 break;
6515
6516 case 8:
6517 fatal_exit_k = 1408;
6518 strcpy(error_message_k, "Cannot open output file");
6519 break;
6520
6521 case 14:
6522 fatal_exit_k = 1409;
6523 strcpy(error_message_k, "Unable to write to output file");
6524 break;
6525
6526 case 16:
6527 fatal_exit_k = 1410;
6528 strcpy(error_message_k, "Unexpected error");
6529 break;
6530
6531 case 19:
6532 fatal_exit_k = 119;
6533 strcpy(error_message_k, "User cancel");
6534 break;
6535
6536 case 401:
6537 fatal_exit_k = 1395;
6538 strcpy(error_message_k, "Cannot create temp file");
6539 break;
6540
6541 case 402:
6542 fatal_exit_k = 1396;
6543 strcpy(error_message_k, "Cannot read from input file");
6544 break;
6545
6546 case 403:
6547 fatal_exit_k = 1397;
6548 strcpy(error_message_k, "File access error");
6549 break;
6550
6551 case 404:
6552 fatal_exit_k = 1398;
6553 strcpy(error_message_k, "Cannot open temp file");
6554 break;
6555
6556 case 527:
6557 fatal_exit_k = 1399;
6558 strcpy(error_message_k, "deflate() failed");
6559 break;
6560
6561 case 528:
6562 fatal_exit_k = 1423;
6563 strcpy(error_message_k, "inflate error Z_STREAM_END");
6564 break;
6565
6566 case 529:
6567 fatal_exit_k = 1425;
6568 strcpy(error_message_k, "inflate error Z_NEED_DICT");
6569 break;
6570
6571 case 530:
6572 fatal_exit_k = 1426;
6573 strcpy(error_message_k, "inflate error Z_STREAM_ERROR");
6574 break;
6575
6576 case 531:
6577 fatal_exit_k = 1427;
6578 strcpy(error_message_k, "inflate error Z_MEM_ERROR");
6579 break;
6580
6581 case 532:
6582 fatal_exit_k = 1428;
6583 strcpy(error_message_k, "inflate error Z_DATA_ERROR");
6584 break;
6585
6586 case 533:
6587 fatal_exit_k = 1429;
6588 strcpy(error_message_k, "inflate error Z_BUF_ERROR ;-) ");
6589 break;
6590
6591 case 534:
6592 fatal_exit_k = 1430;
6593 strcpy(error_message_k, "inflate error 'uknown'");
6594 break;
6595
6596 case 97001:
6597 fatal_exit_k = 97001;
6598 strcpy(error_message_k, "Cannot open required temp file");
6599 break;
6600
6601 default:
6602 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
6603 "not handled correctly by the programmer",
6604 returnvalue_ar);
6606 fatal_exit_k = returnvalue_ar;
6607 break;
6608 }
6609 }
6610 {
6612 WCHAR *ar_temp = (void *)malloc(r_temp);
6613 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6614
6616
6617 free(ar_temp);
6618 free(ar_temp2);
6619 }
6620 if (0 == fatal_exit_k)
6621 {
6622 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
6623
6624 switch (fatal_exit_k)
6625 {
6626 case 0:
6627
6628 break;
6629 case 2:
6630 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
6631 break;
6632 case 3:
6633 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
6634 break;
6635 case 4:
6636 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
6637 break;
6638 case 8:
6639 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
6640 break;
6641 case 14:
6642 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
6643 break;
6644 case 19:
6645 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
6646 break;
6647 case 80:
6648 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
6649 break;
6650 case 81:
6651 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
6652 break;
6653 case 119:
6654 strcpy(error_message_k, "119 - User cancel");
6655 break;
6656 case 140:
6657 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
6658 break;
6659 case 160:
6660 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
6661 break;
6662 case 401:
6663 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
6664 break;
6665 case 402:
6666 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
6667 break;
6668 case 404:
6669 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
6670 break;
6671 case 430:
6672 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
6673 break;
6674 case 441:
6675 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
6676 break;
6677 default:
6678 break;
6679 }
6680 }
6681 else
6682 {
6683 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
6684 WCHAR *ar_temp = (void *)malloc(r_temp);
6685 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6686
6687 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
6688
6689 free(ar_temp);
6690 free(ar_temp2);
6691 }
6692 }
6693
6695 {
6696 double time_charli;
6697 volatile int returnvalue_ar = 0;
6698
6699 if (0 == fatal_exit_k)
6700 {
6701 first_step = 1;
6702 inittimer2(0);
6703
6705
6706 if (1 > parolin_compression_level_p) // sacanagem
6707 {
6709 }
6710
6712 {
6714 }
6716 time_charli = get_bucaneiro_tick();
6717 // compress_b3___rspk_ar uncompress_b3___rspk_ar
6718 // bzip3compress_sha512_k bzip3uncompress
6720 original_destination_tar_file,
6724 yasmin_charlotte_pereira_dprintf(0, "tempo de compressao bzip3 %f", get_bucaneiro_tick() - time_charli);
6725 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "bzip3 compressed required %.3f seconds\n", inittimer2(1));
6726
6727 switch (returnvalue_ar)
6728 {
6729 case 0:;
6730 break;
6731
6732 case 23:
6733 fatal_exit_k = 1507;
6734 strcpy(error_message_k, "Input file read error");
6735 break;
6736
6737 case 107:
6738 fatal_exit_k = 1508;
6739 strcpy(error_message_k, "Cannot open input file");
6740 break;
6741
6742 case 108:
6743 fatal_exit_k = 1509;
6744 strcpy(error_message_k, "Cannot open output file");
6745 break;
6746
6747 case 109:
6748 fatal_exit_k = 1509;
6749 strcpy(error_message_k, "Cannot open output temp file");
6750 break;
6751
6752 case 114:
6753 fatal_exit_k = 1510;
6754 strcpy(error_message_k, "Cannot write to output file");
6755 break;
6756
6757 case 116:
6758 fatal_exit_k = 1511;
6759 strcpy(error_message_k, "Unexpected error");
6760 break;
6761
6762 case 119:
6763 fatal_exit_k = 1512;
6764 strcpy(error_message_k, "User cancel");
6765 break;
6766
6767 default:
6768 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
6769 "not handled correctly by the programmer",
6770 returnvalue_ar);
6772 fatal_exit_k = returnvalue_ar;
6773 break;
6774 }
6775 }
6776 {
6778 WCHAR *ar_temp = (void *)malloc(r_temp);
6779 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6780
6782
6783 free(ar_temp);
6784 free(ar_temp2);
6785 }
6786 if (0 == fatal_exit_k)
6787 {
6788 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
6789
6790 switch (fatal_exit_k)
6791 {
6792 case 0:
6793
6794 break;
6795 case 2:
6796 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
6797 break;
6798 case 3:
6799 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
6800 break;
6801 case 4:
6802 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
6803 break;
6804 case 8:
6805 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
6806 break;
6807 case 14:
6808 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
6809 break;
6810 case 19:
6811 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
6812 break;
6813 case 80:
6814 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
6815 break;
6816 case 81:
6817 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
6818 break;
6819 case 119:
6820 strcpy(error_message_k, "119 - User cancel");
6821 break;
6822 case 140:
6823 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
6824 break;
6825 case 160:
6826 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
6827 break;
6828 case 401:
6829 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
6830 break;
6831 case 402:
6832 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
6833 break;
6834 case 404:
6835 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
6836 break;
6837 case 430:
6838 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
6839 break;
6840 case 441:
6841 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
6842 break;
6843 default:
6844 break;
6845 }
6846 }
6847 else
6848 {
6849 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
6850 WCHAR *ar_temp = (void *)malloc(r_temp);
6851 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6852
6853 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
6854
6855 free(ar_temp);
6856 free(ar_temp2);
6857 }
6858 }
6859
6861 {
6862 volatile int returnvalue_ar = 0;
6863
6864 if (0 == fatal_exit_k)
6865 {
6866 first_step = 1;
6867
6868 inittimer2(0);
6870
6872 {
6874 }
6875
6877 {
6879 }
6881 // pedro_dprintf2(1001, "Threads na entrada %d", threads_z_v27);
6882 // notice that we have not developed lzop2 with compression level support, only one level for the moment is allowed, derived from minilzo -> http://www.oberhumer.com/opensource/lzo/ <- (26/sep/2021, 01:43)
6884 original_destination_tar_file,
6888
6889 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "lzop2 compressed required %.3f seconds\n", inittimer2(1));
6890
6891 switch (returnvalue_ar)
6892 {
6893 case 0:;
6894 break;
6895
6896 case 1:
6897 fatal_exit_k = 5108;
6898 strcpy(error_message_k, "Cannot open input file");
6899 break;
6900
6901 case 2:
6902 fatal_exit_k = 5109;
6903 strcpy(error_message_k, "Cannot open output file");
6904 break;
6905
6906 case 3:
6907 fatal_exit_k = 5110;
6908 strcpy(error_message_k, "Cannot close the input file");
6909 break;
6910
6911 case 4:
6912 fatal_exit_k = 5111;
6913 strcpy(error_message_k, "Cannot close output file");
6914 break;
6915
6916 case 5:
6917 fatal_exit_k = 5112;
6918 strcpy(error_message_k, "Cannot read from input file");
6919 break;
6920
6921 case 6:
6922 fatal_exit_k = 5113;
6923 strcpy(error_message_k, "Cannot write to output file");
6924 break;
6925
6926 case 7:
6927 fatal_exit_k = 5114;
6928 strcpy(error_message_k, "It isnot a valid compressed file");
6929 break;
6930
6931 case 8:
6932 fatal_exit_k = 5115;
6933 strcpy(error_message_k, "Compression error");
6934 break;
6935
6936 case 119:
6937 fatal_exit_k = 119;
6938 strcpy(error_message_k, "User abort");
6939 break;
6940
6941 case 400:
6942 fatal_exit_k = 5116;
6943 strcpy(error_message_k, "Cannot write to temporary file");
6944 break;
6945
6946 case 403:
6947 fatal_exit_k = 5117;
6948 strcpy(error_message_k, "File access error");
6949 break;
6950
6951 case 405:
6952 fatal_exit_k = 5118;
6953 strcpy(error_message_k, "Cannot open temporary file");
6954 break;
6955
6956 case 407:
6957 fatal_exit_k = 5119;
6958 strcpy(error_message_k, "Cannot create temp file");
6959 break;
6960
6961 default:
6962 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
6963 "not handled correctly by the programmer",
6964 returnvalue_ar);
6966 fatal_exit_k = returnvalue_ar;
6967 break;
6968 }
6969 }
6970 {
6972 WCHAR *ar_temp = (void *)malloc(r_temp);
6973 WCHAR *ar_temp2 = (void *)malloc(r_temp);
6974
6976
6977 free(ar_temp);
6978 free(ar_temp2);
6979 }
6980 if (0 == fatal_exit_k)
6981 {
6982 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
6983
6984 switch (fatal_exit_k)
6985 {
6986 case 0:
6987
6988 break;
6989 case 2:
6990 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
6991 break;
6992 case 3:
6993 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
6994 break;
6995 case 4:
6996 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
6997 break;
6998 case 8:
6999 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
7000 break;
7001 case 14:
7002 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
7003 break;
7004 case 19:
7005 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
7006 break;
7007 case 80:
7008 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
7009 break;
7010 case 81:
7011 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
7012 break;
7013 case 119:
7014 strcpy(error_message_k, "119 - User cancel");
7015 break;
7016 case 140:
7017 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
7018 break;
7019 case 160:
7020 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
7021 break;
7022 case 401:
7023 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
7024 break;
7025 case 402:
7026 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
7027 break;
7028 case 404:
7029 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
7030 break;
7031 case 430:
7032 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
7033 break;
7034 case 441:
7035 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
7036 break;
7037 default:
7038 break;
7039 }
7040 }
7041 else
7042 {
7043 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
7044 WCHAR *ar_temp = (void *)malloc(r_temp);
7045 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7046
7047 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
7048
7049 free(ar_temp);
7050 free(ar_temp2);
7051 }
7052 }
7053
7055 {
7056 volatile int returnvalue_ar = 0;
7057
7058 if (0 == fatal_exit_k)
7059 {
7060 first_step = 1;
7061 inittimer2(0);
7062
7064 // compress_l5___rspk_ar_func == compress_l5___rspk_ar uncompress_l5___rspk_ar
7065 // lz5compress_k
7067 original_destination_tar_file,
7068 6,
7071
7072 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "lz5 compressed required %.3f seconds\n", inittimer2(1));
7073
7074 switch (returnvalue_ar)
7075 {
7076 case 0:;
7077 break;
7078
7079 case 1:
7080 fatal_exit_k = 1108;
7081 strcpy(error_message_k, "Cannot open input file");
7082 break;
7083
7084 case 2:
7085 fatal_exit_k = 1109;
7086 strcpy(error_message_k, "Cannot open output file");
7087 break;
7088
7089 case 3:
7090 fatal_exit_k = 1110;
7091 strcpy(error_message_k, "Cannot close the input file");
7092 break;
7093
7094 case 4:
7095 fatal_exit_k = 1111;
7096 strcpy(error_message_k, "Cannot close output file");
7097 break;
7098
7099 case 5:
7100 fatal_exit_k = 1112;
7101 strcpy(error_message_k, "Cannot read from input file");
7102 break;
7103
7104 case 6:
7105 fatal_exit_k = 1113;
7106 strcpy(error_message_k, "Cannot write to output file");
7107 break;
7108
7109 case 7:
7110 fatal_exit_k = 1114;
7111 strcpy(error_message_k, "It isnot a valid compressed file");
7112 break;
7113
7114 case 8:
7115 fatal_exit_k = 1115;
7116 strcpy(error_message_k, "Compression error");
7117 break;
7118
7119 case 119:
7120 fatal_exit_k = 119;
7121 strcpy(error_message_k, "User abort");
7122 break;
7123
7124 case 400:
7125 fatal_exit_k = 1116;
7126 strcpy(error_message_k, "Cannot write to temporary file");
7127 break;
7128
7129 case 403:
7130 fatal_exit_k = 1117;
7131 strcpy(error_message_k, "File access error");
7132 break;
7133
7134 case 405:
7135 fatal_exit_k = 1118;
7136 strcpy(error_message_k, "Cannot open temporary file");
7137 break;
7138
7139 case 407:
7140 fatal_exit_k = 1119;
7141 strcpy(error_message_k, "Cannot create temp file");
7142 break;
7143
7144 default:
7145 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
7146 "not handled correctly by the programmer",
7147 returnvalue_ar);
7149 fatal_exit_k = returnvalue_ar;
7150 break;
7151 }
7152 }
7153 {
7155 WCHAR *ar_temp = (void *)malloc(r_temp);
7156 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7157
7159
7160 free(ar_temp);
7161 free(ar_temp2);
7162 }
7163
7164 if (0 == fatal_exit_k)
7165 {
7166 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
7167
7168 switch (fatal_exit_k)
7169 {
7170 case 0:
7171
7172 break;
7173 case 2:
7174 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
7175 break;
7176 case 3:
7177 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
7178 break;
7179 case 4:
7180 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
7181 break;
7182 case 8:
7183 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
7184 break;
7185 case 14:
7186 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
7187 break;
7188 case 19:
7189 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
7190 break;
7191 case 80:
7192 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
7193 break;
7194 case 81:
7195 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
7196 break;
7197 case 119:
7198 strcpy(error_message_k, "119 - User cancel");
7199 break;
7200 case 140:
7201 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
7202 break;
7203 case 160:
7204 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
7205 break;
7206 case 401:
7207 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
7208 break;
7209 case 402:
7210 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
7211 break;
7212 case 404:
7213 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
7214 break;
7215 case 430:
7216 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
7217 break;
7218 case 441:
7219 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
7220 break;
7221 default:
7222 break;
7223 }
7224 }
7225 else
7226 {
7227 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
7228 WCHAR *ar_temp = (void *)malloc(r_temp);
7229 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7230
7231 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
7232
7233 free(ar_temp);
7234 free(ar_temp2);
7235 }
7236 }
7237
7239 {
7240 volatile int returnvalue_ar = 0;
7241
7242 if (0 == fatal_exit_k)
7243 {
7244 first_step = 1;
7245
7246 inittimer2(0);
7247
7250
7252 {
7254 }
7256 {
7258 }
7259
7260 // compress_bb___rspk_ar uncompress_bb___rspk_ar
7261 // lz5compress_k_7
7263 original_destination_tar_file,
7267
7268 yasmin_charlotte_pereira_dprintf(0, "depois 1, ret %d", (int)returnvalue_ar);
7269 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "brotli2 compressed required %.3f seconds\n", inittimer2(1));
7270
7271 switch (returnvalue_ar)
7272 {
7273 case 0:;
7274 break;
7275
7276 case 1:
7277 fatal_exit_k = 2108;
7278 strcpy(error_message_k, "Cannot open input file");
7279 break;
7280
7281 case 2:
7282 fatal_exit_k = 2109;
7283 strcpy(error_message_k, "Cannot open output file");
7284 break;
7285
7286 case 3:
7287 fatal_exit_k = 2110;
7288 strcpy(error_message_k, "Cannot close the input file");
7289 break;
7290
7291 case 4:
7292 fatal_exit_k = 2111;
7293 strcpy(error_message_k, "Cannot close output file");
7294 break;
7295
7296 case 5:
7297 fatal_exit_k = 2112;
7298 strcpy(error_message_k, "Cannot read from input file");
7299 break;
7300
7301 case 6:
7302 fatal_exit_k = 2113;
7303 strcpy(error_message_k, "Cannot write to output file");
7304 break;
7305
7306 case 7:
7307 fatal_exit_k = 2114;
7308 strcpy(error_message_k, "It isnot a valid compressed file");
7309 break;
7310
7311 case 8:
7312 fatal_exit_k = 2115;
7313 strcpy(error_message_k, "Compression error");
7314 break;
7315
7316 case 119:
7317 fatal_exit_k = 119;
7318 strcpy(error_message_k, "User abort");
7319 break;
7320
7321 case 400:
7322 fatal_exit_k = 2116;
7323 strcpy(error_message_k, "Cannot write to temporary file");
7324 break;
7325
7326 case 403:
7327 fatal_exit_k = 2117;
7328 strcpy(error_message_k, "File access error");
7329 break;
7330
7331 case 405:
7332 fatal_exit_k = 2118;
7333 strcpy(error_message_k, "Cannot open temporary file");
7334 break;
7335
7336 case 407:
7337 fatal_exit_k = 2119;
7338 strcpy(error_message_k, "Cannot create temp file");
7339 break;
7340
7341 default:
7342 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
7343 "not handled correctly by the programmer",
7344 returnvalue_ar);
7346 fatal_exit_k = returnvalue_ar;
7347 break;
7348 }
7349 }
7350 {
7352 WCHAR *ar_temp = /* */ (void *)malloc(r_temp);
7353 WCHAR *ar_temp2 = /* */ (void *)malloc(r_temp);
7354
7356
7357 free(ar_temp);
7358 free(ar_temp2);
7359 }
7360 if (0 == fatal_exit_k)
7361 {
7362 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
7363
7364 switch (fatal_exit_k)
7365 {
7366 case 0:
7367
7368 break;
7369 case 2:
7370 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
7371 break;
7372 case 3:
7373 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
7374 break;
7375 case 4:
7376 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
7377 break;
7378 case 8:
7379 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
7380 break;
7381 case 14:
7382 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
7383 break;
7384 case 19:
7385 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
7386 break;
7387 case 80:
7388 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
7389 break;
7390 case 81:
7391 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
7392 break;
7393 case 119:
7394 strcpy(error_message_k, "119 - User cancel");
7395 break;
7396 case 140:
7397 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
7398 break;
7399 case 160:
7400 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
7401 break;
7402 case 401:
7403 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
7404 break;
7405 case 402:
7406 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
7407 break;
7408 case 404:
7409 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
7410 break;
7411 case 430:
7412 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
7413 break;
7414 case 441:
7415 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
7416 break;
7417 default:
7418 break;
7419 }
7420 }
7421 else
7422 {
7423 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
7424 WCHAR *ar_temp = (void *)malloc(r_temp);
7425 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7426
7427 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
7428
7429 free(ar_temp);
7430 free(ar_temp2);
7431 }
7432 }
7433
7435 {
7436 double time_charli;
7437 volatile int returnvalue_ar = 0;
7438
7439 if (0 == fatal_exit_k)
7440 {
7441 first_step = 1;
7442
7443 inittimer2(0);
7444
7446
7447 // yasmin_charlotte_pereira_dprintf(0, "ok1");
7448
7449 time_charli = get_bucaneiro_tick();
7450
7451 // compress_c5___rspk_ar uncompress_c5___rspk_ar
7452 // compress2_compress_k_14 compress2_uncompress_14
7454 original_destination_tar_file,
7455 6,
7458 yasmin_charlotte_pereira_dprintf(0, "tempo de compressao %f", get_bucaneiro_tick() - time_charli);
7459 yasmin_charlotte_pereira_dprintf(0, "ret %d", returnvalue_ar);
7460 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "compress2 compressed required %.3f seconds\n", inittimer2(1));
7461
7462 switch (returnvalue_ar)
7463 {
7464 case 0:;
7465 break;
7466
7467 case 1:
7468 fatal_exit_k = 2108;
7469 strcpy(error_message_k, "Cannot open input file");
7470 break;
7471
7472 case 2:
7473 fatal_exit_k = 2109;
7474 strcpy(error_message_k, "Cannot open output file");
7475 break;
7476
7477 case 3:
7478 fatal_exit_k = 2110;
7479 strcpy(error_message_k, "Cannot close the input file");
7480 break;
7481
7482 case 4:
7483 fatal_exit_k = 2111;
7484 strcpy(error_message_k, "Cannot close output file");
7485 break;
7486
7487 case 5:
7488 fatal_exit_k = 2112;
7489 strcpy(error_message_k, "Cannot read from input file");
7490 break;
7491
7492 case 6:
7493 fatal_exit_k = 2113;
7494 strcpy(error_message_k, "Cannot write to output file");
7495 break;
7496
7497 case 7:
7498 fatal_exit_k = 2114;
7499 strcpy(error_message_k, "It isnot a valid compressed file");
7500 break;
7501
7502 case 8:
7503 fatal_exit_k = 2115;
7504 strcpy(error_message_k, "Compression error");
7505 break;
7506
7507 case 119:
7508 fatal_exit_k = 119;
7509 strcpy(error_message_k, "User abort");
7510 break;
7511
7512 case 400:
7513 fatal_exit_k = 2116;
7514 strcpy(error_message_k, "Cannot write to temporary file");
7515 break;
7516
7517 case 403:
7518 fatal_exit_k = 2117;
7519 strcpy(error_message_k, "File access error");
7520 break;
7521
7522 case 405:
7523 fatal_exit_k = 2118;
7524 strcpy(error_message_k, "Cannot open temporary file");
7525 break;
7526
7527 case 407:
7528 fatal_exit_k = 2119;
7529 strcpy(error_message_k, "Cannot create temp file");
7530 break;
7531
7532 case 95555:
7533 fatal_exit_k = 95555;
7534 strcpy(error_message_k, "Cannot open internal temp file");
7535 break;
7536
7537 case 95556:
7538 fatal_exit_k = 95556;
7539 strcpy(error_message_k, "Cannot read from internal temp file");
7540 break;
7541
7542 case 95557:
7543 fatal_exit_k = 95557;
7544 strcpy(error_message_k, "Cannot write to internal temp file");
7545 break;
7546
7547 case 95558:
7548 fatal_exit_k = 95558;
7549 strcpy(error_message_k, "When reading from file the temp file is not open");
7550 break;
7551
7552 case 95559:
7553 fatal_exit_k = 95559;
7554 strcpy(error_message_k, "Temp file not loaded");
7555 break;
7556
7557 default:
7558 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
7559 "not handled correctly by the programmer",
7560 returnvalue_ar);
7562 fatal_exit_k = returnvalue_ar;
7563 break;
7564 }
7565 }
7566 {
7568 WCHAR *ar_temp = (void *)malloc(r_temp);
7569 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7570
7572
7573 free(ar_temp);
7574 free(ar_temp2);
7575 }
7576 if (0 == fatal_exit_k)
7577 {
7578 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
7579
7580 switch (fatal_exit_k)
7581 {
7582 case 0:
7583
7584 break;
7585 case 2:
7586 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
7587 break;
7588 case 3:
7589 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
7590 break;
7591 case 4:
7592 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
7593 break;
7594 case 8:
7595 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
7596 break;
7597 case 14:
7598 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
7599 break;
7600 case 19:
7601 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
7602 break;
7603 case 80:
7604 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
7605 break;
7606 case 81:
7607 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
7608 break;
7609 case 119:
7610 strcpy(error_message_k, "119 - User cancel");
7611 break;
7612 case 140:
7613 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
7614 break;
7615 case 160:
7616 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
7617 break;
7618 case 401:
7619 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
7620 break;
7621 case 402:
7622 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
7623 break;
7624 case 404:
7625 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
7626 break;
7627 case 430:
7628 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
7629 break;
7630 case 441:
7631 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
7632 break;
7633 default:
7634 break;
7635 }
7636 }
7637 else
7638 {
7639 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
7640 WCHAR *ar_temp = (void *)malloc(r_temp);
7641 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7642
7643 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
7644
7645 free(ar_temp);
7646 free(ar_temp2);
7647 }
7648 }
7649
7651 {
7652 volatile int returnvalue_ar = 0;
7653 if (0 == fatal_exit_k)
7654 {
7655 first_step = 1;
7656 inittimer2(0);
7657
7659 {
7661 }
7663 {
7665 }
7666
7668 original_destination_tar_file,
7670 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "lzip compressed required %.3f seconds\n", inittimer2(1));
7671
7672 switch (returnvalue_ar)
7673 {
7674 case 0:;
7675 break;
7676
7677 case 1:
7678 fatal_exit_k = 302;
7679 strcpy(error_message_k, "Error in the lzip compressor");
7680 break;
7681
7682 case 2:
7683 fatal_exit_k = 303;
7684 strcpy(error_message_k, "Corrupt or invalid lzip file");
7685 break;
7686
7687 case 3:
7688 fatal_exit_k = 304;
7689 strcpy(error_message_k, "Internal lzip compressor error");
7690 break;
7691
7692 case 119:
7693 fatal_exit_k = 119;
7694 strcpy(error_message_k, "User abort");
7695 break;
7696
7697 default:
7698 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
7699 "not handled correctly by the programmer",
7700 returnvalue_ar);
7702 fatal_exit_k = returnvalue_ar;
7703 break;
7704 }
7705 }
7706 {
7708 WCHAR *ar_temp = (void *)malloc(r_temp);
7709 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7710
7712
7713 free(ar_temp);
7714 free(ar_temp2);
7715 }
7716 if (0 == fatal_exit_k)
7717 {
7718 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
7719
7720 switch (fatal_exit_k)
7721 {
7722 case 0:
7723
7724 break;
7725 case 2:
7726 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
7727 break;
7728 case 3:
7729 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
7730 break;
7731 case 4:
7732 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
7733 break;
7734 case 8:
7735 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
7736 break;
7737 case 14:
7738 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
7739 break;
7740 case 19:
7741 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
7742 break;
7743 case 80:
7744 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
7745 break;
7746 case 81:
7747 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
7748 break;
7749 case 119:
7750 strcpy(error_message_k, "119 - User cancel");
7751 break;
7752 case 140:
7753 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
7754 break;
7755 case 160:
7756 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
7757 break;
7758 case 401:
7759 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
7760 break;
7761 case 402:
7762 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
7763 break;
7764 case 404:
7765 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
7766 break;
7767 case 430:
7768 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
7769 break;
7770 case 441:
7771 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
7772 break;
7773 default:
7774 break;
7775 }
7776 }
7777 else
7778 {
7779 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
7780 WCHAR *ar_temp = (void *)malloc(r_temp);
7781 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7782
7783 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
7784
7785 free(ar_temp);
7786 free(ar_temp2);
7787 }
7788 }
7789
7791 {
7792 volatile int returnvalue_ar = 0;
7793 if (0 == fatal_exit_k)
7794 {
7795 first_step = 1;
7796 inittimer2(0);
7797 returnvalue_ar = compress_lzma_rspk_ar_func(archive_name_array_filename, original_destination_tar_file, 6);
7798 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "lzma compressed required %.3f seconds\n", inittimer2(1));
7799 switch (returnvalue_ar)
7800 {
7801 case 0:;
7802 break;
7803
7804 case 1:
7805 fatal_exit_k = 600;
7806 strcpy(error_message_k, "Error openning file for LZMA handling");
7807 break;
7808
7809 case 3:
7810 fatal_exit_k = 601;
7811 strcpy(error_message_k, "LZMA memory error");
7812 break;
7813
7814 case 4:
7815 fatal_exit_k = 602;
7816 strcpy(error_message_k, "LZMA data error");
7817 break;
7818
7819 case 5:
7820 fatal_exit_k = 603;
7821 strcpy(error_message_k, "Unexpected LZMA error");
7822 break;
7823
7824 case 119:
7825 fatal_exit_k = 119;
7826 strcpy(error_message_k, "User abort");
7827 break;
7828
7829 default:
7830 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
7831 "not handled correctly by the programmer",
7832 returnvalue_ar);
7834 fatal_exit_k = returnvalue_ar;
7835 break;
7836 }
7837 }
7838 {
7840 WCHAR *ar_temp /* pois é tchau Amanda */ = (void *)malloc(r_temp);
7841 WCHAR *ar_temp2 /* */ = (void *)malloc(r_temp);
7842
7844
7845 free(ar_temp);
7846 free(ar_temp2);
7847 }
7848 if (0 == fatal_exit_k)
7849 {
7850 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
7851
7852 switch (fatal_exit_k)
7853 {
7854 case 0:
7855
7856 break;
7857 case 2:
7858 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
7859 break;
7860 case 3:
7861 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
7862 break;
7863 case 4:
7864 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
7865 break;
7866 case 8:
7867 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
7868 break;
7869 case 14:
7870 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
7871 break;
7872 case 19:
7873 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
7874 break;
7875 case 80:
7876 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
7877 break;
7878 case 81:
7879 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
7880 break;
7881 case 119:
7882 strcpy(error_message_k, "119 - User cancel");
7883 break;
7884 case 140:
7885 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
7886 break;
7887 case 160:
7888 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
7889 break;
7890 case 401:
7891 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
7892 break;
7893 case 402:
7894 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
7895 break;
7896 case 404:
7897 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
7898 break;
7899 case 430:
7900 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
7901 break;
7902 case 441:
7903 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
7904 break;
7905 default:
7906 break;
7907 }
7908 }
7909 else
7910 {
7911 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
7912 WCHAR *ar_temp = (void *)malloc(r_temp);
7913 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7914
7915 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
7916
7917 free(ar_temp);
7918 free(ar_temp2);
7919 }
7920 }
7921
7923 {
7924 volatile int returnvalue_ar = 0;
7925
7926 if (0 == fatal_exit_k)
7927 {
7928 first_step = 1;
7929 inittimer2(0);
7932 {
7934 }
7936 {
7938 }
7939 threads_z = 1; // Need to be one because xz compressor have problems with more threads
7940 // we may fix this...
7942 original_destination_tar_file,
7944 threads_z);
7945
7946 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "xz compressed required %.3f seconds\n", inittimer2(1));
7947 switch (returnvalue_ar)
7948 {
7949 case 0:;
7950 break;
7951
7952 case 1:
7953 fatal_exit_k = 707;
7954 strcpy(error_message_k, "Error openning file for read");
7955 break;
7956
7957 case 2:
7958 fatal_exit_k = 708;
7959 strcpy(error_message_k, "Error openning file for write");
7960 break;
7961
7962 case 3:
7963 fatal_exit_k = 709;
7964 strcpy(error_message_k, "XZ compression internal error");
7965 break;
7966
7967 case 4:
7968 fatal_exit_k = 710;
7969 strcpy(error_message_k, "XZ decompression error");
7970 break;
7971
7972 case 119:
7973 fatal_exit_k = 119;
7974 strcpy(error_message_k, "User abort");
7975 break;
7976
7977 default:
7978 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
7979 "not handled correctly by the programmer",
7980 returnvalue_ar);
7982 fatal_exit_k = returnvalue_ar;
7983 break;
7984 }
7985 }
7986 {
7988 WCHAR *ar_temp = (void *)malloc(r_temp);
7989 WCHAR *ar_temp2 = (void *)malloc(r_temp);
7990
7992
7993 free(ar_temp);
7994 free(ar_temp2);
7995 }
7996 if (0 == fatal_exit_k)
7997 {
7998 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
7999
8000 switch (fatal_exit_k)
8001 {
8002 case 0:
8003
8004 break;
8005 case 2:
8006 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
8007 break;
8008 case 3:
8009 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
8010 break;
8011 case 4:
8012 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
8013 break;
8014 case 8:
8015 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
8016 break;
8017 case 14:
8018 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
8019 break;
8020 case 19:
8021 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
8022 break;
8023 case 80:
8024 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
8025 break;
8026 case 81:
8027 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
8028 break;
8029 case 119:
8030 strcpy(error_message_k, "119 - User cancel");
8031 break;
8032 case 140:
8033 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
8034 break;
8035 case 160:
8036 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
8037 break;
8038 case 401:
8039 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
8040 break;
8041 case 402:
8042 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
8043 break;
8044 case 404:
8045 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
8046 break;
8047 case 430:
8048 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
8049 break;
8050 case 441:
8051 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
8052 break;
8053 default:
8054 break;
8055 }
8056 }
8057 else
8058 {
8059 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
8060 WCHAR *ar_temp = (void *)malloc(r_temp);
8061 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8062
8063 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
8064
8065 free(ar_temp);
8066 free(ar_temp2);
8067 }
8068 }
8069
8071 {
8072 volatile int returnvalue_ar = 0;
8073 if (0 == fatal_exit_k)
8074 {
8075 first_step = 1;
8076 inittimer2(0);
8077
8078 // compress_co___rspk_ar uncompress_co___rspk_ar
8079 //
8081 original_destination_tar_file,
8082 1001 /* nights... */);
8083 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "compress compressed required %.3f seconds\n", inittimer2(1));
8084 switch (returnvalue_ar)
8085 {
8086 case 0:;
8087 break;
8088
8089 case 1:
8090 fatal_exit_k = 808;
8091 strcpy(error_message_k, "Cannot open input file");
8092 break;
8093
8094 case 2:
8095 fatal_exit_k = 809;
8096 strcpy(error_message_k, "Cannot open output file");
8097 break;
8098
8099 case 3:
8100 fatal_exit_k = 810;
8101 strcpy(error_message_k, "Cannot close the input file");
8102 break;
8103
8104 case 4:
8105 fatal_exit_k = 811;
8106 strcpy(error_message_k, "Cannot close output file");
8107 break;
8108
8109 case 5:
8110 fatal_exit_k = 812;
8111 strcpy(error_message_k, "Cannot read from input file");
8112 break;
8113
8114 case 6:
8115 fatal_exit_k = 813;
8116 strcpy(error_message_k, "Cannot write to output file");
8117 break;
8118
8119 case 7:
8120 fatal_exit_k = 814;
8121 strcpy(error_message_k, "It isnot a valid compressed file");
8122 break;
8123
8124 case 119:
8125 fatal_exit_k = 119;
8126 strcpy(error_message_k, "User abort");
8127 break;
8128
8129 default:
8130 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
8131 "not handled correctly by the programmer",
8132 returnvalue_ar);
8134 fatal_exit_k = returnvalue_ar;
8135 break;
8136 }
8137 }
8138 {
8140 WCHAR *ar_temp = (void *)malloc(r_temp);
8141 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8142
8144
8145 free(ar_temp);
8146 free(ar_temp2);
8147 }
8148 if (0 == fatal_exit_k)
8149 {
8150 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
8151
8152 switch (fatal_exit_k)
8153 {
8154 case 0:
8155
8156 break;
8157 case 2:
8158 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
8159 break;
8160 case 3:
8161 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
8162 break;
8163 case 4:
8164 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
8165 break;
8166 case 8:
8167 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
8168 break;
8169 case 14:
8170 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
8171 break;
8172 case 19:
8173 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
8174 break;
8175 case 80:
8176 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
8177 break;
8178 case 81:
8179 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
8180 break;
8181 case 119:
8182 strcpy(error_message_k, "119 - User cancel");
8183 break;
8184 case 140:
8185 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
8186 break;
8187 case 160:
8188 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
8189 break;
8190 case 401:
8191 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
8192 break;
8193 case 402:
8194 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
8195 break;
8196 case 404:
8197 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
8198 break;
8199 case 430:
8200 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
8201 break;
8202 case 441:
8203 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
8204 break;
8205 default:
8206 break;
8207 }
8208 }
8209 else
8210 {
8211 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
8212 WCHAR *ar_temp = (void *)malloc(r_temp);
8213 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8214
8215 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
8216
8217 free(ar_temp);
8218 free(ar_temp2);
8219 }
8220 }
8221
8223 {
8224 volatile int returnvalue_ar = 0;
8225 if (0 == fatal_exit_k)
8226 {
8227 first_step = 1;
8228 inittimer2(0);
8229
8231 {
8233 }
8234
8236 {
8238 }
8239
8241 original_destination_tar_file,
8243
8244 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "lzop compressed required %.3f seconds\n", inittimer2(1));
8245
8246 switch (returnvalue_ar)
8247 {
8248 case 0:;
8249 break;
8250
8251 case 1:
8252 fatal_exit_k = 907;
8253 strcpy(error_message_k, "Cannot open input file");
8254 break;
8255
8256 case 2:
8257 fatal_exit_k = 908;
8258 strcpy(error_message_k, "Cannot open output file");
8259 break;
8260
8261 case 3:
8262 fatal_exit_k = 909;
8263 strcpy(error_message_k, "Compression error");
8264 break;
8265
8266 case 4:
8267 fatal_exit_k = 910;
8268 strcpy(error_message_k, "Uncompression error");
8269 break;
8270
8271 case 119:
8272 fatal_exit_k = 119;
8273 strcpy(error_message_k, "User abort");
8274 break;
8275
8276 default:
8277 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
8278 "not handled correctly by the programmer",
8279 returnvalue_ar);
8281 fatal_exit_k = returnvalue_ar;
8282 break;
8283 }
8284 }
8285 {
8287 WCHAR *ar_temp = (void *)malloc(r_temp);
8288 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8289
8291
8292 free(ar_temp);
8293 free(ar_temp2);
8294 }
8295 if (0 == fatal_exit_k)
8296 {
8297 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
8298
8299 switch (fatal_exit_k)
8300 {
8301 case 0:
8302
8303 break;
8304 case 2:
8305 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
8306 break;
8307 case 3:
8308 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
8309 break;
8310 case 4:
8311 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
8312 break;
8313 case 8:
8314 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
8315 break;
8316 case 14:
8317 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
8318 break;
8319 case 19:
8320 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
8321 break;
8322 case 80:
8323 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
8324 break;
8325 case 81:
8326 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
8327 break;
8328 case 119:
8329 strcpy(error_message_k, "119 - User cancel");
8330 break;
8331 case 140:
8332 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
8333 break;
8334 case 160:
8335 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
8336 break;
8337 case 401:
8338 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
8339 break;
8340 case 402:
8341 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
8342 break;
8343 case 404:
8344 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
8345 break;
8346 case 430:
8347 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
8348 break;
8349 case 441:
8350 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
8351 break;
8352 default:
8353 break;
8354 }
8355 }
8356 else
8357 {
8358 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
8359 WCHAR *ar_temp = (void *)malloc(r_temp);
8360 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8361
8362 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
8363
8364 free(ar_temp);
8365 free(ar_temp2);
8366 }
8367 }
8368
8370 {
8371 volatile int returnvalue_ar = 0;
8372 if (0 == fatal_exit_k)
8373 {
8374 first_step = 1;
8375 inittimer2(0);
8377 original_destination_tar_file,
8378 9);
8379
8380 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "lz4 compressed required %.3f seconds\n", inittimer2(1));
8381
8382 switch (returnvalue_ar)
8383 {
8384 case 0:;
8385 break;
8386
8387 case 1:
8388 fatal_exit_k = 1108;
8389 strcpy(error_message_k, "Cannot open input file");
8390 break;
8391
8392 case 2:
8393 fatal_exit_k = 1109;
8394 strcpy(error_message_k, "Cannot open output file");
8395 break;
8396
8397 case 3:
8398 fatal_exit_k = 1110;
8399 strcpy(error_message_k, "Cannot close the input file");
8400 break;
8401
8402 case 4:
8403 fatal_exit_k = 1111;
8404 strcpy(error_message_k, "Cannot close output file");
8405 break;
8406
8407 case 5:
8408 fatal_exit_k = 1112;
8409 strcpy(error_message_k, "Cannot read from input file");
8410 break;
8411
8412 case 6:
8413 fatal_exit_k = 1113;
8414 strcpy(error_message_k, "Cannot write to output file");
8415 break;
8416
8417 case 7:
8418 fatal_exit_k = 1114;
8419 strcpy(error_message_k, "It isnot a valid compressed file");
8420 break;
8421
8422 case 8:
8423 fatal_exit_k = 1115;
8424 strcpy(error_message_k, "Compression error");
8425 break;
8426
8427 case 119:
8428 fatal_exit_k = 119;
8429 strcpy(error_message_k, "User abort");
8430 break;
8431
8432 default:
8433 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
8434 "not handled correctly by the programmer",
8435 returnvalue_ar);
8437 fatal_exit_k = returnvalue_ar;
8438 break;
8439 }
8440 }
8441 {
8443 WCHAR *ar_temp = (void *)malloc(r_temp);
8444 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8445
8447
8448 free(ar_temp);
8449 free(ar_temp2);
8450 }
8451 if (0 == fatal_exit_k)
8452 {
8453 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
8454
8455 switch (fatal_exit_k)
8456 {
8457 case 0:
8458
8459 break;
8460 case 2:
8461 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
8462 break;
8463 case 3:
8464 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
8465 break;
8466 case 4:
8467 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
8468 break;
8469 case 8:
8470 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
8471 break;
8472 case 14:
8473 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
8474 break;
8475 case 19:
8476 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
8477 break;
8478 case 80:
8479 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
8480 break;
8481 case 81:
8482 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
8483 break;
8484 case 119:
8485 strcpy(error_message_k, "119 - User cancel");
8486 break;
8487 case 140:
8488 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
8489 break;
8490 case 160:
8491 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
8492 break;
8493 case 401:
8494 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
8495 break;
8496 case 402:
8497 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
8498 break;
8499 case 404:
8500 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
8501 break;
8502 case 430:
8503 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
8504 break;
8505 case 441:
8506 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
8507 break;
8508 default:
8509 break;
8510 }
8511 }
8512 else
8513 {
8514 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
8515 WCHAR *ar_temp = (void *)malloc(r_temp);
8516 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8517
8518 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
8519
8520 free(ar_temp);
8521 free(ar_temp2);
8522 }
8523 }
8524
8526 {
8527 volatile int returnvalue_ar = 0;
8528 if (0 == fatal_exit_k)
8529 {
8530 first_step = 1;
8531
8532 inittimer2(0);
8535 if (0 > parolin_compression_level_p) // correcting, negatives values not allowed in the executable mode
8536 {
8538 }
8539
8541 {
8543 }
8544
8545 // parolin_compression_level_p = 22;
8546
8548 {
8549 case 0:
8551 break;
8552 case 1:
8554 break;
8555 case 2:
8557 break;
8558 case 3:
8560 break;
8561 case 4:
8563 break;
8564 case 5:
8566 break;
8567 case 6:
8569 break;
8570 case 7:
8572 break;
8573 case 8:
8575 break;
8576 case 9:
8578 break;
8579 }
8580
8582 yasmin_charlotte_pereira_dprintf(0, "file out ric %s", original_destination_tar_file);
8583 {
8584 //[9464] file in ric \\?\C:\Pereira\charli_xcx\back\temp\ZS_A630.tmp _charli_debug_
8585
8586 // char final_file_charli[1024] = {0};
8587
8588 char *ptr_charli = archive_name_array_filename;
8589 /*
8590 if ('\\' == archive_name_array_filename[0])
8591 {
8592 if ('\\' == archive_name_array_filename[1])
8593 {
8594 if ('?' == archive_name_array_filename[2])
8595 {
8596 if ('\\' == archive_name_array_filename[3])
8597 {
8598 ptr_charli++;
8599 ptr_charli++;
8600 ptr_charli++;
8601 ptr_charli++;
8602 }
8603 }
8604 }
8605 }
8606 */
8607 // pedo_dprintf2(1001, "threads entrada %d", threads_z);
8608
8609 // pedro_printf2(1001, "zs input %s", original_destination_tar_file);
8610 returnvalue_ar = compress_zs___rspk_ar_func(ptr_charli,
8611 original_destination_tar_file,
8613 threads_z);
8614 }
8615
8616 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "zstandard compressed required %.3f seconds\n", inittimer2(1));
8617
8618 switch (returnvalue_ar)
8619 {
8620 case 0:;
8621 break;
8622
8623 case 1:
8624 fatal_exit_k = 1208;
8625 strcpy(error_message_k, "Cannot open input file");
8626 break;
8627
8628 case 2:
8629 fatal_exit_k = 1209;
8630 strcpy(error_message_k, "Cannot open output file");
8631 break;
8632
8633 case 7:
8634 fatal_exit_k = 1214;
8635 strcpy(error_message_k, "It isnot a valid compressed file");
8636 break;
8637
8638 case 8:
8639 fatal_exit_k = 1215;
8640 strcpy(error_message_k, "Compression error");
8641 break;
8642
8643 case 119:
8644 fatal_exit_k = 119;
8645 strcpy(error_message_k, "User abort");
8646 break;
8647
8648 default:
8649 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and not handled correctly by the programmer", returnvalue_ar);
8651 fatal_exit_k = returnvalue_ar;
8652 break;
8653 }
8654 }
8655 {
8656 // 3 anos... foram longos anos
8658 WCHAR *ar_temp = (void *)malloc(r_temp);
8659 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8660
8662
8663 free(ar_temp);
8664 free(ar_temp2);
8665 }
8666 if (0 == fatal_exit_k)
8667 {
8668 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
8669
8670 switch (fatal_exit_k)
8671 {
8672 case 0:
8673
8674 break;
8675 case 2:
8676 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
8677 break;
8678 case 3:
8679 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
8680 break;
8681 case 4:
8682 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
8683 break;
8684 case 8:
8685 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
8686 break;
8687 case 14:
8688 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
8689 break;
8690 case 19:
8691 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
8692 break;
8693 case 80:
8694 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
8695 break;
8696 case 81:
8697 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
8698 break;
8699 case 119:
8700 strcpy(error_message_k, "119 - User cancel");
8701 break;
8702 case 140:
8703 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
8704 break;
8705 case 160:
8706 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
8707 break;
8708 case 401:
8709 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
8710 break;
8711 case 402:
8712 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
8713 break;
8714 case 404:
8715 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
8716 break;
8717 case 430:
8718 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
8719 break;
8720 case 441:
8721 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
8722 break;
8723 default:
8724 break;
8725 }
8726 }
8727 else
8728 {
8729 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
8730 WCHAR *ar_temp = (void *)malloc(r_temp);
8731 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8732
8733 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
8734
8735 free(ar_temp);
8736 free(ar_temp2);
8737 }
8738 }
8739
8741 {
8742 volatile int returnvalue_ar = 0;
8743 if (0 == fatal_exit_k)
8744 {
8745 first_step = 1;
8746 inittimer2(0);
8747
8750 yasmin_charlotte_pereira_dprintf(0, "enter 2 %s", original_destination_tar_file);
8751
8753 original_destination_tar_file,
8755
8756 yasmin_charlotte_pereira_dprintf(0, "return value %lld", (int64_t)returnvalue_ar);
8757 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "brotli compressed required %.3f seconds\n", inittimer2(1));
8758
8759 switch (returnvalue_ar)
8760 {
8761 case 0:;
8762 break;
8763
8764 case 1:
8765 fatal_exit_k = 1308;
8766 strcpy(error_message_k, "Cannot open input file");
8767 break;
8768
8769 case 2:
8770 fatal_exit_k = 1309;
8771 strcpy(error_message_k, "Cannot open output file");
8772 break;
8773
8774 case 7:
8775 fatal_exit_k = 1314;
8776 strcpy(error_message_k, "It isnot a valid compressed file");
8777 break;
8778
8779 case 8:
8780 fatal_exit_k = 1315;
8781 strcpy(error_message_k, "Compression error");
8782 break;
8783
8784 case 119:
8785 fatal_exit_k = 119;
8786 strcpy(error_message_k, "User abort");
8787 break;
8788
8789 default:
8790 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
8791 "not handled correctly by the programmer",
8792 returnvalue_ar);
8794 fatal_exit_k = returnvalue_ar;
8795 break;
8796 }
8797 }
8798 {
8800 WCHAR *ar_temp = (void *)malloc(r_temp);
8801 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8802
8804
8805 free(ar_temp);
8806 free(ar_temp2);
8807 }
8808 if (0 == fatal_exit_k)
8809 {
8810 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
8811
8812 switch (fatal_exit_k)
8813 {
8814 case 0:
8815
8816 break;
8817 case 2:
8818 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
8819 break;
8820 case 3:
8821 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
8822 break;
8823 case 4:
8824 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
8825 break;
8826 case 8:
8827 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
8828 break;
8829 case 14:
8830 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
8831 break;
8832 case 19:
8833 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
8834 break;
8835 case 80:
8836 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
8837 break;
8838 case 81:
8839 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
8840 break;
8841 case 119:
8842 strcpy(error_message_k, "119 - User cancel");
8843 break;
8844 case 140:
8845 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
8846 break;
8847 case 160:
8848 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
8849 break;
8850 case 401:
8851 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
8852 break;
8853 case 402:
8854 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
8855 break;
8856 case 404:
8857 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
8858 break;
8859 case 430:
8860 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
8861 break;
8862 case 441:
8863 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
8864 break;
8865 default:
8866 break;
8867 }
8868 }
8869 else
8870 {
8871 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
8872 WCHAR *ar_temp = (void *)malloc(r_temp);
8873 WCHAR *ar_temp2 = (void *)malloc(r_temp);
8874
8875 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
8876
8877 free(ar_temp);
8878 free(ar_temp2);
8879 }
8880 }
8881
8883 {
8884 volatile int returnvalue_ar = 0;
8885 if (0 == fatal_exit_k)
8886 {
8887 first_step = 1;
8888 inittimer2(0);
8889
8891 {
8893 }
8894
8896 {
8898 }
8899
8901
8902 while (GetStatus_bzip2_ar_func())
8903 {
8904 Sleep(5);
8905 }
8906
8907 pedro_dprintf(SHOW_DEBUG_SPEED_Z, "bzip2 compressed required %.3f seconds\n", inittimer2(1));
8908
8909 returnvalue_ar = GetReturnValue_bzip2_ar_func();
8910
8911 switch (returnvalue_ar)
8912 {
8913 case 0:;
8914 break;
8915
8916 case 8:
8917 fatal_exit_k = 60;
8918 strcpy(error_message_k, "Cannot open file to read");
8919 break;
8920
8921 case 9:
8922 fatal_exit_k = 61;
8923 strcpy(error_message_k, "Cannot open file to write");
8924 break;
8925
8926 case 10:
8927 fatal_exit_k = 62;
8928 strcpy(error_message_k, "Cannot write to output file");
8929 break;
8930
8931 case 11:
8932 fatal_exit_k = 63;
8933 strcpy(error_message_k, "Cannot initialize bzip2 compressor");
8934 break;
8935
8936 case 119:
8937 fatal_exit_k = 64;
8938 strcpy(error_message_k, "User cancel");
8939 break;
8940
8941 default:
8942 sprintf(my_error_as_a_programmer_z, "Error %d reported by the compressor and "
8943 "not handled correctly by the programmer",
8944 returnvalue_ar);
8946 fatal_exit_k = returnvalue_ar;
8947 break;
8948 }
8949 }
8950 {
8952 WCHAR *ar_temp =
8953 (void *)malloc(r_temp);
8954 WCHAR *ar_temp2 =
8955 (void *)malloc(r_temp);
8956
8958
8959 free(ar_temp);
8960 free(ar_temp2);
8961 }
8962 if (0 == fatal_exit_k)
8963 {
8964 fatal_exit_k = encryption_process_new_mode_21_february_2021_z(original_destination_tar_file);
8965
8966 switch (fatal_exit_k)
8967 {
8968 case 0:
8969
8970 break;
8971 case 2:
8972 strcpy(error_message_k, "2 - Single-thread encryption error, cannot open output file");
8973 break;
8974 case 3:
8975 strcpy(error_message_k, "3 - Single-thread unencryption error, invalid file");
8976 break;
8977 case 4:
8978 strcpy(error_message_k, "4 - Single-thread unencryption error, sha512 check don't match");
8979 break;
8980 case 8:
8981 strcpy(error_message_k, "8 - Multi-thread, cannot open temp output file");
8982 break;
8983 case 14:
8984 strcpy(error_message_k, "14 - Multi-thread, cannot write to output file");
8985 break;
8986 case 19:
8987 strcpy(error_message_k, "19 - Multi-thread, user cancel (inside thread)");
8988 break;
8989 case 80:
8990 strcpy(error_message_k, "80 - Multi-thread, cannot open output file");
8991 break;
8992 case 81:
8993 strcpy(error_message_k, "81 - Multi-thread, cannot open output temp file with rb+");
8994 break;
8995 case 119:
8996 strcpy(error_message_k, "119 - User cancel");
8997 break;
8998 case 140:
8999 strcpy(error_message_k, "140 - Multi-thread, cannot write to temp file");
9000 break;
9001 case 160:
9002 strcpy(error_message_k, "160 - Multi-thread, internal thread error, the programmer need to know it");
9003 break;
9004 case 401:
9005 strcpy(error_message_k, "401 - Multi-thread, cannot create temp file");
9006 break;
9007 case 402:
9008 strcpy(error_message_k, "402 - Multi-thread, cannot read from input temp file");
9009 break;
9010 case 404:
9011 strcpy(error_message_k, "404 - Multi-thread, cannot open temp file");
9012 break;
9013 case 430:
9014 strcpy(error_message_k, "430 - Multi-thread, cannot read from input file inside thread running");
9015 break;
9016 case 441:
9017 strcpy(error_message_k, "441 - Multi-thread, cannot seek on input file");
9018 break;
9019 default:
9020 break;
9021 }
9022 }
9023 else
9024 {
9025 int r_temp = size_of_WCHAR_mem_r(original_destination_tar_file);
9026 WCHAR *ar_temp = (void *)malloc(r_temp);
9027 WCHAR *ar_temp2 = (void *)malloc(r_temp);
9028
9029 _wunlink(permissive_name_m_(amanda_asciitowide_1_(original_destination_tar_file, ar_temp), ar_temp2));
9030
9031 free(ar_temp);
9032 free(ar_temp2);
9033 }
9034 }
9035
9036 else
9037 {
9038 assert(0 && "Invalid format");
9039 exit(27);
9040 }
9041
9042 if (0 == fatal_exit_k)
9043 {
9044
9045 if (28 == warning_flag)
9046 {
9047 char temp___files_ar[1024] = " ";
9048 char temp_folders_ar[1024] = " ";
9050 if (0 == files_count)
9051 {
9052 }
9053 else if (1 == files_count)
9054 {
9055 sprintf(temp___files_ar, " 1 file ");
9056 }
9057 else
9058 {
9059 sprintf(temp___files_ar, " %d files ", (int)files_count);
9060 }
9061
9062 if (0 == folders_count)
9063 {
9064 }
9065 else if (1 == folders_count)
9066 {
9067 sprintf(temp_folders_ar, " 1 folder ");
9068 }
9069 else
9070 {
9071 sprintf(temp_folders_ar, " %d folders ", (int)folders_count);
9072 }
9073
9074 if ((1 < strlen(temp___files_ar)) && (1 < strlen(temp_folders_ar)))
9075 {
9076 snprintf(error_message_k, 600, "At least%sand%swas skipped because the path "
9077 "was larger than MAX_PATH (260)",
9078 temp___files_ar, temp_folders_ar);
9079 }
9080 else
9081 {
9082 if (1 == strlen(temp___files_ar))
9083 {
9084 temp___files_ar[0] = 0;
9085 }
9086 if (1 == strlen(temp_folders_ar))
9087 {
9088 temp_folders_ar[0] = 0;
9089 }
9090 snprintf(error_message_k, 600, "At least%s%swas skipped because the path "
9091 "was larger than MAX_PATH (260)",
9092 temp___files_ar, temp_folders_ar);
9093 }
9094
9096 }
9097 }
9099 mode_is_VAL_arp = false;
9100 return fatal_exit_k;
9101}
9102
9112{
9113 if (Z_OLD_MODE == method_z)
9114 {
9116 return 0;
9117 }
9118 if (Z_NEW_MODE == method_z)
9119 {
9121 return 0;
9122 }
9124 return 0;
9125}
9126
9139int __stdcall set_encryption_mode_z(char *method_arp)
9140{
9142 if (0 == strcmp("AES 256 CTR", method_arp))
9143 {
9145 }
9146 if (0 == strcmp("RC4", method_arp))
9147 {
9149 }
9150 if (0 == strcmp("SERPENT", method_arp))
9151 {
9153 }
9154 if (0 == strcmp("MARS", method_arp))
9155 {
9157 }
9158 if (0 == strcmp("RC6", method_arp))
9159 {
9161 }
9162 if (0 == strcmp("TWOFISH", method_arp))
9163 {
9165 }
9167 // added
9168 /*
9169
9170 enc_method_arp.Items.Add("AES 256 CTR Multi-Thread");
9171 enc_method_arp.Items.Add("MARS Multi-Thread");
9172 enc_method_arp.Items.Add("RC4 Multi-Thread");
9173 enc_method_arp.Items.Add("RC6 Multi-Thread");
9174 enc_method_arp.Items.Add("SERPENT Multi-Thread");
9175 enc_method_arp.Items.Add("TWOFISH Multi-Thread");
9176 */
9177 if (0 == strcmp("AES 256 CTR Multi-Thread", method_arp))
9178 {
9180 }
9181 if (0 == strcmp("MARS Multi-Thread", method_arp))
9182 {
9184 }
9185 if (0 == strcmp("RC4 Multi-Thread", method_arp))
9186 {
9188 }
9189 if (0 == strcmp("RC6 Multi-Thread", method_arp))
9190 {
9192 }
9193 if (0 == strcmp("SERPENT Multi-Thread", method_arp))
9194 {
9196 }
9197 if (0 == strcmp("TWOFISH Multi-Thread", method_arp))
9198 {
9200 }
9201 return 0;
9202}
9203
9209int __stdcall stringtobyte(unsigned char *dest, unsigned char *src, int len)
9210{
9211 int i;
9212 for (i = 0; i < len; i++)
9213 {
9214 dest[i] = src[i];
9215 }
9216 return 0;
9217}
9218
9225int __stdcall bytetostring(unsigned char *dest, unsigned char *src, int len)
9226{
9227 int i;
9228 for (i = 0; i < len; i++)
9229 {
9230 dest[i] = src[i];
9231 }
9232 dest[i] = 0;
9233 return 0;
9234}
9240int __stdcall libarchive_get_progress_p(void)
9241{
9242 int64_t arp_p;
9243
9245 {
9246
9247#if 0x0 == AMANDA_MODE || 0x2 == AMANDA_MODE
9248 return 0;
9249#endif
9250
9251 return progress_lib_v27;
9252 }
9253
9255
9256 if (0 > arp_p)
9257 {
9258 return 0;
9259 }
9260 if (10000 < arp_p)
9261 {
9262 return 10000;
9263 }
9264
9265 return arp_p;
9266}
9267
9274int __stdcall set_7zip_encryption_mode_i(int also_encrypt_headers_i_)
9275{
9276 also_encrypt_headers_i = false;
9277 if (also_encrypt_headers_i_)
9278 {
9280 }
9281 return 0;
9282}
#define FILE_ATTRIBUTE_ENCRYPTED
Definition 7zTypes.h:156
#define FILE_ATTRIBUTE_READONLY
Definition 7zTypes.h:143
#define FILE_ATTRIBUTE_COMPRESSED
Definition 7zTypes.h:153
#define FILE_ATTRIBUTE_HIDDEN
Definition 7zTypes.h:144
#define FILE_ATTRIBUTE_SYSTEM
Definition 7zTypes.h:145
void * LPVOID
Definition 7zTypes.h:200
#define FILE_ATTRIBUTE_ARCHIVE
Definition 7zTypes.h:147
UINT32 DWORD
Definition 7zTypes.h:194
#define FILE_ATTRIBUTE_DIRECTORY
Definition 7zTypes.h:146
#define FILE_ATTRIBUTE_NORMAL
Definition 7zTypes.h:149
size_t SIZE_T
Definition 7zTypes.h:209
#define AMANDA__SIZE
Definition arp.h:149
libarchive_compression_modes_AR
Definition arp.h:84
@ P_MODE_IS_ZIP__NO_PASSWORD
Definition arp.h:85
amanda__mode
Definition arp.h:238
@ I_MODE_IS_ENUMFOLDER_1
Definition arp.h:240
@ AAKP_MODE_VAL_LZOP2
Definition arp.h:139
@ AAKP_MODE_TAR_XZ
Definition arp.h:116
@ AAKP_MODE_TAR_ZSTANDARD
Definition arp.h:120
@ AAKP_MODE_VAL_LZOP
Definition arp.h:129
@ AAKP_MODE_TAR_BZ2
Definition arp.h:113
@ AAKP_MODE_TAR_BROTLI
Definition arp.h:121
@ AAKP_MODE_VAL_GZIP
Definition arp.h:123
@ AAKP_MODE_VAL_COMPRESS2
Definition arp.h:145
@ AAKP_MODE_VAL_BZ2
Definition arp.h:124
@ AAKP_MODE_TAR
Definition arp.h:111
@ AAKP_MODE_VAL_XZ
Definition arp.h:127
@ AAKP_MODE_TAR_BROTLI2
Definition arp.h:142
@ AAKP_MODE_TAR_LZOP2
Definition arp.h:138
@ AAKP_MODE_TAR_BZIP3
Definition arp.h:136
@ AAKP_MODE_VAL_BZIP3
Definition arp.h:137
@ AAKP_MODE_VAL_LZMA
Definition arp.h:126
@ AAKP_MODE_VAL_COMPRESS
Definition arp.h:128
@ AAKP_MODE_ISO
Definition arp.h:133
@ AAKP_MODE_VAL_ZSTANDARD
Definition arp.h:131
@ AAKP_MODE_VAL_BROTLI2
Definition arp.h:143
@ AAKP_MODE_VAL
Definition arp.h:122
@ AAKP_MODE_TAR_COMPRESS2
Definition arp.h:144
@ AAKP_MODE_TAR_COMPRESS
Definition arp.h:117
@ AAKP_MODE_TAR_GZIP
Definition arp.h:112
@ AAKP_MODE_TAR_LZ5
Definition arp.h:140
@ AAKP_MODE_TAR_LZOP
Definition arp.h:118
@ AAKP_MODE_VAL_LZIP
Definition arp.h:125
@ AAKP_MODE_TAR_LZIP
Definition arp.h:114
@ AAKP_MODE_VAL_BROTLI
Definition arp.h:132
@ AAKP_MODE_VAL_LZ5
Definition arp.h:141
@ AAKP_MODE_TAR_LZMA
Definition arp.h:115
@ AAKP_MODE_TAR_LZ4
Definition arp.h:119
@ AAKP_MODE_VAL_GZIP2
Definition arp.h:135
@ AAKP_MODE_TAR_GZIP2
Definition arp.h:134
@ AAKP_MODE_VAL_LZ4
Definition arp.h:130
z_encryption_method
Definition arp.h:224
@ Z_OLD_MODE
Definition arp.h:225
@ Z_NEW_MODE
Definition arp.h:226
@ ARP_RC4
Definition arp.h:200
@ ARP_SERPENT
Definition arp.h:202
@ ARP_RC4_MT
Definition arp.h:212
@ ARP_SERPENT_MT
Definition arp.h:214
@ ARP_AES
Definition arp.h:198
@ ARP_TWOFISH
Definition arp.h:208
@ ARP_RC6
Definition arp.h:206
@ ARP_MARS
Definition arp.h:204
@ ARP_MARS_MT
Definition arp.h:216
@ ARP_AES_MT
Definition arp.h:210
@ ARP_TWOFISH_MT
Definition arp.h:220
@ ARP_RC6_MT
Definition arp.h:218
mode_is_include_or_exclude
Definition arp_2.h:4
@ ARP_INCLUDE_FILES
Definition arp_2.h:5
@ ARP_MODE_IS_FIRST_STEP
Definition arp_2.h:12
@ ARP_MODE_NORMAL
Definition arp_2.h:11
wchar_t * permissive_name_m_(const wchar_t *wname, WCHAR *ar_temp)
Definition tar_1_33.c:279
int size_of_WCHAR_mem_r(char *in_string)
Definition tar_1_33.c:694
void pedro_dprintf(int amanda_level, char *format,...)
Definition pedro.c:43
WCHAR * amanda_asciitowide_1_(char *pUTF8, WCHAR *ar_temp)
Definition tar_1_33.c:677
void __fastcall dllinit_arp(void)
Definition compression_support_ar.c:43
void strncpy_z(char *dest_z, char *src_z, size_t len)
Definition smartape.c:243
union block * write_extended(bool global, struct tar_stat_info *st, union block *old_header)
int has_itens
Definition create_zen_ar.c:371
void to_base256(int negative, uintmax_t value, char *where, size_t size)
Definition create_zen_ar.c:1057
int __stdcall GetProgress_ar(void)
Definition create_zen_ar.c:2991
struct timespec get_stat_mtime(struct _stat const *st)
Definition create_zen_ar.c:591
bool mode_is_parolin_p
Definition create_zen_ar.c:59
int64_t bytes_read_p
Definition create_zen_ar.c:55
char warning_flag
Definition create_zen_ar.c:354
long int get_stat_atime_ns(__attribute__((unused)) struct _stat const *st)
Definition create_zen_ar.c:612
void tar_copy_str(char *dst, const char *src, size_t len)
Definition create_zen_ar.c:1225
char path_with_the_files_ar_7zip_maria[AMANDA__SIZE]
Definition create_zen_ar.c:42
int threads_z_v27
Definition create_zen_ar.c:36
bool first_pass_VAL_p
Definition create_zen_ar.c:57
int __stdcall set_thread_number(int value_z)
Definition create_zen_ar.c:282
int __stdcall startapi(int parameter)
int __fastcall split_in_multiple_volumes_p(char *filename_utf_8_p)
Definition multi_volume_p.c:463
char * umaxtostr(uintmax_t i, char *buf)
Definition create_zen_ar.c:952
tar_list_function_ar my_func_2__
Definition create_zen_ar.c:2656
int __stdcall GetReturnValue_ar(void)
Definition create_zen_ar.c:2960
int __stdcall create_archive_ar_v2(char *tar_filename_ar, char *path_with_the_files_ar, char *patern_ar, int compression_mode_external_ar, int recurse_in_subfolders_arp, enum mode_is_include_or_exclude the__patern_ar__mode)
Definition create_zen_ar.c:2705
int __stdcall Pause_ar(void)
Definition create_zen_ar.c:4348
#define AMANDA_SIZE__
int __stdcall bytetostring(unsigned char *dest, unsigned char *src, int len)
Definition create_zen_ar.c:9225
int first_step
Definition create_zen_ar.c:82
struct my_struct_for_list_ar * aak_
Definition create_zen_ar.c:366
void add_more_one(char *data_ar)
Definition create_zen_ar.c:383
int64_t files_count
Definition create_zen_ar.c:356
void fix_path_ar(char *initial_path, char *composed_path, char *exit_path_ar)
Definition create_zen_ar.c:2560
void to_octal(uintmax_t value, char *where, size_t size)
Definition create_zen_ar.c:1079
void dump_diretory_VAL_arp(VAL_data *my_VAL_data)
Definition val_create.c:146
void close_archive(void)
Definition tar_1_33.c:4069
int encryption_process_new_mode_21_february_2021_z(char *original_filename_z)
Definition create_zen_ar.c:96
int files_that_cannot_be_read_update
Definition create_zen_ar.c:312
bool EnumerateFolder(char *lpcszFolder_ar, __attribute__((unused)) int first_call, bool only_get_number_of_files_ar)
Definition create_zen_ar.c:2585
char temp_encrypted_file_arp[AMANDA__SIZE]
Definition create_zen_ar.c:335
void __stdcall get_create_process_ar(char *message_ar)
Definition create_zen_ar.c:515
struct my_struct_for_list_ar * aak_pointer_
Definition create_zen_ar.c:369
void get_timestamp_arp(char *file_arp, __time64_t *s_arp, VAL_data *VAL_data_arp)
Definition tar_1_33.c:3939
void xheader_write_global(struct xheader *xhdr)
Definition create_zen_ar.c:1170
int return_value_ar
Definition create_zen_ar.c:2651
void dump_file_new_ar(struct tar_stat_info *parent, char const *name, char *initial_path_ar)
Definition create_zen_ar.c:2432
void pad_archive(off_t size_left)
Definition create_zen_ar.c:1477
double get_bucaneiro_tick(void)
Definition create_zen_ar.c:71
our_map_arp * global_ptr_our_map_arp_v27
Definition create_zen_ar.c:334
int __stdcall create_archive_internal_ar(char *tar_filename_ar, char *path_with_the_files_ar, char *patern_ar)
Definition create_zen_ar.c:4634
size_t blocking_read(int fd, void *buf, size_t count)
Definition create_zen_ar.c:1448
int dump_regular_file_VAL_arp(int fd_arp, VAL_data *my_VAL_data)
Definition val_create.c:469
int64_t folders_count
Definition create_zen_ar.c:357
char process_message_k[AMANDA__SIZE]
Definition create_zen_ar.c:506
__int64 ricard0_itens_processed
Definition create_zen_ar.c:2568
int __stdcall set_encryption_mode_z(char *method_arp)
Definition create_zen_ar.c:9139
#define SHOW_DEBUG_SPEED_Z
Definition create_zen_ar.c:63
int __stdcall libarchive_create_archive_ar_v2(char *tar_filename_ar, char *path_with_the_files_ar, char *patern_ar, int compression_mode_external_ar, int recurse_in_subfolders_arp, enum mode_is_include_or_exclude the__patern_ar__mode, char *compression_level_p_)
Definition create_zen_ar.c:2789
bool also_encrypt_headers_i
Definition create_zen_ar.c:38
void tar_name_copy_str(char *dst, const char *src, size_t len)
Definition create_zen_ar.c:1241
int has_itens_copy
Definition create_zen_ar.c:373
int __stdcall paths_with_invalid_attributes(void)
Definition create_zen_ar.c:4555
int __stdcall Resume_ar(void)
Definition create_zen_ar.c:4405
enum libarchive_compression_modes_AR compression_mode_p
Definition create_zen_ar.c:53
struct timespec get_stat_ctime(struct _stat const *st)
Definition create_zen_ar.c:550
int __stdcall libarchive_get_progress_p(void)
Definition create_zen_ar.c:9240
our_map_arp global_our_map_arp
Definition create_zen_ar.c:332
int __stdcall stringtobyte(unsigned char *dest, unsigned char *src, int len)
Definition create_zen_ar.c:9209
int getpor_10000(int max, int fatia)
Definition create_zen_ar.c:2970
int __stdcall set_7zip_encryption_mode_i(int also_encrypt_headers_i_)
Not in use anymore because we are not using the original 7Zip code from Igor but libarchive (even if ...
Definition create_zen_ar.c:9274
int get_list_itens(char *data_out_ar)
Definition create_zen_ar.c:427
char patern__ar[20000]
Definition create_zen_ar.c:2655
int running_ar
Definition create_zen_ar.c:2650
bool use_encryption_i
Definition create_zen_ar.c:40
int paths_with_invalid_attributes_arp
Definition create_zen_ar.c:313
#define fseek
char path_with_the_files__ar[AMANDA__SIZE+300]
Definition create_zen_ar.c:2654
int __stdcall create_archive_ar(char *tar_filename_ar, char *path_with_the_files_ar, char *patern_ar, int compression_mode_external_ar)
Definition create_zen_ar.c:2859
int __stdcall GetStatus_ar(void)
Definition create_zen_ar.c:2945
struct my_struct_for_list_ar * aak_inicio_
Definition create_zen_ar.c:367
int __stdcall set_compression_level_p(char *level_m)
Definition create_zen_ar.c:2661
void __stdcall get_create_warning_ar(char *message_ar)
Definition create_zen_ar.c:500
void dump_file_or_folder(struct tar_stat_info *st, char const *girlfriend_name, char *initial_path_ar)
Definition create_zen_ar.c:1580
int __stdcall get_last_process_information_ar(char *data_out_ar)
Definition create_zen_ar.c:450
void strtolower_ar(char *path)
Definition create_zen_ar.c:669
int amanda_s_smart_ape(__attribute__((unused)) char *initial_path_amanda_s_smart_ape, bool recurse_on_subfolders_amanda_s_smart_ape, enum amanda__mode amanda_mode, bool)
HANDLE hMapFile_arp
Definition create_zen_ar.c:314
char patern_ar_7zip_maria[20000]
Definition create_zen_ar.c:43
__int64 amanda_itens
Definition create_zen_ar.c:2567
void simple_finish_header(union block *header)
Definition create_zen_ar.c:743
int64_t ricrdo_bytes_read
Definition create_zen_ar.c:341
int __amandacall set_encryption_method_z(enum z_encryption_method method_z)
Definition create_zen_ar.c:9111
int __cdecl create_archive_internal_ar_VAL(char *path_with_the_files_ar)
void dump_file(struct tar_stat_info *parent, char const *name, char const *fullname)
GLOBAL enum set_mtime_option_mode set_mtime_option
Definition create_zen_ar.c:657
char tar_filename__ar[AMANDA__SIZE]
Definition create_zen_ar.c:2653
bool off_to_chars(off_t v, char *p, size_t s)
Definition create_zen_ar.c:1152
struct timespec get_stat_atime(struct _stat const *st)
Definition create_zen_ar.c:632
bool time_to_chars(time_t v, char *p, size_t s)
Definition create_zen_ar.c:886
int __stdcall get_cannot_read_warnings(void)
Definition create_zen_ar.c:4567
union block * write_short_name(struct tar_stat_info *st)
Definition create_zen_ar.c:1268
struct _amanda_ our_map_arp
long int get_stat_mtime_ns(__attribute__((unused)) struct _stat const *st)
Definition create_zen_ar.c:571
char warning_message_k[AMANDA__SIZE]
Definition create_zen_ar.c:491
char fixo_path_ar[AMANDA__SIZE]
Definition create_zen_ar.c:2545
void xheader_store(char const *keyword, struct tar_stat_info *st, void const *data)
Definition sparse_2_k.c:2998
void gid_to_gname(__attribute__((unused)) int gid, char **gname)
Definition create_zen_ar.c:1254
int files_that_cannot_be_read
Definition create_zen_ar.c:311
int compression_mode_ar
Definition create_zen_ar.c:351
#define MYCAST
Definition create_zen_ar.c:2647
int clean_list__ar(void)
Definition create_zen_ar.c:462
void __fastcall clean_up_update_ARP(void)
Definition create_zen_ar.c:4521
char final_file_or_folder_ar[AMANDA__SIZE]
Definition create_zen_ar.c:2546
void tar_stat_init(struct tar_stat_info *st)
Definition create_zen_ar.c:1161
long int get_stat_ctime_ns(__attribute__((unused)) struct _stat const *st)
Definition create_zen_ar.c:530
void dump_file_new_arp(struct tar_stat_info *parent)
Definition create_zen_ar.c:2449
char pause_flag_ar
Definition create_zen_ar.c:353
bool flag_iso_arp
Definition create_zen_ar.c:309
int time_point_arp
Definition create_zen_ar.c:308
bool string_ascii_p(char const *p)
Definition create_zen_ar.c:790
void trocadordebackslashfrente(char *path)
Definition create_zen_ar.c:1423
void write_eot(void)
Definition create_zen_ar.c:2466
bool check_valid_path_i(char *data_i)
Definition create_zen_ar.c:4581
our_map_arp * global_ptr_our_map_arp
Definition create_zen_ar.c:333
int64_t amanda_pereira_total_size
Definition create_zen_ar.c:340
int threads_z
Definition create_zen_ar.c:269
int __stdcall Cancel_ar(void)
Definition create_zen_ar.c:4460
void buffer_write_global_xheader(void)
Definition create_zen_ar.c:1203
off_t current_block_ordinal(void)
Definition create_zen_ar.c:1213
char tar_filename_ar_7zip_maria[AMANDA__SIZE]
Definition create_zen_ar.c:41
void dump_directory(struct tar_stat_info *st)
Definition create_zen_ar.c:1404
enum z_encryption_method internal_encryption_z_method
Definition create_zen_ar.c:84
enum mode_is_include_or_exclude mode_is_include_or_exclude__
Definition create_zen_ar.c:349
bool strmatch(char str[], char pattern[], int n, int m)
Definition create_zen_ar.c:2493
int createtempfilename_and_keep_z(char *path1, char *out_z, WCHAR *signature_z)
Definition extract_kkk.c:1466
int rspmakedir_v2(char *path)
Definition extract_kkk.c:1922
void trocadordebackslashtras(char *path)
Definition extract_kkk.c:2087
void TimetToFileTime(time_t t, LPFILETIME pft)
Definition tar_1_33.c:3685
int __stdcall init_playlist_z_june_24(void)
Definition libarchive_update_i.c:235
int has_itens_is_amanda_update_june_24
Definition libarchive_update_i.c:54
struct my_struct_for_list_ar_is_amanda_update_june_24 * aak_inicio_is_amanda_update_june_24
Definition libarchive_update_i.c:50
#define assert(condition)
Definition lz4.c:273
char * dst
Definition lz4.h:833
const char * src
Definition lz4.h:866
char * dest
Definition lz4.h:806
#define __attribute__(unused_ric_since_2004)
Definition main_cr.c:84
char * ar_gettemppath_z(void)
Definition tar_1_33.c:11455
__int64 getfilesize_ar(char *infile_ar)
Definition tar_1_33.c:2432
type
Definition test-lz4-speed.py:247
#define O_BINARY
Definition compress42.c:385
#define min(a, b)
Definition compress42.c:304
void yasmin_charlotte_pereira_dprintf(int amanda_level, char *format,...)
Definition pedro.c:35
int dummy
Definition sandbox.c:18
#define UNAME_TO_CHARS(name, buf)
Definition sparse_2_k.c:141
#define S_IXGRP
Definition sparse_2_k.c:153
void finish_header(struct tar_stat_info *st, union block *header, off_t block_ordinal)
#define PREFIX_FIELD_SIZE
Definition sparse_2_k.c:26
union block * start_header(struct tar_stat_info *st)
Definition sparse_2_k.c:1386
set_mtime_option_mode
Definition sparse_2_k.c:61
@ USE_FILE_MTIME
Definition sparse_2_k.c:62
#define STRINGIFY_BIGINT(i, b)
Definition sparse_2_k.c:171
#define S_ISUID
Definition sparse_2_k.c:148
#define GNAME_TO_CHARS(name, buf)
Definition sparse_2_k.c:142
void xheader_finish(struct xheader *xhdr)
Definition sparse_2_k.c:992
#define S_IRGRP
Definition sparse_2_k.c:151
#define LG_256
Definition sparse_2_k.c:175
#define MAX_VAL_WITH_DIGITS(digits, bits_per_digit)
Definition sparse_2_k.c:179
char * xheader_ghdr_name(void)
Definition sparse_2_k.c:971
int gid_t
Definition sparse_2_k.c:116
#define NAME_FIELD_SIZE
Definition sparse_2_k.c:25
void uid_to_uname(uid_t uid, char **uname)
#define S_ISVTX
Definition sparse_2_k.c:150
union block * start_private_header(const char *name, size_t size, time_t t)
Definition sparse_2_k.c:896
#define S_ISGID
Definition sparse_2_k.c:149
void xheader_write(char type, char *name, time_t t, struct xheader *xhdr)
Definition sparse_2_k.c:919
#define LG_8
Definition sparse_2_k.c:173
#define CHKBLANKS
Definition sparse_2_k.c:20
#define S_ISCTG(mode)
Definition sparse_2_k.c:16
#define S_IWGRP
Definition sparse_2_k.c:152
int uid_t
Definition sparse_2_k.c:117
char buf[N_BUF]
Definition spewG.c:36
Definition create_zen_ar.c:319
int cancel___arp
Definition create_zen_ar.c:327
int mode_is_include_or_exclude__
Definition create_zen_ar.c:322
int recurse_on_subfolders_arp
Definition create_zen_ar.c:321
char global_patern_ar[1024]
Definition create_zen_ar.c:320
int progress_arp
Definition create_zen_ar.c:325
int pause____arp
Definition create_zen_ar.c:326
char extract_file_arp[1024]
Definition create_zen_ar.c:324
Definition 7zMain.c:324
Definition arp.h:153
DWORD VAL_attributes
Definition arp.h:162
int VAL_encryption_method
Definition arp.h:166
time_t VAL_timestamp
Definition arp.h:171
int64_t VAL_file_size
Definition arp.h:170
char * VAL_filename_dl
Definition arp.h:159
FILETIME LastWriteTime__junior
Definition arp.h:165
FILETIME CreationTime___junior
Definition arp.h:163
int VAL_is_dir
Definition arp.h:167
FILETIME LastAccessTime_junior
Definition arp.h:164
__time64_t VAL_timestamp64
Definition arp.h:154
int VAL_is_encrypted
Definition arp.h:168
Definition poolTests.c:28
Definition tar_1_33.c:3105
char * value
Definition tar_1_33.c:3108
struct keyword_list * next
Definition tar_1_33.c:3106
char * pattern
Definition tar_1_33.c:3107
Definition tar_1_33.c:1949
time_t mtime_tv_sec_arp
Definition tar_1_33.c:1961
char * filename_k
Definition tar_1_33.c:1955
struct my_struct_for_list_ar_is_amanda_update_ * next_ar
Definition tar_1_33.c:1960
Definition libarchive_update_i.c:31
int64_t filesize_i
Definition libarchive_update_i.c:35
char * item_entry_i
Definition libarchive_update_i.c:37
bool in_use_i
Definition libarchive_update_i.c:39
bool is_dir_i
Definition libarchive_update_i.c:38
struct my_struct_for_list_ar_is_amanda_update_june_24 * next_ar
Definition libarchive_update_i.c:45
int64_t attributes_i
Definition libarchive_update_i.c:41
int64_t file_offset_i
Definition libarchive_update_i.c:36
time_t mtime_i
Definition libarchive_update_i.c:33
Definition create_zen_ar.c:360
int has_next
Definition create_zen_ar.c:363
char * filename_ar
Definition create_zen_ar.c:361
struct my_struct_for_list_ar * next_ar
Definition create_zen_ar.c:362
Definition tar.h:25
char typeflag
Definition tar.h:33
Definition tar.h:287
char * gname
Definition tar.h:296
struct xheader xhdr
Definition tar.h:340
off_t archive_file_size
Definition tar.h:314
char * file_name
Definition tar.h:289
struct _stat stat
Definition tar.h:306
struct tar_stat_info * parent
Definition tar.h:350
char * orig_file_name
Definition tar.h:288
struct timespec mtime
Definition tar.h:311
struct timespec ctime
Definition tar.h:312
struct timespec atime
Definition tar.h:310
Definition tar.h:271
struct obstack * stk
Definition tar.h:272
char * buffer
Definition tar.h:274
#define TOEXEC
Definition tar.h:77
#define DIRTYPE
Definition tar.h:57
#define TOWRITE
Definition tar.h:76
#define CONTTYPE
Definition tar.h:59
#define TUEXEC
Definition tar.h:71
#define TGREAD
Definition tar.h:72
#define TGEXEC
Definition tar.h:74
#define TUREAD
Definition tar.h:69
#define TSUID
Definition tar.h:65
#define TSGID
Definition tar.h:66
#define GNUTYPE_LONGNAME
Definition tar.h:178
#define TGWRITE
Definition tar.h:73
#define TUWRITE
Definition tar.h:70
#define TOREAD
Definition tar.h:75
archive_format
Definition tar.h:251
@ GNU_FORMAT
Definition tar.h:258
@ OLDGNU_FORMAT
Definition tar.h:254
@ POSIX_FORMAT
Definition tar.h:256
@ STAR_FORMAT
Definition tar.h:257
@ USTAR_FORMAT
Definition tar.h:255
@ V7_FORMAT
Definition tar.h:253
#define TSVTX
Definition tar.h:67
#define OLDGNU_MAGIC
Definition tar.h:159
#define XGLTYPE
Definition tar.h:62
#define BLOCKSIZE
Definition tar.h:248
ResumeExecution_gzip_ar ResumeExecution_gzip_ar_func
Definition tar_1_33.c:2152
#define S_IROTH
Definition tar_1_33.c:4891
double time___compression_charli
Definition tar_1_33.c:104
pause_b3___aakp_b3___ar pause_b3___aakp_b3___ar_func
Definition tar_1_33.c:2326
CancelExecution_gzip_ar CancelExecution_gzip_ar_func
Definition tar_1_33.c:2154
void tar_stat_destroy(struct tar_stat_info *st)
Definition tar_1_33.c:5799
get_progress_lzip_ar get_progress_lzip_ar_func
Definition tar_1_33.c:2186
bool mode_is_update_libarchive_v27
Definition tar_1_33.c:106
GetProgress_bzip2_ar GetProgress_bzip2_ar_func
Definition tar_1_33.c:2167
#define __amandacall
Definition tar_1_33.c:79
char the_pass_arp[1024+1]
Definition tar_1_33.c:804
compress_zs___rspk_ar compress_zs___rspk_ar_func
Definition tar_1_33.c:2275
int parolin_compression_level_p
Definition tar_1_33.c:122
union block * current_block
Definition tar_1_33.c:3303
union block * record_start
Definition tar_1_33.c:3301
compress_lzip_rspk_ar compress_lzip_rspk_ar_func
Definition tar_1_33.c:2182
bool message_box_flag_m
Definition tar_1_33.c:86
get_progress_g2___ar get_progress_g2___ar_func
Definition tar_1_33.c:2309
wchar_t * permissive_name_m_v27(const wchar_t *wname, WCHAR *ar_temp)
copy of permissive_name_m_, because in some API calls you need to conversions to a wide path this is ...
Definition tar_1_33.c:376
bool extract_cancel_flag
Definition tar_1_33.c:629
get_progress_xz___ar get_progress_xz___ar_func
Definition tar_1_33.c:2217
void set_next_block_after(union block *block)
Definition tar_1_33.c:5178
bool recurse_on_subfolders_arp
Definition tar_1_33.c:647
get_progress_bb___ar get_progress_bb___ar_func
Definition tar_1_33.c:2370
char global_patern_ar[20000]
Definition tar_1_33.c:621
#define GLOBAL
Definition tar_1_33.c:3287
void add_more_one_is_amanda_update_(char *filename_k_ar, __int64 size_of_file_arp, time_t mtime_tv_sec_arp, int is_directory_arp, __int64 position_on_file_arp, DWORD VAL_attributes, int VAL_is_encrypted, __time64_t VAL_timestamp64, VAL_data *VAL_data__arp)
Definition tar_1_33.c:1977
int running_update
Definition tar_1_33.c:562
#define S_IXOTH
Definition tar_1_33.c:4917
int compression_level_xcx
Definition tar_1_33.c:97
get_progress_br___ar get_progress_br___ar_func
Definition tar_1_33.c:2294
get_progress_co___ar get_progress_co___ar_func
Definition tar_1_33.c:2234
size_t available_space_after(union block *pointer)
Definition tar_1_33.c:5169
void open_archive(enum access_mode wanted_access)
Definition tar_1_33.c:6987
int64_t bytes_left_in_the_update_file_arp
Definition tar_1_33.c:643
resume_b3___aakp_b3___ar resume_b3___aakp_b3___ar_func
Definition tar_1_33.c:2328
int ret_arp_
Definition tar_1_33.c:592
void assign_string(char **string, const char *value)
Definition tar_1_33.c:5155
GetReturnValue_gzip_ar GetReturnValue_gzip_ar_func
Definition tar_1_33.c:2156
#define S_IWOTH
Definition tar_1_33.c:4904
struct my_struct_for_list_ar_is_amanda_update_ * aak_inicio_is_amanda_update_
Definition tar_1_33.c:1965
get_progress_lzma_ar get_progress_lzma_ar_func
Definition tar_1_33.c:2201
get_progress_l3___ar get_progress_l3___ar_func
Definition tar_1_33.c:2340
libarchive_process_p libarchive_process_p_func
Definition tar_1_33.c:912
GLOBAL int archive
Definition tar_1_33.c:3291
compress_l3___rspk_ar compress_l3___rspk_ar_func
Definition tar_1_33.c:2336
bool mode_is_VAL_arp
Definition tar_1_33.c:594
get_progress_ju___ar get_progress_ju___ar_func
Definition tar_1_33.c:2249
int num_threads_xcx
Definition tar_1_33.c:99
char compression_level_p[300]
Definition tar_1_33.c:139
GetFinished_gzip_ar GetFinished_gzip_ar_func
Definition tar_1_33.c:2146
int progress_lib_v27
Definition tar_1_33.c:112
get_progress_b3___ar get_progress_b3___ar_func
Definition tar_1_33.c:2324
Compress_gzip_ar Compress_gzip_ar_func
Definition tar_1_33.c:2144
int has_itens_is_amanda_update_internal_b_arp
Definition tar_1_33.c:635
get_progress_l5___ar get_progress_l5___ar_func
Definition tar_1_33.c:2355
char archive_name_array_filename[AMANDA__SIZE]
Definition tar_1_33.c:3215
GLOBAL int blocking_factor
Definition tar_1_33.c:3290
int getpor_10000_int64_t_ar(int64_t max, int64_t fatia)
Definition tar_1_33.c:7574
set_progress_p set_progress_p_func
Definition tar_1_33.c:914
#define S_IRUSR
Definition tar_1_33.c:4885
PauseExecution__arp_ PauseExecution__arp_func
Definition tar_1_33.c:1313
char temp_file_update_i[AMANDA__SIZE]
Definition tar_1_33.c:143
char * valquiria_wide_to_utf8(WCHAR *pUSC2_maria, char *ar_temp_char)
Definition tar_1_33.c:766
ResumeExecution_arp_ ResumeExecution_arp_func
Definition tar_1_33.c:1314
int encryption_method_to_create
Definition tar_1_33.c:577
int internal_progress_z(void)
Definition tar_1_33.c:1404
char error_message_k[AMANDA__SIZE]
Definition tar_1_33.c:176
bool only_get_number_of_files_ar_v27
Definition tar_1_33.c:120
compress_g2___rspk_ar compress_g2___rspk_ar_func
Definition tar_1_33.c:2305
int(__stdcall * tar_list_function_ar)(int clear_flag_k)
Definition tar_1_33.c:172
compress_xz___rspk_ar compress_xz___rspk_ar_func
Definition tar_1_33.c:2213
int gname_to_gid(char const *gname, short *gidp)
void init_rsp_arp_encrypt_arp(void)
Definition tar_1_33.c:1327
void mv_begin_write(const char *file_name, off_t totsize, off_t sizeleft)
bool extract_pause__flag
Definition tar_1_33.c:628
bool mode_is_update_arp
Definition tar_1_33.c:636
libarchive_create_archive_init_p libarchive_create_archive_init_p_func
Definition tar_1_33.c:911
int our_update_file_open__arp
Definition tar_1_33.c:641
compress_l4___rspk_ar compress_l4___rspk_ar_func
Definition tar_1_33.c:2260
bool enable_encryption_arp_
Definition tar_1_33.c:803
int step_for_create_arp
Definition tar_1_33.c:638
union block * find_next_block(void)
Definition tar_1_33.c:6798
compress_l5___rspk_ar compress_l5___rspk_ar_func
Definition tar_1_33.c:2351
compress_b3___rspk_ar compress_b3___rspk_ar_func
Definition tar_1_33.c:2320
GetReturnValue_bzip2_ar GetReturnValue_bzip2_ar_func
Definition tar_1_33.c:2177
#define INT_STRLEN_BOUND(t)
Definition tar_1_33.c:76
int number_of_threads_p
Definition tar_1_33.c:149
GetProgress_gzip_ar GetProgress_gzip_ar_func
Definition tar_1_33.c:2148
@ ACCESS_WRITE
Definition tar_1_33.c:3312
compress_c5___rspk_ar compress_c5___rspk_ar_func
Definition tar_1_33.c:2382
GLOBAL size_t record_size
Definition tar_1_33.c:3289
PauseExecution_gzip_ar PauseExecution_gzip_ar_func
Definition tar_1_33.c:2150
get_progress_c5___ar get_progress_c5___ar_func
Definition tar_1_33.c:2386
compress_bb___rspk_ar compress_bb___rspk_ar_func
Definition tar_1_33.c:2366
int encrypt_arp(char *inputfile, char *outputfile, char *key, int encryption_method_z, int ar_threads_z_v27_)
Definition tar_1_33.c:1444
GLOBAL bool numeric_owner_option
Definition tar_1_33.c:3300
compress_ju___rspk_ar compress_ju___rspk_ar_func
Definition tar_1_33.c:2245
#define S_IWUSR
Definition tar_1_33.c:4898
libarchive_close_p libarchive_close_p_func
Definition tar_1_33.c:913
GetStatus_bzip2_ar GetStatus_bzip2_ar_func
Definition tar_1_33.c:2165
get_progress_zs___ar get_progress_zs___ar_func
Definition tar_1_33.c:2279
CancelExecution_arp_ CancelExecution_arp_func
Definition tar_1_33.c:1315
Compress_bzip2_ar Compress_bzip2_ar_func
Definition tar_1_33.c:2163
double inittimer2(int value)
Definition tar_1_33.c:476
void update_progress_arp(int64_t *bytes_read_arp__)
Definition tar_1_33.c:1418
update_progress_arp_ update_progress_arp_func
Definition tar_1_33.c:1317
char my_error_as_a_programmer_z[AMANDA__SIZE]
Definition tar_1_33.c:170
char update_filename_arp[AMANDA__SIZE]
Definition tar_1_33.c:644
dump_status
Definition tar_1_33.c:3095
@ dump_status_ok
Definition tar_1_33.c:3096
@ dump_status_not_implemented
Definition tar_1_33.c:3099
@ dump_status_fail
Definition tar_1_33.c:3098
@ dump_status_short
Definition tar_1_33.c:3097
bool dont_delete_7zip_file_i
Definition tar_1_33.c:118
void __stdcall enable_encryption(int enable_arp)
Definition tar_1_33.c:832
cancel_b3___aakp_b3___ar cancel_b3___aakp_b3___ar_func
Definition tar_1_33.c:2330
GLOBAL bool read_full_records_option
Definition tar_1_33.c:3288
get_progress_l4___ar get_progress_l4___ar_func
Definition tar_1_33.c:2264
bool use_name_i
Definition tar_1_33.c:581
compress_co___rspk_ar compress_co___rspk_ar_func
Definition tar_1_33.c:2230
bool progress_is_libarchive_v27
Definition tar_1_33.c:110
#define S_IXUSR
Definition tar_1_33.c:4911
WCHAR * amanda_utf8towide_2_(char *pUTF8, WCHAR *ar_temp)
Definition tar_1_33.c:729
compress_br___rspk_ar compress_br___rspk_ar_func
Definition tar_1_33.c:2290
compress_lzma_rspk_ar compress_lzma_rspk_ar_func
Definition tar_1_33.c:2197
GLOBAL struct timespec start_time
Definition tar_1_33.c:3299
#define DEFAULT_BLOCKING
Definition tar_1_33.c:3004
FILE * our_update_file_fopen_arp
Definition tar_1_33.c:640
int fatal_exit_k
Definition tar_1_33.c:3217
Definition tar.h:373
struct posix_header header
Definition tar.h:375
char buffer[BLOCKSIZE]
Definition tar.h:374
Definition compress42.c:551
void dump_file_or_folder_final_arp(struct tar_stat_info *st)
Definition update_arp_k.c:125
__int64 _telli64(int handle)
size_t size
Definition platform.h:559
int __stdcall status(int newvalue)
Definition bzip2dll.c:513
int
Definition lzoconf.h:340
#define SEEK_SET
Definition zconf.h:498
#define const
Definition zconf.h:230
#define b(i)
Definition sha256.c:42
#define a(i)
Definition sha256.c:41
uint32_t flags
Definition container.h:628
lzma_index ** i
Definition index.h:629
#define NULL
Definition getopt1.c:37
static uint32_t const uint8_t uint32_t len
Definition memcmplen.h:44
char name[NAME_LEN_MAX+1]
Name of the filter.
Definition string_conversion.c:450
#define header(is_bt, len_min, ret_op)
Definition lz_encoder_mf.c:191
const char * str
Table column heading string.
Definition list.c:109
ret
Definition zlib_interface.c:30
#define MAX_PATH
Definition decodecorpus.c:40