home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / recio213.zip / spec.txt < prev    next >
Text File  |  1995-09-05  |  80KB  |  2,697 lines

  1.     Title: SPECIFICATION OF C LANGUAGE RECIO LIBRARY
  2. Copyright: (C) 1994-1995, William Pierpoint
  3.   Version: 2.13
  4.      Date: September 4, 1995
  5.  
  6.  
  7.  
  8. 1.0 RECORD INPUT/OUTPUT <recio.h>
  9.  
  10.  
  11. 1.1 Introduction
  12.  
  13. The header <recio.h> declares two types, several macros, and many functions
  14. for performing line oriented input and output.
  15.  
  16.  
  17. 1.1.1 Record Streams
  18.  
  19. Input and output are mapped into logical data record streams.  A record
  20. stream is an ordered sequence of characters composed into records, each
  21. record consisting of zero or more characters plus a terminating record
  22. delimiter character.  The terminating record delimiter for a file is the
  23. newline character.
  24.  
  25. Each record consists of zero or more fields.  The record may be broken
  26. into fields in two different ways: (1) character delimited and (2) column
  27. delimited.  For character delimited fields, each field consists of zero or
  28. more characters plus a terminating field delimiter character or, for the
  29. last field in the record, the record delimiter character.  For column
  30. delimited fields, each field consists of one or more characters delimited
  31. by a single column position for fields consisting of one character, or by
  32. beginning and ending column positions for fields consisting of one or more
  33. characters.
  34.  
  35. Four types of fields are defined: (1) character, (2) text, (3) numeric, and
  36. (4) time.  A character field consists of a single character.  A text field
  37. consists of a sequence of zero or more characters delimited at each end by an
  38. optional text delimiter character.  A numeric field consists of a sequence of
  39. one or more characters from the set of valid characters for the number type
  40. (integral or floating point) and radix.  A time field consists of a sequence
  41. of one or more characters from the set of valid characters for the time type,
  42. delimited according to a specified format string.
  43.  
  44.  
  45. 1.1.2 Types
  46.  
  47. The types are
  48.  
  49.     REC
  50.  
  51. which is an object type capable of recording all information needed to
  52. control a record stream used for line oriented input or output, including
  53. its file pointer, pointers to its associated record and field buffers, field
  54. and text delimiting characters, an error indicator that records whether
  55. an error has occurred, and an end-of-file indicator that records whether
  56. the end of the file has been reached; and
  57.  
  58.     rpos_t
  59.  
  60. which is an object type capable of recording all the information needed to
  61. specify uniquely any field position within a record.
  62.  
  63.  
  64. 1.1.3 Macros
  65.  
  66. The macros are
  67.  
  68.     RECBUFSIZ
  69.     FLDBUFSIZ
  70.  
  71. which expand to integral constant expressions, which are the initial
  72. sizes of the record buffer and the field buffer;
  73.  
  74.     RECFLDCH
  75.     RECTXTCH
  76.  
  77. which expand to integral constant expressions, which are the default
  78. values of the characters used to separate the fields and delimit text
  79. in a record and whose default value shall correspond to the value of
  80. the space character;
  81.  
  82.     RECBEGYR
  83.  
  84. which expands to an integral constant expression, which is the default
  85. 4-digit value for the beginning year corresponding to the beginning
  86. year of the 2-digit time format;
  87.  
  88.     ROPEN_MAX
  89.  
  90. which expands to an integral constant expression that is the maximum
  91. number of files that can be open simultaneously;
  92.  
  93.     RECIN
  94.     RECOUT
  95.     RECERR
  96.  
  97. which expand to an integral constant expression that is the context
  98. number for the recin record stream that gets input from the <stdio.h>
  99. standard input stream stdin, the recout record stream that puts output
  100. to the <stdio.h> standard output stream stdout, and the recerr record
  101. stream that puts output to the <stdio.h> standard error stream stderr.
  102.  
  103.  
  104. 1.1.4 Expressions
  105.  
  106. The expressions are
  107.  
  108.     recin
  109.     recout
  110.     recerr
  111.  
  112. which are of type "pointer to REC" that points to the REC object associated
  113. with the <stdio.h> FILE objects stdin (standard input stream), stdout
  114. (standard output stream), and stderr (standard error stream).  The recin,
  115. recout, and recerr record streams are always open and are included in the
  116. count of ROPEN_MAX.
  117.  
  118.  
  119.  
  120. 1.2 Record Access Functions
  121.  
  122. 1.2.1 The rclose Function
  123.  
  124. Synopsis
  125.  
  126.      #include <recio.h>
  127.      void rclose(REC *rp);
  128.  
  129. Description
  130.  
  131. The rclose function causes the record stream pointed to by rp and the
  132. associated file to be closed.  Any unread data is discarded.  The record
  133. stream is disassociated from the file.  If associated buffers were
  134. automatically allocated, they are deallocated.
  135.  
  136. If an error occurs, the error indicator for the record stream is set and
  137. the callback error function is called.
  138.  
  139. Returns
  140.  
  141. The rclose function returns no value.
  142.  
  143.  
  144. 1.2.2 The rcloseall Function
  145.  
  146. Synopsis
  147.  
  148.      #include <recio.h>
  149.      int rcloseall(void);
  150.  
  151. Description
  152.  
  153. The rcloseall function causes all the open record streams, and all the
  154. files associated with the open record streams, to be closed.  Any unread
  155. data is discarded.  Each record stream is disassociated from its file.
  156. If associated buffers were automatically allocated, they are deallocated.
  157.  
  158. Returns
  159.  
  160. The rcloseall function returns the number of record streams successfully
  161. closed.
  162.  
  163.  
  164. 1.2.3 The ropen Function
  165.  
  166. Synopsis
  167.  
  168.      #include <recio.h>
  169.      REC *ropen(const char *filename, const char *mode);
  170.  
  171. Description
  172.  
  173. The ropen function opens the file whose name is the string pointed to by
  174. filename, and associates a record stream with it.  The argument mode
  175. points to a string whose first letter is:
  176.  
  177.        "r" - open text file for input
  178.        "w" - open text file for output
  179.        "a" - open text file for append
  180.  
  181. When successfully opened, the error and end-of-file indicators for the
  182. record stream are clear.  If an error occurs, errno is set to one of the
  183. error reporting macros as defined in <errno.h>, the callback error function
  184. is called (except when the file associated with filename is not able to be
  185. opened), and a null pointer is returned.
  186.  
  187. Returns
  188.  
  189. The ropen function returns a pointer to the object controlling the record
  190. stream.  If the open operation fails, ropen returns a null pointer.
  191.  
  192.  
  193. 1.2.4 The rsetfldsiz Function
  194.  
  195. Synopsis
  196.  
  197.      #include <recio.h>
  198.      void rsetfldsiz(REC *rp, size_t fldsize);
  199.  
  200. Description
  201.  
  202. The rsetfldsiz function reallocates the field buffer associated with the
  203. record stream pointed to by rp to the new size of fldsize.
  204.  
  205. The rsetfldsiz function may be used only after the record stream pointed
  206. to by rp has been opened and before any data is read into the record
  207. buffer.  Data is read into the record buffer by the function rgetrec,
  208. or by calling a function that either skips a field or gets data from a
  209. field.  If rsetfldsiz is not used, the initial size of the field buffer
  210. is set by the value of the macro FLDBUFSIZ.
  211.  
  212. If an error occurs, the error indicator for the record stream is set and
  213. the callback error function is called.
  214.  
  215. Returns
  216.  
  217. The rsetfldsiz function returns no value.
  218.  
  219.  
  220. 1.2.5 The rsetrecsiz Function
  221.  
  222. Synopsis
  223.  
  224.      #include <recio.h>
  225.      void rsetrecsiz(REC *rp, size_t recsize);
  226.  
  227. Description
  228.  
  229. The rsetrecsiz function reallocates the record buffer associated with the
  230. record stream pointed to by rp to the new size of recsize.
  231.  
  232. The rsetrecsiz function may be used only after the record stream pointed
  233. to by rp has been opened and before any data is read into the record
  234. buffer.  Data is read into the record buffer by the function rgetrec,
  235. or by calling a function that either skips a field or gets data from a
  236. field.  If rsetrecsiz is not used, the initial size of the field buffer
  237. is set by the value of the macro RECBUFSIZ.
  238.  
  239. If an error occurs, the error indicator for the record stream is set and
  240. the callback error function is called.
  241.  
  242. Returns
  243.  
  244. The rsetrecsiz function returns no value.
  245.  
  246.  
  247.  
  248. 1.3 Character Delimited Field Input Functions
  249.  
  250. The character delimited field input functions use a character (such as
  251. a comma or space) to determine where each field begins and ends.
  252.  
  253.  
  254. 1.3.1 The rbgeti Function
  255.  
  256. Synopsis
  257.  
  258.      #include <recio.h>
  259.      int rbgeti(REC *rp, int base);
  260.  
  261. Description
  262.  
  263. The rbgeti function reads a field consisting of one integral number
  264. represented by the radix determined by the value of base from the input
  265. record stream pointed to by rp.  Any leading or trailing white space
  266. in the field is ignored.
  267.  
  268. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  269. base is zero, the expected form of the integral number is described by
  270. section 3.1.3.2 of ANSI X3.159-1989.
  271.  
  272. If an error occurs, the error indicator for the record stream is set,
  273. the callback error function is called, and the function returns zero.
  274.  
  275. Returns
  276.  
  277. The rbgeti function returns a signed integer from the input record
  278. stream pointed to by rp.  If an attempt is made to read beyond the
  279. end-of-record, if the field is empty, or if there is an illegal character
  280. in the field, the error indicator for the record stream is set, and rbgeti
  281. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  282. set), rbgeti returns zero.  If a previous error has occurred on the record
  283. stream that has not been cleared (error indicator set), rbgeti returns zero.
  284.  
  285.  
  286. 1.3.2 The rbgetl Function
  287.  
  288. Synopsis
  289.  
  290.      #include <recio.h>
  291.      long rbgetl(REC *rp, int base);
  292.  
  293. Description
  294.  
  295. The rbgetl function reads a field consisting of one integral number
  296. represented by the radix determined by the value of base from the input
  297. record stream pointed to by rp.  Any leading or trailing white space
  298. in the field is ignored.
  299.  
  300. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  301. base is zero, the expected form of the integral number is described by
  302. section 3.1.3.2 of ANSI X3.159-1989.
  303.  
  304. If an error occurs, the error indicator for the record stream is set,
  305. the callback error function is called, and the function returns zero (0L).
  306.  
  307. Returns
  308.  
  309. The rbgetl function returns a signed long from the input record stream
  310. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  311. if the field is empty, or if there is an illegal character in the field,
  312. the error indicator for the record stream is set, and rbgetl returns zero
  313. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  314. rbgetl returns zero (0L).  If a previous error has occurred on the record
  315. stream that has not been cleared (error indicator set), rbgetl returns
  316. zero (0L).
  317.  
  318.  
  319. 1.3.3 The rbgetui Function
  320.  
  321. Synopsis
  322.  
  323.      #include <recio.h>
  324.      unsigned int rbgetui(REC *rp, int base);
  325.  
  326. Description
  327.  
  328. The rbgetui function reads a field consisting of one non-negative integral
  329. number represented by the radix determined by the value of base from the
  330. input record stream pointed to by rp.  Any leading or trailing white space
  331. in the field is ignored.
  332.  
  333. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  334. base is zero, the expected form of the integral number is described by
  335. section 3.1.3.2 of ANSI X3.159-1989.
  336.  
  337. If an error occurs, the error indicator for the record stream is set,
  338. the callback error function is called, and the function returns zero.
  339.  
  340. Returns
  341.  
  342. The rbgetui function returns an unsigned integer from the input record
  343. stream pointed to by rp.  If an attempt is made to read beyond the
  344. end-of-record, if the field is empty, or if there is an illegal character
  345. in the field, the error indicator for the record stream is set, and rbgetui
  346. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  347. set), rbgetui returns zero.  If a previous error has occurred on the record
  348. stream that has not been cleared (error indicator set), rbgetui returns zero.
  349.  
  350.  
  351. 1.3.4 The rbgetul Function
  352.  
  353. Synopsis
  354.  
  355.      #include <recio.h>
  356.      unsigned long rbgetul(REC *rp, int base);
  357.  
  358. Description
  359.  
  360. The rbgetul function reads a field consisting of one non-negative integral
  361. number represented by the radix determined by the value of base from the
  362. input record stream pointed to by rp.  Any leading or trailing white space
  363. in the field is ignored.
  364.  
  365. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  366. base is zero, the expected form of the integral number is described by
  367. section 3.1.3.2 of ANSI X3.159-1989.
  368.  
  369. If an error occurs, the error indicator for the record stream is set,
  370. the callback error function is called, and the function returns zero (0L).
  371.  
  372. Returns
  373.  
  374. The rbgetul function returns an unsigned long from the input record stream
  375. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  376. if the field is empty, or if there is an illegal character in the field,
  377. the error indicator for the record stream is set, and rbgetul returns zero
  378. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  379. rbgetul returns zero (0L).  If a previous error has occurred on the record
  380. stream that has not been cleared (error indicator set), rbgetul returns
  381. zero (0L).
  382.  
  383.  
  384. 1.3.5 The rgetc Function
  385.  
  386. Synopsis
  387.  
  388.      #include <recio.h>
  389.      int rgetc(REC *rp);
  390.  
  391. Description
  392.  
  393. The rgetc function reads a field consisting of one non-white space
  394. character from the input record stream pointed to by rp.  Any leading
  395. or trailing white space in the field is ignored.
  396.  
  397. If an error occurs, the error indicator for the record stream is set,
  398. the callback error function is called, and the function returns EOF.
  399.  
  400. Returns
  401.  
  402. The rgetc function returns a character from a single non-white
  403. space character field in the input record stream pointed to by rp.
  404. If an attempt is made to read beyond the end-of-record, or if there
  405. is more than or less than one non-white character in the field, the
  406. error indicator for the record stream is set, and rgetc returns EOF.  If the
  407. record stream is at end-of-file (end-of-file indicator set), rgetc returns
  408. EOF.  If a previous error has occurred on the record stream that has not been
  409. cleared (error indicator set), rgetc returns EOF.
  410.  
  411.  
  412. 1.3.6 The rgetd Function
  413.  
  414. Synopsis
  415.  
  416.      #include <recio.h>
  417.      double rgetd(REC *rp);
  418.  
  419. Description
  420.  
  421. The rgetd function reads a field consisting of one floating point
  422. number from the input record stream pointed to by rp.  Any leading
  423. or trailing white space in the field is ignored.
  424.  
  425. If an error occurs, the error indicator for the record stream is set,
  426. the callback error function is called, and the function returns zero.
  427.  
  428. Returns
  429.  
  430. The rgetd function returns a double precision floating point number
  431. from the input record stream pointed to by rp.  If an attempt is made
  432. to read beyond the end-of-record, if the field is empty, or if there
  433. is an illegal character in the field, the error indicator for the
  434. record stream is set, and rgetd returns zero (0.0).  If the record stream is
  435. at end-of-file (end-of-file indicator set), rgetd returns zero (0.0).  If a
  436. previous error has occurred on the record stream that has not been cleared
  437. (error indicator set), rgetd returns zero (0.0).
  438.  
  439.  
  440. 1.3.7 The rgetf Function
  441.  
  442. Synopsis
  443.  
  444.      #include <recio.h>
  445.      float rgetf(REC *rp);
  446.  
  447. Description
  448.  
  449. The rgetf function reads a field consisting of one floating point
  450. number from the input record stream pointed to by rp.  Any leading
  451. or trailing white space in the field is ignored.
  452.  
  453. If an error occurs, the error indicator for the record stream is set,
  454. the callback error function is called, and the function returns zero.
  455.  
  456. Returns
  457.  
  458. The rgetf function returns a single precision floating point number
  459. from the input record stream pointed to by rp.  If an attempt is made
  460. to read beyond the end-of-record, if the field is empty, or if there
  461. is an illegal character in the field, the error indicator for the
  462. record stream is set, and rgetf returns zero (0.0).  If the record stream is
  463. at end-of-file (end-of-file indicator set), rgetf returns zero (0.0).  If a
  464. previous error has occurred on the record stream that has not been cleared
  465. (error indicator set), rgetf returns zero (0.0).
  466.  
  467.  
  468. 1.3.8 The rgeti Function
  469.  
  470. Synopsis
  471.  
  472.      #include <recio.h>
  473.      int rgeti(REC *rp);
  474.  
  475. Description
  476.  
  477. The rgeti function reads a field consisting of one integral
  478. number from the input record stream pointed to by rp.  Any leading
  479. or trailing white space in the field is ignored.
  480.  
  481. If an error occurs, the error indicator for the record stream is set,
  482. the callback error function is called, and the function returns zero.
  483.  
  484. Returns
  485.  
  486. The rgeti function returns a signed integer from the input record
  487. stream pointed to by rp.  If an attempt is made to read beyond the
  488. end-of-record, if the field is empty, or if there is an illegal character
  489. in the field, the error indicator for the record stream is set, and rgeti
  490. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  491. set), rgeti returns zero.  If a previous error has occurred on the record
  492. stream that has not been cleared (error indicator set), rgeti returns zero.
  493.  
  494.  
  495. 1.3.9 The rgetl Function
  496.  
  497. Synopsis
  498.  
  499.      #include <recio.h>
  500.      long rgetl(REC *rp);
  501.  
  502. Description
  503.  
  504. The rgetl function reads a field consisting of one integral number
  505. from the input record stream pointed to by rp.  Any leading or trailing
  506. white space in the field is ignored.
  507.  
  508. If an error occurs, the error indicator for the record stream is set,
  509. the callback error function is called, and the function returns zero (0L).
  510.  
  511. Returns
  512.  
  513. The rgetl function returns a signed long from the input record stream
  514. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  515. if the field is empty, or if there is an illegal character in the field,
  516. the error indicator for the record stream is set, and rgetl returns zero
  517. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  518. rgetl returns zero (0L).  If a previous error has occurred on the record
  519. stream that has not been cleared (error indicator set), rgetl returns zero
  520. (0L).
  521.  
  522.  
  523. 1.3.10 The rgets Function
  524.  
  525. Synopsis
  526.  
  527.      #include <recio.h>
  528.      char *rgets(REC *rp);
  529.  
  530. Description
  531.  
  532. The rgets function reads a field consisting of one text string from the
  533. input record stream pointed to by rp.  Any leading white space before the
  534. text delimiter and any trailing white space after the text delimiter in
  535. the field is ignored.  The text delimiters are not returned as part of
  536. the string.
  537.  
  538. If an error occurs, the error indicator for the record stream is set, the
  539. callback error function is called, and the function returns a pointer to
  540. an empty string.
  541.  
  542. Returns
  543.  
  544. The rgets function returns a pointer to a character array from the input
  545. record stream pointed to by rp.  If an attempt is made to read beyond the
  546. end-of-record, the error indicator for the record stream is set, and rgets
  547. returns a pointer to an empty string.  If the record stream is at end-of-file
  548. (end-of-file indicator set), rgets returns a pointer to an empty string.  If
  549. a previous error has occurred on the record stream that has not been cleared
  550. (error indicator set), rgets returns a pointer to an empty string.
  551.  
  552.  
  553. 1.3.11 The rgett Function
  554.  
  555. Synopsis
  556.  
  557.      #include <recio.h>
  558.      time_t rgett(REC *rp);
  559.  
  560. Description
  561.  
  562. The rgett function reads a field consisting of one time of type time_t from
  563. input record stream pointed to by rp.  Any leading or trailing white space
  564. in the field is ignored.
  565.  
  566. If an error occurs, the error indicator for the record stream is set, the
  567. callback error function is called, and the function returns (time_t)-1.
  568.  
  569. Returns
  570.  
  571. The rgett function returns a time of type time_t.  If an attempt is made to
  572. read beyond the end-of-record, the error indicator for the record stream is
  573. set, and rgett returns (time_t)-1.  If the record stream is at end-of-file
  574. (end-of-file indicator set), rgett returns (time_t)-1.  If a previous error
  575. has occurred on the record stream that has not been cleared (error indicator
  576. set), rgett returns (time_t)-1.
  577.  
  578.  
  579. 1.3.12 The rgettm Function
  580.  
  581. Synopsis
  582.  
  583.      #include <recio.h>
  584.      struct tm rgettm(REC *rp);
  585.  
  586. Description
  587.  
  588. The rgettm function reads a field consisting of one time of type struct tm
  589. from input record stream pointed to by rp.  Any leading or trailing white
  590. space in the field is ignored.
  591.  
  592. If an error occurs, the error indicator for the record stream is set, the
  593. callback error function is called, and the function returns an implementation
  594. defined value.
  595.  
  596. Returns
  597.  
  598. The rgettm function returns a time of type struct tm.  If an attempt is made
  599. to read beyond the end-of-record, the error indicator for the record stream
  600. is set, and rgettm returns an implementation defined value.  If the record
  601. stream is at end-of-file (end-of-file indicator set), rgettm returns an
  602. implementation defined value.  If a previous error has occurred on the
  603. record stream that has not been cleared (error indicator set), rgettm returns
  604. an implementation defined value.
  605.  
  606.  
  607. 1.3.13 The rgetui Function
  608.  
  609. Synopsis
  610.  
  611.      #include <recio.h>
  612.      unsigned int rgetui(REC *rp);
  613.  
  614. Description
  615.  
  616. The rgetui function reads a field consisting of one non-negative
  617. integral number from the input record stream pointed to by rp.  Any
  618. leading or trailing white space in the field is ignored.
  619.  
  620. If an error occurs, the error indicator for the record stream is set,
  621. the callback error function is called, and the function returns zero.
  622.  
  623. Returns
  624.  
  625. The rgetui function returns an unsigned integer from the input record
  626. stream pointed to by rp.  If an attempt is made to read beyond the
  627. end-of-record, if the field is empty, or if there is an illegal character
  628. in the field, the error indicator for the record stream is set, and rgetui
  629. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  630. set), rgetui returns zero.  If a previous error has occurred on the record
  631. stream that has not been cleared (error indicator set), rgetui returns zero.
  632.  
  633.  
  634. 1.3.14 The rgetul Function
  635.  
  636. Synopsis
  637.  
  638.      #include <recio.h>
  639.      unsigned long rgetul(REC *rp);
  640.  
  641. Description
  642.  
  643. The rgetul function reads a field consisting of one non-negative
  644. integral number from the input record stream pointed to by rp.  Any
  645. leading or trailing white space in the field is ignored.
  646.  
  647. If an error occurs, the error indicator for the record stream is set, the
  648. callback error function is called, and the function returns zero (0L).
  649.  
  650. Returns
  651.  
  652. The rgetul function returns an unsigned long from the input record stream
  653. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  654. if the field is empty, or if there is an illegal character in the field,
  655. the error indicator for the record stream is set, and rgetul returns zero
  656. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  657. rgetul returns zero (0L).  If a previous error has occurred on the record
  658. stream that has not been cleared (error indicator set), rgetul returns zero
  659. (0L).
  660.  
  661.  
  662. 1.3.15 The rsetfldch Function
  663.  
  664. Synopsis
  665.  
  666.      #include <recio.h>
  667.      void rsetfldch(REC *rp, int ch);
  668.  
  669. Description
  670.  
  671. The rsetfldch function sets the field delimiter to the character ch
  672. for the record stream pointed to by rp.  If the character ch is the
  673. space character ' ', then the field is delimited by any white-space,
  674. and multiple contiguous white space characters are treated as a single
  675. delimiter.  If the character ch is other than the space character, then
  676. multiple contiguous field delimiters are treated as a series of empty
  677. fields.
  678.  
  679. If rsetfldch is not called, the field delimiter is set by the value of
  680. the macro RECFLDCH.
  681.  
  682. If an error occurs, the error indicator for the record stream is set and
  683. the callback error function is called.
  684.  
  685. Returns
  686.  
  687. The rsetfldch function returns no value.
  688.  
  689.  
  690. 1.3.16 The rsettmfmt Function
  691.  
  692. Synopsis
  693.  
  694.      #include <recio.h>
  695.      void rsettmfmt(REC *rp, char *fmt);
  696.  
  697. Description
  698.  
  699. The rsettmfmt function sets the time format according to the string fmt
  700. for the record stream pointed to by rp.
  701.  
  702. Time formats are specified using a subset of the specifiers from the
  703. ANSI-C strftime function.  Supported specifiers are:
  704.  
  705.         %d - day of month (1-31)
  706.         %H - hour from 24-hour clock (0-23)
  707.         %m - month (1-12)
  708.         %M - minute (0-59)
  709.         %s - second (0-61)
  710.         %y - year without century (00-99)
  711.         %Y - year with century (e.g. 1994)
  712.  
  713. If the rsettmfmt function is not called, the time format is set to
  714. "%m/%d/%y".
  715.  
  716. If an error occurs, the error indicator for the record stream is set
  717. and the callback error function is called.
  718.  
  719. Returns
  720.  
  721. The rsettmfmt function returns no value.
  722.  
  723.  
  724. 1.3.17 The rsettxtch Function
  725.  
  726. Synopsis
  727.  
  728.      #include <recio.h>
  729.      void rsettxtch(REC *rp, int ch);
  730.  
  731. Description
  732.  
  733. The rsettxtch function sets the text delimiter to the character ch for
  734. the record stream pointed to by rp.
  735.  
  736. If rsettxtch is not called, the text delimiter is set by the value of
  737. the macro RECTXTCH.
  738.  
  739. If an error occurs, the error indicator for the record stream is set and
  740. the callback error function is called.
  741.  
  742. Returns
  743.  
  744. The rsettxtch function returns no value.
  745.  
  746.  
  747. 1.3.18 The rskipfld Function
  748.  
  749. Synopsis
  750.  
  751.      #include <recio.h>
  752.      unsigned int rskipfld(REC *rp);
  753.  
  754. Description
  755.  
  756. The rskipfld function skips to the next field for the record stream
  757. pointed to by rp.
  758.  
  759. If an error occurs, the error indicator for the record stream is set,
  760. the callback error function is called, and the function returns 0.
  761.  
  762. Returns
  763.  
  764. The rskipfld function returns one if the field was successfully skipped,
  765. or zero if the field could not be skipped either because you are at the
  766. end of the record or because an error occurred.
  767.  
  768.  
  769. 1.3.19 The rskipnfld Function
  770.  
  771. Synopsis
  772.  
  773.      #include <recio.h>
  774.      unsigned int rskipnfld(REC *rp, unsigned int num);
  775.  
  776. Description
  777.  
  778. The rskipnfld function skips over num number of fields for the record
  779. stream pointed to by rp.
  780.  
  781. If an error occurs, the error indicator for the record stream is set,
  782. the callback error function is called, and the function returns 0.
  783.  
  784. Returns
  785.  
  786. The rskipfld function returns the actual number of fields skipped.
  787.  
  788.  
  789. 1.3.20 The ristxtfld Function
  790.  
  791. Synopsis
  792.  
  793.     #include <recio.h>
  794.     unsigned ristxtfld(REC *rp);
  795.  
  796. Description
  797.  
  798. The ristxtfld function determines if the current field (the field most
  799. recently input or output) for the record stream pointed to by rp was
  800. quoted with the text delimiter character (provided the text delimiter
  801. character is not the space character).
  802.  
  803. Returns
  804.  
  805. The ristxtfld function returns non-zero if the current field was quoted
  806. and returns zero otherwise.  If the text delimiter character for the stream
  807. is the space character, the ristxtfld function always returns zero.
  808.  
  809.  
  810.  
  811. 1.4 Character Delimited Field Output Functions
  812.  
  813. The character delimited field output functions automatically place the
  814. field delimiter character between fields in the output.
  815.  
  816.  
  817. 1.4.1 The rbputi Function
  818.  
  819. Synopsis
  820.  
  821.      #include <recio.h>
  822.      void rbputi(REC *rp, int base, int number);
  823.  
  824. Description
  825.  
  826. The rbputi function writes an integral number in the radix base to the
  827. output record stream pointed to by rp.  Base may be between 2 to 36.
  828.  
  829. If an error occurs, the error indicator for the record stream is set and
  830. the callback error function is called.
  831.  
  832. Returns
  833.  
  834. The rbputi function returns no value.
  835.  
  836.  
  837. 1.4.2 The rbputl Function
  838.  
  839. Synopsis
  840.  
  841.      #include <recio.h>
  842.      void rbputl(REC *rp, int base, long number);
  843.  
  844. Description
  845.  
  846. The rbputl function writes an integral number in the radix base to the
  847. output record stream pointed to by rp.  Base may be between 2 to 36.
  848.  
  849. If an error occurs, the error indicator for the record stream is set and
  850. the callback error function is called.
  851.  
  852. Returns
  853.  
  854. The rbputl function returns no value.
  855.  
  856.  
  857. 1.4.3 The rbputui Function
  858.  
  859. Synopsis
  860.  
  861.      #include <recio.h>
  862.      void rbputui(REC *rp, int base, unsigned int number);
  863.  
  864. Description
  865.  
  866. The rbputui function writes an unsigned integral number in the radix base to
  867. the output record stream pointed to by rp.  Base may be between 2 to 36.
  868.  
  869. If an error occurs, the error indicator for the record stream is set and
  870. the callback error function is called.
  871.  
  872. Returns
  873.  
  874. The rbputui function returns no value.
  875.  
  876.  
  877. 1.4.4 The rbputul Function
  878.  
  879. Synopsis
  880.  
  881.      #include <recio.h>
  882.      void rbputul(REC *rp, int base, unsigned long number);
  883.  
  884. Description
  885.  
  886. The rbputul function writes an unsigned integral number in the radix base to
  887. the output record stream pointed to by rp.  Base may be between 2 to 36.
  888.  
  889. If an error occurs, the error indicator for the record stream is set and
  890. the callback error function is called.
  891.  
  892. Returns
  893.  
  894. The rbputul function returns no value.
  895.  
  896.  
  897. 1.4.5 The rputc Function
  898.  
  899. Synopsis
  900.  
  901.      #include <recio.h>
  902.      void rputc(REC *rp, int ch);
  903.  
  904. Description
  905.  
  906. The rputc function writes a character ch to the output record stream
  907. pointed to by rp.
  908.  
  909. If an error occurs, the error indicator for the record stream is set and
  910. the callback error function is called.
  911.  
  912. Returns
  913.  
  914. The rputc function returns no value.
  915.  
  916.  
  917. 1.4.6 The rputd Function
  918.  
  919. Synopsis
  920.  
  921.      #include <recio.h>
  922.      void rputd(REC *rp, double number);
  923.  
  924. Description
  925.  
  926. The rputd function writes a floating point number to the output record
  927. stream pointed to by rp.
  928.  
  929. If an error occurs, the error indicator for the record stream is set and
  930. the callback error function is called.
  931.  
  932. Returns
  933.  
  934. The rputd function returns no value.
  935.  
  936.  
  937. 1.4.7 The rputf Function
  938.  
  939. Synopsis
  940.  
  941.      #include <recio.h>
  942.      void rputf(REC *rp, float number);
  943.  
  944. Description
  945.  
  946. The rputf function writes a floating point number to the output record
  947. stream pointed to by rp.
  948.  
  949. If an error occurs, the error indicator for the record stream is set and
  950. the callback error function is called.
  951.  
  952. Returns
  953.  
  954. The rputf function returns no value.
  955.  
  956.  
  957. 1.4.8 The rputi Function
  958.  
  959. Synopsis
  960.  
  961.      #include <recio.h>
  962.      void rputi(REC *rp, int number);
  963.  
  964. Description
  965.  
  966. The rputi function writes an integral number to the output record stream
  967. pointed to by rp.
  968.  
  969. If an error occurs, the error indicator for the record stream is set and
  970. the callback error function is called.
  971.  
  972. Returns
  973.  
  974. The rputi function returns no value.
  975.  
  976.  
  977. 1.4.9 The rputl Function
  978.  
  979. Synopsis
  980.  
  981.      #include <recio.h>
  982.      void rputl(REC *rp, long number);
  983.  
  984. Description
  985.  
  986. The rputl function writes an integral number to the output record stream
  987. pointed to by rp.
  988.  
  989. If an error occurs, the error indicator for the record stream is set and
  990. the callback error function is called.
  991.  
  992. Returns
  993.  
  994. The rputl function returns no value.
  995.  
  996.  
  997. 1.4.10 The rputs Function
  998.  
  999. Synopsis
  1000.  
  1001.      #include <recio.h>
  1002.      void rputs(REC *rp, char *string);
  1003.  
  1004. Description
  1005.  
  1006. The rputs function writes a string of characters to the output record
  1007. stream pointed to by rp.  If the text delimiter character is not the space
  1008. character, text delimiters are placed around the text.
  1009.  
  1010. If an error occurs, the error indicator for the record stream is set and
  1011. the callback error function is called.
  1012.  
  1013. Returns
  1014.  
  1015. The rputs function returns no value.
  1016.  
  1017.  
  1018. 1.4.11 The rputt Function
  1019.  
  1020. Synopsis
  1021.  
  1022.      #include <recio.h>
  1023.      void rputt(REC *rp, time_t time);
  1024.  
  1025. Description
  1026.  
  1027. The rputt function writes the time to the output record stream pointed to by
  1028. rp.  The format of the time is determined by the time format for the record
  1029. stream.  See section 1.3.16 on how to set the time format.
  1030.  
  1031. If an error occurs, the error indicator for the record stream is set and
  1032. the callback error function is called.
  1033.  
  1034. Returns
  1035.  
  1036. The rputt function returns no value.
  1037.  
  1038.  
  1039. 1.4.12 The rputtm Function
  1040.  
  1041. Synopsis
  1042.  
  1043.      #include <recio.h>
  1044.      void rputtm(REC *rp, struct tm t);
  1045.  
  1046. Description
  1047.  
  1048. The rputtm function writes out the time as specified by the contents of
  1049. struct tm t to the output record stream pointed to by rp.  The format of
  1050. the time is determined by the time format for the record stream.  See
  1051. section 1.3.16 on how to set the time format.
  1052.  
  1053. If an error occurs, the error indicator for the record stream is set and
  1054. the callback error function is called.
  1055.  
  1056. Returns
  1057.  
  1058. The rputtm function returns no value.
  1059.  
  1060.  
  1061. 1.4.13 The rputui Function
  1062.  
  1063. Synopsis
  1064.  
  1065.      #include <recio.h>
  1066.      void rputui(REC *rp, unsigned int number);
  1067.  
  1068. Description
  1069.  
  1070. The rputui function writes an unsigned integral number to the output record
  1071. stream pointed to by rp.
  1072.  
  1073. If an error occurs, the error indicator for the record stream is set and
  1074. the callback error function is called.
  1075.  
  1076. Returns
  1077.  
  1078. The rputui function returns no value.
  1079.  
  1080.  
  1081. 1.4.14 The rputul Function
  1082.  
  1083. Synopsis
  1084.  
  1085.      #include <recio.h>
  1086.      void rputul(REC *rp, unsigned long number);
  1087.  
  1088. Description
  1089.  
  1090. The rputul function writes an unsigned integral number to the output record
  1091. stream pointed to by rp.
  1092.  
  1093. If an error occurs, the error indicator for the record stream is set and
  1094. the callback error function is called.
  1095.  
  1096. Returns
  1097.  
  1098. The rputul function returns no value.
  1099.  
  1100.  
  1101.  
  1102. 1.5 Column Delimited Field Input Functions
  1103.  
  1104. The column delimited field input functions use column positions to
  1105. determine the start and end of each field.
  1106.  
  1107.  
  1108. 1.5.1 The rcbgeti Function
  1109.  
  1110. Synopsis
  1111.  
  1112.      #include <recio.h>
  1113.      int rcbgeti(REC *rp, size_t begcol, size_t endcol, int base);
  1114.  
  1115. Description
  1116.  
  1117. The rcbgeti function gets one integral number represented by the radix
  1118. determined by the value of base and contained inclusively from column
  1119. begcol to column endcol for the input record stream pointed to by rp.
  1120. Any leading or trailing white space in the field is ignored.
  1121.  
  1122. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1123. base is zero, the expected form of the integral number is described by
  1124. section 3.1.3.2 of ANSI X3.159-1989.
  1125.  
  1126. If an error occurs, the error indicator for the record stream is set,
  1127. the callback error function is called, and the function returns zero.
  1128.  
  1129. Returns
  1130.  
  1131. The rcbgeti function returns a signed integer from the input record stream
  1132. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1133. empty, or if there is an illegal character in the field, the error indicator
  1134. for the record stream is set, and rcbgeti returns zero.  If the record stream
  1135. is at end-of-file (end-of-file indicator set), rcbgeti returns zero.  If a
  1136. previous error has occurred on the record stream that has not been cleared
  1137. (error indicator set), rcbgeti returns zero.
  1138.  
  1139.  
  1140. 1.5.2 The rcbgetl Function
  1141.  
  1142. Synopsis
  1143.  
  1144.      #include <recio.h>
  1145.      long rcbgetl(REC *rp, size_t begcol, size_t endcol, int base);
  1146.  
  1147. Description
  1148.  
  1149. The rcbgetl function gets one integral number represented by the radix
  1150. determined by the value of base and contained inclusively from column
  1151. begcol to column endcol for the input record stream pointed to by rp.
  1152. Any leading or trailing white space in the field is ignored.
  1153.  
  1154. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1155. base is zero, the expected form of the integral number is described by
  1156. section 3.1.3.2 of ANSI X3.159-1989.
  1157.  
  1158. If an error occurs, the error indicator for the record stream is set,
  1159. the callback error function is called, and the function returns zero (0L).
  1160.  
  1161. Returns
  1162.  
  1163. The rcbgetl function returns a signed long from the input record stream
  1164. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1165. empty, or if there is an illegal character in the field, the error indicator
  1166. for the record stream is set, and rcbgetl returns zero (0L).  If the record
  1167. stream is at end-of-file (end-of-file indicator set), rcbgetl returns zero
  1168. (0L).  If a previous error has occurred on the record stream that has not been
  1169. cleared (error indicator set), rcbgetl returns zero (0L).
  1170.  
  1171.  
  1172. 1.5.3 The rcbgetui Function
  1173.  
  1174. Synopsis
  1175.  
  1176.      #include <recio.h>
  1177.      unsigned int rcbgetui(REC *rp, size_t begcol, size_t endcol,
  1178.           int base);
  1179.  
  1180. Description
  1181.  
  1182. The rcbgetui function gets one non-negative integral number represented
  1183. by the radix determined by the value of base and contained inclusively
  1184. from column begcol to column endcol for the input record stream pointed
  1185. to by rp.  Any leading or trailing white space in the field is ignored.
  1186.  
  1187. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1188. base is zero, the expected form of the integral number is described by
  1189. section 3.1.3.2 of ANSI X3.159-1989.
  1190.  
  1191. If an error occurs, the error indicator for the record stream is set,
  1192. the callback error function is called, and the function returns zero.
  1193.  
  1194. Returns
  1195.  
  1196. The rcbgetui function returns an unsigned integer from the input record
  1197. stream pointed to by rp.  If begcol is beyond the end-of-record, if the
  1198. field is empty, or if there is an illegal character in the field, the
  1199. error indicator for the record stream is set, and rcbgetui returns zero.  If
  1200. the record stream is at end-of-file (end-of-file indicator set), rcbgetui
  1201. returns zero.  If a previous error has occurred on the record stream that has
  1202. not been cleared (error indicator set), rcbgetui returns zero.
  1203.  
  1204.  
  1205. 1.5.4 The rcbgetul Function
  1206.  
  1207. Synopsis
  1208.  
  1209.      #include <recio.h>
  1210.      unsigned long rcbgetul(REC *rp, size_t begcol, size_t endcol,
  1211.           int base);
  1212.  
  1213. Description
  1214.  
  1215. The rcbgetul function gets one non-negative integral number represented
  1216. by the radix determined by the value of base and contained inclusively
  1217. from column begcol to column endcol for the input record stream pointed
  1218. to by rp.  Any leading or trailing white space in the field is ignored.
  1219.  
  1220. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1221. base is zero, the expected form of the integral number is described by
  1222. section 3.1.3.2 of ANSI X3.159-1989.
  1223.  
  1224. If an error occurs, the error indicator for the record stream is set,
  1225. the callback error function is called, and the function returns zero (0L).
  1226.  
  1227. Returns
  1228.  
  1229. The rcbgetul function returns an unsigned long from the input record stream
  1230. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1231. empty, or if there is an illegal character in the field, the error indicator
  1232. for the record stream is set, and rcbgetul returns zero (0L).  If the record
  1233. stream is at end-of-file (end-of-file indicator set), rcbgetul returns zero
  1234. (0L).  If a previous error has occurred on the record stream that has not been
  1235. cleared (error indicator set), rcbgetul returns zero (0L).
  1236.  
  1237.  
  1238. 1.5.5 The rcgetc Function
  1239.  
  1240. Synopsis
  1241.  
  1242.      #include <recio.h>
  1243.      int rcgetc(REC *rp, size_t col);
  1244.  
  1245. Description
  1246.  
  1247. The rcgetc function obtains from column position col the unsigned char
  1248. converted to an int from the input record stream pointed to by rp.
  1249.  
  1250. If an error occurs, the error indicator for the record stream is set,
  1251. the callback error function is called, and the function returns EOF.
  1252.  
  1253. Returns
  1254.  
  1255. The rcgetc function returns a character from column position col from
  1256. the input record stream pointed to by rp.  If an attempt is made to read
  1257. beyond the end-of-record, the error indicator for the record stream is set,
  1258. and rcgetc returns EOF.  If the record stream is at end-of-file (end-of-file
  1259. indicator set), rcgetc returns EOF.  If a previous error has occurred on the
  1260. record stream that has not been cleared (error indicator set), rcgetc returns
  1261. EOF.
  1262.  
  1263.  
  1264. 1.5.6 The rcgetd Function
  1265.  
  1266. Synopsis
  1267.  
  1268.      #include <recio.h>
  1269.      double rcgetd(REC *rp, size_t begcol, size_t endcol);
  1270.  
  1271. Description
  1272.  
  1273. The rcgetd function gets one floating point number contained inclusively
  1274. from column begcol to column endcol for the input record stream pointed to
  1275. by rp.  Any leading or trailing white space in the field is ignored.
  1276.  
  1277. If an error occurs, the error indicator for the record stream is set,
  1278. the callback error function is called, and the function returns zero.
  1279.  
  1280. Returns
  1281.  
  1282. The rcgetd function returns a double precision floating point number from the
  1283. input record stream pointed to by rp.  If begcol is beyond the end-of-record,
  1284. if the field is empty, or if there is an illegal character in the field, the
  1285. error indicator for the record stream is set, and rcgetd returns zero (0.0).
  1286. If the record stream is at end-of-file (end-of-file indicator set), rcgetd
  1287. returns zero (0.0).  If a previous error has occurred on the record stream
  1288. that has not been cleared (error indicator set), rcgetd returns zero (0.0).
  1289.  
  1290.  
  1291. 1.5.7 The rcgetf Function
  1292.  
  1293. Synopsis
  1294.  
  1295.      #include <recio.h>
  1296.      float rcgetf(REC *rp, size_t begcol, size_t endcol);
  1297.  
  1298. Description
  1299.  
  1300. The rcgetf function gets one floating point number contained inclusively
  1301. from column begcol to column endcol for the input record stream pointed to
  1302. by rp.  Any leading or trailing white space in the field is ignored.
  1303.  
  1304. If an error occurs, the error indicator for the record stream is set,
  1305. the callback error function is called, and the function returns zero.
  1306.  
  1307. Returns
  1308.  
  1309. The rcgetf function returns a single precision floating point number from the
  1310. input record stream pointed to by rp.  If begcol is beyond the end-of-record,
  1311. if the field is empty, or if there is an illegal character in the field, the
  1312. error indicator for the record stream is set, and rcgetf returns zero (0.0).
  1313. If the record stream is at end-of-file (end-of-file indicator set), rcgetf
  1314. returns zero (0.0).  If a previous error has occurred on the record stream
  1315. that has not been cleared (error indicator set), rcgetf returns zero (0.0).
  1316.  
  1317.  
  1318. 1.5.8 The rcgeti Function
  1319.  
  1320. Synopsis
  1321.  
  1322.      #include <recio.h>
  1323.      int rcgeti(REC *rp, size_t begcol, size_t endcol);
  1324.  
  1325. Description
  1326.  
  1327. The rcgeti function gets one integral number contained inclusively from
  1328. column begcol to column endcol for the input record stream pointed to by
  1329. rp.  Any leading or trailing white space in the field is ignored.
  1330.  
  1331. If an error occurs, the error indicator for the record stream is set,
  1332. the callback error function is called, and the function returns zero.
  1333.  
  1334. Returns
  1335.  
  1336. The rcgeti function returns a signed integer from the input record stream
  1337. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1338. empty, or if there is an illegal character in the field, the error indicator
  1339. for the record stream is set, and rcgeti returns zero.  If the record stream
  1340. is at end-of-file (end-of-file indicator set), rcgeti returns zero.  If a
  1341. previous error has occurred on the record stream that has not been cleared
  1342. (error indicator set), rcgeti returns zero.
  1343.  
  1344.  
  1345. 1.5.9 The rcgetl Function
  1346.  
  1347. Synopsis
  1348.  
  1349.      #include <recio.h>
  1350.      long rcgetl(REC *rp, size_t begcol, size_t endcol);
  1351.  
  1352. Description
  1353.  
  1354. The rcgetl function gets one integral number contained inclusively from
  1355. column begcol to column endcol for the input record stream pointed to by
  1356. rp.  Any leading or trailing white space in the field is ignored.
  1357.  
  1358. If an error occurs, the error indicator for the record stream is set,
  1359. the callback error function is called, and the function returns zero (0L).
  1360.  
  1361. Returns
  1362.  
  1363. The rcgetl function returns a signed long from the input record stream
  1364. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1365. empty, or if there is an illegal character in the field, the error indicator
  1366. for the record stream is set, and rcgetl returns zero (0L).  If the record
  1367. stream is at end-of-file (end-of-file indicator set), rcgetl returns zero
  1368. (0L).  If a previous error has occurred on the record stream that has not
  1369. been cleared (error indicator set), rcgetl returns zero (0L).
  1370.  
  1371.  
  1372. 1.5.10 The rcgets Function
  1373.  
  1374. Synopsis
  1375.  
  1376.      #include <recio.h>
  1377.      char *rcgets(REC *rp, size_t begcol, size_t endcol);
  1378.  
  1379. Description
  1380.  
  1381. The rcgets function gets a string contained inclusively from column
  1382. begcol to column endcol for the input record stream pointed to by
  1383. rp.  The rcgets function does not remove any leading or trailing
  1384. white space, nor does it remove any text delimiter characters.
  1385.  
  1386. If an error occurs, the error indicator for the record stream is set,
  1387. the callback error function is called, and the function returns a pointer
  1388. to an empty string.
  1389.  
  1390. Returns
  1391.  
  1392. The rcgets function returns a pointer to a character array from the input
  1393. record stream pointed to by rp.  If begcol is beyond the end-of-record, the
  1394. error indicator for the record stream is set, and rcgets returns a pointer to
  1395. an empty string.  If the record stream is at end-of-file (eof indicator set),
  1396. rcgets returns a pointer to an empty string.  If a previous error has occurred
  1397. on the record stream that has not been cleared (error indicator set), rcgets
  1398. returns a pointer to an empty string.
  1399.  
  1400.  
  1401. 1.5.11 The rcgett Function
  1402.  
  1403. Synopsis
  1404.  
  1405.      #include <recio.h>
  1406.      time_t rcgett(REC *rp, size_t begcol, size_t endcol);
  1407.  
  1408. Description
  1409.  
  1410. The rcgett function reads a field consisting of one time of type time_t
  1411. contained inclusively from column begcol to column endcol for the input
  1412. record stream pointed to by rp.  Any leading or trailing white space in
  1413. the field is ignored.
  1414.  
  1415. If an error occurs, the error indicator for the record stream is set, the
  1416. callback error function is called, and the function returns (time_t)-1.
  1417.  
  1418. Returns
  1419.  
  1420. The rcgett function returns a time of type time_t.  If an attempt is made to
  1421. read beyond the end-of-record, the error indicator for the record stream is
  1422. set, and rcgett returns (time_t)-1.  If the record stream is at end-of-file
  1423. (end-of-file indicator set), rcgett returns (time_t)-1.  If a previous error
  1424. has occurred on the record stream that has not been cleared (error indicator
  1425. set), rcgett returns (time_t)-1.
  1426.  
  1427.  
  1428. 1.5.12 The rcgettm Function
  1429.  
  1430. Synopsis
  1431.  
  1432.      #include <recio.h>
  1433.      struct tm rcgettm(REC *rp, size_t begcol, size_t endcol);
  1434.  
  1435. Description
  1436.  
  1437. The rcgettm function reads a field consisting of one time of type struct tm
  1438. contained inclusively from column begcol to column endcol for the input
  1439. record stream pointed to by rp.  Any leading or trailing white space in the
  1440. field is ignored.
  1441.  
  1442. If an error occurs, the error indicator for the record stream is set, the
  1443. callback error function is called, and an implementation defined value is
  1444. returned.
  1445.  
  1446. Returns
  1447.  
  1448. The rcgettm function returns a time of type struct tm.  If an attempt is made
  1449. to read beyond the end-of-record, the error indicator for the record stream
  1450. is set, and rcgettm returns an implementation defined value.  If the record
  1451. stream is at end-of-file (end-of-file indicator set), rcgettm returns an
  1452. implementation defined value.  If a previous error has occurred on the
  1453. record stream that has not been cleared (error indicator set), rcgettm
  1454. returns an implementation defined value.
  1455.  
  1456.  
  1457. 1.5.13 The rcgetui Function
  1458.  
  1459. Synopsis
  1460.  
  1461.      #include <recio.h>
  1462.      unsigned int rcgetui(REC *rp, size_t begcol, size_t endcol);
  1463.  
  1464. Description
  1465.  
  1466. The rcgetui function gets one non-negative integral number contained
  1467. inclusively from column begcol to column endcol for the input record
  1468. stream pointed to by rp.  Any leading or trailing white space in the
  1469. field is ignored.
  1470.  
  1471. If an error occurs, the error indicator for the record stream is set,
  1472. the callback error function is called, and the function returns zero.
  1473.  
  1474. Returns
  1475.  
  1476. The rcgetui function returns an unsigned integer from the input record
  1477. stream pointed to by rp.  If begcol is beyond the end-of-record, if the
  1478. field is empty, or if there is an illegal character in the field, the
  1479. error indicator for the record stream is set, and rcgetui returns zero.  If
  1480. the record stream is at end-of-file (end-of-file indicator set), rcgetui
  1481. returns zero.  If a previous error has occurred on the record stream that has
  1482. not been cleared (error indicator set), rcgetui returns zero.
  1483.  
  1484.  
  1485. 1.5.14 The rcgetul Function
  1486.  
  1487. Synopsis
  1488.  
  1489.      #include <recio.h>
  1490.      unsigned long rcgetul(REC *rp, size_t begcol, size_t endcol);
  1491.  
  1492. Description
  1493.  
  1494. The rcgetul function gets one non-negative integral number contained
  1495. inclusively from column begcol to column endcol for the input record
  1496. stream pointed to by rp.  Any leading or trailing white space in the
  1497. field is ignored.
  1498.  
  1499. If an error occurs, the error indicator for the record stream is set,
  1500. the callback error function is called, and the function returns zero (0L).
  1501.  
  1502. Returns
  1503.  
  1504. The rcgetul function returns an unsigned long from the input record stream
  1505. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1506. empty, or if there is an illegal character in the field, the error indicator
  1507. for the record stream is set, and rcgetul returns zero (0L).  If the record
  1508. stream is at end-of-file (end-of-file indicator set), rcgetul returns zero
  1509. (0L).  If a previous error has occurred on the record stream that has not
  1510. been cleared (error indicator set), rcgetul returns zero (0L).
  1511.  
  1512.  
  1513.  
  1514. 1.6 Column Delimited Field Output Functions
  1515.  
  1516. The column delimited field output functions automatically place the number,
  1517. string or character between the specified columns in the output.
  1518.  
  1519.  
  1520. 1.6.1 The rcbputi Function
  1521.  
  1522. Synopsis
  1523.  
  1524.      #include <recio.h>
  1525.      void rcbputi(REC *rp, size_t begcol, size_t endcol, int base,
  1526.                   int number);
  1527.  
  1528. Description
  1529.  
  1530. The rcbputi function writes an integral number in the radix base from column
  1531. begcol to column endcol of the output record stream pointed to by rp.  Base
  1532. may be between 2 to 36.
  1533.  
  1534. If the number is too large to fit between the columns, asterisks are printed
  1535. between the columns and the callback warning function is called.  The
  1536. warning indicator for the record stream is set.
  1537.  
  1538. If an error occurs, the error indicator for the record stream is set and
  1539. the callback error function is called.
  1540.  
  1541. Returns
  1542.  
  1543. The rcbputi function returns no value.
  1544.  
  1545.  
  1546. 1.6.2 The rcbputl Function
  1547.  
  1548. Synopsis
  1549.  
  1550.      #include <recio.h>
  1551.      void rcbputl(REC *rp, size_t begcol, size_t endcol, int base,
  1552.                   long number);
  1553.  
  1554. Description
  1555.  
  1556. The rcbputl function writes an integral number in the radix base from column
  1557. begcol to column endcol of the output record stream pointed to by rp.  Base
  1558. may be between 2 to 36.
  1559.  
  1560. If the number is too large to fit between the columns, asterisks are printed
  1561. between the columns and the callback warning function is called.  The
  1562. warning indicator for the record stream is set.
  1563.  
  1564. If an error occurs, the error indicator for the record stream is set and
  1565. the callback error function is called.
  1566.  
  1567. Returns
  1568.  
  1569. The rcbputl function returns no value.
  1570.  
  1571.  
  1572. 1.6.3 The rcbputui Function
  1573.  
  1574. Synopsis
  1575.  
  1576.      #include <recio.h>
  1577.      void rcbputui(REC *rp, size_t begcol, size_t endcol, int base,
  1578.                    unsigned int number);
  1579.  
  1580. Description
  1581.  
  1582. The rcbputui function writes an unsigned integral number in the radix base
  1583. from column begcol to column endcol of the output record stream pointed to
  1584. by rp.  Base may be between 2 to 36.
  1585.  
  1586. If the number is too large to fit between the columns, asterisks are printed
  1587. between the columns and the callback warning function is called.  The
  1588. warning indicator for the record stream is set.
  1589.  
  1590. If an error occurs, the error indicator for the record stream is set and
  1591. the callback error function is called.
  1592.  
  1593. Returns
  1594.  
  1595. The rcbputui function returns no value.
  1596.  
  1597.  
  1598. 1.6.4 The rcbputul Function
  1599.  
  1600. Synopsis
  1601.  
  1602.      #include <recio.h>
  1603.      void rcbputul(REC *rp, size_t begcol, size_t endcol, int base,
  1604.                    unsigned long number);
  1605.  
  1606. Description
  1607.  
  1608. The rcbputul function writes an unsigned integral number in the radix base
  1609. from column begcol to column endcol of the output record stream pointed to
  1610. by rp.  Base may be between 2 to 36.
  1611.  
  1612. If the number is too large to fit between the columns, asterisks are printed
  1613. between the columns and the callback warning function is called.  The
  1614. warning indicator for the record stream is set.
  1615.  
  1616. If an error occurs, the error indicator for the record stream is set and
  1617. the callback error function is called.
  1618.  
  1619. Returns
  1620.  
  1621. The rcbputul function returns no value.
  1622.  
  1623.  
  1624. 1.6.5 The rcputc Function
  1625.  
  1626. Synopsis
  1627.  
  1628.      #include <recio.h>
  1629.      void rcputc(REC *rp, size_t col, int ch);
  1630.  
  1631. Description
  1632.  
  1633. The rcputc function writes a character ch at column col of the output record
  1634. stream pointed to by rp.
  1635.  
  1636. If an error occurs, the error indicator for the record stream is set and
  1637. the callback error function is called.
  1638.  
  1639. Returns
  1640.  
  1641. The rcputc function returns no value.
  1642.  
  1643.  
  1644. 1.6.6 The rcputd Function
  1645.  
  1646. Synopsis
  1647.  
  1648.      #include <recio.h>
  1649.      void rcputd(REC *rp, size_t begcol, size_t endcol, double number);
  1650.  
  1651. Description
  1652.  
  1653. The rcputd function writes a floating point number from column begcol to
  1654. column endcol of the output record stream pointed to by rp.
  1655.  
  1656. If the number is too large to fit between the columns, asterisks are printed
  1657. between the columns and the callback warning function is called.  The
  1658. warning indicator for the record stream is set.
  1659.  
  1660. If an error occurs, the error indicator for the record stream is set and
  1661. the callback error function is called.
  1662.  
  1663. Returns
  1664.  
  1665. The rcputd function returns no value.
  1666.  
  1667.  
  1668. 1.6.7 The rcputf Function
  1669.  
  1670. Synopsis
  1671.  
  1672.      #include <recio.h>
  1673.      void rcputf(REC *rp, size_t begcol, size_t endcol, float number);
  1674.  
  1675. Description
  1676.  
  1677. The rcputf function writes a floating point number from column begcol to
  1678. column endcol of the output record stream pointed to by rp.
  1679.  
  1680. If the number is too large to fit between the columns, asterisks are printed
  1681. between the columns and the callback warning function is called.  The
  1682. warning indicator for the record stream is set.
  1683.  
  1684. If an error occurs, the error indicator for the record stream is set and
  1685. the callback error function is called.
  1686.  
  1687. Returns
  1688.  
  1689. The rcputf function returns no value.
  1690.  
  1691.  
  1692. 1.6.8 The rcputi Function
  1693.  
  1694. Synopsis
  1695.  
  1696.      #include <recio.h>
  1697.      void rcputi(REC *rp, size_t begcol, size_t endcol, int number);
  1698.  
  1699. Description
  1700.  
  1701. The rcputi function writes an integral number from column begcol to column
  1702. endcol of the output record stream pointed to by rp.
  1703.  
  1704. If the number is too large to fit between the columns, asterisks are printed
  1705. between the columns and the callback warning function is called.  The
  1706. warning indicator for the record stream is set.
  1707.  
  1708. If an error occurs, the error indicator for the record stream is set and
  1709. the callback error function is called.
  1710.  
  1711. Returns
  1712.  
  1713. The rcputi function returns no value.
  1714.  
  1715.  
  1716. 1.6.9 The rcputl Function
  1717.  
  1718. Synopsis
  1719.  
  1720.      #include <recio.h>
  1721.      void rcputl(REC *rp, size_t begcol, size_t endcol, long number);
  1722.  
  1723. Description
  1724.  
  1725. The rcputl function writes an integral number from column begcol to column
  1726. endcol of the output record stream pointed to by rp.
  1727.  
  1728. If the number is too large to fit between the columns, asterisks are printed
  1729. between the columns and the callback warning function is called.  The
  1730. warning indicator for the record stream is set.
  1731.  
  1732. If an error occurs, the error indicator for the record stream is set and
  1733. the callback error function is called.
  1734.  
  1735. Returns
  1736.  
  1737. The rcputl function returns no value.
  1738.  
  1739.  
  1740. 1.6.10 The rcputs Function
  1741.  
  1742. Synopsis
  1743.  
  1744.      #include <recio.h>
  1745.      void rcputs(REC *rp, size_t begcol, size_t endcol, char *string);
  1746.  
  1747. Description
  1748.  
  1749. The rcputs function writes a string of characters from column begcol to
  1750. column endcol of the output record stream pointed to by rp.
  1751.  
  1752. If the string is too large to fit between the columns, a truncated string
  1753. is output and the callback warning function is called.  The warning
  1754. indicator for the record stream is set.
  1755.  
  1756. If an error occurs, the error indicator for the record stream is set and
  1757. the callback error function is called.
  1758.  
  1759. Returns
  1760.  
  1761. The rcputs function returns no value.
  1762.  
  1763.  
  1764. 1.6.11 The rcputt Function
  1765.  
  1766. Synopsis
  1767.  
  1768.      #include <recio.h>
  1769.      void rcputt(REC *rp, size_t begcol, size_t endcol, time_t time);
  1770.  
  1771. Description
  1772.  
  1773. The rcputt function writes the time from column begcol to column endcol
  1774. of the output record stream pointed to by rp.  The format of the time is
  1775. determined by the time format for the record stream.  See section 1.3.16
  1776. on how to set the time format.
  1777.  
  1778. If the time is too large to fit between the columns, asterisks are printed
  1779. between the columns and the callback warning function is called.  The
  1780. warning indicator for the record stream is set.
  1781.  
  1782. If an error occurs, the error indicator for the record stream is set and
  1783. the callback error function is called.
  1784.  
  1785. Returns
  1786.  
  1787. The rcputt function returns no value.
  1788.  
  1789.  
  1790. 1.6.12 The rcputtm Function
  1791.  
  1792. Synopsis
  1793.  
  1794.      #include <recio.h>
  1795.      void rcputtm(REC *rp, size_t begcol, size_t endcol, struct tm t);
  1796.  
  1797. Description
  1798.  
  1799. The rcputtm function writes out the time as specified by the contents of
  1800. struct tm t from column begcol to column endcol of the output record
  1801. stream pointed to by rp.  The format of the time is determined by the
  1802. time format for the record stream.  See section 1.3.16 on how to set the
  1803. time format.
  1804.  
  1805. If the time is too large to fit between the columns, asterisks are printed
  1806. between the columns and the callback warning function is called.  The
  1807. warning indicator for the record stream is set.
  1808.  
  1809. If an error occurs, the error indicator for the record stream is set and
  1810. the callback error function is called.
  1811.  
  1812. Returns
  1813.  
  1814. The rcputtm function returns no value.
  1815.  
  1816.  
  1817. 1.6.13 The rcputui Function
  1818.  
  1819. Synopsis
  1820.  
  1821.      #include <recio.h>
  1822.      void rcputui(REC *rp, size_t begcol, size_t endcol,
  1823.                   unsigned int number);
  1824.  
  1825. Description
  1826.  
  1827. The rcputui function writes an unsigned integral number from column begcol to
  1828. column endcol of the output record stream pointed to by rp.
  1829.  
  1830. If the number is too large to fit between the columns, asterisks are printed
  1831. between the columns and the callback warning function is called.  The
  1832. warning indicator for the record stream is set.
  1833.  
  1834. If an error occurs, the error indicator for the record stream is set and
  1835. the callback error function is called.
  1836.  
  1837. Returns
  1838.  
  1839. The rcputui function returns no value.
  1840.  
  1841.  
  1842. 1.6.14 The rcputul Function
  1843.  
  1844. Synopsis
  1845.  
  1846.      #include <recio.h>
  1847.      void rcputul(REC *rp, size_t begcol, size_t endcol,
  1848.                   unsigned long number);
  1849.  
  1850. Description
  1851.  
  1852. The rcputul function writes an unsigned integral number from column begcol to
  1853. column endcol of the output record stream pointed to by rp.
  1854.  
  1855. If the number is too large to fit between the columns, asterisks are printed
  1856. between the columns and the callback warning function is called.  The
  1857. warning indicator for the record stream is set.
  1858.  
  1859. If an error occurs, the error indicator for the record stream is set and
  1860. the callback error function is called.
  1861.  
  1862. Returns
  1863.  
  1864. The rcputul function returns no value.
  1865.  
  1866.  
  1867.  
  1868. 1.7 Current Position Functions
  1869.  
  1870. 1.7.1 The rbegcolno Function
  1871.  
  1872. Synopsis
  1873.  
  1874.      #include <recio.h>
  1875.      int rbegcolno(REC *rp);
  1876.  
  1877. Description
  1878.  
  1879. The rbegcolno function gets the current setting of the first column number
  1880. in the record for the record stream pointed to by rp.
  1881.  
  1882. Returns
  1883.  
  1884. The rbegcolno function returns 0 if column numbering starts with zero or
  1885. 1 if column numbering starts with one.
  1886.  
  1887.  
  1888. 1.7.2 The rcolno Function
  1889.  
  1890. Synopsis
  1891.  
  1892.      #include <recio.h>
  1893.      size_t rcolno(REC *rp);
  1894.  
  1895. Description
  1896.  
  1897. The rcolno function gets the current column number of the current record
  1898. for the record stream pointed to by rp.
  1899.  
  1900. Returns
  1901.  
  1902. The rcolno function returns the current column number of the current record
  1903. for the record stream pointed to by rp.  The rcolno function returns zero
  1904. prior to the reading of the first record.
  1905.  
  1906.  
  1907. 1.7.3 The rflds Function
  1908.  
  1909. Synopsis
  1910.  
  1911.      #include <recio.h>
  1912.      char *rflds(REC *rp);
  1913.  
  1914. Description
  1915.  
  1916. The rflds function gets a pointer to the field buffer associated with
  1917. the record stream pointed to by rp.  The last field read from the current
  1918. record is stored in the field buffer.  The field is terminated by a
  1919. null character.
  1920.  
  1921. Returns
  1922.  
  1923. The rflds function returns a pointer to the field buffer associated with
  1924. the record stream pointed to by rp.
  1925.  
  1926.  
  1927. 1.7.4 The rfldno Function
  1928.  
  1929. Synopsis
  1930.  
  1931.      #include <recio.h>
  1932.      size_t rfldno(REC *rp);
  1933.  
  1934. Description
  1935.  
  1936. The rfldno function gets the number of fields that have been read from
  1937. the current record for the record stream pointed to by rp.
  1938.  
  1939. Returns
  1940.  
  1941. The rfldno function returns the number of fields that have been read from
  1942. the current record for the record stream pointed to by rp.
  1943.  
  1944.  
  1945. 1.7.5 The rgetfldpos Function
  1946.  
  1947. Synopsis
  1948.  
  1949.      #include <recio.h>
  1950.      void rgetfldpos(REC *rp, rpos_t &pos)
  1951.  
  1952. Description
  1953.  
  1954. The rgetfldpos function stores the current value of the field position
  1955. indicator of the current record for the input stream pointed to by rp
  1956. into the object pointed to by pos.  The value stored contains unspecified
  1957. information usable by the rsetfldpos function to set the field position of
  1958. the current record to the same position as when the rgetfldpos function
  1959. was called.
  1960.  
  1961. If an error occurs, the error indicator for the record stream is set, and
  1962. the callback error function is called.
  1963.  
  1964. Returns
  1965.  
  1966. The rgetfldpos function returns no value.
  1967.  
  1968.  
  1969. 1.7.6 The rnames Function
  1970.  
  1971. Synopsis
  1972.  
  1973.      #include <recio.h>
  1974.      char *rnames(REC *rp);
  1975.  
  1976. Description
  1977.  
  1978. The rnames function gets a pointer to the name of the file associated
  1979. with the record stream pointed to by rp.
  1980.  
  1981. Returns
  1982.  
  1983. The rnames function returns a pointer to the name of the file associated
  1984. with the record stream pointed to by rp.
  1985.  
  1986.  
  1987. 1.7.7 The rgetrec Function
  1988.  
  1989. Synopsis
  1990.  
  1991.      #include <recio.h>
  1992.      char *rgetrec(REC *rp);
  1993.  
  1994. Description
  1995.  
  1996. The rgetrec function gets the next record from the record stream pointed
  1997. to by rp.  The rgetrec function increments the record number, clears the
  1998. field number to zero, resets the column number to rbegcolno(), and returns
  1999. a pointer to the record buffer.
  2000.  
  2001. Record numbering starts at one (1L).  Before the first record in a record
  2002. stream is read into the record buffer, the record number is zero.
  2003.  
  2004. Field numbering starts at one (1).  Before the first field in a record is
  2005. read into the field buffer, the field number is zero.
  2006.  
  2007. Column numbering starts at either zero or one, depending on the setting of
  2008. the rsetbegcolno function.  Column numbering defaults to zero.
  2009.  
  2010. If an error occurs, the error indicator for the record stream is set,
  2011. the callback error function is called, and the rgetrec
  2012. function returns a null pointer.
  2013.  
  2014. If the end-of-file is reached, the end-of-file indicator for the record
  2015. stream is set and the rgetrec function returns a null pointer.
  2016.  
  2017. Returns
  2018.  
  2019. The rgetrec function returns a pointer to the record buffer if the next
  2020. record was successfully read.  A null pointer is returned on either
  2021. error or end-of-file.
  2022.  
  2023.  
  2024. 1.7.8 The rnumfld Function
  2025.  
  2026. Synopsis
  2027.  
  2028.      #include <recio.h>
  2029.      unsigned int rnumfld(REC *rp);
  2030.  
  2031. Description
  2032.  
  2033. The rnumfld function gets the number of fields in the current record for
  2034. the input record stream pointed to by rp.
  2035.  
  2036. If an error occurs, the error indicator for the record stream is set, and
  2037. the callback error function is called.
  2038.  
  2039. Returns
  2040.  
  2041. The rnumfld function returns the number of fields in the current record.
  2042.  
  2043.  
  2044. 1.7.9 The rputrec Function
  2045.  
  2046. Synopsis
  2047.  
  2048.      #include <recio.h>
  2049.      void rputrec(REC *rp);
  2050.  
  2051. Description
  2052.  
  2053. The rputrec function writes the end-of-record newline character to the output
  2054. record stream pointed to by rp.  The rputrec function increments the record
  2055. number, clears the field number to zero, resets the column number to either
  2056. zero or one, depending on the setting of the rsetbegcolno function.
  2057.  
  2058. Record numbering starts at one (1L).  Before the first record in a record
  2059. stream is written, the record number is zero.
  2060.  
  2061. Field numbering starts at one (1).  Before the first field in a record is
  2062. written, the field number is zero.
  2063.  
  2064. Column numbering starts at either zero or one, depending on the setting of
  2065. the rsetbegcolno function.  Column numbering defaults to zero.
  2066.  
  2067. If an error occurs, the error indicator for the record stream is set, and
  2068. the callback error function is called.
  2069.  
  2070. Returns
  2071.  
  2072. The rputrec function returns no value.
  2073.  
  2074.  
  2075. 1.7.10 The rrecs Function
  2076.  
  2077. Synopsis
  2078.  
  2079.      #include <recio.h>
  2080.      char *rrecs(REC *rp);
  2081.  
  2082. Description
  2083.  
  2084. The rrecs function gets a pointer to the record buffer associated with
  2085. the record stream pointed to by rp.  The current record is stored in the
  2086. record buffer.  The record is terminated by a null character.
  2087.  
  2088. Returns
  2089.  
  2090. The rrecs function returns a pointer to the record buffer associated with
  2091. the record stream pointed to by rp.
  2092.  
  2093.  
  2094. 1.7.11 The rrecno Function
  2095.  
  2096. Synopsis
  2097.  
  2098.      #include <recio.h>
  2099.      long rrecno(REC *rp);
  2100.  
  2101. Description
  2102.  
  2103. The rrecno function gets the number of records that have been read from
  2104. the record stream pointed to by rp.
  2105.  
  2106. Returns
  2107.  
  2108. The rrecno function returns the number of records that have been read from
  2109. the record stream pointed to by rp.
  2110.  
  2111.  
  2112. 1.7.12 The rresetrec Function
  2113.  
  2114. Synopsis
  2115.  
  2116.     #include <recio.h>
  2117.     void rresetrec(REC *rp);
  2118.  
  2119. Description
  2120.  
  2121. The rresetrec function resets the internals of the input stream pointed
  2122. to by rp such that the next use of a rget field function reads from the
  2123. beginning of the record buffer.  It has no effect on an output stream.
  2124.  
  2125. Returns
  2126.  
  2127. The rresetrec function returns no value.
  2128.  
  2129.  
  2130. 1.7.13 The rsetbegcolno Function
  2131.  
  2132. Synopsis
  2133.  
  2134.      #include <recio.h>
  2135.      void rsetbegcolno(REC *rp, int colno);
  2136.  
  2137. Description
  2138.  
  2139. The rsetbegcolno function sets the first column number colno for the record
  2140. stream pointed to by rp.  Column numbering can start at either 0 or 1.
  2141.  
  2142. If an error occurs, the error indicator for the record stream is set and
  2143. the callback error function is called.
  2144.  
  2145. Returns
  2146.  
  2147. The rsetbegcolno function returns no value.
  2148.  
  2149.  
  2150. 1.7.14 The rsetbegyr Function
  2151.  
  2152. Synopsis
  2153.  
  2154.     #include <recio.h>
  2155.     void rsetbegyr(int year) 
  2156.  
  2157. Description
  2158.  
  2159. The rsetbegyr function sets the beginning 4-digit year of the range of 
  2160. the 2-digit time format %y (see section 1.3.16).  If not this function 
  2161. is not used, the beginning year is controlled by the value of the constant 
  2162. macro RECBEGYR.
  2163.  
  2164. Returns
  2165.  
  2166. The rsetbegyr function returns no value.
  2167.  
  2168.  
  2169. 1.7.15 The rsetfldpos Function
  2170.  
  2171. Synopsis
  2172.  
  2173.     #include <recio.h>
  2174.     void rsetfldpos(REC *rp, rpos_t &pos);
  2175.  
  2176. Description
  2177.  
  2178. The rsetfldpos function sets the field position indicator of the current
  2179. record of the input stream pointed to by rp according to the value of the
  2180. object pointed to by pos, which is a value obtained from an earlier call
  2181. to the rgetfldpos function on the same stream.  If the record has changed
  2182. since the earlier call to the rgetfldpos function, the behavior of this
  2183. function is implementation dependent.
  2184.  
  2185. If an error occurs, the error indicator for the record stream is set and
  2186. the callback error function is called.
  2187.  
  2188. Returns
  2189.  
  2190. The rsetfldpos function returns no value.
  2191.  
  2192.  
  2193. 1.7.16 The rsetfldstr Function
  2194.  
  2195. Synopsis
  2196.  
  2197.      #include <recio.h>
  2198.      void rsetfldstr(REC *rp, char *s);
  2199.  
  2200. Description
  2201.  
  2202. The rsetfldstr function copies the string s into the field buffer of the
  2203. record stream pointed to by rp.  Any existing string in the field buffer
  2204. is overwritten.  The field buffer size is increased, if necessary, to
  2205. accommodate the string.
  2206.  
  2207. A side effect of using the rsetfldstr function is that the error and
  2208. end-of-file indicators for the record stream are cleared (provided
  2209. rsetfldstr does not create an error).
  2210.  
  2211. If an error occurs, the error indicator for the record stream is set and
  2212. the callback error function is called.
  2213.  
  2214. Returns
  2215.  
  2216. The rsetfldstr function returns no value.
  2217.  
  2218.  
  2219. 1.7.17 The rsetrecstr Function
  2220.  
  2221. Synopsis
  2222.  
  2223.      #include <recio.h>
  2224.      void rsetrecstr(REC *rp, char *s);
  2225.  
  2226. Description
  2227.  
  2228. The rsetrecstr function copies the string s into the record buffer of the
  2229. input record stream pointed to by rp.  Any existing string in the record
  2230. buffer is overwritten.  The record buffer size is increased, if necessary,
  2231. to accommodate the string.  It has no effect on an output stream.
  2232.  
  2233. A side effect of using the rsetrecstr function is that the error and
  2234. end-of-file indicators for the record stream are cleared (provided
  2235. rsetrecstr does not create an error).
  2236.  
  2237. If an error occurs, the error indicator for the record stream is set and
  2238. the callback error function is called.
  2239.  
  2240. Returns
  2241.  
  2242. The rsetrecstr function returns no value.
  2243.  
  2244.  
  2245.  
  2246. 1.8 Error Functions
  2247.  
  2248. 1.8.1 The errno Macro
  2249.  
  2250. Synopsis
  2251.  
  2252.      #include <errno.h>
  2253.  
  2254. Description
  2255.  
  2256. The errno macro "expands to a modifiable lvalue that has type int, the
  2257. value of which is set to a positive error number by several library
  2258. functions." -Section 4.1.3 of ANSI X3.159-1989.
  2259.  
  2260.  
  2261. 1.8.2 The rclearerr Function
  2262.  
  2263. Synopsis
  2264.  
  2265.      #include <recio.h>
  2266.      void rclearerr(REC *rp);
  2267.  
  2268. Description
  2269.  
  2270. The rclearerr function clears the end-of-file and error indicators for
  2271. the record stream pointed to by rp.
  2272.  
  2273. Returns
  2274.  
  2275. The rclearerr function returns no value.
  2276.  
  2277.  
  2278. 1.8.3 The rcxtno Function
  2279.  
  2280. Synopsis
  2281.  
  2282.      #include <recio.h>
  2283.      int rcxtno(REC *rp);
  2284.  
  2285. Description
  2286.  
  2287. The rcxtno function gets the context number from the record stream pointed
  2288. to by rp.  Context numbers can be assigned to a record stream using the
  2289. rsetcxtno function.  A zero context number indicates that the context
  2290. number has not been assigned.  The recin, recout, recerr, and recprn streams
  2291. return the macro values of RECIN, RECOUT, RECERR, and RECPRN respectively.
  2292.  
  2293. Returns
  2294.  
  2295. The rcxtno function returns the context number from the record stream pointed
  2296. to by rp.
  2297.  
  2298.  
  2299. 1.8.4 The reof Function
  2300.  
  2301. Synopsis
  2302.  
  2303.      #include <recio.h>
  2304.      int reof(REC *rp);
  2305.  
  2306. Description
  2307.  
  2308. The reof function tests the end-of-file indicator for the record stream
  2309. pointed to by rp.
  2310.  
  2311. Returns
  2312.  
  2313. The reof function returns nonzero if and only if the end-of-file indicator
  2314. is set for the record stream pointed to by rp.
  2315.  
  2316.  
  2317. 1.8.5 The rerror Function
  2318.  
  2319. Synopsis
  2320.  
  2321.      #include <recio.h>
  2322.      int rerror(REC *rp);
  2323.  
  2324. Description
  2325.  
  2326. The rerror function tests the error indicator for the record stream
  2327. pointed to by rp.
  2328.  
  2329. Returns
  2330.  
  2331. The rerror function returns nonzero if and only if the error indicator
  2332. is set for the record stream pointed to by rp.
  2333.  
  2334.  
  2335. 1.8.6 The rerrstr Function
  2336.  
  2337. Synopsis
  2338.  
  2339.      #include <recio.h>
  2340.      char *rerrstr(REC *rp);
  2341.  
  2342. Description
  2343.  
  2344. The rerrstr function gets the error message for the record stream pointed
  2345. to by rp.  The text of the error message is implementation dependent.
  2346.  
  2347. Returns
  2348.  
  2349. The rerrstr function returns a pointer to a string containing an error
  2350. message.
  2351.  
  2352.  
  2353. 1.8.7 The risvalid Function
  2354.  
  2355. Synopsis
  2356.  
  2357.      #include <recio.h>
  2358.      int risvalid(REC *rp);
  2359.  
  2360. Description
  2361.  
  2362. The risvalid function tests if rp is a valid pointer to a record stream.
  2363.  
  2364. Returns
  2365.  
  2366. The risvalid function returns a nonzero value if and only if rp is a
  2367. valid pointer to an open record stream.
  2368.  
  2369.  
  2370. 1.8.8 The rsetcxtno Function
  2371.  
  2372. Synopsis
  2373.  
  2374.      #include <recio.h>
  2375.      void rsetcxtno(REC *rp, int cxtno);
  2376.  
  2377. Description
  2378.  
  2379. The rsetcxtno function sets the context number cxtno on the record stream
  2380. pointed to by rp.  Assigning a context number allows a file format to be more
  2381. easily identified in the callback error function.  Negative context numbers
  2382. are reserved; a zero context number indicates an that the context has not
  2383. been assigned.  A macro values RECIN, RECOUT, RECERR, and RECPRN are
  2384. preassigned to the recin, recout, recerr, and recprn streams respectively.
  2385.  
  2386.  
  2387. Returns
  2388.  
  2389. The rsetcxtno returns no value.
  2390.  
  2391.  
  2392. 1.8.9 The rseterr Function
  2393.  
  2394. Synopsis
  2395.  
  2396.      #include <recio.h>
  2397.      int rseterr(REC *rp, int errnum);
  2398.  
  2399. Description
  2400.  
  2401. The rseterr function sets the global error number errno to the value of
  2402. errnum if the record stream pointed to by rp is null.  If rp points to
  2403. a valid record stream, the rseterr function sets the error indicator on
  2404. the record stream.  The callback error function is called.  If the record
  2405. stream error indicator is already set on entry to the rseterr function,
  2406. the rseterr function does nothing.
  2407.  
  2408. Returns
  2409.  
  2410. The rseterr function returns the error number.  If the callback error
  2411. function corrects the error and clears the error number, the function
  2412. returns zero.
  2413.  
  2414.  
  2415. 1.8.10 The rseterrfn Function
  2416.  
  2417. Synopsis
  2418.  
  2419.      #include <recio.h>
  2420.      void rseterrfn(void(*rerrfn)(REC *rp));
  2421.  
  2422. Description
  2423.  
  2424. The rseterrfn function registers the callback error function rerrfn for the
  2425. record stream pointed to by rp.
  2426.  
  2427. Returns
  2428.  
  2429. The rseterrfn function returns no value.  The callback error function rerrfn
  2430. returns no value.
  2431.  
  2432.  
  2433. 1.8.11 The rstrerror Function
  2434.  
  2435. Synopsis
  2436.  
  2437.      #include <recio.h>
  2438.      char *rstrerror(int errnum);
  2439.  
  2440. Description
  2441.  
  2442. The rstrerror function maps the error number in errnum to an error
  2443. message string.  The error number and the text of the error message
  2444. are implementation dependent.  (To map errno to an error string, use
  2445. the strerror function.)
  2446.  
  2447. Returns
  2448.  
  2449. The rstrerror function returns a pointer to a string containing an
  2450. error message.
  2451.  
  2452.  
  2453.  
  2454. 1.9 Warning Functions
  2455.  
  2456. 1.9.1 The rclearwarn Function
  2457.  
  2458. Synopsis
  2459.  
  2460.      #include <recio.h>
  2461.      void rclearwarn(REC *rp);
  2462.  
  2463. Description
  2464.  
  2465. The rclearwarn function clears the warning indicator for the record stream
  2466. pointed to by rp.
  2467.  
  2468. Returns
  2469.  
  2470. The rclearwarn function returns no value.
  2471.  
  2472.  
  2473. 1.9.2 The rsetwarn Function
  2474.  
  2475. Synopsis
  2476.  
  2477.      #include <recio.h>
  2478.      int rsetwarn(REC *rp, int warnum);
  2479.  
  2480. Description
  2481.  
  2482. The rsetwarn function sets the warning indicator on the record stream
  2483. pointed to by rp.  The callback warning function is called (if registered).
  2484.  
  2485. Returns
  2486.  
  2487. The rsetwarn function returns the warning number.  If the callback warning
  2488. function modifies the warning number, the function returns the modified
  2489. warning number.
  2490.  
  2491.  
  2492. 1.9.3 The rsetwarnfn Function
  2493.  
  2494. Synopsis
  2495.  
  2496.      #include <recio.h>
  2497.      void rsetwarnfn(void(*rwarnfn)(REC *rp));
  2498.  
  2499. Description
  2500.  
  2501. The rsetwarnfn function registers the callback warning function rwarnfn for
  2502. the record stream pointed to by rp.
  2503.  
  2504. Returns
  2505.  
  2506. The rsetwarnfn function returns no value.  The callback warning function
  2507. rwarnfn returns no value.
  2508.  
  2509.  
  2510. 1.9.4 The rstrwarning Function
  2511.  
  2512. Synopsis
  2513.  
  2514.      #include <recio.h>
  2515.      char *rstrwarning(int warnum);
  2516.  
  2517. Description
  2518.  
  2519. The rstrwarning function maps the warning number warnum to an warning
  2520. message string.  The warning number and the text of the warning message
  2521. are implementation dependent.
  2522.  
  2523. Returns
  2524.  
  2525. The rstrwarning function returns a pointer to a string containing an
  2526. warning message.
  2527.  
  2528.  
  2529. 1.9.5 The rwarning Function
  2530.  
  2531. Synopsis
  2532.  
  2533.      #include <recio.h>
  2534.      int rwarning(REC *rp);
  2535.  
  2536. Description
  2537.  
  2538. The rwarning function tests the warning indicator for the record stream
  2539. pointed to by rp.
  2540.  
  2541. Returns
  2542.  
  2543. The rwarning function returns nonzero if and only if the warning indicator
  2544. is set for the record stream pointed to by rp.
  2545.  
  2546.  
  2547. 1.9.6 The rwarnstr Function
  2548.  
  2549. Synopsis
  2550.  
  2551.      #include <recio.h>
  2552.      char *rwarnstr(REC *rp);
  2553.  
  2554. Description
  2555.  
  2556. The rwarnstr function gets the warning message for the record stream pointed
  2557. to by rp.  The text of the warning message is implementation dependent.
  2558.  
  2559. Returns
  2560.  
  2561. The rwarnstr function returns a pointer to a string containing an warning
  2562. message.
  2563.  
  2564.  
  2565.  
  2566. 2.0 PORTABILITY ISSUES
  2567.  
  2568. The first six characters of this function are common to another function.
  2569. Ref 3.1.2 of ANSI X3.159-1989.  (1.2.1, 1.2.2, 1.2.4, 1.3.3, 1.3.4, 1.3.15,
  2570. 1.5.1-1.5.4, 1.5.11-1.5.14, 1.6.1-1.6.4, 1.6.11-1.6.14, 1.7.16, 1.8.9,
  2571. 1.8.10, 1.9.2, 1.9.3)
  2572.  
  2573. References are not implemented in ANSI X3.159-1989, but are part of C++.
  2574. They can be reasonably simulated in C (for functions that don't have a
  2575. variable number of arguments) by use of a macro that inserts the & into the
  2576. call.  (1.7.5, 1.7.15)
  2577.  
  2578.  
  2579.  
  2580. 3.0 REFERENCES
  2581.  
  2582. 1. ANSI X3.159-1989.  American National Standard for Information Systems -
  2583.    Programming Language - C.  American National Standards Institute,
  2584.    11 West 42nd Street, New York, NY 10036, 1990.
  2585.  
  2586.  
  2587. 4.0 INDEX
  2588.  
  2589. errno macro ............ 1.8.1
  2590. FLDBUFSIZ macro ........ 1.1.3, 1.2.4
  2591. rbegcolno function ..... 1.7.1, 1.7.7
  2592. rbgeti function ........ 1.3.1
  2593. rbgetl function ........ 1.3.2
  2594. rbgetui function ....... 1.3.3
  2595. rbgetul function ....... 1.3.4
  2596. rbputi function ........ 1.4.1
  2597. rbputl function ........ 1.4.2
  2598. rbputui function ....... 1.4.3
  2599. rbputul function ....... 1.4.4
  2600. rcbgeti function ....... 1.5.1
  2601. rcbgetl function ....... 1.5.2
  2602. rcbgetui function ...... 1.5.3
  2603. rcbgetul function ...... 1.5.4
  2604. rcbputi function ....... 1.6.1
  2605. rcbputl function ....... 1.6.2
  2606. rcbputui function ...... 1.6.3
  2607. rcbputul function ...... 1.6.4
  2608. rcgetc function ........ 1.5.5
  2609. rcgetd function ........ 1.5.6
  2610. rcgetf function ........ 1.5.7
  2611. rcgeti function ........ 1.5.8
  2612. rcgetl function ........ 1.5.9
  2613. rcgets function ........ 1.5.10
  2614. rcgett function ........ 1.5.11
  2615. rcgettm function ....... 1.5.12
  2616. rcgetui function ....... 1.5.13
  2617. rcgetul function ....... 1.5.14
  2618. rclearerr function ..... 1.8.2
  2619. rclearwarn function .... 1.9.1
  2620. rclose function ........ 1.2.1
  2621. rcloseall function ..... 1.2.2
  2622. rcolno function ........ 1.7.2
  2623. rcputc function ........ 1.6.5
  2624. rcputd function ........ 1.6.6
  2625. rcputf function ........ 1.6.7
  2626. rcputi function ........ 1.6.8
  2627. rcputl function ........ 1.6.9
  2628. rcputs function ........ 1.6.10
  2629. rcputt function ........ 1.6.11
  2630. rcputtm function ....... 1.6.12
  2631. rcputui function ....... 1.6.13
  2632. rcputul function ....... 1.6.14
  2633. rcxtno function ........ 1.8.3
  2634. REC object ............. 1.1.2
  2635. recin expression ....... 1.1.4
  2636. RECBUFSIZ macro ........ 1.1.3, 1.2.5
  2637. RECFLDCH macro ......... 1.1.3, 1.3.15
  2638. RECTXTCH macro ......... 1.1.3, 1.3.17
  2639. reof function .......... 1.8.4
  2640. rerror function ........ 1.8.5
  2641. rerrstr function ....... 1.8.6
  2642. rflds function ......... 1.7.3
  2643. rfldno function ........ 1.7.4
  2644. rgetc function ......... 1.3.5
  2645. rgetd function ......... 1.3.6
  2646. rgetf function ......... 1.3.7
  2647. rgetfldpos function .... 1.7.5
  2648. rgeti function ......... 1.3.8
  2649. rgetl function ......... 1.3.9
  2650. rgetrec function ....... 1.7.7
  2651. rgets function ......... 1.3.10
  2652. rgett function ......... 1.3.11
  2653. rgettm function ........ 1.3.12
  2654. rgetui function ........ 1.3.13
  2655. rgetul function ........ 1.3.14
  2656. ristxtfld function ..... 1.3.20
  2657. risvalid function ...... 1.8.7
  2658. rnames function ........ 1.7.6
  2659. rnumfld function ....... 1.7.8
  2660. ropen function  ........ 1.2.3
  2661. ROPEN_MAX macro ........ 1.1.3
  2662. rputc function ......... 1.4.5
  2663. rputd function ......... 1.4.6
  2664. rputf function ......... 1.4.7
  2665. rputi function ......... 1.4.8
  2666. rputl function ......... 1.4.9
  2667. rputrec function ....... 1.7.9
  2668. rputs function ......... 1.4.10
  2669. rputt function ......... 1.4.11
  2670. rputtm function ........ 1.4.12
  2671. rputui function ........ 1.4.13
  2672. rputul function ........ 1.4.14
  2673. rrecs function ......... 1.7.10
  2674. rrecno function ........ 1.7.11
  2675. rresetstr function ..... 1.7.12
  2676. rsetbegcolno function .. 1.7.7, 1.7.13
  2677. rsetbegyr .............. 1.7.14
  2678. rsetcxtno function ..... 1.8.8
  2679. rseterr function ....... 1.8.9
  2680. rseterrfn function ..... 1.8.10
  2681. rsetfldch function ..... 1.3.15
  2682. rsetfldpos function .... 1.7.15
  2683. rsetfldsiz function .... 1.2.4
  2684. rsetfldstr function .... 1.7.16
  2685. rsetrecsiz function .... 1.2.5
  2686. rsetrecstr function .... 1.7.17
  2687. rsettmfmt function ..... 1.3.16
  2688. rsettxtch function ..... 1.3.17
  2689. rsetwarn function ...... 1.9.2
  2690. rsetwarnfn function .... 1.9.3
  2691. rskipfld function  ..... 1.3.18
  2692. rskipnfld function ..... 1.3.19
  2693. rstrerror function ..... 1.8.11
  2694. rstrwarning function ... 1.9.4
  2695. rwarning function ...... 1.9.5
  2696. rwarnstr function ...... 1.9.6
  2697.