Bob Andrews
03d824e13b
Merge pull request #2464 from SvenMichaelKlose/stpcpy
...
Add stpcpy().
2024-07-16 01:47:11 +02:00
Sven Michael Klose
677cd8ff4e
Use standard library's exit() code constants.
2024-07-15 17:54:43 +02:00
Sven Michael Klose
9558ebad62
Add test for stpcpy().
2024-07-15 17:35:28 +02:00
Sven Michael Klose
816bcabe5a
Move strtok() test to correct section.
2024-07-14 23:12:59 +02:00
Sven Michael Klose
c385e52c12
Merge branch 'master' into test_strtok
2024-07-14 13:59:18 +02:00
Sven Michael Klose
cdb2d49e3a
Test strtok().
2024-07-07 01:02:32 +02:00
Sven Michael Klose
871bafa5b3
Keep gcc-14 from aborting with errors due to new defaults.
...
Adds -Wno-error=implicit-int -Wno-error=int-conversion to CFLAGS.
Tested with gcc-12.4 and gcc-14.1.
2024-07-07 00:48:15 +02:00
Bob Andrews
0541b65aa4
Merge pull request #2434 from colinleroy/strcasestr
...
Implement strcasestr
2024-06-22 15:00:17 +02:00
mrdudz
86e5acd679
fix race condition as proposed in #2420
2024-05-16 18:57:08 +02:00
Evgeny Vrublevsky
f789316f86
Add a test for the unnamed labels.
2024-04-07 13:34:49 +03:00
Colin Leroy-Mira
82165c1a77
Implement strcasestr
2024-03-18 19:51:50 +01:00
mrdudz
b993d88339
second half of #2420 - don't use the loop macro. Fixes -j13 for me
2024-03-17 17:19:42 +01:00
Bob Andrews
a06431a8f9
Merge pull request #2402 from colinleroy/a-bit-of-65c02-optimisations
...
a BIT of 65C02 optimisations
2024-02-02 21:58:04 +01:00
Bob Andrews
eb503cc542
Merge pull request #2390 from colinleroy/implement-shifts-by-7
...
Implement aslax7/shlax7/asrax7/shrax7
2024-02-02 20:17:48 +01:00
Colin Leroy-Mira
1fab179cb4
a BIT of 65C02 optimisations
...
Use BIT immediate instead of AND when reloading A is required
afterwards.
Add an fread unit test as the optimisation touches fread.
Sprinkle a few zero page indexed while we're at it.
2024-02-02 19:45:49 +01:00
Bob Andrews
2a03e5d8c9
Merge pull request #2392 from colinleroy/asm-fputc-fputs
...
Asm fputc fputs
2024-02-02 19:41:23 +01:00
Bob Andrews
128f261c3a
Merge pull request #2389 from colinleroy/fix-2388
...
Fix #2388
2024-02-02 18:25:39 +01:00
Bob Andrews
54b423a99e
fix test
2024-02-02 13:13:57 +01:00
acqn
96d55e3703
Fixed optimization for char-size bitwise XOR/OR/AND when the rhs operand is complicated.
2024-02-02 19:00:33 +08:00
Colin Leroy-Mira
1e300bf768
Add test case for issue #2395
2024-02-01 22:06:56 +01:00
Colin Leroy-Mira
ce606bb19e
Fix tests...
2024-01-31 08:40:36 +01:00
Colin Leroy-Mira
1a5a7d67a7
Rewrite fputc in assembly
...
-36 bytes, -12% cycles
2024-01-30 17:19:13 +01:00
Colin Leroy-Mira
ba36071022
Rewrite fputs in assembly
...
-28 bytes, -1% cycles
2024-01-30 17:12:52 +01:00
Colin Leroy-Mira
7594af553a
Fix #2388
...
Reopen stdin in binary mode instead of closing/opening
2024-01-30 09:39:44 +01:00
Colin Leroy-Mira
7d7cf2d1e0
Implement aslax7/shlax7/asrax7/shrax7
2024-01-29 07:59:11 +01:00
Bob Andrews
51b946bf25
Merge pull request #2387 from colinleroy/sim65-implement-remove
...
Implement __sysremove for sim65
2024-01-28 16:53:29 +01:00
Colin Leroy-Mira
0dd7b0c3a5
Implement __sysremove for sim65
...
This will allow using unlink()/remove() in sim65 programs
Use it to unlink fgets' test output file
2024-01-28 13:58:57 +01:00
Colin Leroy-Mira
aa6f850b8d
Rewrite gets in assembler
...
+19 bytes if used alone, because it pulls in fgets, but as code is
factorized, -128 bytes in programs using both fgets and gets.
2024-01-26 20:29:17 +01:00
Bob Andrews
65937684a0
Merge pull request #2380 from colinleroy/asm-fgetc
...
Rewrite fgetc in asm
2024-01-26 20:12:41 +01:00
Colin Leroy-Mira
476591e8b7
Rewrite fgetc in asm
...
-82 bytes, -20% cycles
2024-01-25 09:13:39 +01:00
Colin Leroy-Mira
f7388cfb79
add fgets/fgetc test
2024-01-25 09:13:35 +01:00
Bob Andrews
ee3a542539
Merge pull request #2383 from colinleroy/pmemalign-size-opt
...
Optimize -36 bytes out of posix_memalign
2024-01-24 21:26:50 +01:00
Colin Leroy-Mira
b87df9e1c6
Optimize -36 bytes out of posix_memalign
...
And add a unit test
2024-01-24 10:23:53 +01:00
Colin Leroy-Mira
3e01ac9b04
Fix malloc and realloc overflow
...
If user requests a size >= 65532, adding the heap admin size
overflows size. Fixes #2358 .
2024-01-24 09:54:54 +01:00
Bob Andrews
57e65a6bf6
Merge pull request #2348 from colinleroy/time-functions-pass-2
...
Convert more time functions to asm
2024-01-23 23:45:10 +01:00
acqn
ba75a2ac26
Added missing checks for forward declarations of the main() function.
...
More accurate diagnosis on implicit 'int' type specifiers.
2024-01-23 14:33:05 +08:00
Bob Andrews
998dfd6fa7
Merge pull request #2370 from acqn/VisibilityFix
...
[cc65] Fixed visibility of undeclared functions and objects
2024-01-22 18:31:47 +01:00
Colin Leroy-Mira
01ee903cdf
Fixup gmtime/localtime/mktime tests with all cases
2024-01-22 16:38:39 +01:00
Colin Leroy-Mira
03d5e5fba0
Rewrite mktime in assembly
...
-415 bytes,
-39% cycles,
Unit test expanded to cover more cases (there was a bug in 2100 before!)
2024-01-18 09:09:38 +01:00
acqn
0b06c34dfc
Added primitive support for the ISO C99 inline feature as well as the __inline__ extension.
...
No inlining is actually done but that part is not required by the standard.
2024-01-14 00:08:41 +08:00
Colin Leroy-Mira
0c53e7e0da
Add test case for bug #2357
2024-01-16 20:55:48 +01:00
acqn
3d0dc58153
Fixed visibility of undeclared functions and objects.
2024-01-13 00:46:14 +08:00
Bob Andrews
28f892bb3c
Merge pull request #2345 from acqn/PtrFix
...
[cc65] Fixed regression on comparison to null pointer
2024-01-11 16:50:49 +01:00
acqn
2682fc0b79
Fixed regression on comparison to null pointer.
2024-01-10 04:51:20 +08:00
acqn
94dfc08c0e
Fixed false "Non constant initializers" error messages on wrong places, which could be resulted from failed array declarations etc.
2024-01-10 04:43:50 +08:00
acqn
2564aaa12c
Refix for diagnosis on expected expressions.
2024-01-10 04:48:27 +08:00
Bob Andrews
2127778239
Merge pull request #2336 from colinleroy/optimize-strdup
...
Optimize strdup
2024-01-08 22:13:43 +01:00
Bob Andrews
e1065d0c89
Merge pull request #2342 from colinleroy/rework-mktime
...
Rework time functions a bit
2024-01-08 22:13:05 +01:00
Bob Andrews
a71865f6ec
Merge pull request #2331 from acqn/FuncDeclFix
...
[cc65] Fixed calling convention parsing in type names and function parameter types
2024-01-08 21:58:01 +01:00
Colin Leroy-Mira
df193c0947
Rework time functions a bit
...
- mktime: Work unsigned as time_t's type implies (shifting Y2K38 bug to 2106)
- mktime: Add unit tests
- gmtime/localtime: factorize
- gmtime/localtime: Add unit tests
- mktime/gmtime/localtime: Size optimisation (-130 bytes wrt master)
- mktime: Speed optimisation (from 23M cycles on the unit test to 2M)
2024-01-08 18:24:13 +01:00