How kamillemelgaard04-design/a1 works
This repository contains small C command-line programs for searching files, counting set bits, and computing Fibonacci numbers; it is not a single integrated application. The principal file-oriented workflow walks supplied paths and processes regular files, while the Fibonacci program reads lines from standard input. Multithreaded variants are present, but the grep and histogram variants contain assertion placeholders rather than implemented worker workflows. The README gives no further capability details, so relationships below follow the shown source; the job-queue implementation is also stubbed.
Main entry points: fibs.c Line reader · fhistogram.c File histogram · fauxgrep.c File search · job_queue.h Job queue API
Components 15
File tools
- File search
fauxgrep.c - Line matcher
fauxgrep.c - Parallel search
fauxgrep-mt.c - File histogram
fhistogram.c - Parallel histogram
fhistogram-mt.c
Fibonacci tool
- Line reader
fibs.c - Fibonacci calculator
fibs.c
Concurrency
- Worker pool
fibs.c - Job queue API
job_queue.h - Job queue implementation
job_queue.c
Shared logic
- Bit counter
histogram.h - Histogram display
histogram.h
Other components
- CLI user
- Files and paths
- Standard input/output
Connections 23
- CLI user → File search: invokes
fauxgrep.c - File search → Files and paths: walks paths
fauxgrep.c - File search → Line matcher: processes files
fauxgrep.c - Line matcher → Files and paths: reads lines
fauxgrep.c - Line matcher → Standard input/output: prints matches
fauxgrep.c - CLI user → Parallel search: invokes
fauxgrep-mt.c - Parallel search → Files and paths: walks paths
fauxgrep-mt.c - CLI user → File histogram: invokes
fhistogram.c - File histogram → Files and paths: walks and reads
fhistogram.c - File histogram → Bit counter: updates counts
fhistogram.c - File histogram → Histogram display: prints counts
fhistogram.c - Bit counter → Histogram display: provides counts
histogram.h - CLI user → Parallel histogram: invokes
fhistogram-mt.c - Parallel histogram → Files and paths: walks paths
fhistogram-mt.c - CLI user → Line reader: invokes
fibs.c - Line reader → Standard input/output: reads lines
fibs.c - Line reader → Job queue API: enqueues lines
fibs.c - Line reader → Worker pool: starts workers
fibs.c - Worker pool → Job queue API: dequeues lines
fibs.c - Worker pool → Fibonacci calculator: processes lines
fibs.c - Fibonacci calculator → Standard input/output: prints results
fibs.c - Line reader → Job queue implementation: uses queue
- Job queue API → Job queue implementation: declares operations
job_queue.c