Blob
- Date:
- Message:
- tmac: introduce real manual reference macro instead of overloading IR The overloading of IR emits magic \X'...' sequences that turn into HTML manual links. But not all such IR invocations should be manual links; those had to be written to avoid the IR macro before. Worse, the \X'...' ending the IR causes troff to emit only a single space after a period. Defining a new IM macro for manual references fixes both problems. Fixes #441.
- Actions:
- History | Blame | Raw File
1 .TH READ 9P2 .SH NAME3 read, write \- transfer data from and to a file4 .SH SYNOPSIS5 .ta \w'\fLTwrite 'u6 .IR size [4]7 .B Tread8 .IR tag [2]9 .IR fid [4]10 .IR offset [8]11 .IR count [4]12 .br13 .IR size [4]14 .B Rread15 .IR tag [2]16 .IR count [4]17 .IR data [ count ]18 .PP19 .IR size [4]20 .B Twrite21 .IR tag [2]22 .IR fid [4]23 .IR offset [8]24 .IR count [4]25 .IR data [ count ]26 .br27 .IR size [4]28 .B Rwrite29 .IR tag [2]30 .IR count [4]31 .SH DESCRIPTION32 The33 .B read34 request35 asks for36 .I count37 bytes of data38 from the file identified by39 .IR fid ,40 which must be opened for reading,41 starting42 .I offset43 bytes after the beginning of the file.44 The bytes are returned with the45 .B read46 reply message.47 .PP48 The49 .I count50 field in the reply indicates the number of bytes returned.51 This may be less than the requested amount.52 If the53 .I offset54 field is greater than or equal to the number of bytes in the file,55 a count of zero will be returned.56 .PP57 For directories,58 .B read59 returns an integral number of60 directory entries exactly as in61 .B stat62 (see63 .IR stat (9P)),64 one for each member of the directory.65 The66 .B read67 request message must have68 .B offset69 equal to zero or the value of70 .B offset71 in the previous72 .B read73 on the directory, plus the number of bytes74 returned in the previous75 .BR read .76 In other words, seeking other than to the beginning77 is illegal in a directory.78 .PP79 The80 .B write81 request asks that82 .I count83 bytes of data be recorded in the file identified by84 .IR fid ,85 which must be opened for writing, starting86 .I offset87 bytes after the beginning of the file.88 If the file is append-only,89 the data will be placed at the end of the file regardless of90 .IR offset .91 Directories may not be written.92 .PP93 The94 .B write95 reply records the number of bytes actually written.96 It is usually an error97 if this is not the same as requested.98 .PP99 Because 9P implementations may limit the size of individual100 messages,101 more than one message may be produced by a single102 .I read103 or104 .I write105 call.106 The107 .I iounit108 field returned by109 .IR open (9P),110 if non-zero, reports the maximum size that is guaranteed111 to be transferred atomically.112 .SH ENTRY POINTS113 .I Fsread114 and115 .I fswrite116 (see117 .IM 9pclient (3) )118 generate the corresponding messages.119 Because they take an offset parameter, the120 .I fspread121 and122 .I fspwrite123 calls correspond more directly to the 9P messages.124 Although125 .I fsseek126 affects the offset, it does not generate a message.