USF-OS / FogOS

Other
1 stars 24 forks source link

Project 1 | date command implementation #42

Open Ndewedo-Newbury opened 4 months ago

Ndewedo-Newbury commented 4 months ago

Had to create a strstr function in ulib.c Rough version of date where some of the functions of date are implemented based off of man pages

atanaspatterson commented 4 months ago

I'll be working on peer reviewing this!

kat-le commented 3 months ago

I will also be reviewing this!

atanaspatterson commented 3 months ago

Here are my suggested improvements:

Because the date command probably worked on your machine, it might just be a pushing to GitHub thing.

Overall, great work!

kat-le commented 3 months ago

Here is my suggestion:

Overall, it was really fun getting to test your code plus it’s very clean and readable!

malensek commented 2 months ago

Please address the flags issue and you should be able to print multiple parts of the date as Kat mentioned but this looks good otherwise. You don't need to worry about the problem with the system call, that'll be different on everyones so when we merge this we'll have a single implementation. There is no doc file but honestly it's not necessary with the usage info and comments.

For future improvements, this currently just uses strstr to check for the date flags, then prints them in a fixed order. It should work more like strftime and let us print a variety of formats in any order, but I think that for P1 this is enough as-is.