Hi Sören Yes maybe code needs a rewrite, but I remember to have tested it against a full year of dates and it looked correct. With the logical AND code is testing an integer value ( months shifted by the value of D ) which will always result in a > 0 value, which will always be considered true, so the second test is ineffective until December. With bitwise AND the same value is ANDed with a 0/1 from the second condition, so it will get true/false on the right months, hopefully Regards On Sun, Nov...
Thank you for reporting this problem. It is well known and even commented on in the source code itself. Don't consider it a bug but just a restriction as of now. The next version of stroke will support file names containing spaces. Cheers, Sören
The bug will be checked. Until then try using the -force command line flag in order to disable date validation, then it should work as expected
Hello Albert, I don't think your fix is correct. Although it seems to work in your case, just replacing the logical && with a bitwise AND-operator is not the correct fix here in my opinion. The code has some logical issues in my opinion. Best regards, Sören
Hello Alberto, thanks for the patch, I'll look into applying it to the next release version of stroke. Best regards, Sören
no problems on RHEL5
stroke does not set ctime even when invoked by root user
Some modifications I made to get it compile under GCC-10 with defaults $ LC_ALL=C TZ=UTC0 diff -Naur stroke-0.1.3 stroke-0.1.3-J diff -Naur stroke-0.1.3/src/aux.c stroke-0.1.3-J/src/aux.c --- stroke-0.1.3/src/aux.c 2011-02-24 13:36:34.000000000 +0000 +++ stroke-0.1.3-J/src/aux.c 2020-10-15 16:42:28.405609962 +0000 @@ -58,7 +58,7 @@ * Current verbosity level function. * Used as reference by libgeneral. */ -inline int +extern inline int verbosity_level() { return CHKF(VERBOSE); @@ -419,7 +419,7 @@...
I made this only change to the source and it seems to validate dates better: $ LC_ALL=C TZ=UTC0 diff -Naur aux.c.old aux.c --- aux.c.old 2020-10-15 16:42:54.085730137 +0000 +++ aux.c 2020-10-15 16:42:28.405609962 +0000 @@ -419,7 +419,7 @@ goto error; } - if(months >> D(MON) && D(DAY) > 30) { + if(months >> D(MON) & D(DAY) > 30) { goto error; } else if(D(MON) == 2) { /* leap year */ Checked with for D in {1..365}; do TS=$(date -d "20110101 + $D day" '+%Y%m%d 10:12:14'); echo $TS; touch -d "$TS" file...
I made this only change to the source and it seems to validate dates better: $ LC_ALL=C TZ=UTC0 diff -Naur aux.c.old aux.c --- aux.c.old 2020-10-15 16:42:54.085730137 +0000 +++ aux.c 2020-10-15 16:42:28.405609962 +0000 @@ -419,7 +419,7 @@ goto error; } - if(months >> D(MON) && D(DAY) > 30) { + if(months >> D(MON) & D(DAY) > 30) { goto error; } else if(D(MON) == 2) { /* leap year */
Hi, thank you for reporting this problem. It's probably because something changed with the POSIX definition. Try adding -D_POSIX_C_SOURCE=199309L as a temporary fix to the compiler flags. I will look into this issue. Best Regards, Sören
unknown type name 'siginfo_t'