~ubuntu-branches/ubuntu/karmic/unzip/karmic

« back to all changes in this revision

Viewing changes to acorn/acorn.c

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2009-05-08 20:02:40 UTC
  • mfrom: (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090508200240-rk23wg0jdoyc6caj
Tags: 6.0-1
* New upstream release. Closes: #496989.
* Enabled new Unicode support. Closes: #197427. This may or may not work
  for your already created zipfiles, but it's not a bug unless they were
  created using the Unicode feature present in zip 3.0.
* Built using DATE_FORMAT=DF_YMD so that unzip -l show dates in ISO format,
  as that's the only available one which makes sense. Closes: #312886.
* Enabled new bzip2 support. Closes: #426798.
* Exit code for zipgrep should now be the right one. Closes: #441997.
* The reason why a file may not be created is now shown. Closes: #478791.
* Summary of changes in this version not being the debian/* files:
- Manpages in section 1, not 1L.
- Branding patch. UnZip by Debian. Original by Info-ZIP.
- Always #include <unistd.h>. Debian GNU/kFreeBSD needs it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
  Copyright (c) 1990-2005 Info-ZIP.  All rights reserved.
 
2
  Copyright (c) 1990-2007 Info-ZIP.  All rights reserved.
3
3
 
4
4
  See the accompanying file LICENSE, version 2000-Apr-09 or later
5
5
  (the contents of which are also included in unzip.h) for terms of use.
885
885
    iztimes z_utime;
886
886
#endif
887
887
 
 
888
    /* skip restoring time stamps on user's request */
 
889
    if (uO.D_flag <= 1) {
888
890
#ifdef USE_EF_UT_TIME
889
 
    if (G.extra_field &&
 
891
        if (G.extra_field &&
890
892
#ifdef IZ_CHECK_TZ
891
 
        G.tz_is_valid &&
 
893
            G.tz_is_valid &&
892
894
#endif
893
 
        (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0,
894
 
                          G.lrec.last_mod_dos_datetime, &z_utime, NULL)
895
 
         & EB_UT_FL_MTIME))
896
 
    {
897
 
        TTrace((stderr, "close_outfile:  Unix e.f. modif. time = %ld\n",
898
 
          z_utime.mtime));
899
 
        m_time = z_utime.mtime;
900
 
    } else
 
895
            (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0,
 
896
                              G.lrec.last_mod_dos_datetime, &z_utime, NULL)
 
897
             & EB_UT_FL_MTIME))
 
898
        {
 
899
            TTrace((stderr, "close_outfile:  Unix e.f. modif. time = %ld\n",
 
900
              z_utime.mtime));
 
901
            m_time = z_utime.mtime;
 
902
        } else
901
903
#endif /* USE_EF_UT_TIME */
902
 
        m_time = dos_to_unix_time(G.lrec.last_mod_dos_datetime);
 
904
            m_time = dos_to_unix_time(G.lrec.last_mod_dos_datetime);
 
905
    }
903
906
 
904
 
    /* set the file's modification time */
 
907
    /* set the file's time-stamp and attributes */
905
908
    SWI_OS_File_5(G.filename, NULL, &loadaddr, NULL, NULL, &attr);
906
909
 
907
 
    uxtime2acornftime(&execaddr, &loadaddr, m_time);
 
910
    if (uO.D_flag <= 1)
 
911
        /* set the file's modification time */
 
912
        uxtime2acornftime(&execaddr, &loadaddr, m_time);
908
913
 
909
914
    loadaddr = (loadaddr & 0xfff000ffU) |
910
915
               ((G.pInfo->file_attr&0xfff00000) >> 12);