summaryrefslogtreecommitdiffstats
path: root/Lib/irix5
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
committerGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
commitb6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af (patch)
tree9362939305b2d088b8f19a530c9015d886bc2801 /Lib/irix5
parent2979b01ff88ac4c5b316d9bf98edbaaaffac8e24 (diff)
downloadcpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.zip
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.gz
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.bz2
Merge alpha100 branch back to main trunk
Diffstat (limited to 'Lib/irix5')
-rwxr-xr-xLib/irix5/FCNTL.py58
-rwxr-xr-xLib/irix5/IN.py44
-rwxr-xr-xLib/irix5/SOCKET.py37
-rwxr-xr-xLib/irix5/cddb.py26
-rwxr-xr-xLib/irix5/flp.py8
5 files changed, 128 insertions, 45 deletions
diff --git a/Lib/irix5/FCNTL.py b/Lib/irix5/FCNTL.py
index 1271b9e..12c60fa 100755
--- a/Lib/irix5/FCNTL.py
+++ b/Lib/irix5/FCNTL.py
@@ -1,35 +1,35 @@
-# These lines were generated by h2py.py (see demo/scripts)
-# from <sys/fcntl.h> on Irix 4.0.2.
-# The applicability on other systems is not clear.
-
+# Generated by h2py from /usr/include/sys/fcntl.h
FNDELAY = 0x04
FAPPEND = 0x08
FSYNC = 0x10
-FRCACH = 0x20
-FASYNC = 0x40
-FNONBLK = 0x80
-FCREAT = 0x100
-FTRUNC = 0x200
-FEXCL = 0x400
-FNOCTTY = 0x800
+FNONBLOCK = 0x80
+FASYNC = 0x1000
+FNONBLK = FNONBLOCK
+FDIRECT = 0x8000
+FCREAT = 0x0100
+FTRUNC = 0x0200
+FEXCL = 0x0400
+FNOCTTY = 0x0800
O_RDONLY = 0
O_WRONLY = 1
O_RDWR = 2
-O_ACCMODE = 0x3
-O_NDELAY = FNDELAY
-O_APPEND = FAPPEND
-O_SYNC = FSYNC
-O_NONBLOCK = FNONBLK
-O_CREAT = FCREAT
-O_TRUNC = FTRUNC
-O_EXCL = FEXCL
-O_NOCTTY = FNOCTTY
+O_NDELAY = 0x04
+O_APPEND = 0x08
+O_SYNC = 0x10
+O_NONBLOCK = 0x80
+O_DIRECT = 0x8000
+O_CREAT = 0x100
+O_TRUNC = 0x200
+O_EXCL = 0x400
+O_NOCTTY = 0x800
F_DUPFD = 0
F_GETFD = 1
F_SETFD = 2
F_GETFL = 3
F_SETFL = 4
-F_GETLK = 5
+F_GETLK = 14
+F_O_GETLK = 5
+F_GETLK = 14
F_SETLK = 6
F_SETLKW = 7
F_CHKFL = 8
@@ -37,13 +37,17 @@ F_ALLOCSP = 10
F_FREESP = 11
F_SETBSDLK = 12
F_SETBSDLKW = 13
-F_RGETLK = 20
-F_RSETLK = 21
+F_DIOINFO = 30
+F_RSETLK = 20
+F_RGETLK = 21
F_RSETLKW = 22
-F_GETOWN = 10
-F_SETOWN = 11
+F_GETOWN = 23
+F_SETOWN = 24
+F_O_GETOWN = 10
+F_O_SETOWN = 11
F_RDLCK = 01
F_WRLCK = 02
F_UNLCK = 03
-FD_CLOEXEC = 0x1
-FD_NODUP_FORK = 0x2
+O_ACCMODE = 3
+FD_CLOEXEC = 1
+FD_NODUP_FORK = 4
diff --git a/Lib/irix5/IN.py b/Lib/irix5/IN.py
index 78be3ef..325a021 100755
--- a/Lib/irix5/IN.py
+++ b/Lib/irix5/IN.py
@@ -1,8 +1,4 @@
-# Symbolic constants from <netinet/in.h>.
-# These constants are SGI specific!
-# See demo/scripts/h2py.py for a tool to help generate a version for
-# your system.
-
+# Generated by h2py from /usr/include/netinet/in.h
IPPROTO_IP = 0
IPPROTO_ICMP = 1
IPPROTO_IGMP = 2
@@ -14,6 +10,8 @@ IPPROTO_UDP = 17
IPPROTO_IDP = 22
IPPROTO_TP = 29
IPPROTO_XTP = 36
+IPPROTO_HELLO = 63
+IPPROTO_ND = 77
IPPROTO_EON = 80
IPPROTO_RAW = 255
IPPROTO_MAX = 256
@@ -42,6 +40,11 @@ INADDR_MAX_LOCAL_GROUP = 0xe00000ff
INADDR_NONE = 0xffffffff
IN_LOOPBACKNET = 127
IP_OPTIONS = 1
+IP_MULTICAST_IF = 2
+IP_MULTICAST_TTL = 3
+IP_MULTICAST_LOOP = 4
+IP_ADD_MEMBERSHIP = 5
+IP_DROP_MEMBERSHIP = 6
IP_HDRINCL = 7
IP_TOS = 8
IP_TTL = 9
@@ -49,11 +52,32 @@ IP_RECVOPTS = 10
IP_RECVRETOPTS = 11
IP_RECVDSTADDR = 12
IP_RETOPTS = 13
-IP_MULTICAST_IF = 2
-IP_MULTICAST_TTL = 3
-IP_MULTICAST_LOOP = 4
-IP_ADD_MEMBERSHIP = 5
-IP_DROP_MEMBERSHIP = 6
+IP_OPTIONS = 1
+IP_HDRINCL = 2
+IP_TOS = 3
+IP_TTL = 4
+IP_RECVOPTS = 5
+IP_RECVRETOPTS = 6
+IP_RECVDSTADDR = 7
+IP_RETOPTS = 8
+IP_MULTICAST_IF = 20
+IP_MULTICAST_TTL = 21
+IP_MULTICAST_LOOP = 22
+IP_ADD_MEMBERSHIP = 23
+IP_DROP_MEMBERSHIP = 24
+IRIX4_IP_OPTIONS = 1
+IRIX4_IP_MULTICAST_IF = 2
+IRIX4_IP_MULTICAST_TTL = 3
+IRIX4_IP_MULTICAST_LOOP = 4
+IRIX4_IP_ADD_MEMBERSHIP = 5
+IRIX4_IP_DROP_MEMBERSHIP = 6
+IRIX4_IP_HDRINCL = 7
+IRIX4_IP_TOS = 8
+IRIX4_IP_TTL = 9
+IRIX4_IP_RECVOPTS = 10
+IRIX4_IP_RECVRETOPTS = 11
+IRIX4_IP_RECVDSTADDR = 12
+IRIX4_IP_RETOPTS = 13
IP_DEFAULT_MULTICAST_TTL = 1
IP_DEFAULT_MULTICAST_LOOP = 1
IP_MAX_MEMBERSHIPS = 20
diff --git a/Lib/irix5/SOCKET.py b/Lib/irix5/SOCKET.py
index 8a15ef9..0ba0742 100755
--- a/Lib/irix5/SOCKET.py
+++ b/Lib/irix5/SOCKET.py
@@ -1,8 +1,23 @@
+# Generated by h2py from /usr/include/sys/socket.h
SOCK_STREAM = 1
SOCK_DGRAM = 2
SOCK_RAW = 3
SOCK_RDM = 4
SOCK_SEQPACKET = 5
+NC_TPI_CLTS = 1
+NC_TPI_COTS = 2
+NC_TPI_COTS_ORD = 3
+NC_TPI_RAW = 4
+SOCK_DGRAM = NC_TPI_CLTS
+SOCK_STREAM = NC_TPI_COTS
+SOCK_RAW = NC_TPI_RAW
+SOCK_RDM = 5
+SOCK_SEQPACKET = 6
+IRIX4_SOCK_STREAM = 1
+IRIX4_SOCK_DGRAM = 2
+IRIX4_SOCK_RAW = 3
+IRIX4_SOCK_RDM = 4
+IRIX4_SOCK_SEQPACKET = 5
SO_DEBUG = 0x0001
SO_ACCEPTCONN = 0x0002
SO_REUSEADDR = 0x0004
@@ -13,6 +28,9 @@ SO_USELOOPBACK = 0x0040
SO_LINGER = 0x0080
SO_OOBINLINE = 0x0100
SO_REUSEPORT = 0x0200
+SO_ORDREL = 0x0200
+SO_IMASOCKET = 0x0400
+SO_CHAMELEON = 0x1000
SO_SNDBUF = 0x1001
SO_RCVBUF = 0x1002
SO_SNDLOWAT = 0x1003
@@ -21,6 +39,7 @@ SO_SNDTIMEO = 0x1005
SO_RCVTIMEO = 0x1006
SO_ERROR = 0x1007
SO_TYPE = 0x1008
+SO_PROTOTYPE = 0x1009
SOL_SOCKET = 0xffff
AF_UNSPEC = 0
AF_UNIX = 1
@@ -30,7 +49,6 @@ AF_PUP = 4
AF_CHAOS = 5
AF_NS = 6
AF_ISO = 7
-AF_OSI = AF_ISO
AF_ECMA = 8
AF_DATAKIT = 9
AF_CCITT = 10
@@ -44,7 +62,14 @@ AF_ROUTE = 17
AF_RAW = 18
AF_LINK = 18
pseudo_AF_XTP = 19
-AF_MAX = 20
+AF_NIT = 17
+AF_802 = 18
+AF_OSI = 19
+AF_X25 = 20
+AF_OSINET = 21
+AF_GOSIP = 22
+AF_SDL = 23
+AF_MAX = (AF_SDL+1)
PF_UNSPEC = AF_UNSPEC
PF_UNIX = AF_UNIX
PF_INET = AF_INET
@@ -53,7 +78,6 @@ PF_PUP = AF_PUP
PF_CHAOS = AF_CHAOS
PF_NS = AF_NS
PF_ISO = AF_ISO
-PF_OSI = AF_ISO
PF_ECMA = AF_ECMA
PF_DATAKIT = AF_DATAKIT
PF_CCITT = AF_CCITT
@@ -67,11 +91,18 @@ PF_ROUTE = AF_ROUTE
PF_LINK = AF_LINK
PF_XTP = pseudo_AF_XTP
PF_RAW = AF_RAW
+PF_NIT = AF_NIT
+PF_802 = AF_802
+PF_OSI = AF_OSI
+PF_X25 = AF_X25
+PF_OSINET = AF_OSINET
+PF_GOSIP = AF_GOSIP
PF_MAX = AF_MAX
SOMAXCONN = 5
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_DONTROUTE = 0x4
+MSG_EOR = 0x8
MSG_BTAG = 0x40
MSG_ETAG = 0x80
MSG_MAXIOVLEN = 16
diff --git a/Lib/irix5/cddb.py b/Lib/irix5/cddb.py
index d7fdc96..0dee709 100755
--- a/Lib/irix5/cddb.py
+++ b/Lib/irix5/cddb.py
@@ -138,6 +138,19 @@ class Cddb:
continue
self.track[trackno] = value
f.close()
+ for i in range(2, len(self.track)):
+ track = self.track[i]
+ # if track title starts with `,', use initial part
+ # of previous track's title
+ if track[0] == ',':
+ try:
+ off = string.index(self.track[i - 1],
+ ',')
+ except string.index_error:
+ pass
+ else:
+ self.track[i] = self.track[i-1][:off] \
+ + track
def write(self):
import posixpath
@@ -153,6 +166,17 @@ class Cddb:
f.write('album.title:\t' + self.title + '\n')
f.write('album.artist:\t' + self.artist + '\n')
f.write('album.toc:\t' + self.toc + '\n')
+ prevpref = None
for i in range(1, len(self.track)):
- f.write('track' + `i` + '.title:\t' + self.track[i] + '\n')
+ track = self.track[i]
+ try:
+ off = string.index(track, ',')
+ except string.index_error:
+ prevpref = None
+ else:
+ if prevpref and track[:off] == prevpref:
+ track = track[off:]
+ else:
+ prevpref = track[:off]
+ f.write('track' + `i` + '.title:\t' + track + '\n')
f.close()
diff --git a/Lib/irix5/flp.py b/Lib/irix5/flp.py
index c3f6f3b..bc4a8ab 100755
--- a/Lib/irix5/flp.py
+++ b/Lib/irix5/flp.py
@@ -432,10 +432,10 @@ def _select_crfunc(fm, cl):
def test():
import time
- t0 = time.millitimer()
+ t0 = time.time()
if len(sys.argv) == 2:
forms = parse_forms(sys.argv[1])
- t1 = time.millitimer()
+ t1 = time.time()
print 'parse time:', 0.001*(t1-t0), 'sec.'
keys = forms.keys()
keys.sort()
@@ -443,8 +443,8 @@ def test():
_printform(forms[i])
elif len(sys.argv) == 3:
form = parse_form(sys.argv[1], sys.argv[2])
- t1 = time.millitimer()
- print 'parse time:', 0.001*(t1-t0), 'sec.'
+ t1 = time.time()
+ print 'parse time:', round(t1-t0, 3), 'sec.'
_printform(form)
else:
print 'Usage: test fdfile [form]'