Files
CS361-Computer-Systems-II/p1-sh/PHASE-2.txt
T
2026-05-31 14:34:00 -04:00

26 lines
1.2 KiB
Plaintext

Answer the following questions to describe your code submission. Please keep
all lines to a maximum of 80 characters wide.
1 - When implementing the built-ins, which ones essentially only required
making a call to an existing C function? What function(s)?
The pwd, cd, and quit are essentially just calls to c functions.
2 - Briefly describe how you sorted the files in the ls program. If you used
an existing C function to sort, explain the arguments you passed.
We created a custom, leading dot ignoring, case-insensitive comparison
function that can be used by scandir to sort the files before they are
returned to us. The two arguments we two dirents, the names of which
were compared, and an integer returned to tell scandir which should be
sorted first.
3 - If you used your lab 2 code to parse the command line, briefly describe
any changes or adaptations you made. If you didn't use lab 2, briefly
describe how you built the array of arguments to pass when executing the
program.
Most of the code from lab 2 was fairly plug in play. The only adaptation
necessary was turning the parse_buffer and functions process.c to use the
fsm from lab2 instead of just strings.