User Activity

  • Posted a comment on ticket #6 on stroke

    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...

  • Posted a comment on ticket #7 on stroke

    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 @@...

  • Modified a comment on ticket #6 on stroke

    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...

  • Posted a comment on ticket #6 on stroke

    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 */

View All

Personal Data

Username:
avaresio
Joined:
2000-06-29 07:19:56
Location:
Turin / Italy / CEST
Gender:
Male

Projects

  • No projects to display.

Skills

This is a list of skills that Alberto Varesio possesses:

  • C
  • C++
  • PHP
  • Perl
  • Python
  • Linux
  • SQL-based
  • PHP Pear::MDB2
  • Python Database API

Personal Tools

MongoDB Logo MongoDB