4 Commits
Author SHA1 Message Date
Cody Boone Ferguson 29889fe686 Fix 1994/ldb for clang in linux
It objected to the incompatible pointer type passed to time(2) as what
was passed to time(2) was an int, not a time_t *. One way would be to
disable the warning but I chose to cast the parameter to a time_t * to
get rid of the warning wanting to be triggered at all.
2023-07-07 10:38:29 -07:00
Cody Boone Ferguson bf6cd19109 Make 1994/ldb use fgets()
I had already fixed this entry to compile with modern compilers but a
problem existed where lines longer than 231 characters (which generally
would not happen but is not impossible) would overflow the buffer. Now
it uses fgets() so this does not happen. A couple notes about this
though.

It right now does print a newline after the output unless the line
length is in fact 231 characters. This seems like a worthy compromise
though. In time I hope to address this so that it does not ever print a
newline (a blank line notwithstanding which does happen and is part of
the entry).

The second thing to be aware of is just a subtlety with the entry: what
happens with a line of length 394? What you'll find is that it might
print the first 231 characters or it might print the last 163 characters
plus the newline (the 231 one does not have a newline).

I've added to bugs.md the part where it will print a newline if the line
length < 231.

At the same time I fixed a path in the bugs.md file that I noticed.
2023-04-02 04:56:16 -07:00
Cody Boone Ferguson 00e5b58539 Get 1994/ldb to compile
This required some -includes at the compiler line as well as use of the
comma operator as srand() returns void but it was used in || expression.
2023-03-18 06:30:45 -07:00
Landon Curt Noll d2a42f42e8 Move 1988-2004 entries into subdirs
We we move 1988-2004 entries from all of a year's winning entries
in a single directory to each winner being in their own sub-directory
under the given year directory.
2022-09-18 23:37:49 -07:00