Tang Cheng | 37650ea | 2014-10-20 16:14:41 +0800 | [diff] [blame^] | 1 | /* Copyright (c) 1991, 2005, Oracle. All rights reserved. */ |
| 2 | /* |
| 3 | NAME |
| 4 | ocikpr.h - header of K & R compilers |
| 5 | MODIFIED (MM/DD/YY) |
| 6 | mbastawa 09/16/05 - dbhygiene |
| 7 | porangas 12/04/00 - Forward merge bug#974710 to 9i |
| 8 | sgollapu 05/19/98 - Change text to OraText |
| 9 | dchatter 04/21/96 - |
| 10 | dchatter 11/10/95 - add ognfd() - get native fd |
| 11 | lchidamb 04/06/95 - drop maxdsz from obindps/odefinps |
| 12 | slari 04/07/95 - add opinit |
| 13 | dchatter 03/08/95 - osetpi and ogetpi |
| 14 | lchidamb 12/09/94 - add obindps() and odefinps() |
| 15 | dchatter 03/06/95 - merge changes from branch 1.1.720.2 |
| 16 | dchatter 11/14/94 - merge changes from branch 1.1.720.1 |
| 17 | dchatter 02/08/95 - olog call; drop onblon |
| 18 | dchatter 10/31/94 - new functions for non-blocking oci |
| 19 | rkooi2 11/27/92 - Changing datatypes (in comments) and return types |
| 20 | rkooi2 10/26/92 - More portability mods |
| 21 | rkooi2 10/18/92 - Changed to agree with oci.c |
| 22 | sjain 03/16/92 - Creation |
| 23 | */ |
| 24 | |
| 25 | /* |
| 26 | * Declare the OCI functions. |
| 27 | * Prototype information is commented out. |
| 28 | * Use this header for non-ANSI C compilers. |
| 29 | * Note that you will need to include ocidfn.h in the .c files |
| 30 | * to get the definition for cda_def. |
| 31 | */ |
| 32 | |
| 33 | #ifndef OCIKPR |
| 34 | #define OCIKPR |
| 35 | |
| 36 | #include <oratypes.h> |
| 37 | |
| 38 | /* |
| 39 | * Oci BIND (Piecewise or with Skips) |
| 40 | */ |
| 41 | sword obindps( struct cda_def *cursor, ub1 opcode, OraText *sqlvar, |
| 42 | sb4 sqlvl, ub1 *pvctx, sb4 progvl, |
| 43 | sword ftype, sword scale, |
| 44 | sb2 *indp, ub2 *alen, ub2 *arcode, |
| 45 | sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip, |
| 46 | ub4 maxsiz, ub4 *cursiz, |
| 47 | OraText *fmt, sb4 fmtl, sword fmtt ); |
| 48 | sword obreak( struct cda_def *lda ); |
| 49 | sword ocan ( struct cda_def *cursor ); |
| 50 | sword oclose( struct cda_def *cursor ); |
| 51 | sword ocof ( struct cda_def *lda ); |
| 52 | sword ocom ( struct cda_def *lda ); |
| 53 | sword ocon ( struct cda_def *lda ); |
| 54 | |
| 55 | |
| 56 | /* |
| 57 | * Oci DEFINe (Piecewise or with Skips) |
| 58 | */ |
| 59 | sword odefinps( struct cda_def *cursor, ub1 opcode, sword pos,ub1 *bufctx, |
| 60 | sb4 bufl, sword ftype, sword scale, |
| 61 | sb2 *indp, OraText *fmt, sb4 fmtl, sword fmtt, |
| 62 | ub2 *rlen, ub2 *rcode, |
| 63 | sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip ); |
| 64 | sword odescr( struct cda_def *cursor, sword pos, sb4 *dbsize, |
| 65 | sb2 *dbtype, sb1 *cbuf, sb4 *cbufl, sb4 *dsize, |
| 66 | sb2 *prec, sb2 *scale, sb2 *nullok ); |
| 67 | sword odessp( struct cda_def *cursor, OraText *objnam, size_t onlen, |
| 68 | ub1 *rsv1, size_t rsv1ln, ub1 *rsv2, size_t rsv2ln, |
| 69 | ub2 *ovrld, ub2 *pos, ub2 *level, OraText **argnam, |
| 70 | ub2 *arnlen, ub2 *dtype, ub1 *defsup, ub1* mode, |
| 71 | ub4 *dtsiz, sb2 *prec, sb2 *scale, ub1 *radix, |
| 72 | ub4 *spare, ub4 *arrsiz ); |
| 73 | sword oerhms( struct cda_def *lda, sb2 rcode, OraText *buf, |
| 74 | sword bufsiz ); |
| 75 | sword oermsg( sb2 rcode, OraText *buf ); |
| 76 | sword oexec ( struct cda_def *cursor ); |
| 77 | sword oexfet( struct cda_def *cursor, ub4 nrows, |
| 78 | sword cancel, sword exact ); |
| 79 | sword oexn ( struct cda_def *cursor, sword iters, sword rowoff ); |
| 80 | sword ofen ( struct cda_def *cursor, sword nrows ); |
| 81 | sword ofetch( struct cda_def *cursor ); |
| 82 | sword oflng ( struct cda_def *cursor, sword pos, ub1 *buf, |
| 83 | sb4 bufl, sword dtype, ub4 *retl, sb4 offset ); |
| 84 | sword ogetpi( struct cda_def *cursor, ub1 *piecep, void **ctxpp, |
| 85 | ub4 *iterp, ub4 *indexp ); |
| 86 | sword opinit( ub4 mode ); |
| 87 | sword olog ( struct cda_def *lda, ub1 *hst, |
| 88 | OraText *uid, sword uidl, |
| 89 | OraText *psw, sword pswl, |
| 90 | OraText *conn, sword connl, |
| 91 | ub4 mode ); |
| 92 | sword ologof( struct cda_def *lda ); |
| 93 | sword oopen ( struct cda_def *cursor, struct cda_def *lda, |
| 94 | OraText *dbn, sword dbnl, sword arsize, |
| 95 | OraText *uid, sword uidl ); |
| 96 | sword oopt ( struct cda_def *cursor, sword rbopt, sword waitopt ); |
| 97 | sword oparse( struct cda_def *cursor, OraText *sqlstm, sb4 sqllen, |
| 98 | sword defflg, ub4 lngflg ); |
| 99 | sword orol ( struct cda_def *lda ); |
| 100 | sword osetpi( struct cda_def *cursor, ub1 piece, void *bufp, |
| 101 | ub4 *lenp ); |
| 102 | void sqlld2 ( struct cda_def *lda, OraText *cname, sb4 *cnlen ); |
| 103 | void sqllda ( struct cda_def *lda ); |
| 104 | |
| 105 | /* non-blocking functions */ |
| 106 | sword onbset( struct cda_def *lda ); |
| 107 | sword onbtst( struct cda_def *lda ); |
| 108 | sword onbclr( struct cda_def *lda ); |
| 109 | sword ognfd ( struct cda_def *lda, void *fdp ); |
| 110 | |
| 111 | |
| 112 | |
| 113 | /* |
| 114 | * OBSOLETE FUNCTIONS |
| 115 | */ |
| 116 | |
| 117 | /* |
| 118 | * OBSOLETE BIND CALLS-- use obindps() |
| 119 | */ |
| 120 | sword obndra( struct cda_def *cursor, OraText *sqlvar, sword sqlvl, |
| 121 | ub1 *progv, sword progvl, sword ftype, sword scale, |
| 122 | sb2 *indp, ub2 *alen, ub2 *arcode, ub4 maxsiz, |
| 123 | ub4 *cursiz, OraText *fmt, sword fmtl, sword fmtt ); |
| 124 | sword obndrn( struct cda_def *cursor, sword sqlvn, ub1 *progv, |
| 125 | sword progvl, sword ftype, sword scale, sb2 *indp, |
| 126 | OraText *fmt, sword fmtl, sword fmtt ); |
| 127 | sword obndrv( struct cda_def *cursor, OraText *sqlvar, sword sqlvl, |
| 128 | ub1 *progv, sword progvl, sword ftype, sword scale, |
| 129 | sb2 *indp, OraText *fmt, sword fmtl, sword fmtt ); |
| 130 | |
| 131 | /* |
| 132 | * OBSOLETE DEFINE CALLS-- use odefinps() |
| 133 | */ |
| 134 | sword odefin( struct cda_def *cursor, sword pos, ub1 *buf, |
| 135 | sword bufl, sword ftype, sword scale, sb2 *indp, |
| 136 | OraText *fmt, sword fmtl, sword fmtt, ub2 *rlen, |
| 137 | ub2 *rcode ); |
| 138 | |
| 139 | |
| 140 | /* older calls ; preferred equivalent calls above */ |
| 141 | sword odsc ( struct cda_def *cursor, sword pos, sb2 *dbsize, |
| 142 | sb2 *fsize, sb2 *rcode, sb2 *dtype, sb1 *buf, |
| 143 | sb2 *bufl, sb2 *dsize ); |
| 144 | sword oname ( struct cda_def *cursor, sword pos, sb1 *tbuf, |
| 145 | sb2 *tbufl, sb1 *buf, sb2 *bufl ); |
| 146 | sword olon ( struct cda_def *lda, OraText *uid, sword uidl, |
| 147 | OraText *pswd, sword pswdl, sword audit ); |
| 148 | sword orlon ( struct cda_def *lda, ub1 *hda, OraText *uid, |
| 149 | sword uidl, OraText *pswd, sword pswdl, sword audit ); |
| 150 | sword osql3 ( struct cda_def *cda, OraText *sqlstm, sword sqllen ); |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | #endif /* OCIKPR */ |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |