HTMLify

main.c
Views: 12 | Author: abh
#include <stdio.h>
#include "search.h"
#include "ui.h"

void print_stats(int , int, int, char* current_dir);

int main(int argc, char* argv[]) {
    char *search_string, *search_dir;
    SearchResult sr;

    sr = search(argv[1], argv[2], print_stats);
    printf("\n");

    printf("Search complete\n");
    printf("%d found \n", sr.result_count);

    ui(sr);

    // for (int i=0; i<sr.result_count; i++)
    //     printf("%s\n", sr.results[i]);

    return 0;
}

void print_stats(int file_count, int dir_count, int files_matched, char* current_dir) {
    printf("[%d matched] | f: %d | d: %d | c: %s \r", files_matched, file_count, dir_count, current_dir);
}

Comments