Author: sebb
Date: Thu Mar 26 20:20:07 2009
New Revision: 758834
URL: http://svn.apache.org/viewvc?rev=758834&view=rev
Log:
Re-arrange constants in descending order; ensure numbers are aligned and the
same length.
Modified:
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java
Modified:
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java
URL:
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java?rev=758834&r1=758833&r2=758834&view=diff
==============================================================================
---
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java
(original)
+++
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioConstants.java
Thu Mar 26 20:20:07 2009
@@ -37,6 +37,8 @@
/** magic number of a cpio entry in the old binary format */
final int MAGIC_OLD_BINARY = 070707;
+ // These FORMAT_ constants are internal to the code
+
/** write/read a CPIOArchiveEntry in the new format */
final short FORMAT_NEW = 1;
@@ -55,78 +57,81 @@
/** Mask for both old formats */
final short FORMAT_OLD_MASK = 12;
+ /*
+ * Constants for the MODE bits
+ */
+
/** Mask for all file type bits. */
- final int S_IFMT = 0170000;
+ final int S_IFMT = 0170000;
// http://www.opengroup.org/onlinepubs/9699919799/basedefs/cpio.h.html
// has a list of the C_xxx constatnts
- /** Defines a directory */
- final int C_ISDIR = 0040000;
+ /** Defines a socket */
+ final int C_ISSOCK = 0140000;
/** Defines a symbolic link */
- final int C_ISLNK = 0120000;
+ final int C_ISLNK = 0120000;
+
+ /** HP/UX network special (C_ISCTG) */
+ final int C_ISNWK = 0110000;
/** Defines a regular file */
- final int C_ISREG = 0100000;
+ final int C_ISREG = 0100000;
+
+ /** Defines a block device */
+ final int C_ISBLK = 0060000;
+
+ /** Defines a directory */
+ final int C_ISDIR = 0040000;
+
+ /** Defines a character device */
+ final int C_ISCHR = 0020000;
/** Defines a pipe */
final int C_ISFIFO = 0010000;
- /** Defines a character device */
- final int C_ISCHR = 0020000;
- /** Defines a block device */
- final int C_ISBLK = 0060000;
+ /** Set user ID */
+ final int C_ISUID = 0004000;
- /** Defines a socket */
- final int C_ISSOCK = 0140000;
+ /** Set group ID */
+ final int C_ISGID = 0002000;
+
+ /** On directories, restricted deletion flag. */
+ final int C_ISVTX = 0001000;
- /** HP/UX network special (C_ISCTG) */
- final int C_ISNWK = 0110000;
/** Permits the owner of a file to read the file */
- final int C_IRUSR = 000400;
+ final int C_IRUSR = 0000400;
/** Permits the owner of a file to write to the file */
- final int C_IWUSR = 000200;
+ final int C_IWUSR = 0000200;
+
+ /** Permits the owner of a file to execute the file or to search the
directory */
+ final int C_IXUSR = 0000100;
- /**
- * Permits the owner of a file to execute the file or to search the file's
- * directory
- */
- final int C_IXUSR = 000100;
/** Permits a file's group to read the file */
- final int C_IRGRP = 000040;
+ final int C_IRGRP = 0000040;
/** Permits a file's group to write to the file */
- final int C_IWGRP = 000020;
+ final int C_IWGRP = 0000020;
+
+ /** Permits a file's group to execute the file or to search the directory
*/
+ final int C_IXGRP = 0000010;
- /**
- * Permits a file's group to execute the file or to search the file's
- * directory
- */
- final int C_IXGRP = 000010;
/** Permits others to read the file */
- final int C_IROTH = 000004;
+ final int C_IROTH = 0000004;
/** Permits others to write to the file */
- final int C_IWOTH = 000002;
-
- /** Permits others to execute the file or to search the file's directory */
- final int C_IXOTH = 000001;
-
- /** Set user ID */
- final int C_ISUID = 004000;
+ final int C_IWOTH = 0000002;
- /** Set group ID */
- final int C_ISGID = 002000;
-
- /** On directories, restricted deletion flag. */
- final int C_ISVTX = 001000;
+ /** Permits others to execute the file or to search the directory */
+ final int C_IXOTH = 0000001;
+
/** The special trailer marker */
final String CPIO_TRAILER = "TRAILER!!!";
}