home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cidsam.zip / RFIOE.H < prev    next >
C/C++ Source or Header  |  1993-06-28  |  2KB  |  70 lines

  1.                   /*********************************/
  2.                   /*              NOTE             */
  3.                   /*                               */
  4.                   /* This sample code has been     */
  5.                   /* provided by IBM.  It is not   */
  6.                   /* warranted for any particular  */
  7.                   /* use or purpose.               */
  8.                   /*                               */
  9.                   /* IBM releases this code into   */
  10.                   /* the public domain.  You may   */
  11.                   /* use it, modify it, or         */
  12.                   /* incorporate it into other     */
  13.                   /* products without restriction. */
  14.                   /*********************************/
  15. /* rfioe.h */
  16. /* Include file for users of rfio functions (rfio.obj) */
  17.  
  18. /* This header file defines the rfio externals */
  19.  
  20. #ifndef FILE
  21. #include <stdio.h>
  22. #endif
  23.  
  24. /* Special error codes returned by RF_Open_File */
  25.  
  26. #define RF_BAD_CALL   9998
  27. #define RF_FILE_NOT_FOUND ERROR_FILE_NOT_FOUND
  28.  
  29. /* Return codes that can be returned by RF_Get_Next_Keyword_In_...  */
  30. #define RF0          0
  31. #define RFOOS        1
  32. #define RFEOF        2
  33. #define RFERR        3
  34. #define RFSYNTAX     4
  35.  
  36. /* Value types that can be returned by RF_Get_Next_Keyword_In_... */
  37. #define RFLIST      13
  38. #define RFSTRING     0
  39.  
  40. /* definition of the Response File Handle type */
  41. typedef FILE * RFHANDLE;
  42.  
  43. /* definitions of the Response File Include Stack types */
  44. struct rfis {
  45.               RFHANDLE  rfis_rfh;
  46.               char     *rfis_filename;
  47.               unsigned int rfis_lineno;
  48.               struct rfis *rfis_previous;
  49.               struct rfis *rfis_next;
  50.             };
  51.  
  52. typedef struct rfis RFIS;
  53. typedef RFIS *RFISP;
  54.  
  55. /* DBCS enablement */
  56. /* #define strrchr(a, b) mc_strrchr(a, b) */
  57.  
  58. /* Prototypes for the externalized RF/IO functions */
  59.  
  60. RFHANDLE RF_Open_File(char *filename, RFISP isp, int *rcp);
  61. RFHANDLE RF_Close_File(RFHANDLE current_handle, RFISP isp);
  62. RFISP RF_Create_Root_ISE(void);
  63. char *RF_Get_Current_Filename(RFISP isp);
  64. int RF_Get_Next_Kwd_In_File(RFHANDLE rfh, char **kw, char **val, int *type);
  65. RFHANDLE RF_Get_Current_RFHANDLE(RFISP isp);
  66. int RF_Get_Next_Kwd_In_List(char **start, char **kw, char **val, int *type);
  67. int RF_Get_Next_Wanted_Kwd_In_File(RFHANDLE rfh, char **kwdlist, char **kw,
  68.                                    char **val, int *type);
  69.  
  70.