home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / database / softc210 / headers / dbt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-21  |  2.9 KB  |  125 lines

  1. /*************************************************
  2.  **                                             **
  3.  **   dbt.h                                         **
  4.  **                                             **
  5.  **    Copyright (C) 1988, 1989, 1990, 1991 by  **
  6.  **               SoftC, Ltd.                   **
  7.  **               16820 3rd St NE               **
  8.  **               Ham Lake, MN 55304            **
  9.  **               (612) 434-6968                **
  10.  **                                             **
  11.  **             All rights reserved.            **
  12.  *************************************************/
  13.  
  14.  
  15.  
  16. #ifndef __SOFTC_H__
  17. #include "softc.h"
  18. #endif
  19.  
  20.  
  21.  
  22. /**********
  23.  *
  24.  *  Defines
  25.  *
  26.  **********/
  27.  
  28.  
  29. /* scdtrget, scdtrput definitions */
  30. #define SC_CRUNCHNG 0               /* leave memo buffer unchanged */
  31. #define SC_CRDELETE 0x100           /* delete soft carriage returns */
  32.  
  33.  
  34.  
  35.  
  36.  
  37. /**********
  38.  *
  39.  *  Type Definitions
  40.  *
  41.  **********/
  42.  
  43.  
  44.  
  45.  
  46. typedef struct {  /* dBASE memo file information packet */
  47.   CHAR fname[80]; /* file name */
  48.   CHAR style;     /* file type (dBase3 or dBase4) */
  49.   SC_FLAGS flags; /* miscellaneous flags */
  50. } SC_DBTINFO;
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. #ifdef __cplusplus
  58. extern "C" {
  59. #endif
  60.  
  61.  
  62. /**********
  63.  *
  64.  *  dBase Memo File Manipulator Prototypes
  65.  *
  66.  **********/
  67.  
  68.  
  69.  
  70.  
  71. INT scdtclose(  INT );            /* file handle */
  72.  
  73. INT scdtcreate( CHAR * );         /* filename */
  74.  
  75. INT scdtcreatex(CHAR *,           /* filename */
  76.                 INT,              /* block size in 512 byte blocks */
  77.                 INT );            /* file format (dBASE 3/4) */
  78.  
  79. INT scdthget(   INT );            /* file handle */
  80.  
  81. INT scdtinfo(   INT,              /* file handle */
  82.                 SC_DBTINFO * );   /* file information and status */
  83.  
  84. INT scdtopenx(  INT *,            /* file handle */
  85.                 CHAR *,           /* filename */
  86.                 INT );            /* open mode & characteristics */
  87.  
  88. INT scdtpack(   INT,              /* data file handle */
  89.                 INT *);           /* memo file handle */
  90.  
  91. INT scdtrget(   INT,              /* file handle */
  92.                 LONG,             /* record number */
  93.                                 CHAR F_PTR *,     /* buffer for record number */
  94.                 INT );            /* remove soft carriage returns? */
  95.  
  96. INT scdtrput(   INT,              /* file handle */
  97.                 LONG *,           /* record number */
  98.                                 CHAR F_PTR,       /* buffer for record data */
  99.                 INT );            /* insert soft carriage returns? */
  100.  
  101.  
  102.  
  103.  
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107.  
  108.  
  109.  
  110.  
  111. /**********
  112.  *
  113.  *  Compatibility Definitions
  114.  *
  115.  **********/
  116.  
  117.  
  118.  
  119. #define scdfgett(a,b,c)     scdtrget(a,b,c,SC_CRDELETE)
  120. #define scdfgettx(a,b,c,d)  scdtrget(a,b,c,d)
  121. #define scdfputt(a,b,c)     scdtrput(a,b,c,66)
  122. #define scdfputtx(a,b,c,d)  scdtrput(a,b,c,d)
  123.  
  124. #define scdtopen(a,b)       scdtopenx(a,b,SC_RDWR | SC_FLUSH | SC_EXCLUDE)
  125.