Skip to content

Commit

Permalink
daily upload 1.25
Browse files Browse the repository at this point in the history
  • Loading branch information
TGSpock123 committed Jan 25, 2024
1 parent 9186b78 commit fe9972f
Show file tree
Hide file tree
Showing 25 changed files with 142 additions and 36 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified 11/.DS_Store
Binary file not shown.
5 changes: 2 additions & 3 deletions 11/11/11.30.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "s_gets.h"
#define SIZE 81
#define LIM 20
#define HALT ""

void stsrt (char *strings[], int num)
{
Expand All @@ -25,7 +24,7 @@ void stsrt (char *strings[], int num)
int main (void)
{
char input[LIM][SIZE];
char *ptstr[LIM];
char * ptstr[LIM];
int ct = 0;
int k;

Expand All @@ -37,7 +36,7 @@ int main (void)
ct ++;
}
stsrt (ptstr, ct);
puts ("\nHere's the sort list: \n");
puts ("Here's the sort list: \n");
for (k = 0; k < ct; k ++)
{
puts (ptstr[k]);
Expand Down
50 changes: 50 additions & 0 deletions 11/11/11.31.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define LIMIT 81
void to_upper (char * str);
int punct_count (const char *str);

int main (void)
{
char line[LIMIT];
char * find;

puts ("please enter a line: ");
fgets (line, LIMIT, stdin);
find = strchr (line, '\n');
if (find)
{
*find = '\0';
}
to_upper (line);
puts (line);
printf ("That line has %d punctuation characters. \n", punct_count (line));

return 0;
}
void to_upper (char * str)
{
while (*str)
{
if (islower (*str))
{
*str = toupper (*str);
}
str ++;
}
}
int punct_count (const char * str)
{
int ct;

for (ct = 0; *str; str ++)
{
if (ispunct (*str))
{
ct ++;
}
}

return ct;
}
14 changes: 14 additions & 0 deletions 11/11/11.32.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <stdio.h>
int main (int argc, char * argv[])
{
int count;

printf ("The command line has %d arguments: \n", argc - 1);
for (count = 0; count < argc; count ++)
{
printf ("%d: %s\n", count, argv[count]);
}
printf ("\n");

return 0;
}
19 changes: 19 additions & 0 deletions 11/11/11.33.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char * argv[])
{
int i, times;

if (argc < 2 || (times = atoi (argv[1])) < 1)
{
printf ("Usage: %s positive-number\n", argv[0]);
}else
{
for (i = 0; i < times; i ++)
{
puts ("Hello, goodlooking!");
}
}

return 0;
}
22 changes: 22 additions & 0 deletions 11/11/11.34.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "s_gets.h"
#include <stdlib.h>
#define LIM 30
int main (void)
{
char number[LIM];
char * end;
long value;

puts ("Enter a number(empty line to quit):");
while (s_gets (number, LIM) && number[0])
{
value = strtol (number, &end, 10);
printf ("base 10 input, base 10 output: %ld, stopped at %s(%d)\n", value, end, *end);
value = strtol (number, &end, 16);
printf ("base 16 input, base 10 output: %ld, stopped at %s(%d)\n", value, end, *end);
puts ("Next number:");
}
puts ("Bye.");

return 0;
}
Empty file added 11/11/11.35.c
Empty file.
Binary file added 11/11/hello
Binary file not shown.
Binary file added 11/11/repeat
Binary file not shown.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ set(CMAKE_CXX_STANDARD 14)
include_directories(9)

add_executable(C_primer
11/11/11.30.c 11/11/s_gets.c
11/11/11.34.c 11/11/s_gets.c
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
"directoryIndex" : 0,
"id" : "C_primer::@6890427a1f51a3e7e1df",
"jsonFile" : "target-C_primer-Debug-c6656e18f983ae479999.json",
"jsonFile" : "target-C_primer-Debug-2506983990cec0ab17b4.json",
"name" : "C_primer",
"projectIndex" : 0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"objects" :
[
{
"jsonFile" : "codemodel-v2-570e37c8900be2a43840.json",
"jsonFile" : "codemodel-v2-bc71b87dc24d23e97fec.json",
"kind" : "codemodel",
"version" :
{
Expand Down Expand Up @@ -86,7 +86,7 @@
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-570e37c8900be2a43840.json",
"jsonFile" : "codemodel-v2-bc71b87dc24d23e97fec.json",
"kind" : "codemodel",
"version" :
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "11/11/11.30.c",
"path" : "11/11/11.34.c",
"sourceGroupIndex" : 0
},
{
Expand Down
Binary file modified cmake-build-debug/.ninja_deps
Binary file not shown.
46 changes: 24 additions & 22 deletions cmake-build-debug/.ninja_log
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
# ninja log v5
1 650 1705728959565596464 CMakeFiles/C_primer.dir/11/11/11.28.c.o 879ba678eb7659d3
1 139 1705655794891216181 CMakeFiles/C_primer.dir/11/11/11.26.c.o 60cd9bd27e13dee9
4 335 1702822896367170007 CMakeFiles/C_primer.dir/9_plus/9_plus/9.36.c.o 9f95dd8b31879556
3 743 1705477691140561907 CMakeFiles/C_primer.dir/11/11/11.20.c.o 4d41b33316ec8196
8 399 1703341888623019922 CMakeFiles/C_primer.dir/10_plus_2/10_plus_2/10.27.c.o c931a25c28b6f776
1 314 1705426175402873873 CMakeFiles/C_primer.dir/11/11/ttttttt.c.o e65d1f4f85245257
1 768 1703335314154911819 CMakeFiles/C_primer.dir/10_plus/10.27.c.o e943e8b249a83691
1 143 1705647977382829895 CMakeFiles/C_primer.dir/11/11/11.23.c.o 8d1dd77d660222d8
0 305 1702822896335875576 CMakeFiles/C_primer.dir/9_plus/9_plus/9.35.c.o c09ce47479a5514a
1 79 1704987149621406781 CMakeFiles/C_primer.dir/11/11/11.18.c.o a8a9353c4b47a706
1 213 1705593199876040862 CMakeFiles/C_primer.dir/11/11/11.22.c.o aeaa032b253b3f6
1 187 1705656507378973250 CMakeFiles/C_primer.dir/11/11/11.27.c.o 2d5ba875468ac8fb
1 182 1705478273108029140 CMakeFiles/C_primer.dir/11/11/11.21.c.o a5f1d6b58ebbc38e
1 650 1705728959565596464 CMakeFiles/C_primer.dir/11/11/11.28.c.o 879ba678eb7659d3
1 307 1706098844786149859 CMakeFiles/C_primer.dir/11/11/11.33.c.o df87872c3f711417
4 335 1702822896367170007 CMakeFiles/C_primer.dir/9_plus/9_plus/9.36.c.o 9f95dd8b31879556
1 139 1705655794891216181 CMakeFiles/C_primer.dir/11/11/11.26.c.o 60cd9bd27e13dee9
1 144 1702825381558358062 CMakeFiles/C_primer.dir/10_plus/10.14.c.o 27c11ea85739635
0 133 1705807674707591764 CMakeFiles/C_primer.dir/11/11/11.29.c.o 4578e5e29e3d0feb
1 182 1705478273108029140 CMakeFiles/C_primer.dir/11/11/11.21.c.o a5f1d6b58ebbc38e
1 139 1703332966115689949 CMakeFiles/C_primer.dir/10_plus/10.26.c.o 1fb19967a9825110
4 212 1706068902889082467 CMakeFiles/C_primer.dir/11/11/11.29.c.o 4578e5e29e3d0feb
0 712 1703213310905304912 CMakeFiles/C_primer.dir/10_plus/10.28.c.o c90e9088be1fd995
1 94 1705649854118681712 CMakeFiles/C_primer.dir/11/11/11.24.c.o 9c813ca189b53dc
0 267 1702717481449984888 CMakeFiles/C_primer.dir/10_plus/10.12.c.o d0b2887c66daa4b1
1 100 1705652108918433891 CMakeFiles/C_primer.dir/11/11/11.25.c.o 9311352dfbe1bec9
1 137 1705807674711430391 CMakeFiles/C_primer.dir/11/11/s_gets.c.o 482640b116f7f053
2 620 1703211568893536340 CMakeFiles/C_primer.dir/10_plus/10.25.c.o df8f1239080514a
2 401 1705812436533746761 CMakeFiles/C_primer.dir/11/11/s_gets.c.o 482640b116f7f053
2 247 1705292200850914317 CMakeFiles/C_primer.dir/11/11/11.19.c.o fe1937fff2522a0d
2 620 1703211568893536340 CMakeFiles/C_primer.dir/10_plus/10.25.c.o df8f1239080514a
0 431 1702958013825178426 CMakeFiles/C_primer.dir/10_plus/10.15.c.o 3cd52d55636f54b
0 434 1705811550674513896 build.ninja 40ffa430796bc747
1 138 1702825381555261318 CMakeFiles/C_primer.dir/10_plus/10.13.c.o 7bef308e0e43b8ac
0 434 1706154972780235704 build.ninja 40ffa430796bc747
3 161 1705810764224886659 CMakeFiles/C_primer.dir/count_all_codes.c.o bc1d9f2637b19595
164 351 1705810764413024005 C_primer cc79695adb62baee
1 138 1702825381555261318 CMakeFiles/C_primer.dir/10_plus/10.13.c.o 7bef308e0e43b8ac
0 305 1702822896335875576 CMakeFiles/C_primer.dir/9_plus/9_plus/9.35.c.o c09ce47479a5514a
0 324 1706073988864655653 CMakeFiles/C_primer.dir/11/11/11.22.c.o aeaa032b253b3f6
1 79 1704987149621406781 CMakeFiles/C_primer.dir/11/11/11.18.c.o a8a9353c4b47a706
1 143 1705647977382829895 CMakeFiles/C_primer.dir/11/11/11.23.c.o 8d1dd77d660222d8
1 206 1706075451077411555 CMakeFiles/C_primer.dir/11/11/11.30.c.o febb14f1edb3a233
1 187 1705656507378973250 CMakeFiles/C_primer.dir/11/11/11.27.c.o 2d5ba875468ac8fb
1 875 1706079728948015842 CMakeFiles/C_primer.dir/11/11/11.31.c.o 7de9de148e61df4
308 669 1706098845155881141 C_primer abb35006aea92dea
0 398 1703341888622940162 CMakeFiles/C_primer.dir/10_plus_2/10_plus_2/10.26.c.o eac4638a5b3bb1a6
2 401 1705812436533746761 CMakeFiles/C_primer.dir/11/11/s_gets.c.o 482640b116f7f053
1 415 1705812436555428092 CMakeFiles/C_primer.dir/11/11/11.30.c.o febb14f1edb3a233
415 586 1705812436732955345 C_primer 502a84d303e7a6f0
0 112 1705812463562054893 CMakeFiles/C_primer.dir/11/11/11.30.c.o febb14f1edb3a233
113 287 1705812463732136563 C_primer 502a84d303e7a6f0
3 743 1705477691140561907 CMakeFiles/C_primer.dir/11/11/11.20.c.o 4d41b33316ec8196
1 133 1706097471309179618 CMakeFiles/C_primer.dir/11/11/11.32.c.o 8ee2316f627a1f04
1 768 1703335314154911819 CMakeFiles/C_primer.dir/10_plus/10.27.c.o e943e8b249a83691
6 885 1706165152516904273 CMakeFiles/C_primer.dir/11/11/s_gets.c.o 482640b116f7f053
1 921 1706165152567909895 CMakeFiles/C_primer.dir/11/11/11.34.c.o e27bf47f490c34e2
921 1715 1706165153370313198 C_primer f1de7d88473b4b10
Binary file modified cmake-build-debug/CMakeFiles/C_primer.dir/11/11/11.30.c.o
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion cmake-build-debug/CMakeFiles/clion-Debug-log.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/Applications/CLion.app/Contents/bin/ninja/mac/x64/ninja -G Ninja -S /Users/tgspock/Documents/GitHub/learn_c_primer.github.io -B /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/cmake-build-debug
-- Configuring done (0.1s)
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/cmake-build-debug
Binary file modified cmake-build-debug/C_primer
Binary file not shown.
4 changes: 2 additions & 2 deletions cmake-build-debug/Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Start testing: Jan 21 12:47 CST
Start testing: Jan 25 14:45 CST
----------------------------------------------------------
End testing: Jan 21 12:47 CST
End testing: Jan 25 14:45 CST
6 changes: 3 additions & 3 deletions cmake-build-debug/build.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ cmake_ninja_workdir = /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/c

build cmake_object_order_depends_target_C_primer: phony || CMakeFiles/C_primer.dir

build CMakeFiles/C_primer.dir/11/11/11.30.c.o: C_COMPILER__C_primer_unscanned_Debug /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/11/11/11.30.c || cmake_object_order_depends_target_C_primer
DEP_FILE = CMakeFiles/C_primer.dir/11/11/11.30.c.o.d
build CMakeFiles/C_primer.dir/11/11/11.34.c.o: C_COMPILER__C_primer_unscanned_Debug /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/11/11/11.34.c || cmake_object_order_depends_target_C_primer
DEP_FILE = CMakeFiles/C_primer.dir/11/11/11.34.c.o.d
FLAGS = -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.7 -fcolor-diagnostics
INCLUDES = -I/Users/tgspock/Documents/GitHub/learn_c_primer.github.io/9
OBJECT_DIR = CMakeFiles/C_primer.dir
Expand All @@ -71,7 +71,7 @@ build CMakeFiles/C_primer.dir/11/11/s_gets.c.o: C_COMPILER__C_primer_unscanned_D
#############################################
# Link the executable C_primer

build C_primer: C_EXECUTABLE_LINKER__C_primer_Debug CMakeFiles/C_primer.dir/11/11/11.30.c.o CMakeFiles/C_primer.dir/11/11/s_gets.c.o
build C_primer: C_EXECUTABLE_LINKER__C_primer_Debug CMakeFiles/C_primer.dir/11/11/11.34.c.o CMakeFiles/C_primer.dir/11/11/s_gets.c.o
FLAGS = -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.7
OBJECT_DIR = CMakeFiles/C_primer.dir
POST_BUILD = :
Expand Down

0 comments on commit fe9972f

Please sign in to comment.