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;