<commit_before>/*
 * This file handles all of the login logic for the project
 */

#include <stdio.h>

#include "Login.h"
#include "Sanitizer.h"
#include <stdlib.h>
#include <string.h>
#include "utility.h"
#include <errno.h>


int MAX_ATTEMPTS = 5;
int MAX_BUFF = 20;
//handles the login logic for lock out and attempts/ uses loginUser()

struct LoginT* loginMain() {
    int attempts = 0;
    LoginT verify=NULL;
    char usernameBuffer[20] = {'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0'};
    char passwordBuffer[20] = {'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0'};

    printf("ENTER USER: ");
    
    if(fgets(usernameBuffer, 20, stdin) == NULL) {
        //Something happened.
    }
    
    sanitizeInput(usernameBuffer, 20);
    while (attempts < MAX_ATTEMPTS) {
        attempts++;
        printf("\nENTER PASSWORD: ");
        
        if(fgets(passwordBuffer, 20, stdin) == NULL) {
            //Something happened
        }
        
        sanitizeInput(passwordBuffer, 20);<commit_msg>,,,,,,,<commit_after>/*
 * This file handles all of the login logic for the project
 */

#include <stdio.h>

#include "Login.h"
#include "Sanitizer.h"
#include <stdlib.h>
#include <string.h>
#include "utility.h"
#include <errno.h>


int MAX_ATTEMPTS = 5;
int MAX_BUFF = 20;
//handles the login logic for lock out and attempts/ uses loginUser()

struct LoginT* loginMain() {
    int attempts = 0;
    LoginT* verify=NULL;
    char usernameBuffer[20] = {'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0'};
    char passwordBuffer[20] = {'\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0'};

    printf("ENTER USER: ");
    
    if(fgets(usernameBuffer, 20, stdin) == NULL) {
        //Something happened.
    }
    
    sanitizeInput(usernameBuffer, 20);
    while (attempts < MAX_ATTEMPTS) {
        attempts++;
        printf("\nENTER PASSWORD: ");
        
        if(fgets(passwordBuffer, 20, stdin) == NULL) {
            //Something happened
        }
        
        sanitizeInput(passwordBuffer, 20);
{'fraction_non_alphanumeric': 0.24422154382904493, 'fraction_numerical': 0.04884430876580898, 'mean_word_length': 2.5130168453292496, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7021850', 'n_tokens_mistral': 865, 'n_tokens_neox': 833, 'n_words': 237}