Loading ...
Sorry, an error occurred while loading the content.

[jasspa] Directory file selection failure - solution.

Expand Messages
  • Jon Green
    Another Y2K fix for the 99/12/01 release - this is fixed in the current Beta. File selection from a directory listing fails because the file cannot be
    Message 1 of 2 , Jan 17, 2000
    • 0 Attachment
      Another Y2K fix for the 99/12/01 release - this is fixed in the
      current Beta.

      File selection from a directory listing fails because the file cannot
      be found. The cause of this problem is the date information wrapping
      and forcing the filename in the next column. The offending function is
      "readDirectory()" in file.c. All year values should be protected with

      (<year value> % 100)

      In the beta release the year field has been increased to 4 digits so
      this does not present a problem.

      Regards
      Jon.
    • Jon Green
      These are the source code changes. This affects DOS and UNIX platforms ONLY. Sorry, I should of attached them last time. Regards Jon. cd
      Message 2 of 2 , Jan 17, 2000
      • 0 Attachment
        These are the source code changes. This affects DOS and UNIX
        platforms ONLY.

        Sorry, I should of attached them last time.
        Regards
        Jon.

        cd /home/jnaught/JASSPA/src/
        diff --context --minimal --ignore-space-change --report-identical-files --recursive "/home/jnaught/JASSPA/src/file.c~" "/home/jnaug$

        *** /home/jnaught/JASSPA/src/file.c~ Fri Nov 5 12:08:06 1999
        --- /home/jnaught/JASSPA/src/file.c Mon Jan 17 12:17:39 2000
        ***************
        *** 1081,1087 ****
        #ifdef _UNIX
        if ((tmp = localtime(&fnode->mtime)) != NULL)
        len += sprintf(buf+len, "%02d/%02d/%02d %02d:%02d. ",
        ! tmp->tm_year, tmp->tm_mon+1, tmp->tm_mday,
        tmp->tm_hour, tmp->tm_min);

        else
        --- 1081,1087 ----
        #ifdef _UNIX
        if ((tmp = localtime(&fnode->mtime)) != NULL)
        len += sprintf(buf+len, "%02d/%02d/%02d %02d:%02d. ",
        ! tmp->tm_year%100, tmp->tm_mon+1, tmp->tm_mday,
        tmp->tm_hour, tmp->tm_min);

        else
        ***************
        *** 1089,1095 ****
        #ifdef _DOS
        if((fnode->mtime & 0x0ffff) != 0x7fff)
        len += sprintf(buf+len, "%02d/%02d/%02d %02d:%02d. ",
        ! (int) ((fnode->mtime >> 25) & 0x007f)+80,
        (int) ((fnode->mtime >> 21) & 0x000f),
        (int) ((fnode->mtime >> 16) & 0x001f),
        (int) ((fnode->mtime >> 11) & 0x001f),
        --- 1089,1095 ----
        #ifdef _DOS
        if((fnode->mtime & 0x0ffff) != 0x7fff)
        len += sprintf(buf+len, "%02d/%02d/%02d %02d:%02d. ",
        ! ((int) ((fnode->mtime >> 25) & 0x007f)+80)%100,
        (int) ((fnode->mtime >> 21) & 0x000f),
        (int) ((fnode->mtime >> 16) & 0x001f),
        (int) ((fnode->mtime >> 11) & 0x001f),
        [EXIT]


        Jon Green wrote:
        >
        > Another Y2K fix for the 99/12/01 release - this is fixed in the
        > current Beta.
        >
        > File selection from a directory listing fails because the file cannot
        > be found. The cause of this problem is the date information wrapping
        > and forcing the filename in the next column. The offending function is
        > "readDirectory()" in file.c. All year values should be protected with
        >
        > (<year value> % 100)
        >
        > In the beta release the year field has been increased to 4 digits so
        > this does not present a problem.
        >
        > Regards
        > Jon.
        >
        > ------------------------------------------------------------------------
        > __________________________________________________________________________
        >
        > This is an unmoderated list. JASSPA is not responsible for the content of
        > any material posted to this list.
        >
        > ------------------------------------------------------------------------
        > For the fastest and easiest way to backup your files and, access them from
        > anywhere. Try @backup Free for 30 days. Click here for a chance to win a
        > digital camera.
        > http://click.egroups.com/1/337/4/_/6009/_/948111105/
        >
        > eGroups.com Home: http://www.egroups.com/group/jasspa/
        > http://www.egroups.com - Simplifying group communications
      Your message has been successfully submitted and would be delivered to recipients shortly.