From 4c1881da8c6e9e5dcdb3a50b8d6e9b7350b72feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Korpesio?= Date: Thu, 20 Jan 2022 08:04:32 +0100 Subject: [PATCH] prvy --- sk1a.zip | Bin 14098 -> 0 bytes sk1a/readme.md | 8 ++++---- sk2a/compressor.c | 13 +++---------- sk2a/program | Bin 29344 -> 29232 bytes sk2a/readme.md | 12 ++---------- 5 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 sk1a.zip diff --git a/sk1a.zip b/sk1a.zip deleted file mode 100644 index 098b10f5278ffe91d3f081ae25c7ec0a7ab5c4ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14098 zcmZ{r19TiLc{=66KzTbDhzfaYvQ>*$s zwb$O=t7}*9tt1N$0SEHe0jOhB`^S%eeL;S<&NeJYOiG`pV0?C9K$^WnRU4v=C8aXdeSAbB?$FTh(7}-1fc--|G4=e+aR)r1b;%>7^R4ru0Po+!ch{_HS?hkI4 z4ofyv9J(F^;ewoeAWz`=a$yslc{wKHH6Aq`Rf&2S1`#5#aOzb#t(j*3O5;kX2vCdp zX)PS+m|^}sfv7T>!`l5JQp}udB~+1~ECgNwXft_G4jJO&L&oVxhRC+?6>-sD#XlRE zGcE`3*SCO|ypt*0ckGS#y!e_`99Fh>p)Q?G%=7{NABC3|u&M2$V3r?#nn;T9e=FR+ zD#P1WSCepLy2;suTH(Ai&!ipmths(wVeOYqyTF|J_iRR+j-~)}+l{T2G)}Aw&cFcw)9aH=bS= z(#QrA&YipSZeQQ0UbprSOpPtm6j9=nAQ};2PljFEnzSxWwi(KB-x-|FdP0-tHItH- ze;(XLq*%TFR@vjJ2C5oUIr3-dC`?gkB=$QUxMFbkaQS|DKG)Fm#`3S)VXF1|Af~RK zps1FshUvmS|C6WAtDY2b26jDK8PyeWX28Y9`?@5q>5YDRAUCwe+sDYA^OWz+(w58> z(?#N+acH5Xprb28KX-mt3YVCyEz?O6@RX|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>= 0 && x < size) && (y >= 0 && y < size) && (maze[x * size + y] == ' ')){ return 1; } return 0; } -int backtracking(char* maze, int x, int y, int size){ -if(x == size - 1 && y == size - 1 && maze[x * size + y] == ' '){ +int backtracking(char* maze, int x, int y, int size){ //https://www.geeksforgeeks.org/rat-in-a-maze-backtracking-2/ +if(x == size - 1 && y == size - 1 && maze[x * size + y] == ' '){ //kontrola ci sa nachadzam na konci maze[x * size + y] = '*'; return 1; } - if(issafe(maze, x, y, size) == 1) { + if(issafe(maze, x, y, size) == 1) { // znazornenie stien maze[x * size + y] = '*'; if (backtracking(maze, x, y + 1, size) == 1) { diff --git a/sk2a/compressor.c b/sk2a/compressor.c index c45b0cb..e7ee5c4 100644 --- a/sk2a/compressor.c +++ b/sk2a/compressor.c @@ -24,7 +24,7 @@ void delete(struct dict* tree){ for (int i = 0 ;i < SIZE; i++){ delete(tree-> characters[i]); } - free(tree); + } void get_words (struct dict* tree,char* words[]){ @@ -102,7 +102,7 @@ int mylz78compress(char* buff,int size,char** outbuf){ } delete(root); - free(words); + *outbuf = temp; return strlen(temp); @@ -183,9 +183,7 @@ void compress(FILE* infile,FILE* outfile){ fwrite(outbuf,sizeof(char),outsize,outfile); } - free(buffer); - free(tempbuf); - free(outbuf); + } @@ -204,7 +202,6 @@ int myrldecompress(char* buff,int size,char** outbuf){ char *tempbuf = calloc(size,sizeof(char)); memset(tempbuf,'\0',size); strcpy(tempbuf,*outbuf); - free(*outbuf); *outbuf = tempbuf; } @@ -242,7 +239,6 @@ int mylz78decompress(char* buff,int size,char** outbuf){ char *tempbuf = calloc(size,sizeof(char)); memset(tempbuf,'\0',size); strcpy(tempbuf,*outbuf); - free(*outbuf); *outbuf = tempbuf; } @@ -278,8 +274,5 @@ void decompress(FILE* infile,FILE* outfile){ fwrite(outbuf,sizeof(char),outsize,outfile); } - free(buffer); - free(tempbuf); - free(outbuf); } diff --git a/sk2a/program b/sk2a/program index c6f260994591c8bad1cf7ef67f1063184857e47e..e57f5bd5370ca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TOJ3`$aa^w!F8%)CuW z-X7g}V=A*KmNnb9DQp|OGk&Pua*N_Rtf=xm8{^^)&bQcvN;c@2tZ zxstR&Ni_NGICjI)2^C$-uf1v_qj-(HDP8gApg%pEj8}p(sGqFjU7~)nOHRO>#Tq_( zbMp1923WPq>hS53)1=irp06_?f5#Y*YMr>lr;o^&0mhLuL_nnB+n|^;6zKnWCwx*ZBBl$i!il;DLfNwNrn+ zD;eBESTi--b|6n5D+0a|YHQT2EG#NJTF~<)Fda4WZ(HmwU^Ns6l(y52kEDM+YhhB2 zk41^ecJb#IfTsmJNd2NSLcHhJD za~r%`t9sjTPmobP?=PQ|jB*UQx+CYocAGlJf)3kIUJ`F5Jl}XzMId^f#C-%_C&EWt zo7$C7f1BUCL#(}8e91Ikww1_L*>q^XP4&`?jqK~WZx@hE(K5m9dFgmU;5`qHr@7`R zJ-xe7#%A(LX%)In#`6=1OjEu86t?xer5=y&m^Pcm(f7)d64)P?AH8lyzByVqyN0nU zXrJS^8C$}jmxJvNzpYH%vJE;2D(~=H7YlSTgzqS}wu(_J?7pM8>w0cn)7!u{H-vwk zB6IyK=B2^jxrMem@y*hpgKSeh}0J+4CU7*ywaHA characters[i]); } -free(tree); } void get_words (struct dict* tree,char* words[]){ //posielam cely strom a smernik na dvojrozmerne pole @@ -102,7 +101,7 @@ sprintf(last,"-%d-%c\n",current->index,c); // } delete(root); //nepotrebujeme strom, uvolnime pamat - free(words); + *outbuf = temp; //adresa sa zapise do outbuffer return strlen(temp); @@ -183,9 +182,7 @@ char *buffer = calloc(insize,sizeof(char)); //alokuje pamat fwrite(outbuf,sizeof(char),outsize,outfile); //napise sa do suboru, z akeho buffera do akeho suboru } - free(buffer); - free(tempbuf); - free(outbuf); + } @@ -204,7 +201,6 @@ memset(*outbuf,0,size + 1); char *tempbuf = calloc(size,sizeof(char)); memset(tempbuf,'\0',size); strcpy(tempbuf,*outbuf); - free(*outbuf); *outbuf = tempbuf; } @@ -242,7 +238,6 @@ int bytes_read, bytes_read_all = 0; //citame vstupny buffer, necitame p char *tempbuf = calloc(size,sizeof(char)); memset(tempbuf,'\0',size); strcpy(tempbuf,*outbuf); - free(*outbuf); *outbuf = tempbuf; } @@ -278,7 +273,4 @@ char *buffer = calloc(insize,sizeof(char)); fwrite(outbuf,sizeof(char),outsize,outfile); } - free(buffer); - free(tempbuf); - free(outbuf); } \ No newline at end of file