d386aa5744Strip symbols from binary file in non-debug makeKwarde2025-08-02 14:48:13 +02:00
77c578e79b__INTERNAL_fmt: Improve %check_formatted_len for arrays, check and insert '(null) byte per byte (instead of byte,qword,byte)Kwarde2025-08-01 11:11:37 +02:00
486b4d5d9b__INTERNAL_fmt: write_format_data writes to array directly; do not strcat __fmt_Buff to arrayKwarde2025-08-01 11:01:16 +02:00
68ee2828c1Make fetching args from stack (__INTERNAL_fmt) bit clearerKwarde2025-07-31 18:22:26 +02:00
be81866768__INTERNAL_fmt: fix stack offset when output=memory instead of fdKwarde2025-07-31 14:34:46 +02:00
00568e2e7cAdds format(), modified __INTERNAL_fmt to allow writing to memory (instead of writing to given FD)Kwarde2025-07-31 14:18:00 +02:00
c36ae377baRemove invalid line from tests.asmKwarde2025-07-31 14:17:31 +02:00
7c89bfe7d3console.asm: printf** variables renamed to __fmt_** args since printf->__INTERNAL_fmtKwarde2025-07-31 13:04:09 +02:00
93c606541dRemove old return value comment of reads()Kwarde2025-07-31 11:47:46 +02:00
b39f39fb99Tests: disable reads(), print assertion messages to stderr (call eprintf, not printf)Kwarde2025-07-31 11:36:22 +02:00
0c5bbde4a4fgettype() test: Skip useless tests (lea/cmp/cmove) if correct filetype was detectedKwarde2025-07-27 15:08:07 +02:00
310c199942stat buffer fields: add comments (unsigned) and '4 bytes' for non-qword values.Kwarde2025-07-27 14:52:42 +02:00
40583103a1Add (basic) tests for stat(), fgettype(), fgetmod()Kwarde2025-07-27 14:49:24 +02:00
efd35b2957fstatat -> stat, fgettype/fgetmod: rax->eax (st_mode is dword, not qword)Kwarde2025-07-27 14:19:09 +02:00
dbf2af0253Adds fgetat,fgettype,fgetmod. Seperates constants to multiple filesKwarde2025-07-27 14:11:44 +02:00
5b6831a501__INTERNAL_fmt: Exit if syscall NR_write fails (which is very likely if called through fwrite with an invalid FD)Kwarde2025-07-26 01:10:34 +02:00
e8b47fff6d__INTERNAL_fmt: Assure correct stack arguments are loaded if FD=stderrKwarde2025-07-26 01:07:42 +02:00
69d7a52c62Adds eprintf (printf but print to stderr)Kwarde2025-07-26 00:57:30 +02:00
8a18695328__INTERNAL_fmt: Add description + return with errno -EBADF if FD is lower than FD_stdout (1)Kwarde2025-07-26 00:50:09 +02:00
fdef1ed7b6fwrite test 4: do not reopen fileKwarde2025-07-26 00:21:37 +02:00
6b45b84ab1printf->__INTERNAL_fmt. FD passed via RAX. fwrite now allows specifiers and variable arguments.Kwarde2025-07-26 00:20:25 +02:00
d713fdf556Fix minor test message mistakesKwarde2025-07-25 14:45:18 +02:00
a7c1c6bdb5Add *.txt to make cleanKwarde2025-07-25 12:02:28 +02:00
31bda18649Fix test message fopen2 (==>fopen1)Kwarde2025-07-25 12:01:43 +02:00
1fac6f92efAdds fopen() and fexist() and tests for all existing functionsKwarde2025-07-25 11:56:13 +02:00
490f287c09Add tests for umask_get() and umask_set()Kwarde2025-07-25 11:13:25 +02:00
511be406beAdd tests for existing functions (except file functions)Kwarde2025-07-25 11:04:41 +02:00
6cfb1b6f5fprintf fix: Decrease rdi if padding is not 0 and specifier is invalid (assure '%' is printed)Kwarde2025-07-24 22:20:47 +02:00
bb69efcc37Update printf test 1; Add '%9l'; I realized that I fixed '%0(invalid)' but that in the same scenario, non-zero would still cause that specific bugKwarde2025-07-24 22:19:31 +02:00
34de8f351dTests: print expected return value and real return value. Also allow printing this only for failed tests (preventing more output to console)Kwarde2025-07-21 16:04:25 +02:00
7db299bcbdprintf test 18: atoi->itoaKwarde2025-07-21 00:30:17 +02:00
336a178d30Revert "utoa: call clampu instead of clamp (since utoa=>unsigned to ascii)" -- it's for padding length, max 64, no unsigned tests needed...Kwarde2025-07-20 23:55:01 +02:00
e00895105cutoa: call clampu instead of clamp (since utoa=>unsigned to ascii)Kwarde2025-07-20 23:48:07 +02:00
d595ba1903Little update in printf comment (padding now does take num prefix into account)Kwarde2025-07-20 23:39:54 +02:00
8c25b7913bprintf(): Print null pointers (arg for %s = 0) as (null), fixes#4Kwarde2025-07-20 22:51:01 +02:00
aef72931a3atoi(): Don't use extra loop for calculating base^n; r9 already holds previous value so just do r9*rsi ( [previous base^n] * base)Kwarde2025-07-20 11:47:31 +02:00
bb53e7967dAccount for padding length when inserting prefix while padding with spacesKwarde2025-07-16 13:24:24 +02:00
0a737dc0e5Use r13 only instead of r13+r15 (bitmasking)Kwarde2025-07-15 21:34:36 +02:00
3978805d8fExtra test for %p (or rather prefix+padding): prefix taken into account for padding spaces but not for zeroes.Kwarde2025-07-15 16:57:53 +02:00
53f9c1e2f7Fix tests for printf %p: Don't use random magic number but actual pointers, since that's what %p is for)Kwarde2025-07-15 16:50:00 +02:00
e718e1534bprintf: Add format specifier %pKwarde2025-07-15 16:39:19 +02:00
70ab8b19c3Allow printing prefixes for %x,%X,%b and %o (pass ~base to udec)Kwarde2025-07-15 16:31:52 +02:00
a4855c3b75printf: Macro process_arg to decrease repeated codeKwarde2025-07-15 10:45:01 +02:00
351f8058f9Replace old X2str references in src/tests.asmKwarde2025-07-15 08:58:03 +02:00
7caa050b71Revert src/tests.asm (%000064b -> %064b). Was a quick test (assure pad num is calculated correctly with multiple zeroes)Kwarde2025-07-15 08:56:49 +02:00
920522e167printf: increase arg counter (r14) for invalid specifiers, as it's supposed to do (according to func doc)Kwarde2025-07-15 08:55:37 +02:00
e593ce76d3Update supported specifiers in printf commentKwarde2025-07-15 08:19:27 +02:00
dc49e29019utoa/printf: Support octal (%o)Kwarde2025-07-15 08:18:57 +02:00
9f33e36883Rewrite X2str functions to itoa/utoa ; it was a stupid idea to have seperate functions (=> more maintenance)Kwarde2025-07-15 07:58:18 +02:00