Lines Matching refs:record

1 /*	$NetBSD: record.c,v 1.4 2022/10/08 16:12:45 christos Exp $	*/
5 /* record 3
7 /* simple typed record I/O
9 /* #include <record.h>
71 /* Each record contains a 1-byte type code (0..255), a length
74 /* rec_get_raw() retrieves a record from the named record stream
75 /* and returns the record type. The \fImaxsize\fR argument is
76 /* zero, or specifies a maximal acceptable record length.
78 /* and REC_TYPE_ERROR in case of a bad record. The result buffer is
88 /* Seek to the end-of-file upon reading a REC_TYPE_END record.
98 /* non-zero when the specified record type is "not exposed"
101 /* rec_put() stores the specified record and returns the record
104 /* rec_put_type() updates the type field of the record at the
105 /* specified file offset. The result is the new record type,
112 /* rec_fputs() writes a record with as contents a copy of the
119 /* rec_goto() takes the argument of a pointer record and moves
124 /* rec_pad() writes a record that occupies the larger of (the
128 /* length into a record length. This macro modifies its second
173 #include <record.h>
175 /* rec_put_type - update record type field */
180 msg_panic("rec_put_type: bad record type %d", type);
194 /* rec_put - store typed record */
202 msg_panic("rec_put: bad record type %d", type);
209 * Write the record type, one byte.
215 * Write the record data length in 7-bit portions, using the 8th bit to
229 * Write the record data portion. Use as many length bytes as needed.
236 /* rec_get_raw - retrieve typed record */
250 msg_panic("%s: bad record size limit: %ld", myname, (long) maxsize);
255 * Extract the record type.
261 * Find out the record data length. Return an error result when the
262 * record data length is malformed or when it exceeds the acceptable
267 msg_warn("%s: too many length bits, record type %d",
272 msg_warn("%s: unexpected EOF reading length, record type %d",
281 msg_warn("%s: illegal length %ld, record type %d",
289 * Reserve buffer space for the result, and read the record data into
293 msg_warn("%s: unexpected EOF in data, record type %d length %ld",
314 msg_warn("%s: seek error after reading END record: %m",
323 /* rec_goto - follow PTR record */
353 msg_warn("%s: malformed pointer record value: %s",
357 /* Dummy record. */
363 msg_warn("%s: seek error after pointer record: %m",
372 /* rec_vfprintf - write formatted string to record */
383 * know the record length before we can write it.
389 /* rec_fprintf - write formatted string to record */
402 /* rec_fputs - write string to record */
409 /* rec_pad - write padding record */