]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unix/linux/inotify/inotify.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / unix / linux / inotify / inotify.factor
index 1e6edc985eff24bb9cc7e992bc5def63e269bb61..e641c618474b4a681fef44ffa73e250999905bc8 100644 (file)
@@ -1,57 +1,57 @@
-! Copyright (C) 2008 Slava Pestov.\r
-! See http://factorcode.org/license.txt for BSD license.\r
-USING: alien.c-types alien.syntax math math.bitwise classes.struct\r
-literals ;\r
-IN: unix.linux.inotify\r
-\r
-STRUCT: inotify-event\r
-    { wd int }\r
-    { mask uint }\r
-    { cookie uint }\r
-    { len uint }\r
-    { name char[0] } ;\r
-\r
-CONSTANT: IN_ACCESS 0x1         ! File was accessed\r
-CONSTANT: IN_MODIFY 0x2         ! File was modified\r
-CONSTANT: IN_ATTRIB 0x4         ! Metadata changed\r
-CONSTANT: IN_CLOSE_WRITE 0x8    ! Writtable file was closed\r
-CONSTANT: IN_CLOSE_NOWRITE 0x10 ! Unwrittable file closed\r
-CONSTANT: IN_OPEN 0x20          ! File was opened\r
-CONSTANT: IN_MOVED_FROM 0x40    ! File was moved from X\r
-CONSTANT: IN_MOVED_TO 0x80      ! File was moved to Y\r
-CONSTANT: IN_CREATE 0x100       ! Subfile was created\r
-CONSTANT: IN_DELETE 0x200       ! Subfile was deleted\r
-CONSTANT: IN_DELETE_SELF 0x400  ! Self was deleted\r
-CONSTANT: IN_MOVE_SELF 0x800    ! Self was moved\r
-\r
-CONSTANT: IN_UNMOUNT 0x2000     ! Backing fs was unmounted\r
-CONSTANT: IN_Q_OVERFLOW 0x4000  ! Event queued overflowed\r
-CONSTANT: IN_IGNORED 0x8000     ! File was ignored\r
-\r
-CONSTANT: IN_CLOSE flags{ IN_CLOSE_WRITE IN_CLOSE_NOWRITE }\r
-CONSTANT: IN_MOVE flags{ IN_MOVED_FROM IN_MOVED_TO }\r
-\r
-CONSTANT: IN_ONLYDIR 0x1000000     ! only watch the path if it is a directory\r
-CONSTANT: IN_DONT_FOLLOW 0x2000000 ! don't follow a sym link\r
-CONSTANT: IN_MASK_ADD 0x20000000   ! add to the mask of an already existing watch\r
-CONSTANT: IN_ISDIR 0x40000000      ! event occurred against dir\r
-CONSTANT: IN_ONESHOT 0x80000000    ! only send event once\r
-\r
-CONSTANT: IN_CHANGE_EVENTS \r
-    flags{\r
-        IN_MODIFY IN_ATTRIB IN_MOVED_FROM\r
-        IN_MOVED_TO IN_DELETE IN_CREATE IN_DELETE_SELF\r
-        IN_MOVE_SELF\r
-    }\r
-\r
-CONSTANT: IN_ALL_EVENTS\r
-    flags{\r
-        IN_ACCESS IN_MODIFY IN_ATTRIB IN_CLOSE_WRITE\r
-        IN_CLOSE_NOWRITE IN_OPEN IN_MOVED_FROM\r
-        IN_MOVED_TO IN_DELETE IN_CREATE IN_DELETE_SELF\r
-        IN_MOVE_SELF\r
-    }\r
-\r
-FUNCTION: int inotify_init ( ) ;\r
-FUNCTION: int inotify_add_watch ( int fd, c-string name, uint mask  ) ;\r
-FUNCTION: int inotify_rm_watch ( int fd, uint wd ) ;\r
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: alien.c-types alien.syntax math math.bitwise classes.struct
+literals ;
+IN: unix.linux.inotify
+
+STRUCT: inotify-event
+    { wd int }
+    { mask uint }
+    { cookie uint }
+    { len uint }
+    { name char[0] } ;
+
+CONSTANT: IN_ACCESS 0x1         ! File was accessed
+CONSTANT: IN_MODIFY 0x2         ! File was modified
+CONSTANT: IN_ATTRIB 0x4         ! Metadata changed
+CONSTANT: IN_CLOSE_WRITE 0x8    ! Writtable file was closed
+CONSTANT: IN_CLOSE_NOWRITE 0x10 ! Unwrittable file closed
+CONSTANT: IN_OPEN 0x20          ! File was opened
+CONSTANT: IN_MOVED_FROM 0x40    ! File was moved from X
+CONSTANT: IN_MOVED_TO 0x80      ! File was moved to Y
+CONSTANT: IN_CREATE 0x100       ! Subfile was created
+CONSTANT: IN_DELETE 0x200       ! Subfile was deleted
+CONSTANT: IN_DELETE_SELF 0x400  ! Self was deleted
+CONSTANT: IN_MOVE_SELF 0x800    ! Self was moved
+
+CONSTANT: IN_UNMOUNT 0x2000     ! Backing fs was unmounted
+CONSTANT: IN_Q_OVERFLOW 0x4000  ! Event queued overflowed
+CONSTANT: IN_IGNORED 0x8000     ! File was ignored
+
+CONSTANT: IN_CLOSE flags{ IN_CLOSE_WRITE IN_CLOSE_NOWRITE }
+CONSTANT: IN_MOVE flags{ IN_MOVED_FROM IN_MOVED_TO }
+
+CONSTANT: IN_ONLYDIR 0x1000000     ! only watch the path if it is a directory
+CONSTANT: IN_DONT_FOLLOW 0x2000000 ! don't follow a sym link
+CONSTANT: IN_MASK_ADD 0x20000000   ! add to the mask of an already existing watch
+CONSTANT: IN_ISDIR 0x40000000      ! event occurred against dir
+CONSTANT: IN_ONESHOT 0x80000000    ! only send event once
+
+CONSTANT: IN_CHANGE_EVENTS
+    flags{
+        IN_MODIFY IN_ATTRIB IN_MOVED_FROM
+        IN_MOVED_TO IN_DELETE IN_CREATE IN_DELETE_SELF
+        IN_MOVE_SELF
+    }
+
+CONSTANT: IN_ALL_EVENTS
+    flags{
+        IN_ACCESS IN_MODIFY IN_ATTRIB IN_CLOSE_WRITE
+        IN_CLOSE_NOWRITE IN_OPEN IN_MOVED_FROM
+        IN_MOVED_TO IN_DELETE IN_CREATE IN_DELETE_SELF
+        IN_MOVE_SELF
+    }
+
+FUNCTION: int inotify_init ( ) ;
+FUNCTION: int inotify_add_watch ( int fd, c-string name, uint mask  ) ;
+FUNCTION: int inotify_rm_watch ( int fd, uint wd ) ;