SakurajimaShida
  • Joined on 2025-07-17
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-15 19:14:57 -07:00
dbf602e13d Implemented KNR C Exercise 1-12, reusing mostly modified code from my previous (optional) implementaiton of KNR C's example wordcounting program.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-15 19:08:03 -07:00
2523043172 Nearly direct copy of a word count program from KNR C, mimicked here only so that I could compare the size of the resulting binary once compiled to my own solution, archived as ex1_10-5.c (ex1-10.5). The resulting binary, as compiled with GCC, was 136 lines long, 2 lines shorter than my own. Challenge failed :sigh:. Good exercise, though; I'll come back to this and study why later.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-15 19:05:00 -07:00
313e4aaa3b Added ex1_10-5.c, an implementation of an example wordcount program on pages 21/22 of KNR C, purely as an exercise to see if I could do it more efficiently than the book. This resulted in a binary that was, 138 lines long as disassembled.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 15:32:21 -07:00
d3ce211f14 Implemented a suggestion from Affine to replace the many if statements with a single switch and only ever call getchar at one point in the code.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 15:07:43 -07:00
43f172da21 Cleaned up unnecesary curly braces.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 15:06:00 -07:00
b466a300d0 Annotation updates.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 14:54:55 -07:00
2638922bbe Untested initial version of code for visibility.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 13:02:35 -07:00
635a8300a3 Implemented suggestions from affine. Considerably simplified the program by removing initialization for 'a' prior to loop entry; 'a' is now declared as the initialization expression for the loop, performing a getchar at the same time and preventing a null byte from being printed as the first character (even though this was not visible to the user).
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 12:52:27 -07:00
abc0ac1660 Rewrote while loop as a for loop to reduce overall program size.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 12:24:01 -07:00
d6f81778ef Completed and improved ex1_10 using a switch function.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 10:42:40 -07:00
d3262419a8 Added comments to explain certain code behaviors in ex1_10.c so that they can be read and referred to later more easily. Future code should be properly annotated on initial commit.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 10:29:25 -07:00
1ac53c22b2 Minor change to reprint a single \ as \ instead of \.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 10:27:58 -07:00
bbf858134c Initial incomplete implemenation of exercise 1-10. Current version only reprints tabs to \t and backslashes to \ rather than the intended behavior of doing that in addition to reprinting backspaces as \b. Bug is due to not capturing backspaces as input. Fix pending.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-14 00:16:14 -07:00
84a9263691 Added a solution of 1-9 developed collaboratively by both of us <3
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-13 23:53:52 -07:00
7d26e0ffc7 Implementation of exercise 1-9: copying and printing input text to output, removing redundant spaces.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-13 00:17:06 -07:00
7be84d6b88 Complexted exercise 1-8; count and report number of newline, tab, and blank characters in input.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-12 22:48:28 -07:00
7682f93933 Delete dumbtest.c
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-12 22:46:58 -07:00
a36892d8be Changed name of dumbtest.c to ex1_7.c to reflect what exercise was completed in this code.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-12 22:44:31 -07:00
9ed3796014 Changed 'c' to 'a' while working on other, later abaondoned changes.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-09 16:14:36 -07:00
191b35631c Modifications and bugfix to prevent the program from returning an error code on exit.