|
d1a6bb91fa
|
freadln.c: reformat
|
2024-03-10 15:46:24 +03:00 |
|
|
06c5330a67
|
freadln.*: add testing against unexpected STDOUT flushing
|
2024-03-10 15:40:51 +03:00 |
|
|
53d0b8908d
|
freadln.*: handle EOF in a special way to indicate EOF
|
2024-03-10 15:38:14 +03:00 |
|
|
3638c9eb7c
|
freadln.*: fix error handling logic
|
2024-03-10 15:25:59 +03:00 |
|
|
18af3053f3
|
freadln.c: set errno to EINVAL if *output is NULL
|
2024-03-10 15:06:20 +03:00 |
|
|
ec06d2165b
|
freadln.c: flush stdout only if file is stdin
|
2024-03-10 14:50:42 +03:00 |
|
|
d7be00df1f
|
freadln.c: improve the test, make last TODO optional
|
2024-03-10 14:47:41 +03:00 |
|
|
1a69cfa4ad
|
freadln.c: add a comment to indicate initial length
|
2024-03-10 14:40:02 +03:00 |
|
|
e8d66db238
|
freadln.*: implement reading lines from arbitrary file
|
2024-03-10 14:39:10 +03:00 |
|
|
7d223427b6
|
freadln.h: use intuitive enum values
|
2024-03-10 14:19:29 +03:00 |
|
|
9a2979efe5
|
freadln.c: add a test
|
2024-03-10 14:14:38 +03:00 |
|
|
9d47a1d50b
|
freadln.c: improve function I/O logic
|
2024-03-10 14:14:02 +03:00 |
|
|
8025dbfb61
|
freadln.c: add missing semicolons
|
2024-03-10 14:12:51 +03:00 |
|
|
139afe969b
|
freadln.c: add flushing of STDOUT
|
2024-03-10 14:12:05 +03:00 |
|
|
692eb05bf5
|
freadln.c: add new TODOs
|
2024-03-10 14:08:28 +03:00 |
|
|
c09c9481c9
|
freadln.h: fix prototype mismatch
|
2024-03-10 13:55:21 +03:00 |
|
|
df477f5d44
|
reverse-ramdisk.c: extend and improve the comment about compilers
|
2024-03-10 13:20:06 +03:00 |
|
|
cccdc5087d
|
reverse-ramdisk.c: change warning style
|
2024-03-10 12:19:18 +03:00 |
|
|
c0b07642c4
|
static-vs-dynamic-mem-alloc.c: make sure to avoid macro integer overflow
|
2024-03-10 11:54:20 +03:00 |
|
|
df8d36b8d5
|
str_replace.c: change to-do style
|
2024-03-10 11:52:23 +03:00 |
|
|
34832e541b
|
reverse-ramdisk.c: change to-do style
|
2024-03-10 11:51:09 +03:00 |
|
|
2ac97f81a7
|
freadln.c: change to-do style
|
2024-03-10 11:50:09 +03:00 |
|
|
0957b5dc49
|
opt_int_div.h: make test precision limit optional
|
2024-03-09 19:29:11 +03:00 |
|
|
4839ab2330
|
opt_int_div.h: add parentheses around a and b in last part of OPT_INT_DIV
|
2024-03-09 17:56:53 +03:00 |
|
|
3c9278f472
|
opt_int_div.h: add optimization for case abs(a) < abs(b)
|
2024-03-09 17:51:22 +03:00 |
|
|
fef612cec2
|
opt_int_div.h: extract sign explanation
|
2024-03-09 17:48:05 +03:00 |
|
|
e8d0b5a091
|
opt_int_div.h: fix the test in OPT_INT_DIV
|
2024-03-09 17:16:46 +03:00 |
|
|
9ead68332f
|
opt_int_div.h: explain the comment in macro OPT_INT_DIV_ROUNDING
|
2024-03-09 16:50:42 +03:00 |
|
|
195e1c177b
|
opt_int_div.h: fix macro OPT_INT_DIV_ROUNDING
|
2024-03-09 16:49:33 +03:00 |
|
|
4ea244ca91
|
C: add extol.modern.c
|
2024-03-09 16:47:42 +03:00 |
|
|
bb3f589cbe
|
extol.c: assign new file handler to old file handler
|
2024-03-09 15:50:58 +03:00 |
|
|
bef0606936
|
extol.c: pack all loop-related operations into it
|
2024-03-09 14:04:32 +03:00 |
|
|
93768da40f
|
extol.c: fix calling fclose with NULL argument
|
2024-03-09 13:54:41 +03:00 |
|
|
267b869440
|
extol.c: add file size limit
|
2024-03-09 12:14:56 +03:00 |
|
|
4ae64ebf95
|
extol.c: add error checking for fopen
|
2024-03-09 12:09:57 +03:00 |
|
|
988389a6ea
|
extol.c: clear 4 rightmost bits before the loop
|
2024-03-09 11:46:09 +03:00 |
|
|
1060bfbe45
|
C: add extol.c [joke!]
|
2024-03-09 11:42:06 +03:00 |
|
|
fc829628d9
|
cpuid_vendor_id.mod.c: use only tabs for scope indentation
|
2024-03-08 19:40:54 +03:00 |
|
|
b6f79fadf5
|
C: floatscan-experiment.c: wrap for 80 characters per line
|
2024-03-08 15:03:32 +03:00 |
|
|
3983e7f35d
|
C: add cpuid_vendor_id.mod.c
|
2024-03-08 14:56:35 +03:00 |
|
|
c040b0bd44
|
floatscan-experiment.c: implement shunget to normalize operation of the original code
|
2024-03-02 16:12:59 +03:00 |
|
|
f411dfc6dc
|
floatscan-experiment.c: reformat the original code
|
2024-03-02 16:08:42 +03:00 |
|
|
4f9ceae08f
|
floatscan-experiment.c: upgrade the experiment code, do not use STDIN
|
2024-03-02 15:29:04 +03:00 |
|
|
ca099f2797
|
floatscan-experiment.c: add function prototypes
|
2024-03-02 15:25:41 +03:00 |
|
|
223393b38c
|
floatscan-experiment.c: sort #include s
|
2024-03-02 15:20:37 +03:00 |
|
|
b17b8aa71a
|
floatscan-experiment.c: simplify the note
|
2024-03-02 15:20:20 +03:00 |
|
|
0e6fd4e322
|
C: opt_int_div.*: add the full name
|
2024-02-25 01:09:36 +03:00 |
|
|
7898a3c1ca
|
C: opt_int_div.h: remove the unnecessary division after rounding
|
2024-02-25 01:07:22 +03:00 |
|
|
0ef6c03393
|
C: add opt_int_div.*
|
2024-02-24 20:05:25 +03:00 |
|
|
a73f75c489
|
C: add bool-operations.c
|
2024-02-24 12:05:20 +03:00 |
|
|
bfd51c23c2
|
C: add static-vs-dynamic-mem-alloc.c
|
2024-02-24 12:02:14 +03:00 |
|
|
3e37f5fb73
|
C: reverse-ramdisk.c: tf_free : prevent memory leaks
|
2024-02-22 22:00:45 +03:00 |
|
|
bae1b1a301
|
C: reverse-ramdisk.c: fix memory usage in tf_alloc
|
2024-02-22 21:10:55 +03:00 |
|
|
9c47cde541
|
C: reverse-ramdisk.c: make use of ternary operator
|
2024-02-22 20:29:14 +03:00 |
|
|
544ae06944
|
C: reverse-ramdisk.c: apply D.R.Y. to conditional compilation
|
2024-02-22 20:28:41 +03:00 |
|
|
d36ed5f273
|
C: reverse-ramdisk.c: reformat macros
|
2024-02-22 20:21:07 +03:00 |
|
|
4d797a9854
|
C: pure_getline.h: move include statements
|
2024-02-22 19:20:26 +03:00 |
|
|
c1916f928c
|
C: freadln.h: fix syntax; reformat
|
2024-02-22 19:09:37 +03:00 |
|
|
8f4b853094
|
C: clock-malfunction-imitation.c: reformat
|
2024-02-21 21:53:22 +03:00 |
|
|
a0d4c9d104
|
C: clock-malfunction-imitation.c: remove unsafe optimization
|
2024-02-21 21:52:41 +03:00 |
|
|
5123278748
|
C: clock-malfunction-imitation.c: remove IR leftovers
|
2024-02-21 21:51:26 +03:00 |
|
|
685154e035
|
C: clock-malfunction-imitation.c: optimize sizeof(time(NULL))
|
2024-02-21 19:11:30 +03:00 |
|
|
96af138bb7
|
C: clock-malfunction-imitation.c: fix syntax
|
2024-02-20 22:18:40 +03:00 |
|
|
f345d55d3a
|
C: clock-malfunction-imitation.c: reformat macros
|
2024-02-20 19:47:40 +03:00 |
|
|
130179ab6b
|
C: add str_replace.*
|
2024-02-20 19:41:24 +03:00 |
|
|
eb34ee33b3
|
C: categorize files, update .gitignore
|
2024-02-20 19:36:12 +03:00 |
|
|
73257b0c55
|
C: add freadln.*
|
2024-02-20 01:38:45 +03:00 |
|
|
714d32b4b4
|
C: pure_getline.c: add arguments docs
|
2024-02-20 01:36:11 +03:00 |
|
|
f9985a55ce
|
C: pure_getline.c: remove string reallocation
|
2024-02-20 01:34:07 +03:00 |
|
|
d25a4aa7f3
|
C: jokes/brexit.c: fix the Windows issue
|
2024-02-04 12:36:27 +03:00 |
|
|
5557621438
|
C: jokes/brexit.c: document the Windows issue
|
2024-02-04 12:25:38 +03:00 |
|
|
4e08a91184
|
C: jokes/brexit.c: C99: change asm to __asm__
|
2024-02-04 12:21:09 +03:00 |
|
|
9e3d804e6e
|
C: jokes/brexit.c: don't include stdio.h
|
2024-02-04 12:20:17 +03:00 |
|
|
92da46ef9a
|
C: jokes/brexit.c: reorder __attribute__ place
|
2024-02-04 12:19:42 +03:00 |
|
|
5095bb1f47
|
C: jokes/brexit.c: remove _Noreturn
|
2024-02-04 12:05:05 +03:00 |
|
|
2ab2a332a1
|
C: jokes/brexit.c: simplify, fix SIGSEGV
Fix the indentation
|
2024-02-04 11:55:56 +03:00 |
|
|
2001b310d7
|
C: jokes/brexit.c: add _Noreturn , remove last empty line
|
2024-02-04 11:38:43 +03:00 |
|
|
de0b86824d
|
C: add jokes/brexit.c
|
2024-02-04 11:36:09 +03:00 |
|
|
03e02868b8
|
optimize .gitignore files
|
2024-01-31 22:24:38 +03:00 |
|
|
f5fd670db6
|
C: add pure_getline.*
|
2024-01-28 22:47:01 +03:00 |
|
|
1ec1b4a9e7
|
C: add test for asprintf.c
|
2024-01-28 15:46:26 +03:00 |
|
|
b10cdd7215
|
asprintf.c: fix use of malloc
1. Pass `size_t` variable to `malloc`
2. Multiply the count of bytes to allocate by `sizeof(char)`
|
2024-01-28 13:49:25 +03:00 |
|
|
cde36888a3
|
asprintf.c: optimize size + 1
with fixup applied
|
2024-01-28 13:43:56 +03:00 |
|
|
f98cbbaf84
|
add copyleft notices
|
2024-01-25 20:33:58 +03:00 |
|
|
f65917aec9
|
C: add clock-malfunction-imitation.c
|
2024-01-25 20:23:51 +03:00 |
|
|
8b243b9bea
|
C: add fwrite_le.*
|
2024-01-24 20:01:23 +03:00 |
|
|
30dee62706
|
rename floatscan_experiment.c -> floatscan-experiment.c
|
2024-01-16 01:24:07 +03:00 |
|
|
71f8f052d3
|
floatscan_experiment.c: fix typo
|
2024-01-15 23:49:03 +03:00 |
|
|
a47bdb62c5
|
add c-programming/floatscan_experiment.c
|
2024-01-15 23:38:02 +03:00 |
|
|
5464b1f85a
|
add c-programming/asprintf.*
|
2024-01-15 19:42:17 +03:00 |
|
|
1085b5df6e
|
add more .gitignore files
|
2024-01-11 23:16:25 +03:00 |
|
|
1960bb9866
|
reverse-ramdisk.c: change to-do list
|
2024-01-06 22:28:06 +03:00 |
|
|
57730252f0
|
reverse-ramdisk.c: define DBG_PRINT if TEST is defined
|
2024-01-06 22:26:22 +03:00 |
|
|
226cb79663
|
reverse-ramdisk.c: test: extract constants
|
2024-01-06 22:23:13 +03:00 |
|
|
ab8843ee14
|
reverse-ramdisk.c: change comment style and wrap
|
2024-01-03 22:02:31 +03:00 |
|
|
7ab89ffc53
|
reverse-ramdisk.c: extend the test, add more IRs
|
2024-01-03 21:57:59 +03:00 |
|
|
0355b33d84
|
reverse-ramdisk.c: bytes_written : reduce #if scope
|
2024-01-03 21:49:23 +03:00 |
|
|
9059cf1056
|
reverse-ramdisk.c: remove an unnecessary cast
|
2024-01-03 21:43:22 +03:00 |
|
|
e7990709ed
|
reverse-ramdisk.c: improve format of read IR
|
2024-01-03 21:30:07 +03:00 |
|
|
8e7743af40
|
reverse-ramdisk.c: use %p instead of PRIXPTR
|
2024-01-03 21:26:13 +03:00 |
|