From a27af28f343daf7599bcd92b3c2679dfdc5ffc6c Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Thu, 16 Apr 2020 10:20:24 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu6/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du6/program.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/du6/program.c b/du6/program.c index b3dc19b..18a98e0 100644 --- a/du6/program.c +++ b/du6/program.c @@ -26,19 +26,12 @@ int main() } int pm = 0; char** pole_smernikov = malloc(fullSIZE * sizeof(char)); - //char* success[SIZE]; - //char* unsuccess[SIZE]; - //memset(pole_smernikov,0,SIZE*sizeof(char*)); int k = 0; char* line = malloc(wSIZE * sizeof(char)); - //memset(line,0,SIZE); - //char* r; - //int q = 0; size_t pocet_znakov = 0; int antiInfC = 0; char r = 'a'; - while (fgets(line,wSIZE,stdin)) { - + while (fgets(line,wSIZE,stdin)) { k = 0; pocet_znakov = strlen(line); char* all = malloc(pocet_znakov); @@ -47,7 +40,6 @@ int main() if(memcmp(pole_smernikov[x], line, pocet_znakov) == 0){ k++; } - //pole_smernikov[k] = line; } if(0 == k){ pole_smernikov[pm] = all; @@ -74,18 +66,8 @@ int main() pole_smernikov[j-1] = temp; } } - // if (memcmp(pole_smernikov[i],line,pocet_znakov)){ - // // Nasiel som - // unsuccess[k] = pole_smernikov[i]; - // printf("%s\n", unsuccess[k]); - // } else{ - // success[q] = pole_smernikov[i]; - // printf("%s\n", success[q]); - - // } i++; } - // printf("%s\n", pole_smernikov[0]); if(NULL == pole_smernikov[1]){ puts("Ziadne prihlasky"); return 0;