Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
lzop2_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* Licença 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
33unsigned __stdcall my_thread_function_v27_14(void *my_argument_z)
34{
35 // exit(40);
36 my_thread_struct_z *ptr_my_struct_z = (void *)my_argument_z;
37 assert(ptr_my_struct_z);
38 if (NULL == ptr_my_struct_z->dest)
39 {
40 goto saida_amanda;
41 }
42
43 if (0 != ptr_my_struct_z->offset_z)
44 {
45
46 if (
47 0 != _fseeki64(
48 ptr_my_struct_z->input_file,
49 ptr_my_struct_z->offset_z,
50 SEEK_SET))
51 {
52 ptr_my_struct_z->retvalue = 403; //File access error
53 goto saida_amanda;
54 }
55 }
56
57 //aqui amor...
58
59 ptr_my_struct_z->dest_is_FILE_z = true;
60
61 ptr_my_struct_z->retvalue = decompress_file_ch_1(ptr_my_struct_z->input_file, NULL, ptr_my_struct_z);
62
63 if (119 == ptr_my_struct_z->internal_error_arp)
64 {
65 ptr_my_struct_z->retvalue = 119;
66 }
67 else if (6 == ptr_my_struct_z->internal_error_arp)
68 {
69 ptr_my_struct_z->retvalue = ptr_my_struct_z->internal_error_arp;
70 }
71 else
72 {
73 if (ptr_my_struct_z->retvalue)
74 {
75 ptr_my_struct_z->retvalue = 777; //Decompression error
76 }
77 }
78
79saida_amanda:;
80
81 if (intcancel_14)
82 {
83 ptr_my_struct_z->retvalue = 119; //User abort
84 }
85
86 if (ptr_my_struct_z->dest)
87 {
88 fclose(ptr_my_struct_z->dest);
89 ptr_my_struct_z->dest = NULL;
90 }
91
92 if (ptr_my_struct_z->input_file)
93 {
94 fclose(ptr_my_struct_z->input_file);
95 }
96
98 {
99 thread_return_value_z_14 = ptr_my_struct_z->retvalue;
100 }
101
102 //Sleep(2000);
103
104 free(my_argument_z);
105 _endthreadex(0);
106
107 return 27 + 51;
108}
#define assert(condition)
Definition lz4.c:273
Definition stdio_v3.h:23
int64_t offset_z
Definition stdio_v3.h:44
int retvalue
Definition stdio_v3.h:39
bool dest_is_FILE_z
Definition stdio_v3.h:32
FILE * dest
Definition stdio_v3.h:26
int internal_error_arp
Definition stdio_v3.h:36
FILE * input_file
Definition stdio_v3.h:35
int intcancel_14
Definition compress2dll.c:122
int thread_return_value_z_14
Definition compress2_2_z.c:305
int decompress_file_ch_1(FILE *f_in, FILE *f_out, my_thread_struct_z *amanda)
Definition compress2_z.c:1376
unsigned __stdcall my_thread_function_v27_14(void *my_argument_z)
Definition lzop2_thread.c:33
#define SEEK_SET
Definition zconf.h:498
#define NULL
Definition getopt1.c:37