Revision: 3982
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3982&view=rev
Author:   hofman
Date:     2008-06-07 07:12:54 -0700 (Sat, 07 Jun 2008)

Log Message:
-----------
Rename XATTR flag constants and type.

Modified Paths:
--------------
    trunk/NSFileManager_SKExtendedAttributes.h
    trunk/NSFileManager_SKExtendedAttributes.m
    trunk/SKPDFDocument.m

Modified: trunk/NSFileManager_SKExtendedAttributes.h
===================================================================
--- trunk/NSFileManager_SKExtendedAttributes.h  2008-06-07 14:08:52 UTC (rev 
3981)
+++ trunk/NSFileManager_SKExtendedAttributes.h  2008-06-07 14:12:54 UTC (rev 
3982)
@@ -30,13 +30,13 @@
 
 #import <Cocoa/Cocoa.h>
 
-typedef UInt32 BDSKXattrFlags;
+typedef UInt32 SKXattrFlags;
 enum {
-    kBDSKXattrDefault     = 0,       /* create or replace, follow symlinks, 
split data    */
-    kBDSKXattrNoFollow    = 1L << 1, /* don't follow symlinks                  
           */
-    kBDSKXattrCreateOnly  = 1L << 2, /* setting will fail if the attribute 
already exists */
-    kBDSKXattrReplaceOnly = 1L << 3, /* setting will fail if the attribute 
does not exist */
-    kBDSKXattrNoSplitData = 1L << 4  /* don't split data objects into segments 
           */
+    kSKXattrDefault     = 0,       /* create or replace, follow symlinks, 
split data    */
+    kSKXattrNoFollow    = 1L << 1, /* don't follow symlinks                    
         */
+    kSKXattrCreateOnly  = 1L << 2, /* setting will fail if the attribute 
already exists */
+    kSKXattrReplaceOnly = 1L << 3, /* setting will fail if the attribute does 
not exist */
+    kSKXattrNoSplitData = 1L << 4  /* don't split data objects into segments   
         */
 };
 
 /*!
@@ -100,11 +100,11 @@
     @param      attr The attribute name.
     @param      value The value of the attribute as NSData.
     @param      path Path to the object in the file system.
-    @param      options see BDSKXattrFlags
+    @param      options see SKXattrFlags
     @param      error Error object describing the error if NO was returned.
     @result     Returns NO if an error occurred.
 */
-- (BOOL)setExtendedAttributeNamed:(NSString *)attr toValue:(NSData *)value 
atPath:(NSString *)path options:(BDSKXattrFlags)options error:(NSError **)error;
+- (BOOL)setExtendedAttributeNamed:(NSString *)attr toValue:(NSData *)value 
atPath:(NSString *)path options:(SKXattrFlags)options error:(NSError **)error;
 
 /*!
     @method     
setExtendedAttributeNamed:toPropertyListValue:atPath:options:error:
@@ -117,7 +117,7 @@
     @param      error (description)
     @result     (description)
 */
-- (BOOL)setExtendedAttributeNamed:(NSString *)attr 
toPropertyListValue:(id)plist atPath:(NSString *)path 
options:(BDSKXattrFlags)options error:(NSError **)error;
+- (BOOL)setExtendedAttributeNamed:(NSString *)attr 
toPropertyListValue:(id)plist atPath:(NSString *)path 
options:(SKXattrFlags)options error:(NSError **)error;
 
 /*!
     @method     removeExtendedAttribute:atPath:followLinks:error:

Modified: trunk/NSFileManager_SKExtendedAttributes.m
===================================================================
--- trunk/NSFileManager_SKExtendedAttributes.m  2008-06-07 14:08:52 UTC (rev 
3981)
+++ trunk/NSFileManager_SKExtendedAttributes.m  2008-06-07 14:12:54 UTC (rev 
3982)
@@ -242,7 +242,7 @@
     return plist;
 }
 
-- (BOOL)setExtendedAttributeNamed:(NSString *)attr toValue:(NSData *)value 
atPath:(NSString *)path options:(BDSKXattrFlags)options error:(NSError **)error;
+- (BOOL)setExtendedAttributeNamed:(NSString *)attr toValue:(NSData *)value 
atPath:(NSString *)path options:(SKXattrFlags)options error:(NSError **)error;
 {
 
     const char *fsPath = [self fileSystemRepresentationWithPath:path];
@@ -254,16 +254,16 @@
         
     // options passed to xattr functions
     int xopts = 0;
-    if(options & kBDSKXattrNoFollow)
+    if(options & kSKXattrNoFollow)
         xopts = xopts | XATTR_NOFOLLOW;
-    if(options & kBDSKXattrCreateOnly)
+    if(options & kSKXattrCreateOnly)
         xopts = xopts | XATTR_CREATE;
-    if(options & kBDSKXattrReplaceOnly)
+    if(options & kSKXattrReplaceOnly)
         xopts = xopts | XATTR_REPLACE;
     
     BOOL success;
 
-    if ((options & kBDSKXattrNoSplitData) == 0 && [value length] > 
MAX_XATTR_LENGTH) {
+    if ((options & kSKXattrNoSplitData) == 0 && [value length] > 
MAX_XATTR_LENGTH) {
                     
         // compress to save space, and so we don't identify this as a plist 
when reading it (in case it really is plist data)
         value = [value bzip2];
@@ -313,7 +313,7 @@
     return success;
 }
 
-- (BOOL)setExtendedAttributeNamed:(NSString *)attr 
toPropertyListValue:(id)plist atPath:(NSString *)path 
options:(BDSKXattrFlags)options error:(NSError **)error;
+- (BOOL)setExtendedAttributeNamed:(NSString *)attr 
toPropertyListValue:(id)plist atPath:(NSString *)path 
options:(SKXattrFlags)options error:(NSError **)error;
 {
     NSString *errorString;
     NSData *data = [NSPropertyListSerialization dataFromPropertyList:plist 

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2008-06-07 14:08:52 UTC (rev 3981)
+++ trunk/SKPDFDocument.m       2008-06-07 14:12:54 UTC (rev 3982)
@@ -738,7 +738,7 @@
             //NSLog(@"%@: %@", self, error);
         }
         
-        if ([fm setExtendedAttributeNamed:@"net_sourceforge_skim-app_notes" 
toValue:data atPath:path options:kBDSKXattrDefault error:&error] == NO) {
+        if ([fm setExtendedAttributeNamed:@"net_sourceforge_skim-app_notes" 
toValue:data atPath:path options:kSKXattrDefault error:&error] == NO) {
             success = NO;
             if (outError) *outError = error;
             NSLog(@"%@: %@", self, error);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to