Annotation of 43BSDTahoe/man/man3f/topen.3, revision 1.1

1.1     ! root        1: .\" Copyright (c) 1983 Regents of the University of California.
        !             2: .\" All rights reserved.  The Berkeley software License Agreement
        !             3: .\" specifies the terms and conditions for redistribution.
        !             4: .\"
        !             5: .\"    @(#)topen.3f    6.1 (Berkeley) 5/15/85
        !             6: .\"
        !             7: .TH TOPEN 3F "May 15, 1985"
        !             8: .UC 5
        !             9: .SH NAME
        !            10: topen, tclose, tread, twrite, trewin, tskipf, tstate \- f77 tape I/O
        !            11: .SH SYNOPSIS
        !            12: .B integer function topen 
        !            13: (tlu, devnam, label)
        !            14: .br
        !            15: .B integer
        !            16: tlu
        !            17: .br
        !            18: .B character*(*)
        !            19: devnam
        !            20: .br
        !            21: .B logical
        !            22: label
        !            23: .sp 1
        !            24: .B integer function tclose
        !            25: (tlu)
        !            26: .br
        !            27: .B integer
        !            28: tlu
        !            29: .sp 1
        !            30: .B integer function tread
        !            31: (tlu, buffer)
        !            32: .br
        !            33: .B integer
        !            34: tlu
        !            35: .br
        !            36: .B character*(*)
        !            37: buffer
        !            38: .sp 1
        !            39: .B integer function twrite
        !            40: (tlu, buffer)
        !            41: .br
        !            42: .B integer
        !            43: tlu
        !            44: .br
        !            45: .B character*(*)
        !            46: buffer
        !            47: .sp 1
        !            48: .B integer function trewin
        !            49: (tlu)
        !            50: .br
        !            51: .B integer
        !            52: tlu
        !            53: .sp 1
        !            54: .B integer function tskipf
        !            55: (tlu, nfiles, nrecs)
        !            56: .br
        !            57: .B integer
        !            58: tlu, nfiles, nrecs
        !            59: .sp 1
        !            60: .B integer function tstate
        !            61: (tlu, fileno, recno, errf, eoff, eotf, tcsr)
        !            62: .br
        !            63: .B integer
        !            64: tlu, fileno, recno, tcsr
        !            65: .br
        !            66: .B logical
        !            67: errf, eoff, eotf
        !            68: .SH DESCRIPTION
        !            69: These functions provide a simple interface between f77 and magnetic
        !            70: tape devices.
        !            71: A ``tape logical unit'',
        !            72: .IR tlu ,
        !            73: is ``topen''ed in much the same way as a normal f77 logical unit
        !            74: is ``open''ed.
        !            75: All other operations are performed via the
        !            76: .IR tlu .
        !            77: The
        !            78: .I tlu
        !            79: has no relationship at all to any normal f77 logical unit.
        !            80: .PP
        !            81: .I Topen
        !            82: associates a device name with a
        !            83: .IR tlu .
        !            84: .I Tlu
        !            85: must be in the range 0 to 3.
        !            86: The logical argument
        !            87: .I label
        !            88: should indicate whether the tape includes a tape label.
        !            89: This is used by
        !            90: .I trewin
        !            91: below.
        !            92: .I Topen
        !            93: does not move the tape.
        !            94: The normal returned value is 0.
        !            95: If the value of the function is negative, an error has occured.
        !            96: See
        !            97: .IR perror (3F)
        !            98: for details.
        !            99: .PP
        !           100: .I Tclose
        !           101: closes the tape device channel and removes its association with
        !           102: .IR tlu .
        !           103: The normal returned value is 0.
        !           104: A negative value indicates an error.
        !           105: .PP
        !           106: .I Tread
        !           107: reads the next physical record from tape to
        !           108: .IR buffer .
        !           109: .I Buffer
        !           110: .B must
        !           111: be of type
        !           112: .BR character .
        !           113: The size of
        !           114: .I buffer
        !           115: should be large enough to hold the largest physical record to be read.
        !           116: The actual number of bytes read will be returned as the value of the
        !           117: function.
        !           118: If the value is 0, the end-of-file has been detected.
        !           119: A negative value indicates an error.
        !           120: .PP
        !           121: .I Twrite
        !           122: writes a physical record to tape from
        !           123: .IR buffer .
        !           124: The physical record length will be the size of
        !           125: .IR buffer .
        !           126: .I Buffer
        !           127: .B must
        !           128: be of type
        !           129: .BR character .
        !           130: The number of bytes written will be returned.
        !           131: A value of 0 or negative indicates an error.
        !           132: .PP
        !           133: .I Trewin
        !           134: rewinds the tape associated with
        !           135: .I tlu
        !           136: to the beginning of the first data file.
        !           137: If the tape is a labelled tape
        !           138: (see
        !           139: .I topen
        !           140: above)
        !           141: then the label is skipped over after rewinding.
        !           142: The normal returned value is 0.
        !           143: A negative value indicates an error.
        !           144: .PP
        !           145: .I Tskipf
        !           146: allows the user to skip over files and/or records.
        !           147: First,
        !           148: .I nfiles
        !           149: end-of-file marks are skipped. If the current file is at
        !           150: EOF, this counts as 1 file to skip.
        !           151: (Note: This is the way to reset the EOF status for a
        !           152: .IR tlu .)
        !           153: Next,
        !           154: .I nrecs
        !           155: physical records are skipped over.
        !           156: The normal returned value is 0.
        !           157: A negative value indicates an error.
        !           158: .PP
        !           159: Finally,
        !           160: .I tstate
        !           161: allows the user to determine the logical state of the tape I/O channel
        !           162: and to see the tape drive control status register.
        !           163: The values of
        !           164: .I fileno
        !           165: and
        !           166: .I recno
        !           167: will be returned and indicate the current file and record number.
        !           168: The logical values
        !           169: .IR errf ,
        !           170: .IR eoff ,
        !           171: and
        !           172: .I eotf
        !           173: indicate an error has occurred, the current file is at EOF,
        !           174: or the tape has reached logical end-of-tape.
        !           175: End-of-tape (EOT) is indicated by an empty file, often
        !           176: referred to as a double EOF mark.
        !           177: It is not allowed to read past EOT although it is allowed to write.
        !           178: The value of
        !           179: .I tcsr
        !           180: will reflect the tape drive control status register.
        !           181: See
        !           182: .IR ht (4)
        !           183: for details.
        !           184: .SH FILES
        !           185: .ie \nM /usr/ucb/lib/libU77.a
        !           186: .el /usr/lib/libU77.a
        !           187: .SH "SEE ALSO"
        !           188: ht(4), perror(3F), rewind(1)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.