]> sjero.net Git - wget/commitdiff
[svn] Use octal constants.
authorhniksic <devnull@localhost>
Thu, 12 Apr 2001 12:58:02 +0000 (05:58 -0700)
committerhniksic <devnull@localhost>
Thu, 12 Apr 2001 12:58:02 +0000 (05:58 -0700)
Published in <sxsr8yy1dk6.fsf@florida.arsdigita.de>.

src/ChangeLog
src/ftp-ls.c

index 1e543cbb5cecc8fcfd8eca5cce6cd412545600ad..a896f8b8f9ce493351001d616157a1c96679fc9b 100644 (file)
@@ -1,3 +1,10 @@
+2001-04-12  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * ftp-ls.c (ftp_parse_unix_ls): Use octal constants for
+       permissions.  A compiler that doesn't accept octal constants is
+       seriously broken and shouldn't be used -- octal constants were
+       present in K&R C!
+
 2001-01-20  Karl Eichwalder  <ke@suse.de>
 
        * Makefile.in: Provide and use DESTDIR according to the Coding
index 338c1a4e27b3b270d3708e72342dbbd3d5b1c25a..bd3309c62004608553fb65b947ff407a898fae92 100644 (file)
@@ -155,15 +155,16 @@ ftp_parse_unix_ls (const char *file, int ignore_perms)
          switch (cur.type)
            {
            case FT_PLAINFILE:
-             cur.perms = 420;
+             cur.perms = 0644;
              break;
            case FT_DIRECTORY:
-             cur.perms = 493;
+             cur.perms = 0755;
              break;
            default:
-             cur.perms = 1023;
+             /*cur.perms = 1023;*/     /* #### What is this?  --hniksic */
+             cur.perms = 0644;
            }
-         DEBUGP (("implicite perms %0o; ", cur.perms));
+         DEBUGP (("implicit perms %0o; ", cur.perms));
        }
        else
          {
@@ -489,14 +490,14 @@ ftp_parse_winnt_ls (const char *file)
        {
          cur.type  = FT_DIRECTORY;
          cur.size  = 0;
-         cur.perms = 493; /* my gcc does not like 0755 ?? */
+         cur.perms = 0755;
          DEBUGP(("Directory\n"));
        }
       else
        {
          cur.type  = FT_PLAINFILE;
          cur.size  = atoi(tok);
-         cur.perms = 420; /* 0664 octal */
+         cur.perms = 0644;
          DEBUGP(("File, size %ld bytes\n", cur.size));
        }