]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing assorted compile errors and help lint warnings
authorSlava Pestov <slava@oberon.local>
Tue, 16 Dec 2008 07:12:36 +0000 (01:12 -0600)
committerSlava Pestov <slava@oberon.local>
Tue, 16 Dec 2008 07:12:36 +0000 (01:12 -0600)
47 files changed:
basis/channels/remote/remote-docs.factor
basis/checksums/openssl/openssl-docs.factor
basis/http/server/server-docs.factor
basis/io/files/windows/nt/nt-tests.factor
basis/io/launcher/windows/nt/nt-tests.factor
basis/io/streams/duplex/duplex-docs.factor
basis/math/intervals/intervals.factor
basis/ui/gadgets/panes/panes-docs.factor
basis/unix/bsd/bsd.factor
basis/unix/bsd/freebsd/freebsd.factor
basis/unix/bsd/macosx/macosx.factor
basis/unix/bsd/netbsd/netbsd.factor
basis/unix/bsd/openbsd/openbsd.factor
basis/unix/getfsstat/freebsd/freebsd.factor
basis/unix/getfsstat/macosx/macosx.factor
basis/unix/getfsstat/netbsd/netbsd.factor
basis/unix/getfsstat/openbsd/openbsd.factor
basis/unix/kqueue/freebsd/freebsd.factor
basis/unix/kqueue/macosx/macosx.factor
basis/unix/kqueue/netbsd/netbsd.factor
basis/unix/kqueue/openbsd/openbsd.factor
basis/unix/linux/epoll/epoll.factor
basis/unix/linux/inotify/inotify.factor
basis/unix/linux/linux.factor
basis/unix/process/process.factor
basis/unix/solaris/solaris.factor
basis/unix/stat/netbsd/32/32.factor
basis/unix/stat/netbsd/64/64.factor
basis/unix/stat/stat.factor
basis/unix/statfs/freebsd/freebsd.factor
basis/unix/statfs/openbsd/openbsd.factor
basis/unix/statvfs/freebsd/freebsd.factor
basis/unix/statvfs/linux/linux.factor
basis/unix/statvfs/macosx/macosx.factor
basis/unix/statvfs/netbsd/netbsd.factor
basis/unix/statvfs/openbsd/openbsd.factor
basis/unix/unix.factor
basis/unix/utmpx/utmpx.factor
basis/windows/ole32/ole32.factor
basis/xml-rpc/xml-rpc-docs.factor
basis/xml/xml-docs.factor
core/continuations/continuations-docs.factor
core/io/streams/c/c-docs.factor
core/sequences/sequences-docs.factor
core/sequences/sequences.factor
core/words/words-docs.factor
extra/assoc-heaps/assoc-heaps-docs.factor

index 862084e1d9e4a856f0f04102d0b7e894fc971aeb..309f764d2da6f1e6a3deb4baef1901fc0932b2ac 100644 (file)
@@ -6,6 +6,7 @@ IN: channels.remote
 HELP: <remote-channel>
 { $values { "node" "a node object" }
           { "id" "the id of the published channel on the node" } 
+          { "remote-channel" remote-channel }
 }
 { $description "Create a remote channel that acts as a proxy for a "
 "channel on another node. The remote node's channel must have been "
index fafe9386d65a86b79fe57b6ca48fe165d47dfb00..750e05f3c89bea6b2d61366189bb119f3044fcb5 100644 (file)
@@ -5,7 +5,7 @@ HELP: openssl-checksum
 { $class-description "The class of checksum algorithms implemented by OpenSSL. The exact set of algorithms supported depends on how the OpenSSL library was compiled; " { $snippet "md5" } " and " { $snippet "sha1" } " should be universally available." } ;
 
 HELP: <openssl-checksum>
-{ $values { "name" "an EVP message digest name" } { "checksum" openssl-checksum } }
+{ $values { "name" "an EVP message digest name" } { "openssl-checksum" openssl-checksum } }
 { $description "Creates a new OpenSSL checksum object." } ;
 
 HELP: openssl-md5
index 18e1ab1323f4cee44baab4badfb27010b3f2d0a6..29f61416fa1fd003d4f9d1592b6dd2d520356278 100644 (file)
@@ -5,7 +5,7 @@ HELP: trivial-responder
 { $description "The class of trivial responders, which output the same response for every request. New instances are created by calling " { $link <trivial-responder> } "." } ;
 
 HELP: <trivial-responder>
-{ $values { "response" response } { "responder" trivial-responder } }
+{ $values { "response" response } { "trivial-responder" trivial-responder } }
 { $description "Creates a new trivial responder which outputs the same response for every request." } ;
 
 HELP: benchmark?
index 727f72c808bd838fcc2dc4997a6f456a35d2bf20..e934dc8cd256df96740fa89480dd253da64cdd21 100644 (file)
@@ -1,4 +1,4 @@
-USING: io.files kernel tools.test io.backend
+USING: io.files io.pathnames kernel tools.test io.backend
 io.files.windows.nt splitting sequences ;
 IN: io.files.windows.nt.tests
 
index 2cdb7d5f89ba23f1521876591810af812bbeda3d..62fe45dc7fb5a74556a5180724088ae714bf3d10 100644 (file)
@@ -1,6 +1,7 @@
 USING: io.launcher tools.test calendar accessors environment
 namespaces kernel system arrays io io.files io.encodings.ascii
-sequences parser assocs hashtables math continuations eval ;
+sequences parser assocs hashtables math continuations eval
+io.files.temp io.directories io.pathnames ;
 IN: io.launcher.windows.nt.tests
 
 [ ] [
index ca4f424fb6cadf1751d081bc67b21f3d631e54c0..48afafeec742ac253e3f74c78f633fb9fba7e097 100644 (file)
@@ -15,7 +15,7 @@ HELP: duplex-stream
 { $class-description "A bidirectional stream wrapping an input and output stream." } ;
 
 HELP: <duplex-stream>
-{ $values { "in" "an input stream" } { "out" "an output stream" } { "stream" " a duplex stream" } }
+{ $values { "in" "an input stream" } { "out" "an output stream" } { "duplex-stream" duplex-stream } }
 { $description "Creates a duplex stream. Writing to a duplex stream will write to " { $snippet "out" } ", and reading from a duplex stream will read from " { $snippet "in" } ". Closing a duplex stream closes both the input and output streams." } ;
 
 HELP: with-stream
index ed76ccaedd1e6cc6a6d0f9181537bfe8cb069556..86c3b0de0b70bd009ba0fa0391d8b6dae2a6b9b3 100644 (file)
@@ -11,7 +11,7 @@ SYMBOL: full-interval
 
 TUPLE: interval { from read-only } { to read-only } ;
 
-: <interval> ( from to -- int )
+: <interval> ( from to -- interval )
     2dup [ first ] bi@ {
         { [ 2dup > ] [ 2drop 2drop empty-interval ] }
         { [ 2dup = ] [
index cad49375720a8d4394a36e2d6ba34aa8bd8fa737..23dc99da82124b3d0305f6d075ab7fb94c7e3d97 100644 (file)
@@ -50,7 +50,7 @@ HELP: pane-stream
 { $class-description "Pane streams implement the portion of the " { $link "stream-protocol" } " responsible for output of text, including full support for " { $link "styles" } ". Pane streams also support direct output of gadgets via " { $link write-gadget } " and " { $link print-gadget } ". Pane streams are created by calling " { $link <pane-stream> } "." } ;
 
 HELP: <pane-stream>
-{ $values { "pane" pane } { "stream" "a new " { $link pane-stream } } }
+{ $values { "pane" pane } { "pane-stream" "a new " { $link pane-stream } } }
 { $description "Creates a new " { $link pane-stream } " for writing to " { $snippet "pane" } "." } ;
 
 { with-pane make-pane } related-words
index 761b1d14e31986a15880d80b1476fd1069f8d207..42f2a07e62c1cceddc13bcc9de5bb0edbedf7162 100644 (file)
@@ -1,30 +1,31 @@
 ! Copyright (C) 2005, 2006 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax combinators system vocabs.loader alias ;
+USING: alien.syntax combinators system vocabs.loader alias
+constants ;
 IN: unix
 
-: MAXPATHLEN 1024 ; inline
-
-: O_RDONLY   HEX: 0000 ; inline
-: O_WRONLY   HEX: 0001 ; inline
-: O_RDWR     HEX: 0002 ; inline
-: O_NONBLOCK HEX: 0004 ; inline
-: O_APPEND   HEX: 0008 ; inline
-: O_CREAT    HEX: 0200 ; inline
-: O_TRUNC    HEX: 0400 ; inline
-: O_EXCL     HEX: 0800 ; inline
-: O_NOCTTY   HEX: 20000 ; inline
+CONSTANT: MAXPATHLEN 1024
+
+CONSTANT: O_RDONLY   HEX: 0000
+CONSTANT: O_WRONLY   HEX: 0001
+CONSTANT: O_RDWR     HEX: 0002
+CONSTANT: O_NONBLOCK HEX: 0004
+CONSTANT: O_APPEND   HEX: 0008
+CONSTANT: O_CREAT    HEX: 0200
+CONSTANT: O_TRUNC    HEX: 0400
+CONSTANT: O_EXCL     HEX: 0800
+CONSTANT: O_NOCTTY   HEX: 20000
 ALIAS: O_NDELAY O_NONBLOCK
 
-: SOL_SOCKET HEX: ffff ; inline
-: SO_REUSEADDR HEX: 4 ; inline
-: SO_OOBINLINE HEX: 100 ; inline
-: SO_SNDTIMEO HEX: 1005 ; inline
-: SO_RCVTIMEO HEX: 1006 ; inline
+CONSTANT: SOL_SOCKET HEX: ffff
+CONSTANT: SO_REUSEADDR HEX: 4
+CONSTANT: SO_OOBINLINE HEX: 100
+CONSTANT: SO_SNDTIMEO HEX: 1005
+CONSTANT: SO_RCVTIMEO HEX: 1006
 
-: F_SETFD 2 ; inline
-: F_SETFL 4 ; inline
-: FD_CLOEXEC 1 ; inline
+CONSTANT: F_SETFD 2
+CONSTANT: F_SETFL 4
+CONSTANT: FD_CLOEXEC 1
 
 C-STRUCT: sockaddr-in
     { "uchar" "len" }
@@ -59,29 +60,29 @@ C-STRUCT: passwd
     { "time_t" "pw_expire" }
     { "int"    "pw_fields" } ;
 
-: max-un-path 104 ; inline
+CONSTANT: max-un-path 104
 
-: SOCK_STREAM 1 ; inline
-: SOCK_DGRAM 2 ; inline
+CONSTANT: SOCK_STREAM 1
+CONSTANT: SOCK_DGRAM 2
 
-: AF_UNSPEC 0 ; inline
-: AF_UNIX 1 ; inline
-: AF_INET 2 ; inline
-: AF_INET6 30 ; inline
+CONSTANT: AF_UNSPEC 0
+CONSTANT: AF_UNIX 1
+CONSTANT: AF_INET 2
+CONSTANT: AF_INET6 30
 
 ALIAS: PF_UNSPEC AF_UNSPEC
 ALIAS: PF_UNIX AF_UNIX
 ALIAS: PF_INET AF_INET
 ALIAS: PF_INET6 AF_INET6
 
-: IPPROTO_TCP 6 ; inline
-: IPPROTO_UDP 17 ; inline
+CONSTANT: IPPROTO_TCP 6
+CONSTANT: IPPROTO_UDP 17
 
-: AI_PASSIVE 1 ; inline
+CONSTANT: AI_PASSIVE 1
 
-: SEEK_SET 0 ; inline
-: SEEK_CUR 1 ; inline
-: SEEK_END 2 ; inline
+CONSTANT: SEEK_SET 0
+CONSTANT: SEEK_CUR 1
+CONSTANT: SEEK_END 2
 
 os {
     { macosx  [ "unix.bsd.macosx"  require ] }
index 81885ff14157b1f7d12e8ce4138cba4620e02aff..d58cfbb90d21767d46aad975ac25abc92c2bed24 100644 (file)
@@ -1,4 +1,4 @@
-USING: alien.syntax ;
+USING: alien.syntax alias constants ;
 IN: unix
 
 : FD_SETSIZE 1024 ;
@@ -20,97 +20,97 @@ C-STRUCT: dirent
     { "u_int8_t"  "d_namlen" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: EOPNOTSUPP 45 ; inline
-: ENOTSUP EOPNOTSUPP ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EIDRM 82 ; inline
-: ENOMSG 83 ; inline
-: EOVERFLOW 84 ; inline
-: ECANCELED 85 ; inline
-: EILSEQ 86 ; inline
-: ENOATTR 87 ; inline
-: EDOOFUS 88 ; inline
-: EBADMSG 89 ; inline
-: EMULTIHOP 90 ; inline
-: ENOLINK 91 ; inline
-: EPROTO 92 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: EOPNOTSUPP 45
+ALIAS: ENOTSUP EOPNOTSUPP
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EIDRM 82
+CONSTANT: ENOMSG 83
+CONSTANT: EOVERFLOW 84
+CONSTANT: ECANCELED 85
+CONSTANT: EILSEQ 86
+CONSTANT: ENOATTR 87
+CONSTANT: EDOOFUS 88
+CONSTANT: EBADMSG 89
+CONSTANT: EMULTIHOP 90
+CONSTANT: ENOLINK 91
+CONSTANT: EPROTO 92
index 6cb086b11b80c8075fe5e4512d7a1de8c7697562..f38707b456e116ed31998160717136a3062e0b29 100644 (file)
@@ -1,7 +1,7 @@
-USING: alien.syntax unix.time alias ;
+USING: alien.syntax unix.time alias constants ;
 IN: unix
 
-: FD_SETSIZE 1024 ; inline
+CONSTANT: FD_SETSIZE 1024
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -13,10 +13,10 @@ C-STRUCT: addrinfo
     { "void*" "addr" }
     { "addrinfo*" "next" } ;
 
-: _UTX_USERSIZE 256 ; inline
-: _UTX_LINESIZE 32 ; inline
-: _UTX_IDSIZE 4 ; inline
-: _UTX_HOSTSIZE 256 ; inline
+CONSTANT: _UTX_USERSIZE 256
+CONSTANT: _UTX_LINESIZE 32
+CONSTANT: _UTX_IDSIZE 4
+CONSTANT: _UTX_HOSTSIZE 256
     
 C-STRUCT: utmpx
     { { "char" _UTX_USERSIZE } "ut_user" }
@@ -28,9 +28,9 @@ C-STRUCT: utmpx
     { { "char" _UTX_HOSTSIZE } "ut_host" }
     { { "uint" 16 } "ut_pad" } ;
 
-: __DARWIN_MAXPATHLEN 1024 ; inline
-: __DARWIN_MAXNAMELEN 255 ; inline
-: __DARWIN_MAXNAMELEN+1 255 ; inline
+CONSTANT: __DARWIN_MAXPATHLEN 1024
+CONSTANT: __DARWIN_MAXNAMELEN 255
+CONSTANT: __DARWIN_MAXNAMELEN+1 255
 
 C-STRUCT: dirent
     { "ino_t" "d_ino" }
@@ -39,107 +39,107 @@ C-STRUCT: dirent
     { "__uint8_t"  "d_namlen" }
     { { "char" __DARWIN_MAXNAMELEN+1 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
 ALIAS: EWOULDBLOCK EAGAIN
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: ENOTSUP 45 ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EPWROFF 82 ; inline
-: EDEVERR 83 ; inline
-: EOVERFLOW 84 ; inline
-: EBADEXEC 85 ; inline
-: EBADARCH 86 ; inline
-: ESHLIBVERS 87 ; inline
-: EBADMACHO 88 ; inline
-: ECANCELED 89 ; inline
-: EIDRM 90 ; inline
-: ENOMSG 91 ; inline
-: EILSEQ 92 ; inline
-: ENOATTR 93 ; inline
-: EBADMSG 94 ; inline
-: EMULTIHOP 95 ; inline
-: ENODATA 96 ; inline
-: ENOLINK 97 ; inline
-: ENOSR 98 ; inline
-: ENOSTR 99 ; inline
-: EPROTO 100 ; inline
-: ETIME 101 ; inline
-: EOPNOTSUPP 102 ; inline
-: ENOPOLICY 103 ; inline
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: ENOTSUP 45
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EPWROFF 82
+CONSTANT: EDEVERR 83
+CONSTANT: EOVERFLOW 84
+CONSTANT: EBADEXEC 85
+CONSTANT: EBADARCH 86
+CONSTANT: ESHLIBVERS 87
+CONSTANT: EBADMACHO 88
+CONSTANT: ECANCELED 89
+CONSTANT: EIDRM 90
+CONSTANT: ENOMSG 91
+CONSTANT: EILSEQ 92
+CONSTANT: ENOATTR 93
+CONSTANT: EBADMSG 94
+CONSTANT: EMULTIHOP 95
+CONSTANT: ENODATA 96
+CONSTANT: ENOLINK 97
+CONSTANT: ENOSR 98
+CONSTANT: ENOSTR 99
+CONSTANT: EPROTO 100
+CONSTANT: ETIME 101
+CONSTANT: EOPNOTSUPP 102
+CONSTANT: ENOPOLICY 103
index 149f35afce1e2fc3390d08650a99da32d16d8301..5853210d1359fe949a233e6945298e169653afe9 100644 (file)
@@ -1,7 +1,7 @@
-USING: alien.syntax alien.c-types math vocabs.loader ;
+USING: alien.syntax alien.c-types math vocabs.loader constants ;
 IN: unix
 
-: FD_SETSIZE 256 ; inline
+CONSTANT: FD_SETSIZE 256
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -20,111 +20,111 @@ C-STRUCT: dirent
     { "__uint8_t"  "d_namlen" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: EOPNOTSUPP 45 ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EIDRM 82 ; inline
-: ENOMSG 83 ; inline
-: EOVERFLOW 84 ; inline
-: EILSEQ 85 ; inline
-: ENOTSUP 86 ; inline
-: ECANCELED 87 ; inline
-: EBADMSG 88 ; inline
-: ENODATA 89 ; inline
-: ENOSR 90 ; inline
-: ENOSTR 91 ; inline
-: ETIME 92 ; inline
-: ENOATTR 93 ; inline
-: EMULTIHOP 94 ; inline
-: ENOLINK 95 ; inline
-: EPROTO 96 ; inline
-: ELAST 96 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: EOPNOTSUPP 45
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EIDRM 82
+CONSTANT: ENOMSG 83
+CONSTANT: EOVERFLOW 84
+CONSTANT: EILSEQ 85
+CONSTANT: ENOTSUP 86
+CONSTANT: ECANCELED 87
+CONSTANT: EBADMSG 88
+CONSTANT: ENODATA 89
+CONSTANT: ENOSR 90
+CONSTANT: ENOSTR 91
+CONSTANT: ETIME 92
+CONSTANT: ENOATTR 93
+CONSTANT: EMULTIHOP 94
+CONSTANT: ENOLINK 95
+CONSTANT: EPROTO 96
+CONSTANT: ELAST 96
 
 TYPEDEF: __uint8_t sa_family_t
 
-: _UTX_USERSIZE   32 ; inline
-: _UTX_LINESIZE   32 ; inline
-: _UTX_IDSIZE     4 ; inline
-: _UTX_HOSTSIZE   256 ; inline
+CONSTANT: _UTX_USERSIZE   32
+CONSTANT: _UTX_LINESIZE   32
+CONSTANT: _UTX_IDSIZE     4
+CONSTANT: _UTX_HOSTSIZE   256
 
 : _SS_MAXSIZE ( -- n )
     128 ; inline
index a4189775e7430eb4aa66ff582d78cbca8feaff64..46f889cef9188fc67923ae7bbbfdb51326244c00 100644 (file)
@@ -1,7 +1,7 @@
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix
 
-: FD_SETSIZE 1024 ; inline
+CONSTANT: FD_SETSIZE 1024
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -20,92 +20,92 @@ C-STRUCT: dirent
     { "__uint8_t"  "d_namlen" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EDEADLK 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EAGAIN 35 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: EINPROGRESS 36 ; inline
-: EALREADY 37 ; inline
-: ENOTSOCK 38 ; inline
-: EDESTADDRREQ 39 ; inline
-: EMSGSIZE 40 ; inline
-: EPROTOTYPE 41 ; inline
-: ENOPROTOOPT 42 ; inline
-: EPROTONOSUPPORT 43 ; inline
-: ESOCKTNOSUPPORT 44 ; inline
-: EOPNOTSUPP 45 ; inline
-: EPFNOSUPPORT 46 ; inline
-: EAFNOSUPPORT 47 ; inline
-: EADDRINUSE 48 ; inline
-: EADDRNOTAVAIL 49 ; inline
-: ENETDOWN 50 ; inline
-: ENETUNREACH 51 ; inline
-: ENETRESET 52 ; inline
-: ECONNABORTED 53 ; inline
-: ECONNRESET 54 ; inline
-: ENOBUFS 55 ; inline
-: EISCONN 56 ; inline
-: ENOTCONN 57 ; inline
-: ESHUTDOWN 58 ; inline
-: ETOOMANYREFS 59 ; inline
-: ETIMEDOUT 60 ; inline
-: ECONNREFUSED 61 ; inline
-: ELOOP 62 ; inline
-: ENAMETOOLONG 63 ; inline
-: EHOSTDOWN 64 ; inline
-: EHOSTUNREACH 65 ; inline
-: ENOTEMPTY 66 ; inline
-: EPROCLIM 67 ; inline
-: EUSERS 68 ; inline
-: EDQUOT 69 ; inline
-: ESTALE 70 ; inline
-: EREMOTE 71 ; inline
-: EBADRPC 72 ; inline
-: ERPCMISMATCH 73 ; inline
-: EPROGUNAVAIL 74 ; inline
-: EPROGMISMATCH 75 ; inline
-: EPROCUNAVAIL 76 ; inline
-: ENOLCK 77 ; inline
-: ENOSYS 78 ; inline
-: EFTYPE 79 ; inline
-: EAUTH 80 ; inline
-: ENEEDAUTH 81 ; inline
-: EIPSEC 82 ; inline
-: ENOATTR 83 ; inline
-: EILSEQ 84 ; inline
-: ENOMEDIUM 85 ; inline
-: EMEDIUMTYPE 86 ; inline
-: EOVERFLOW 87 ; inline
-: ECANCELED 88 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EDEADLK 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EAGAIN 35
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: EINPROGRESS 36
+CONSTANT: EALREADY 37
+CONSTANT: ENOTSOCK 38
+CONSTANT: EDESTADDRREQ 39
+CONSTANT: EMSGSIZE 40
+CONSTANT: EPROTOTYPE 41
+CONSTANT: ENOPROTOOPT 42
+CONSTANT: EPROTONOSUPPORT 43
+CONSTANT: ESOCKTNOSUPPORT 44
+CONSTANT: EOPNOTSUPP 45
+CONSTANT: EPFNOSUPPORT 46
+CONSTANT: EAFNOSUPPORT 47
+CONSTANT: EADDRINUSE 48
+CONSTANT: EADDRNOTAVAIL 49
+CONSTANT: ENETDOWN 50
+CONSTANT: ENETUNREACH 51
+CONSTANT: ENETRESET 52
+CONSTANT: ECONNABORTED 53
+CONSTANT: ECONNRESET 54
+CONSTANT: ENOBUFS 55
+CONSTANT: EISCONN 56
+CONSTANT: ENOTCONN 57
+CONSTANT: ESHUTDOWN 58
+CONSTANT: ETOOMANYREFS 59
+CONSTANT: ETIMEDOUT 60
+CONSTANT: ECONNREFUSED 61
+CONSTANT: ELOOP 62
+CONSTANT: ENAMETOOLONG 63
+CONSTANT: EHOSTDOWN 64
+CONSTANT: EHOSTUNREACH 65
+CONSTANT: ENOTEMPTY 66
+CONSTANT: EPROCLIM 67
+CONSTANT: EUSERS 68
+CONSTANT: EDQUOT 69
+CONSTANT: ESTALE 70
+CONSTANT: EREMOTE 71
+CONSTANT: EBADRPC 72
+CONSTANT: ERPCMISMATCH 73
+CONSTANT: EPROGUNAVAIL 74
+CONSTANT: EPROGMISMATCH 75
+CONSTANT: EPROCUNAVAIL 76
+CONSTANT: ENOLCK 77
+CONSTANT: ENOSYS 78
+CONSTANT: EFTYPE 79
+CONSTANT: EAUTH 80
+CONSTANT: ENEEDAUTH 81
+CONSTANT: EIPSEC 82
+CONSTANT: ENOATTR 83
+CONSTANT: EILSEQ 84
+CONSTANT: ENOMEDIUM 85
+CONSTANT: EMEDIUMTYPE 86
+CONSTANT: EOVERFLOW 87
+CONSTANT: ECANCELED 88
index 1d9cab577eda8501a5e1e13ad15d8724fb25447e..0cc63229c4ebd792528f3914c4b068f6ef74f134 100644 (file)
@@ -1,11 +1,11 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.getfsstat.freebsd
 
-: MNT_WAIT        1       ; inline ! synchronously wait for I/O to complete
-: MNT_NOWAIT      2       ; inline ! start all I/O, but do not wait for it 
-: MNT_LAZY        3       ; inline ! push data not written by filesystem syncer 
-: MNT_SUSPEND     4       ; inline ! Suspend file system after sync 
+CONSTANT: MNT_WAIT        1       ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT      2       ! start all I/O, but do not wait for it 
+CONSTANT: MNT_LAZY        3       ! push data not written by filesystem syncer 
+CONSTANT: MNT_SUSPEND     4       ! Suspend file system after sync 
 
 FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ;
index fe39f8556b8131228a8e72a21cc09f8f0e339a4e..23d9a14b9b5a737f33b9bbe338970f428322033e 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.getfsstat.macosx
 
-: MNT_WAIT    1   ; inline ! synchronously wait for I/O to complete
-: MNT_NOWAIT  2   ; inline ! start all I/O, but do not wait for it
+CONSTANT: MNT_WAIT    1   ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT  2   ! start all I/O, but do not wait for it
 
 FUNCTION: int getfsstat64 ( statfs* buf, int bufsize, int flags ) ;
index 1c8941a6531f5f8272577a5f3e81b2a85c01e60b..18064822ebe39cc772ff7ec796278b8ce83bc030 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.getfsstat.netbsd
 
-: MNT_WAIT        1       ; inline ! synchronously wait for I/O to complete
-: MNT_NOWAIT      2       ; inline ! start all I/O, but do not wait for it 
-: MNT_LAZY        3       ; inline ! push data not written by filesystem syncer 
+CONSTANT: MNT_WAIT   1 ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it 
+CONSTANT: MNT_LAZY   3 ! push data not written by filesystem syncer 
 
 FUNCTION: int getvfsstat ( statfs* buf, int bufsize, int flags ) ;
index 8bf692bd9c3d629a8794ce3ccfa531b934ea87ec..41adfeaacde83e615e13643b5aa0d5c5233c1522 100644 (file)
@@ -1,10 +1,10 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.getfsstat.openbsd
 
-: MNT_WAIT        1       ; ! synchronously wait for I/O to complete
-: MNT_NOWAIT      2       ; ! start all I/O, but do not wait for it
-: MNT_LAZY        3       ; ! push data not written by filesystem syncer
+CONSTANT: MNT_WAIT   1 ! synchronously wait for I/O to complete
+CONSTANT: MNT_NOWAIT 2 ! start all I/O, but do not wait for it
+CONSTANT: MNT_LAZY   3 ! push data not written by filesystem syncer
 
 FUNCTION: int getfsstat ( statfs* buf, int bufsize, int flags ) ;
index edddae2c16dea9afb961248b96768f6a160593a4..4c90ef739eef2ee7bfdad7348b924622a874a64b 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax constants ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,12 +12,12 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
 
-: EVFILT_READ     -1 ; inline
-: EVFILT_WRITE    -2 ; inline
-: EVFILT_AIO      -3 ; inline ! attached to aio requests
-: EVFILT_VNODE    -4 ; inline ! attached to vnodes
-: EVFILT_PROC     -5 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   -6 ; inline ! attached to struct proc
-: EVFILT_TIMER    -7 ; inline ! timers
-: EVFILT_NETDEV   -8 ; inline ! Mach ports
-: EVFILT_FS       -9 ; inline ! Filesystem events
+CONSTANT: EVFILT_READ     -1
+CONSTANT: EVFILT_WRITE    -2
+CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
+CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    -7 ! timers
+CONSTANT: EVFILT_NETDEV   -8 ! Mach ports
+CONSTANT: EVFILT_FS       -9 ! Filesystem events
index 7dc2a79c09f78ef743fd9749567a28f0736f3c5c..0bc6ce57857cf2077c76cb03860b8dd5e4cf22c4 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax constants ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,12 +12,12 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
 
-: EVFILT_READ     -1 ; inline
-: EVFILT_WRITE    -2 ; inline
-: EVFILT_AIO      -3 ; inline ! attached to aio requests
-: EVFILT_VNODE    -4 ; inline ! attached to vnodes
-: EVFILT_PROC     -5 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   -6 ; inline ! attached to struct proc
-: EVFILT_TIMER    -7 ; inline ! timers
-: EVFILT_MACHPORT -8 ; inline ! Mach ports
-: EVFILT_FS       -9 ; inline ! Filesystem events
+CONSTANT: EVFILT_READ     -1
+CONSTANT: EVFILT_WRITE    -2
+CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
+CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    -7 ! timers
+CONSTANT: EVFILT_MACHPORT -8 ! Mach ports
+CONSTANT: EVFILT_FS       -9 ! Filesystem events
index e3fc11a688c8ec588f4ca2dc24eb5b80593668df..5e23626e1d4089ee6efeaf2da542d86e74131bd9 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax constants ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,11 +12,11 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, size_t nchanges, kevent* eventlist, size_t nevents, timespec* timeout ) ;
 
-: EVFILT_READ     0 ; inline
-: EVFILT_WRITE    1 ; inline
-: EVFILT_AIO      2 ; inline ! attached to aio requests
-: EVFILT_VNODE    3 ; inline ! attached to vnodes
-: EVFILT_PROC     4 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   5 ; inline ! attached to struct proc
-: EVFILT_TIMER    6 ; inline ! timers
-: EVFILT_SYSCOUNT 7 ; inline ! Filesystem events
+CONSTANT: EVFILT_READ     0
+CONSTANT: EVFILT_WRITE    1
+CONSTANT: EVFILT_AIO      2 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    3 ! attached to vnodes
+CONSTANT: EVFILT_PROC     4 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   5 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    6 ! timers
+CONSTANT: EVFILT_SYSCOUNT 7 ! Filesystem events
index bc4be88c42311cbd3f6c7fb18a40aa8cd818fcb5..fc2e7d20cacd61ed0418d98b331820a366ef47b8 100644 (file)
@@ -1,4 +1,4 @@
-USE: alien.syntax
+USING: alien.syntax constants ;
 IN: unix.kqueue
 
 C-STRUCT: kevent
@@ -12,10 +12,10 @@ C-STRUCT: kevent
 
 FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
 
-: EVFILT_READ     -1 ; inline
-: EVFILT_WRITE    -2 ; inline
-: EVFILT_AIO      -3 ; inline ! attached to aio requests
-: EVFILT_VNODE    -4 ; inline ! attached to vnodes
-: EVFILT_PROC     -5 ; inline ! attached to struct proc
-: EVFILT_SIGNAL   -6 ; inline ! attached to struct proc
-: EVFILT_TIMER    -7 ; inline ! timers
+CONSTANT: EVFILT_READ     -1
+CONSTANT: EVFILT_WRITE    -2
+CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
+CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
+CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
+CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
+CONSTANT: EVFILT_TIMER    -7 ! timers
index 72935807c320c5e52747fa32912c9ac55156607a..1a42765ee818f71a60c327797252c2f74ae33d66 100644 (file)
@@ -14,19 +14,19 @@ C-STRUCT: epoll-event
 
 FUNCTION: int epoll_wait ( int epfd, epoll_event* events, int maxevents, int timeout ) ;
 
-: EPOLL_CTL_ADD 1 ; inline ! Add a file decriptor to the interface.
-: EPOLL_CTL_DEL 2 ; inline ! Remove a file decriptor from the interface.
-: EPOLL_CTL_MOD 3 ; inline ! Change file decriptor epoll_event structure.
+CONSTANT: EPOLL_CTL_ADD 1 ! Add a file decriptor to the interface.
+CONSTANT: EPOLL_CTL_DEL 2 ! Remove a file decriptor from the interface.
+CONSTANT: EPOLL_CTL_MOD 3 ! Change file decriptor epoll_event structure.
 
-: EPOLLIN      HEX: 001 ; inline
-: EPOLLPRI     HEX: 002 ; inline
-: EPOLLOUT     HEX: 004 ; inline
-: EPOLLRDNORM  HEX: 040 ; inline
-: EPOLLRDBAND  HEX: 080 ; inline
-: EPOLLWRNORM  HEX: 100 ; inline
-: EPOLLWRBAND  HEX: 200 ; inline
-: EPOLLMSG     HEX: 400 ; inline
-: EPOLLERR     HEX: 008 ; inline
-: EPOLLHUP     HEX: 010 ; inline
-: EPOLLONESHOT 30 2^    ; inline
-: EPOLLET      31 2^    ; inline
+CONSTANT: EPOLLIN      HEX: 001
+CONSTANT: EPOLLPRI     HEX: 002
+CONSTANT: EPOLLOUT     HEX: 004
+CONSTANT: EPOLLRDNORM  HEX: 040
+CONSTANT: EPOLLRDBAND  HEX: 080
+CONSTANT: EPOLLWRNORM  HEX: 100
+CONSTANT: EPOLLWRBAND  HEX: 200
+CONSTANT: EPOLLMSG     HEX: 400
+CONSTANT: EPOLLERR     HEX: 008
+CONSTANT: EPOLLHUP     HEX: 010
+CONSTANT: EPOLLONESHOT 30 2^
+CONSTANT: EPOLLET      31 2^
index 3385e454d2891d3dab207e7adc4522ae3cd3eca2..e3d40b5b2837acd1dd162c789ab5b6ad7f39ca1b 100644 (file)
@@ -11,31 +11,31 @@ C-STRUCT: inotify-event
     { "char[0]" "name" } ! stub for possible name\r
     ;\r
 \r
-: IN_ACCESS HEX: 1 ; inline         ! File was accessed\r
-: IN_MODIFY HEX: 2 ; inline         ! File was modified\r
-: IN_ATTRIB HEX: 4 ; inline         ! Metadata changed\r
-: IN_CLOSE_WRITE HEX: 8 ; inline    ! Writtable file was closed\r
-: IN_CLOSE_NOWRITE HEX: 10 ; inline ! Unwrittable file closed\r
-: IN_OPEN HEX: 20 ; inline          ! File was opened\r
-: IN_MOVED_FROM HEX: 40 ; inline    ! File was moved from X\r
-: IN_MOVED_TO HEX: 80 ; inline      ! File was moved to Y\r
-: IN_CREATE HEX: 100 ; inline       ! Subfile was created\r
-: IN_DELETE HEX: 200 ; inline       ! Subfile was deleted\r
-: IN_DELETE_SELF HEX: 400 ; inline  ! Self was deleted\r
-: IN_MOVE_SELF HEX: 800 ; inline    ! Self was moved\r
-\r
-: IN_UNMOUNT HEX: 2000 ; inline     ! Backing fs was unmounted\r
-: IN_Q_OVERFLOW HEX: 4000 ; inline  ! Event queued overflowed\r
-: IN_IGNORED HEX: 8000 ; inline     ! File was ignored\r
+CONSTANT: IN_ACCESS HEX: 1         ! File was accessed\r
+CONSTANT: IN_MODIFY HEX: 2         ! File was modified\r
+CONSTANT: IN_ATTRIB HEX: 4         ! Metadata changed\r
+CONSTANT: IN_CLOSE_WRITE HEX: 8    ! Writtable file was closed\r
+CONSTANT: IN_CLOSE_NOWRITE HEX: 10 ! Unwrittable file closed\r
+CONSTANT: IN_OPEN HEX: 20          ! File was opened\r
+CONSTANT: IN_MOVED_FROM HEX: 40    ! File was moved from X\r
+CONSTANT: IN_MOVED_TO HEX: 80      ! File was moved to Y\r
+CONSTANT: IN_CREATE HEX: 100       ! Subfile was created\r
+CONSTANT: IN_DELETE HEX: 200       ! Subfile was deleted\r
+CONSTANT: IN_DELETE_SELF HEX: 400  ! Self was deleted\r
+CONSTANT: IN_MOVE_SELF HEX: 800    ! Self was moved\r
+\r
+CONSTANT: IN_UNMOUNT HEX: 2000     ! Backing fs was unmounted\r
+CONSTANT: IN_Q_OVERFLOW HEX: 4000  ! Event queued overflowed\r
+CONSTANT: IN_IGNORED HEX: 8000     ! File was ignored\r
 \r
 : IN_CLOSE ( -- n ) IN_CLOSE_WRITE IN_CLOSE_NOWRITE bitor ; inline ! close\r
-: IN_MOVE ( -- n ) IN_MOVED_FROM IN_MOVED_TO bitor ; inline        ! moves\r
+: IN_MOVE ( -- n ) IN_MOVED_FROM IN_MOVED_TO bitor        ; inline ! moves\r
 \r
-: IN_ONLYDIR HEX: 1000000 ; inline     ! only watch the path if it is a directory\r
-: IN_DONT_FOLLOW HEX: 2000000 ; inline ! don't follow a sym link\r
-: IN_MASK_ADD HEX: 20000000 ; inline   ! add to the mask of an already existing watch\r
-: IN_ISDIR HEX: 40000000 ; inline      ! event occurred against dir\r
-: IN_ONESHOT HEX: 80000000 ; inline    ! only send event once\r
+CONSTANT: IN_ONLYDIR HEX: 1000000     ! only watch the path if it is a directory\r
+CONSTANT: IN_DONT_FOLLOW HEX: 2000000 ! don't follow a sym link\r
+CONSTANT: IN_MASK_ADD HEX: 20000000   ! add to the mask of an already existing watch\r
+CONSTANT: IN_ISDIR HEX: 40000000      ! event occurred against dir\r
+CONSTANT: IN_ONESHOT HEX: 80000000    ! only send event once\r
 \r
 : IN_CHANGE_EVENTS ( -- n )\r
     {\r
index 7a77dc9316788c9fddfb2d12280db62b53af4089..61ced5c97ba072507b7e1ceb98e08a5cb005cdb0 100644 (file)
@@ -1,36 +1,37 @@
 ! Copyright (C) 2005, 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax alias constants ;
 IN: unix
 
 ! Linux.
 
-: MAXPATHLEN 1024 ; inline
+CONSTANT: MAXPATHLEN 1024
 
-: O_RDONLY   HEX: 0000 ; inline
-: O_WRONLY   HEX: 0001 ; inline
-: O_RDWR     HEX: 0002 ; inline
-: O_CREAT    HEX: 0040 ; inline
-: O_EXCL     HEX: 0080 ; inline
-: O_NOCTTY   HEX: 0100 ; inline
-: O_TRUNC    HEX: 0200 ; inline
-: O_APPEND   HEX: 0400 ; inline
-: O_NONBLOCK HEX: 0800 ; inline
-: O_NDELAY O_NONBLOCK ; inline
+CONSTANT: O_RDONLY   HEX: 0000
+CONSTANT: O_WRONLY   HEX: 0001
+CONSTANT: O_RDWR     HEX: 0002
+CONSTANT: O_CREAT    HEX: 0040
+CONSTANT: O_EXCL     HEX: 0080
+CONSTANT: O_NOCTTY   HEX: 0100
+CONSTANT: O_TRUNC    HEX: 0200
+CONSTANT: O_APPEND   HEX: 0400
+CONSTANT: O_NONBLOCK HEX: 0800
 
-: SOL_SOCKET 1 ; inline
+ALIAS: O_NDELAY O_NONBLOCK
 
-: FD_SETSIZE 1024 ; inline
+CONSTANT: SOL_SOCKET 1
 
-: SO_REUSEADDR 2 ; inline
-: SO_OOBINLINE 10 ; inline
-: SO_SNDTIMEO HEX: 15 ; inline
-: SO_RCVTIMEO HEX: 14 ; inline
+CONSTANT: FD_SETSIZE 1024
 
-: F_SETFD 2 ; inline
-: FD_CLOEXEC 1 ; inline
+CONSTANT: SO_REUSEADDR 2
+CONSTANT: SO_OOBINLINE 10
+CONSTANT: SO_SNDTIMEO HEX: 15
+CONSTANT: SO_RCVTIMEO HEX: 14
 
-: F_SETFL 4 ; inline
+CONSTANT: F_SETFD 2
+CONSTANT: FD_CLOEXEC 1
+
+CONSTANT: F_SETFL 4
 
 C-STRUCT: addrinfo
     { "int" "flags" }
@@ -55,33 +56,33 @@ C-STRUCT: sockaddr-in6
     { { "uchar" 16 } "addr" }
     { "uint" "scopeid" } ;
 
-: max-un-path 108 ; inline
+CONSTANT: max-un-path 108
 
 C-STRUCT: sockaddr-un
     { "ushort" "family" }
     { { "char" max-un-path } "path" } ;
 
-: SOCK_STREAM 1 ; inline
-: SOCK_DGRAM 2 ; inline
+CONSTANT: SOCK_STREAM 1
+CONSTANT: SOCK_DGRAM 2
 
-: AF_UNSPEC 0 ; inline
-: AF_UNIX 1 ; inline
-: AF_INET 2 ; inline
-: AF_INET6 10 ; inline
+CONSTANT: AF_UNSPEC 0
+CONSTANT: AF_UNIX 1
+CONSTANT: AF_INET 2
+CONSTANT: AF_INET6 10
 
-: PF_UNSPEC AF_UNSPEC ; inline
-: PF_UNIX AF_UNIX ; inline
-: PF_INET AF_INET ; inline
-: PF_INET6 AF_INET6 ; inline
+ALIAS: PF_UNSPEC AF_UNSPEC
+ALIAS: PF_UNIX AF_UNIX
+ALIAS: PF_INET AF_INET
+ALIAS: PF_INET6 AF_INET6
 
-: IPPROTO_TCP 6 ; inline
-: IPPROTO_UDP 17 ; inline
+CONSTANT: IPPROTO_TCP 6
+CONSTANT: IPPROTO_UDP 17
 
-: AI_PASSIVE 1 ; inline
+CONSTANT: AI_PASSIVE 1
 
-: SEEK_SET 0 ; inline
-: SEEK_CUR 1 ; inline
-: SEEK_END 2 ; inline
+CONSTANT: SEEK_SET 0
+CONSTANT: SEEK_CUR 1
+CONSTANT: SEEK_END 2
 
 C-STRUCT: passwd
     { "char*"  "pw_name" }
@@ -99,134 +100,134 @@ C-STRUCT: dirent
     { "uchar" "d_type" }
     { { "char" 256 } "d_name" } ;
 
-: EPERM 1 ; inline
-: ENOENT 2 ; inline
-: ESRCH 3 ; inline
-: EINTR 4 ; inline
-: EIO 5 ; inline
-: ENXIO 6 ; inline
-: E2BIG 7 ; inline
-: ENOEXEC 8 ; inline
-: EBADF 9 ; inline
-: ECHILD 10 ; inline
-: EAGAIN 11 ; inline
-: ENOMEM 12 ; inline
-: EACCES 13 ; inline
-: EFAULT 14 ; inline
-: ENOTBLK 15 ; inline
-: EBUSY 16 ; inline
-: EEXIST 17 ; inline
-: EXDEV 18 ; inline
-: ENODEV 19 ; inline
-: ENOTDIR 20 ; inline
-: EISDIR 21 ; inline
-: EINVAL 22 ; inline
-: ENFILE 23 ; inline
-: EMFILE 24 ; inline
-: ENOTTY 25 ; inline
-: ETXTBSY 26 ; inline
-: EFBIG 27 ; inline
-: ENOSPC 28 ; inline
-: ESPIPE 29 ; inline
-: EROFS 30 ; inline
-: EMLINK 31 ; inline
-: EPIPE 32 ; inline
-: EDOM 33 ; inline
-: ERANGE 34 ; inline
-: EDEADLK 35 ; inline
-: ENAMETOOLONG 36 ; inline
-: ENOLCK 37 ; inline
-: ENOSYS 38 ; inline
-: ENOTEMPTY 39 ; inline
-: ELOOP 40 ; inline
-: EWOULDBLOCK EAGAIN ; inline
-: ENOMSG 42 ; inline
-: EIDRM 43 ; inline
-: ECHRNG 44 ; inline
-: EL2NSYNC 45 ; inline
-: EL3HLT 46 ; inline
-: EL3RST 47 ; inline
-: ELNRNG 48 ; inline
-: EUNATCH 49 ; inline
-: ENOCSI 50 ; inline
-: EL2HLT 51 ; inline
-: EBADE 52 ; inline
-: EBADR 53 ; inline
-: EXFULL 54 ; inline
-: ENOANO 55 ; inline
-: EBADRQC 56 ; inline
-: EBADSLT 57 ; inline
-: EDEADLOCK EDEADLK ; inline
-: EBFONT 59 ; inline
-: ENOSTR 60 ; inline
-: ENODATA 61 ; inline
-: ETIME 62 ; inline
-: ENOSR 63 ; inline
-: ENONET 64 ; inline
-: ENOPKG 65 ; inline
-: EREMOTE 66 ; inline
-: ENOLINK 67 ; inline
-: EADV 68 ; inline
-: ESRMNT 69 ; inline
-: ECOMM 70 ; inline
-: EPROTO 71 ; inline
-: EMULTIHOP 72 ; inline
-: EDOTDOT 73 ; inline
-: EBADMSG 74 ; inline
-: EOVERFLOW 75 ; inline
-: ENOTUNIQ 76 ; inline
-: EBADFD 77 ; inline
-: EREMCHG 78 ; inline
-: ELIBACC 79 ; inline
-: ELIBBAD 80 ; inline
-: ELIBSCN 81 ; inline
-: ELIBMAX 82 ; inline
-: ELIBEXEC 83 ; inline
-: EILSEQ 84 ; inline
-: ERESTART 85 ; inline
-: ESTRPIPE 86 ; inline
-: EUSERS 87 ; inline
-: ENOTSOCK 88 ; inline
-: EDESTADDRREQ 89 ; inline
-: EMSGSIZE 90 ; inline
-: EPROTOTYPE 91 ; inline
-: ENOPROTOOPT 92 ; inline
-: EPROTONOSUPPORT 93 ; inline
-: ESOCKTNOSUPPORT 94 ; inline
-: EOPNOTSUPP 95 ; inline
-: EPFNOSUPPORT 96 ; inline
-: EAFNOSUPPORT 97 ; inline
-: EADDRINUSE 98 ; inline
-: EADDRNOTAVAIL 99 ; inline
-: ENETDOWN 100 ; inline
-: ENETUNREACH 101 ; inline
-: ENETRESET 102 ; inline
-: ECONNABORTED 103 ; inline
-: ECONNRESET 104 ; inline
-: ENOBUFS 105 ; inline
-: EISCONN 106 ; inline
-: ENOTCONN 107 ; inline
-: ESHUTDOWN 108 ; inline
-: ETOOMANYREFS 109 ; inline
-: ETIMEDOUT 110 ; inline
-: ECONNREFUSED 111 ; inline
-: EHOSTDOWN 112 ; inline
-: EHOSTUNREACH 113 ; inline
-: EALREADY 114 ; inline
-: EINPROGRESS 115 ; inline
-: ESTALE 116 ; inline
-: EUCLEAN 117 ; inline
-: ENOTNAM 118 ; inline
-: ENAVAIL 119 ; inline
-: EISNAM 120 ; inline
-: EREMOTEIO 121 ; inline
-: EDQUOT 122 ; inline
-: ENOMEDIUM 123 ; inline
-: EMEDIUMTYPE 124 ; inline
-: ECANCELED 125 ; inline
-: ENOKEY 126 ; inline
-: EKEYEXPIRED 127 ; inline
-: EKEYREVOKED 128 ; inline
-: EKEYREJECTED 129 ; inline
-: EOWNERDEAD 130 ; inline
-: ENOTRECOVERABLE 131 ; inline
+CONSTANT: EPERM 1
+CONSTANT: ENOENT 2
+CONSTANT: ESRCH 3
+CONSTANT: EINTR 4
+CONSTANT: EIO 5
+CONSTANT: ENXIO 6
+CONSTANT: E2BIG 7
+CONSTANT: ENOEXEC 8
+CONSTANT: EBADF 9
+CONSTANT: ECHILD 10
+CONSTANT: EAGAIN 11
+CONSTANT: ENOMEM 12
+CONSTANT: EACCES 13
+CONSTANT: EFAULT 14
+CONSTANT: ENOTBLK 15
+CONSTANT: EBUSY 16
+CONSTANT: EEXIST 17
+CONSTANT: EXDEV 18
+CONSTANT: ENODEV 19
+CONSTANT: ENOTDIR 20
+CONSTANT: EISDIR 21
+CONSTANT: EINVAL 22
+CONSTANT: ENFILE 23
+CONSTANT: EMFILE 24
+CONSTANT: ENOTTY 25
+CONSTANT: ETXTBSY 26
+CONSTANT: EFBIG 27
+CONSTANT: ENOSPC 28
+CONSTANT: ESPIPE 29
+CONSTANT: EROFS 30
+CONSTANT: EMLINK 31
+CONSTANT: EPIPE 32
+CONSTANT: EDOM 33
+CONSTANT: ERANGE 34
+CONSTANT: EDEADLK 35
+CONSTANT: ENAMETOOLONG 36
+CONSTANT: ENOLCK 37
+CONSTANT: ENOSYS 38
+CONSTANT: ENOTEMPTY 39
+CONSTANT: ELOOP 40
+ALIAS: EWOULDBLOCK EAGAIN
+CONSTANT: ENOMSG 42
+CONSTANT: EIDRM 43
+CONSTANT: ECHRNG 44
+CONSTANT: EL2NSYNC 45
+CONSTANT: EL3HLT 46
+CONSTANT: EL3RST 47
+CONSTANT: ELNRNG 48
+CONSTANT: EUNATCH 49
+CONSTANT: ENOCSI 50
+CONSTANT: EL2HLT 51
+CONSTANT: EBADE 52
+CONSTANT: EBADR 53
+CONSTANT: EXFULL 54
+CONSTANT: ENOANO 55
+CONSTANT: EBADRQC 56
+CONSTANT: EBADSLT 57
+ALIAS: EDEADLOCK EDEADLK
+CONSTANT: EBFONT 59
+CONSTANT: ENOSTR 60
+CONSTANT: ENODATA 61
+CONSTANT: ETIME 62
+CONSTANT: ENOSR 63
+CONSTANT: ENONET 64
+CONSTANT: ENOPKG 65
+CONSTANT: EREMOTE 66
+CONSTANT: ENOLINK 67
+CONSTANT: EADV 68
+CONSTANT: ESRMNT 69
+CONSTANT: ECOMM 70
+CONSTANT: EPROTO 71
+CONSTANT: EMULTIHOP 72
+CONSTANT: EDOTDOT 73
+CONSTANT: EBADMSG 74
+CONSTANT: EOVERFLOW 75
+CONSTANT: ENOTUNIQ 76
+CONSTANT: EBADFD 77
+CONSTANT: EREMCHG 78
+CONSTANT: ELIBACC 79
+CONSTANT: ELIBBAD 80
+CONSTANT: ELIBSCN 81
+CONSTANT: ELIBMAX 82
+CONSTANT: ELIBEXEC 83
+CONSTANT: EILSEQ 84
+CONSTANT: ERESTART 85
+CONSTANT: ESTRPIPE 86
+CONSTANT: EUSERS 87
+CONSTANT: ENOTSOCK 88
+CONSTANT: EDESTADDRREQ 89
+CONSTANT: EMSGSIZE 90
+CONSTANT: EPROTOTYPE 91
+CONSTANT: ENOPROTOOPT 92
+CONSTANT: EPROTONOSUPPORT 93
+CONSTANT: ESOCKTNOSUPPORT 94
+CONSTANT: EOPNOTSUPP 95
+CONSTANT: EPFNOSUPPORT 96
+CONSTANT: EAFNOSUPPORT 97
+CONSTANT: EADDRINUSE 98
+CONSTANT: EADDRNOTAVAIL 99
+CONSTANT: ENETDOWN 100
+CONSTANT: ENETUNREACH 101
+CONSTANT: ENETRESET 102
+CONSTANT: ECONNABORTED 103
+CONSTANT: ECONNRESET 104
+CONSTANT: ENOBUFS 105
+CONSTANT: EISCONN 106
+CONSTANT: ENOTCONN 107
+CONSTANT: ESHUTDOWN 108
+CONSTANT: ETOOMANYREFS 109
+CONSTANT: ETIMEDOUT 110
+CONSTANT: ECONNREFUSED 111
+CONSTANT: EHOSTDOWN 112
+CONSTANT: EHOSTUNREACH 113
+CONSTANT: EALREADY 114
+CONSTANT: EINPROGRESS 115
+CONSTANT: ESTALE 116
+CONSTANT: EUCLEAN 117
+CONSTANT: ENOTNAM 118
+CONSTANT: ENAVAIL 119
+CONSTANT: EISNAM 120
+CONSTANT: EREMOTEIO 121
+CONSTANT: EDQUOT 122
+CONSTANT: ENOMEDIUM 123
+CONSTANT: EMEDIUMTYPE 124
+CONSTANT: ECANCELED 125
+CONSTANT: ENOKEY 126
+CONSTANT: EKEYEXPIRED 127
+CONSTANT: EKEYREVOKED 128
+CONSTANT: EKEYREJECTED 129
+CONSTANT: EOWNERDEAD 130
+CONSTANT: ENOTRECOVERABLE 131
index 04ba4d3438a2410ae22c3a8eb6f9513b80b238a0..ec782f5164ef74befd3f66dce0fc61f15e69e4af 100644 (file)
@@ -1,6 +1,6 @@
 USING: kernel alien.c-types alien.strings sequences math alien.syntax unix
 vectors kernel namespaces continuations threads assocs vectors
-io.backend.unix io.encodings.utf8 unix.utilities ;
+io.backend.unix io.encodings.utf8 unix.utilities constants ;
 IN: unix.process
 
 ! Low-level Unix process launching utilities. These are used
@@ -39,34 +39,34 @@ FUNCTION: int execve ( char* path, char** argv, char** envp ) ;
     [ [ fork-process dup zero? ] dip [ drop ] prepose ] dip
     if ; inline
 
-: SIGKILL 9 ; inline
-: SIGTERM 15 ; inline
+CONSTANT: SIGKILL 9
+CONSTANT: SIGTERM 15
 
 FUNCTION: int kill ( pid_t pid, int sig ) ;
 
-: PRIO_PROCESS 0 ; inline
-: PRIO_PGRP 1 ; inline
-: PRIO_USER 2 ; inline
+CONSTANT: PRIO_PROCESS 0
+CONSTANT: PRIO_PGRP 1
+CONSTANT: PRIO_USER 2
 
-: PRIO_MIN -20 ; inline
-: PRIO_MAX 20 ; inline
+CONSTANT: PRIO_MIN -20
+CONSTANT: PRIO_MAX 20
 
 ! which/who = 0 for current process
 FUNCTION: int getpriority ( int which, int who ) ;
 FUNCTION: int setpriority ( int which, int who, int prio ) ;
 
 : set-priority ( n -- )
-    0 0 rot setpriority io-error ;
+    [ 0 0 ] dip setpriority io-error ;
 
 ! Flags for waitpid
 
-: WNOHANG   1 ; inline
-: WUNTRACED 2 ; inline
+CONSTANT: WNOHANG   1
+CONSTANT: WUNTRACED 2
 
-: WSTOPPED   2 ; inline
-: WEXITED    4 ; inline
-: WCONTINUED 8 ; inline
-: WNOWAIT    HEX: 1000000 ; inline
+CONSTANT: WSTOPPED   2
+CONSTANT: WEXITED    4
+CONSTANT: WCONTINUED 8
+CONSTANT: WNOWAIT    HEX: 1000000
 
 ! Examining status
 
index 2bca20c6b6fba3887b41d2f0f85e1655d7097274..267e89e98d73fa03cb9fa35817ff43bd3294ddc2 100644 (file)
@@ -5,23 +5,23 @@ USING: alien.syntax system kernel ;
 
 ! Solaris.
 
-: O_RDONLY  HEX: 0000 ; inline
-: O_WRONLY  HEX: 0001 ; inline
-: O_RDWR    HEX: 0002 ; inline
-: O_APPEND  HEX: 0008 ; inline
-: O_CREAT   HEX: 0100 ; inline
-: O_TRUNC   HEX: 0200 ; inline
+CONSTANT: O_RDONLY  HEX: 0000
+CONSTANT: O_WRONLY  HEX: 0001
+CONSTANT: O_RDWR    HEX: 0002
+CONSTANT: O_APPEND  HEX: 0008
+CONSTANT: O_CREAT   HEX: 0100
+CONSTANT: O_TRUNC   HEX: 0200
 
-: SEEK_END 2 ; inline
+CONSTANT: SEEK_END 2
 
-: SOL_SOCKET HEX: ffff ; inline
+CONSTANT: SOL_SOCKET HEX: ffff
 
-: FD_SETSIZE cell 4 = 1024 65536 ? ; inline
+CONSTANT: FD_SETSIZE cell 4 = 1024 65536 ?
 
-: SO_REUSEADDR 4 ; inline
-: SO_OOBINLINE HEX: 0100 ; inline
-: SO_SNDTIMEO HEX: 1005 ; inline
-: SO_RCVTIMEO HEX: 1006 ; inline
+CONSTANT: SO_REUSEADDR 4
+CONSTANT: SO_OOBINLINE HEX: 0100
+CONSTANT: SO_SNDTIMEO HEX: 1005
+CONSTANT: SO_RCVTIMEO HEX: 1006
 
 : F_SETFL 4 ;    ! set file status flags
 : O_NONBLOCK HEX: 80 ; ! no delay
@@ -58,24 +58,24 @@ C-STRUCT: sockaddr-un
     { "ushort" "family" }
     { { "char" max-un-path } "path" } ;
 
-: EINTR 4 ; inline
-: EAGAIN 11 ; inline
-: EINPROGRESS 150 ; inline
+CONSTANT: EINTR 4
+CONSTANT: EAGAIN 11
+CONSTANT: EINPROGRESS 150
 
-: SOCK_STREAM 2 ; inline
-: SOCK_DGRAM 1 ; inline
+CONSTANT: SOCK_STREAM 2
+CONSTANT: SOCK_DGRAM 1
 
-: AF_UNSPEC 0 ; inline
-: AF_UNIX 1 ; inline
-: AF_INET 2 ; inline
-: AF_INET6 26 ; inline
+CONSTANT: AF_UNSPEC 0
+CONSTANT: AF_UNIX 1
+CONSTANT: AF_INET 2
+CONSTANT: AF_INET6 26
 
-: PF_UNSPEC AF_UNSPEC ; inline
-: PF_UNIX AF_UNIX ; inline
-: PF_INET AF_INET ; inline
-: PF_INET6 AF_INET6 ; inline
+CONSTANT: PF_UNSPEC AF_UNSPEC
+CONSTANT: PF_UNIX AF_UNIX
+CONSTANT: PF_INET AF_INET
+CONSTANT: PF_INET6 AF_INET6
 
-: IPPROTO_TCP 6 ; inline
-: IPPROTO_UDP 17 ; inline
+CONSTANT: IPPROTO_TCP 6
+CONSTANT: IPPROTO_UDP 17
 
-: AI_PASSIVE 8 ; inline
+CONSTANT: AI_PASSIVE 8
index d6a60ba5c88f385b773096fb87a8be8f40001526..adf13a3845eca6f91c5282476d8d7617cc9f2c60 100644 (file)
@@ -25,5 +25,5 @@ C-STRUCT: stat
 FUNCTION: int __stat30  ( char* pathname, stat* buf ) ;
 FUNCTION: int __lstat30 ( char* pathname, stat* buf ) ;
 
-: stat ( pathname buf -- n ) __stat30 ; inline
-: lstat ( pathname buf -- n ) __lstat30 ; inline
+CONSTANT: stat ( pathname buf -- n ) __stat30
+CONSTANT: lstat ( pathname buf -- n ) __lstat30
index 1a1f97507c9a9fd6f2560b192afcb22505610c7a..a832ff8d1cab265d011505f824ebd85e05d5b57e 100644 (file)
@@ -25,5 +25,5 @@ C-STRUCT: stat
 FUNCTION: int __stat13 ( char* pathname, stat* buf ) ;
 FUNCTION: int __lstat13 ( char* pathname, stat* buf ) ;
 
-: stat ( pathname buf -- n ) __stat13 ; inline
-: lstat ( pathname buf -- n ) __lstat13 ; inline
+CONSTANT: stat ( pathname buf -- n ) __stat13
+CONSTANT: lstat ( pathname buf -- n ) __lstat13
index a3f8a5ce824764d4714451ffd113db1b2e9f83f6..5e7529fb82a47f5009cedbb101f33d707460a80a 100644 (file)
@@ -1,19 +1,19 @@
 USING: kernel system combinators alien.syntax alien.c-types
-math io.backend.unix vocabs.loader unix ;
+math io.backend.unix vocabs.loader unix constants ;
 IN: unix.stat
 
 ! File Types
 
 : S_IFMT   OCT: 170000 ; ! These bits determine file type.
 
-: S_IFDIR  OCT:  40000 ; inline   ! Directory.
-: S_IFCHR  OCT:  20000 ; inline   ! Character device.
-: S_IFBLK  OCT:  60000 ; inline   ! Block device.
-: S_IFREG  OCT: 100000 ; inline   ! Regular file.
-: S_IFIFO  OCT: 010000 ; inline   ! FIFO.
-: S_IFLNK  OCT: 120000 ; inline   ! Symbolic link.
-: S_IFSOCK OCT: 140000 ; inline   ! Socket.
-: S_IFWHT  OCT: 160000 ; inline   ! Whiteout.
+CONSTANT: S_IFDIR  OCT:  40000   ! Directory.
+CONSTANT: S_IFCHR  OCT:  20000   ! Character device.
+CONSTANT: S_IFBLK  OCT:  60000   ! Block device.
+CONSTANT: S_IFREG  OCT: 100000   ! Regular file.
+CONSTANT: S_IFIFO  OCT: 010000   ! FIFO.
+CONSTANT: S_IFLNK  OCT: 120000   ! Symbolic link.
+CONSTANT: S_IFSOCK OCT: 140000   ! Socket.
+CONSTANT: S_IFWHT  OCT: 160000   ! Whiteout.
 
 FUNCTION: int chmod ( char* path, mode_t mode ) ;
 FUNCTION: int fchmod ( int fd, mode_t mode ) ;
index 038178f6f8351f018017f4dc2db51a34874dffe1..e6a033e09d505f484da2fa0f82ded795312ef563 100644 (file)
@@ -3,9 +3,9 @@
 USING: alien.syntax ;
 IN: unix.statfs.freebsd
 
-: MFSNAMELEN      16            ; inline ! length of type name including null */
-: MNAMELEN        88            ; inline ! size of on/from name bufs
-: STATFS_VERSION  HEX: 20030518 ; inline ! current version number 
+CONSTANT: MFSNAMELEN      16            ! length of type name including null */
+CONSTANT: MNAMELEN        88            ! size of on/from name bufs
+CONSTANT: STATFS_VERSION  HEX: 20030518 ! current version number 
 
 C-STRUCT: statfs
     { "uint32_t" "f_version" }
index 378e335c115e265760775a941cc740ce676de4bc..f495f2af4e75001e18ed40bdb9ebe65246527293 100644 (file)
@@ -3,8 +3,8 @@
 USING: alien.syntax ;
 IN: unix.statfs.openbsd
 
-: MFSNAMELEN 16 ; inline
-: MNAMELEN 90 ; inline
+CONSTANT: MFSNAMELEN 16
+CONSTANT: MNAMELEN 90
 
 C-STRUCT: statfs
     { "u_int32_t"       "f_flags" }
index 7d1a6afb6146e8a4b7778d9d9904fc7768d6e6a3..a2a316846464926b51ea39cbf34823396e6ec1d8 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.statvfs.freebsd
 
 C-STRUCT: statvfs
@@ -17,7 +17,7 @@ C-STRUCT: statvfs
     { "ulong"   "f_namemax" } ;
 
 ! Flags
-: ST_RDONLY   HEX: 1 ; inline ! Read-only file system
-: ST_NOSUID   HEX: 2 ; inline ! Does not honor setuid/setgid
+CONSTANT: ST_RDONLY   HEX: 1 ! Read-only file system
+CONSTANT: ST_NOSUID   HEX: 2 ! Does not honor setuid/setgid
 
 FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
index 3bfbffa197f88e4e1b6d17a63015debd820cf910..c92fef6aaaeb551d7e202dde934e1ba6984add26 100644 (file)
@@ -19,13 +19,13 @@ C-STRUCT: statvfs64
 
 FUNCTION: int statvfs64 ( char* path, statvfs64* buf ) ;
 
-: ST_RDONLY 1 ; inline        ! Mount read-only.
-: ST_NOSUID 2 ; inline        ! Ignore suid and sgid bits.
-: ST_NODEV 4 ; inline         ! Disallow access to device special files.
-: ST_NOEXEC 8 ; inline        ! Disallow program execution.
-: ST_SYNCHRONOUS 16 ; inline  ! Writes are synced at once.
-: ST_MANDLOCK 64 ; inline     ! Allow mandatory locks on an FS.
-: ST_WRITE 128 ; inline       ! Write on file/directory/symlink.
-: ST_APPEND 256 ; inline      ! Append-only file.
-: ST_IMMUTABLE 512 ; inline   ! Immutable file.
-: ST_NOATIME 1024 ; inline    ! Do not update access times.
+CONSTANT: ST_RDONLY 1        ! Mount read-only.
+CONSTANT: ST_NOSUID 2        ! Ignore suid and sgid bits.
+CONSTANT: ST_NODEV 4         ! Disallow access to device special files.
+CONSTANT: ST_NOEXEC 8        ! Disallow program execution.
+CONSTANT: ST_SYNCHRONOUS 16  ! Writes are synced at once.
+CONSTANT: ST_MANDLOCK 64     ! Allow mandatory locks on an FS.
+CONSTANT: ST_WRITE 128       ! Write on file/directory/symlink.
+CONSTANT: ST_APPEND 256      ! Append-only file.
+CONSTANT: ST_IMMUTABLE 512   ! Immutable file.
+CONSTANT: ST_NOATIME 1024    ! Do not update access times.
index 7078ff9f33ad3c587d703d5059ee50542f19ead6..fc85b9d9dc013e38c8d5ffb21c3c050be052e139 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.statvfs.macosx
 
 C-STRUCT: statvfs
@@ -17,7 +17,7 @@ C-STRUCT: statvfs
     { "ulong"   "f_namemax" } ;
 
 ! Flags
-: ST_RDONLY   HEX: 1 ; inline ! Read-only file system
-: ST_NOSUID   HEX: 2 ; inline ! Does not honor setuid/setgid
+CONSTANT: ST_RDONLY   HEX: 1 ! Read-only file system
+CONSTANT: ST_NOSUID   HEX: 2 ! Does not honor setuid/setgid
 
 FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
index cf575c74b16d81e54aa1c84bc1e7035e75c90b5d..e3e54fb4e2dbd8f2876cea9fdf8cc3f1730f9405 100644 (file)
@@ -1,33 +1,33 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.statvfs.netbsd
 
-: _VFS_NAMELEN    32   ; inline
-: _VFS_MNAMELEN   1024 ; inline
+CONSTANT: _VFS_NAMELEN    32
+CONSTANT: _VFS_MNAMELEN   1024
 
 C-STRUCT: statvfs
-    { "ulong"   "f_flag" }   
+    { "ulong"   "f_flag" }
     { "ulong"   "f_bsize" }
-    { "ulong"   "f_frsize" }  
-    { "ulong"   "f_iosize" }  
-    { "fsblkcnt_t" "f_blocks" }       
-    { "fsblkcnt_t" "f_bfree" } 
-    { "fsblkcnt_t" "f_bavail" }       
-    { "fsblkcnt_t" "f_bresvd" }       
+    { "ulong"   "f_frsize" }
+    { "ulong"   "f_iosize" }
+    { "fsblkcnt_t" "f_blocks" }
+    { "fsblkcnt_t" "f_bfree" }
+    { "fsblkcnt_t" "f_bavail" }
+    { "fsblkcnt_t" "f_bresvd" }
     { "fsfilcnt_t" "f_files" }
     { "fsfilcnt_t" "f_ffree" }
-    { "fsfilcnt_t" "f_favail" }       
-    { "fsfilcnt_t" "f_fresvd" }       
-    { "uint64_t"   "f_syncreads" }    
-    { "uint64_t"   "f_syncwrites" }   
-    { "uint64_t"   "f_asyncreads" }   
-    { "uint64_t"   "f_asyncwrites" }  
+    { "fsfilcnt_t" "f_favail" }
+    { "fsfilcnt_t" "f_fresvd" }
+    { "uint64_t"   "f_syncreads" }
+    { "uint64_t"   "f_syncwrites" }
+    { "uint64_t"   "f_asyncreads" }
+    { "uint64_t"   "f_asyncwrites" }
     { "fsid_t"    "f_fsidx" }
     { "ulong"   "f_fsid" }
-    { "ulong"   "f_namemax" }      
+    { "ulong"   "f_namemax" }
     { "uid_t"   "f_owner" }
-    { { "uint32_t" 4 } "f_spare" }     
+    { { "uint32_t" 4 } "f_spare" }
     { { "char" _VFS_NAMELEN } "f_fstypename" }
     { { "char" _VFS_MNAMELEN } "f_mntonname" }
     { { "char" _VFS_MNAMELEN } "f_mntfromname" } ;
index 3f9353f92692a8295f6683667a96f81bf38b56ef..76c2af912779b54fb8474a08d45cc548c8c1f5a5 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2008 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax constants ;
 IN: unix.statvfs.openbsd
 
 C-STRUCT: statvfs
@@ -16,7 +16,7 @@ C-STRUCT: statvfs
     { "ulong" "f_flag" }
     { "ulong" "f_namemax" } ;
 
-: ST_RDONLY       1 ; inline
-: ST_NOSUID       2 ; inline
+CONSTANT: ST_RDONLY       1
+CONSTANT: ST_NOSUID       2
 
 FUNCTION: int statvfs ( char* path, statvfs* buf ) ;
index 8e73a212d9fe7ed6a66c35198bbb449d73ea055f..c0e496a0413d9045fb8eb56a4facc954bf877899 100644 (file)
@@ -168,7 +168,7 @@ FUNCTION: int readdir_r ( void* dirp, dirent* entry, dirent** result ) ;
 
 FUNCTION: ssize_t readlink ( char* path, char* buf, size_t bufsize ) ;
 
-: PATH_MAX 1024 ; inline
+CONSTANT: PATH_MAX 1024
 
 : read-symbolic-link ( path -- path )
     PATH_MAX <byte-array> dup [
index e1756daa0071068518b8b0e5a9c81c2eb1ddd6e5..6b70ceee2e1d5318a8f1ab72581d9e5f5f8900b1 100644 (file)
@@ -6,18 +6,18 @@ unix calendar system accessors unix.time calendar.unix
 vocabs.loader ;
 IN: unix.utmpx
 
-: EMPTY 0 ; inline
-: RUN_LVL 1 ; inline
-: BOOT_TIME 2 ; inline
-: OLD_TIME 3 ; inline
-: NEW_TIME 4 ; inline
-: INIT_PROCESS 5 ; inline
-: LOGIN_PROCESS 6 ; inline
-: USER_PROCESS 7 ; inline
-: DEAD_PROCESS 8 ; inline
-: ACCOUNTING 9 ; inline
-: SIGNATURE 10 ; inline
-: SHUTDOWN_TIME 11 ; inline
+CONSTANT: EMPTY 0
+CONSTANT: RUN_LVL 1
+CONSTANT: BOOT_TIME 2
+CONSTANT: OLD_TIME 3
+CONSTANT: NEW_TIME 4
+CONSTANT: INIT_PROCESS 5
+CONSTANT: LOGIN_PROCESS 6
+CONSTANT: USER_PROCESS 7
+CONSTANT: DEAD_PROCESS 8
+CONSTANT: ACCOUNTING 9
+CONSTANT: SIGNATURE 10
+CONSTANT: SHUTDOWN_TIME 11
 
 FUNCTION: void setutxent ( ) ;
 FUNCTION: void endutxent ( ) ;
index 6d4e60ab22ff80d69a1ba0acd5603fc6a9250fce..05a306640d7a3bccfc1b1a9f9181c6dc8750f349 100755 (executable)
@@ -131,7 +131,7 @@ M: ole32-error error.
 : guid= ( a b -- ? )
     [ 16 memory>byte-array ] bi@ = ;
 
-: GUID-STRING-LENGTH
+: GUID-STRING-LENGTH ( -- n )
     "{01234567-89ab-cdef-0123-456789abcdef}" length ; inline
 
 :: (guid-section>guid) ( string guid start end quot -- )
index 8c20df1fd02d93349777e43a43fb495638d55456..d812e8503b872814842581c884e17860bf64e0f6 100644 (file)
@@ -21,7 +21,7 @@ HELP: base64
 { $see-also <base64> } ;
 
 HELP: <rpc-method>
-{ $values { "name" "a string" } { "params" "a sequence" } }
+{ $values { "name" "a string" } { "params" "a sequence" } { "rpc-method" rpc-method } }
 { $description "creates a tuple reprsenting a method call which can be translated using send-rpc into an XML-RPC document" }
 { $see-also rpc-method <rpc-response> <rpc-fault> } ;
 
@@ -30,7 +30,7 @@ HELP: rpc-method
 { $see-also <rpc-method> rpc-response rpc-fault } ;
 
 HELP: <rpc-response>
-{ $values { "params" "a sequence" } }
+{ $values { "params" "a sequence" } { "rpc-response" rpc-response } }
 { $description "creates a tuple representing a data response in XML-RPC" }
 { $see-also rpc-response <rpc-method> <rpc-fault> } ;
 
@@ -39,7 +39,7 @@ HELP: rpc-response
 { $see-also <rpc-response> rpc-method rpc-fault } ;
 
 HELP: <rpc-fault>
-{ $values { "code" "an integer" } { "string" "a string" } }
+{ $values { "code" "an integer" } { "string" "a string" } { "rpc-fault" rpc-fault } }
 { $description "creates a tuple representing an exception in RPC, to be returned to the caller. The code is a number representing what type of error it is, and the string is a description" }
 { $see-also rpc-fault <rpc-method> <rpc-response> } ;
 
index 6d5a7f810fb6b97fdb1453f2fafb2e613c0dc13a..16a817d62846351f2b2a95807380cac03fa392c8 100644 (file)
@@ -113,7 +113,7 @@ HELP: name
 { $see-also <name> tag } ;\r
 \r
 HELP: <name>\r
-{ $values { "space" "a string" } { "tag" "a string" } { "url" "a string" }\r
+{ $values { "space" "a string" } { "main" "a string" } { "url" "a string" }\r
     { "name" "an XML tag name" } }\r
 { $description "creates a name tuple with the name-space space and the tag-name tag and the tag-url url." }\r
 { $see-also name <tag> } ;\r
@@ -135,7 +135,7 @@ HELP: xml
 \r
 HELP: <xml>\r
 { $values { "prolog" "an XML prolog" } { "before" "a sequence of XML elements" }\r
-{ "main" tag } { "after" "a sequence of XML elements" } { "xml" "an XML document" } }\r
+{ "body" tag } { "after" "a sequence of XML elements" } { "xml" "an XML document" } }\r
 { $description "creates an XML document, delegating to the main tag, with the specified prolog, before, and after" }\r
 { $see-also xml <tag> } ;\r
 \r
index 363248216281cc009a825933b18bb82576dd9fb9..ea3470feb3419ea74873ebed2a3ab9d1b09d9c3f 100644 (file)
@@ -221,10 +221,6 @@ HELP: assert-depth
 { $values { "quot" "a quotation" } }
 { $description "Runs a quotation. Throws an error if the quotation attempts to take input values from the stack, or leave outputs on the stack." } ;
 
-HELP: <continuation>
-{ $description "Constructs a new continuation." }
-{ $notes "User code should call " { $link continuation } " instead." } ;
-
 HELP: attempt-all
 { $values
      { "seq" sequence } { "quot" quotation }
index 09dcb31458c11f95a11e0fba72da697b04d63952..41cc878c7977ba88be9c4fde352ecb7e3d3229d2 100644 (file)
@@ -21,12 +21,12 @@ ARTICLE: "io.streams.c" "ANSI C streams"
 ABOUT: "io.streams.c"
 
 HELP: <c-reader>
-{ $values { "in" "a C FILE* handle" } { "stream" "a new stream" } }
+{ $values { "handle" "a C FILE* handle" } { "stream" "a new stream" } }
 { $description "Creates a stream which reads data by calling C standard library functions." }
 { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ;
 
 HELP: <c-writer>
-{ $values { "out" "a C FILE* handle" } { "stream" "a new stream" } }
+{ $values { "handle" "a C FILE* handle" } { "stream" "a new stream" } }
 { $description "Creates a stream which writes data by calling C standard library functions." }
 { $notes "Usually C streams are only used during bootstrap, and non-blocking OS-specific I/O routines are used during normal operation." } ;
 
index 6e3a06da26a87fcba67a3751693db42a47004ffa..b3df0b889f7492b84d6f305481e3f5abedc0c65b 100644 (file)
@@ -191,6 +191,10 @@ HELP: exchange-unsafe
 { $values { "m" "a non-negative integer" } { "n" "a non-negative integer" } { "seq" "a mutable sequence" } }
 { $description "Unsafe variant of " { $link exchange } " that does not perform bounds checks." } ;
 
+HELP: first-unsafe
+{ $values { "seq" sequence } { "first" "the first element" } }
+{ $contract "Unsafe variant of " { $link first } " that does not perform bounds checks." } ;
+
 HELP: first2-unsafe
 { $values { "seq" sequence } { "first" "the first element" } { "second" "the second element" } }
 { $contract "Unsafe variant of " { $link first2 } " that does not perform bounds checks." } ;
index 865a074ad38dc81c08898b3ee183ae5ae998f9ee..31c7c8a4d73b2aa71e4df3f5bb5d22c2c19acafb 100644 (file)
@@ -101,16 +101,16 @@ M: integer nth-unsafe drop ;
 
 INSTANCE: integer immutable-sequence
 
-: first-unsafe ( seq -- elt )
+: first-unsafe ( seq -- first )
     0 swap nth-unsafe ; inline
 
-: first2-unsafe ( seq -- elt1 elt2 )
+: first2-unsafe ( seq -- first second )
     [ first-unsafe ] [ 1 swap nth-unsafe ] bi ; inline
 
-: first3-unsafe ( seq -- elt1 elt2 elt3 )
+: first3-unsafe ( seq -- first second third )
     [ first2-unsafe ] [ 2 swap nth-unsafe ] bi ; inline
 
-: first4-unsafe ( seq -- elt1 elt2 elt3 elt4 )
+: first4-unsafe ( seq -- first second third fourth )
     [ first3-unsafe ] [ 3 swap nth-unsafe ] bi ; inline
 
 : exchange-unsafe ( m n seq -- )
index 1db322f8c37909d52ab5b1150e206bf7727b00de..389f16c68ebd58209736d2017b5e72541802c423 100644 (file)
@@ -344,6 +344,6 @@ HELP: make-inline
 { $side-effects "word" } ;
 
 HELP: define-inline
-{ $values { "word" word } { "quot" quotation } { "effect" effect } }
+{ $values { "word" word } { "def" quotation } { "effect" effect } }
 { $description "Defines a word and makes it " { $link POSTPONE: inline } "." }
 { $side-effects "word" } ;
index 8beaf9c4b1525dcf27096fc25cfe72f6dd8f3808..e5636dee3ee0887a03f2ea417f3eb8c80cdad2d5 100644 (file)
@@ -4,17 +4,15 @@ USING: help.markup help.syntax io.streams.string ;
 IN: assoc-heaps
 
 HELP: <assoc-heap>
+{ $values { "assoc" assoc } { "heap" heap } }
 { $description "Constructs a new " { $link assoc-heap } " from two existing data structures." } ;
 
 HELP: <unique-max-heap>
-{ $values
-    
-     { "unique-heap" assoc-heap } }
+{ $values { "unique-heap" assoc-heap } }
 { $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a max-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ;
 
 HELP: <unique-min-heap>
-{ $values
-     { "unique-heap" assoc-heap } }
+{ $values { "unique-heap" assoc-heap } }
 { $description "Creates a new " { $link assoc-heap } " where the assoc is a hashtable and the heap is a min-heap. Popping an element from the heap leaves this element in the hashtable to ensure that the element will not be processed again." } ;
 
 { <unique-max-heap> <unique-min-heap> } related-words