Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
bzip3_thread.c
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2
3 #2023 X March 21 19:50 PM Brasília Time
4
5* *
6* Licensa de Copia (C) <2024> <Aurora Boreal> *
7* *
8* Este programa e software livre: voce pode redistribuir isto e/ou *
9* modificar isto sobre os termos do GNU Licensa Geral Pública como 25
10* publicado pela Fundacao de Software Livre, tanto a versão 3 da *
11* Licensa, ou (dependendo da sua opcao) qualquer versao posterior. *
12* *
13* Este programa e distribuido na esperanca que isto vai ser util, *
14* mas SEM QUALQUER GARANTIA; sem ate mesmo a implicada garantia de *
15* COMERCIALIZAcaO ou CABIMENTO PARA UM FIM PARTICULAR. Veja a *
16* Licensa Geral Publica para mais detalhes. *
17* *
18* Você deve ter recebido uma cópia da LICENSA GERAL PUBLICA e a GNU *
19* Licensa Publica Menor junto com este programa *
20* Se não, veja <http://www.gnu.org/licenses/>. *
21* *
22* Suporte: sourceforge.net github.com *
23* *
24* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
25
26* Pereira: arsoftware25@gmail.com ricardo@arsoftware.net.br *
27* xcx: arsoftware10@gmail.com charli@arsoftware.net.br *
28 Yasmin: yasmin@arsoftware.net.br *
29 pereira1001@users.sourceforge.net
30 */
31
32
34
35unsigned __stdcall my_thread_function_v27xcx(void * my_argument_z )
36{
37 my_thread_struct_z * ptr_my_struct_z = (void *) my_argument_z;
38 assert(ptr_my_struct_z);
39 if(NULL == ptr_my_struct_z->dest)
40 {
41 goto saida_amanda;
42 }
43
44 // pedro_dprintf(-1, "bytes to extract %lld\n", ptr_my_struct_z->size_of_input_file_copy_z);
45
46 ptr_my_struct_z->dest_is_FILE_z = true;
47
48 ptr_my_struct_z->retvalue = zuncompress_sha512_k_mt_decoding_multi_thread_z(ptr_my_struct_z->input_file, NULL, ptr_my_struct_z);
49
50 if(119 == ptr_my_struct_z->internal_error_arp)
51 {
52 ptr_my_struct_z->retvalue = 119;
53 }
54 else if(6 == ptr_my_struct_z->internal_error_arp)
55 {
56 ptr_my_struct_z->retvalue = ptr_my_struct_z->internal_error_arp;
57 }
58 else
59 {
60 if(ptr_my_struct_z->retvalue)
61 {
62 pedro_dprintf(-1, "error 2 7 \n");
63 ptr_my_struct_z->retvalue = 11; //Decompression error
64 }
65 }
66
67saida_amanda:;
68
69 if (*(ptr_my_struct_z->intcancelxcx))
70 {
71 ptr_my_struct_z->retvalue = 119;//User abort
72 }
73
74 if(ptr_my_struct_z->input_file )
75 {
76 fclose(ptr_my_struct_z->input_file);
77 }
78
80 {
81 thread_return_value_z = ptr_my_struct_z->retvalue; // CriticalSection?...
82 }
83
84 if(ptr_my_struct_z->dest)
85 {
86 fclose(ptr_my_struct_z->dest);
87 }
88
89 //Sleep(2000);
90
91 free(my_argument_z);
92 _endthreadex(0);
93
94 return 27+51;
95}
void pedro_dprintf(int amanda_level, char *format,...)
Definition pedro.c:43
int thread_return_value_z
Definition bzip3.c:592
int zuncompress_sha512_k_mt_decoding_multi_thread_z(FILE *source, FILE *dest, my_thread_struct_z *amanda)
unsigned __stdcall my_thread_function_v27xcx(void *my_argument_z)
Definition bzip3_thread.c:35
#define assert(condition)
Definition lz4.c:273
const char * source
Definition lz4.h:808
char * dest
Definition lz4.h:806
Definition stdio_v3.h:23
int retvalue
Definition stdio_v3.h:39
bool dest_is_FILE_z
Definition stdio_v3.h:32
int * intcancelxcx
Definition bzip3_structs_z.h:58
FILE * dest
Definition stdio_v3.h:26
int internal_error_arp
Definition stdio_v3.h:36
FILE * input_file
Definition stdio_v3.h:35
#define NULL
Definition getopt1.c:37