home *** CD-ROM | disk | FTP | other *** search
File List | 1992-06-02 | 32.8 KB | 894 lines |
-
-
- PAGE 1
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 1 /*
- 2 * TTS libray for Clipper 5.01
- 3 * Brian Connelly
- 4 */
- 5 #include <extend.h>
- 6
- 7
- 8 #include "tts_lib.h" // return codes, etc.
- ***** tts_lib.c(8) : warning C4001: nonstandard extension used - 'single line comment'
- 9
- 10 //>+*************************************************************************
- 11 //>N* TTSIsAvail()
- 12 //>Q* will tell you whether or not TTS is available and enabled
- 13 //>T*
- 14 //>S* Syntax
- 15 //>T* TTSIsAvail() -> iReturn
- 16 //>T*
- 17 //>R* Returns
- 18 //>T* iReturn : 00 not available
- 19 //>T* 01 available
- 20 //>T* 253 disabled
- 21 //>T*
- 22 //>D* Description
- 23 //>T* Simple clipper shell around TTSIsAvailable() call.
- 24 //>T*
- 25 //>W* Written by
- 26 //>T* Brian Connelly
- 27 //>T*
- 28 //>L* Language
- 29 //>T* Assembler
- 30 //>T* C
- 31 //>T*
- 32 //>E* Examples
- 33 //>T* ? TTSIsAvail() //RESULT: 0 {hopefully}
- 34 //>T*
- 35 //>O* See also
- 36 //>T* TTSBegin()
- 37 //>T* TTSEnd()
- 38 //>T* TTSAbort()
- 39 //>T* TTSStatus()
- 40 //>T* TTSGetAppT()
- 41 //>T* TTSSetAppT()
- 42 //>T* TTSGetWksT()
- 43 //>T* TTSSetWksT()
- 44 //>T*
- 45 //>-*************************************************************************
- 46
- 47 CLIPPER ttsisavail (void)
- 48 /* this function will tell you whether TTS is available and/or disabled
- 49 */
- 50 {
- ***** tts_lib.c(50) : warning C4204: 'ttsisavail' : in-line assembler precludes global optimizations
- 51 int rc = 0;
- 52
-
-
- PAGE 2
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 53 _asm {
- 54 mov ah, 0xc7
- 55 mov al, 0x02
- 56 int 0x21
- 57 mov rc, al
- ***** tts_lib.c(57) : warning C4407: operand size conflict
- 58 }
- 59
- 60 _retni( rc );
- 61
- 62 return;
- 63 }
-
-
- ttsisavail Local Symbols
-
- Name Class Type Size Offset Register
-
- rc. . . . . . . . . . . . auto -0002
-
- 64
- 65 //>+*************************************************************************
- 66 //>N* TTSBegin()
- 67 //>Q* Begins an explicit transaction
- 68 //>T*
- 69 //>S* Syntax
- 70 //>T* TTSBegin() -> iReturn
- 71 //>T*
- 72 //>R* Returns
- 73 //>T* iReturn : 00 success
- 74 //>T* 150 out of dynamic worksapce on server
- 75 //>T* 255 explicit transaction already active
- 76 //>T* 254 implicit transaction already active
- 77 //>T*
- 78 //>D* Description
- 79 //>T* Simple clipper shell around TTSBeginTransaction() call.
- 80 //>T* Note: On return code of 255 the explicit transaction will continue
- 81 //>T* normally. On a return code of 254 the implicit transaction will
- 82 //>T* as an explicit transaction. On a return code of 150, you are in some
- 83 //>T* serious trouble.
- 84 //>T*
- 85 //>W* Written by
- 86 //>T* Brian Connelly
- 87 //>T*
- 88 //>L* Language
- 89 //>T* Assembler
- 90 //>T* C
- 91 //>T*
- 92 //>E* Examples
- 93 //>T* ? TTSBegin() //RESULT: 0 {hopefully}
- 94 //>T*
- 95 //>O* See also
- 96 //>T* TTSIsAvail()
- 97 //>T* TTSEnd()
- 98 //>T* TTSAbort()
-
-
- PAGE 3
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 99 //>T* TTSStatus()
- 100 //>T* TTSGetAppT()
- 101 //>T* TTSSetAppT()
- 102 //>T* TTSGetWksT()
- 103 //>T* TTSSetWksT()
- 104 //>T*
- 105 //>-*************************************************************************
- 106
- 107 CLIPPER ttsbegin (void)
- 108 /* this functions notifies Netware to begin tts backups on all tts file
- 109 * output, from this moment on.
- 110 */
- 111 {
- ***** tts_lib.c(111) : warning C4204: 'ttsbegin' : in-line assembler precludes global optimizations
- 112 int rc = 0;
- 113
- 114 _asm {
- 115 mov ah, 0xc7
- 116 mov al, 0x00
- 117 int 0x21
- 118 mov rc, al
- ***** tts_lib.c(118) : warning C4407: operand size conflict
- 119 }
- 120
- 121 _retni( rc );
- 122
- 123 return;
- 124 }
-
-
- ttsbegin Local Symbols
-
- Name Class Type Size Offset Register
-
- rc. . . . . . . . . . . . auto -0002
-
- 125
- 126 //>+*************************************************************************
- 127 //>N* TTSEnd()
- 128 //>Q* Ends an explicit (or implicit) transaction
- 129 //>T*
- 130 //>S* Syntax
- 131 //>T* TTSEnd( @<iTransNumber>) -> iReturn
- 132 //>T*
- 133 //>A* Arguments
- 134 //>T* <iTransNumber> : optional transaction reference number for
- 135 //>T* call to TTSStatus()
- 136 //>T*
- 137 //>R* Returns
- 138 //>T* iReturn : 00 success
- 139 //>T* 255 no explicit transaction active
- 140 //>T* 254 transaction ended, records locked
- 141 //>T* 253 tts is disabled
- 142 //>T* 252 BAD PARAMETERS
-
-
- PAGE 4
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 143 //>T*
- 144 //>D* Description
- 145 //>T* Simple clipper shell around TTSEndTransaction() call.
- 146 //>T* Note: On return code of 254 the transaction was aborted, but the
- 147 //>T* records were left locked, this is only for implicit transactions.
- 148 //>T*
- 149 //>W* Written by
- 150 //>T* Brian Connelly
- 151 //>T*
- 152 //>L* Language
- 153 //>T* Assembler
- 154 //>T* C
- 155 //>T*
- 156 //>E* Examples
- 157 //>T* Local iRef := 0
- 158 //>T* ? TTSEnd( @iRef) //RESULT: 0 {hopefully}
- 159 //>T*
- 160 //>O* See also
- 161 //>T* TTSIsAvail()
- 162 //>T* TTSBegin()
- 163 //>T* TTSAbort()
- 164 //>T* TTSStatus()
- 165 //>T* TTSGetAppT()
- 166 //>T* TTSSetAppT()
- 167 //>T* TTSGetWksT()
- 168 //>T* TTSSetWksT()
- 169 //>T*
- 170 //>-*************************************************************************
- 171
- 172 CLIPPER ttsend (void)
- 173 /* this function notifies Netware to end the current transaction. It will
- 174 * return a completion code as well as a transaction number, that can
- 175 * be used to track when the transaction is actually written.
- 176 */
- 177 {
- ***** tts_lib.c(177) : warning C4204: 'ttsend' : in-line assembler precludes global optimizations
- 178 unsigned ref = 0 , *ref_ptr = &ref;
- 179 int rc;
- 180
- 181 if ( PCOUNT == 1 )
- 182 if ( !ISBYREF(1) || !ISNUM(1) ) {
- 183 _retni( 252 );
- 184 return;
- 185 }
- 186
- 187 _asm {
- 188 mov ah, 0xc7
- 189 mov al, 0x01
- 190 int 0x21
- 191 cmp al, 0
- 192 jne NoRef
- 193 mov ref_ptr[0], cx
- ***** tts_lib.c(193) : warning C4407: operand size conflict
- 194 mov ref_ptr[2], dx
-
-
- PAGE 5
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- ***** tts_lib.c(194) : warning C4407: operand size conflict
- 195 NoRef: mov rc, al
- ***** tts_lib.c(195) : warning C4407: operand size conflict
- 196 }
- 197
- 198 if ( PCOUNT == 1)
- 199 _stornl( (long) ref, 1);
- 200
- 201 _retni( rc );
- 202
- 203 return;
- 204 }
-
-
- ttsend Local Symbols
-
- Name Class Type Size Offset Register
-
- ref . . . . . . . . . . . auto -0008
- rc. . . . . . . . . . . . auto -0006
- ref_ptr . . . . . . . . . auto -0004
-
- 205
- 206 //>+*************************************************************************
- 207 //>N* TTSAbort()
- 208 //>Q* Aborts all transactions.
- 209 //>T*
- 210 //>S* Syntax
- 211 //>T* TTSAbort() -> iReturn
- 212 //>T*
- 213 //>R* Returns
- 214 //>T* iReturn : 00 success
- 215 //>T* 255 no explicit transaction active
- 216 //>T* 254 transaction ends record locked
- 217 //>T* 253 tts is disabled
- 218 //>T*
- 219 //>D* Description
- 220 //>T* Simple clipper shell around TTSAbortTransaction() call.
- 221 //>T* Note: On return code of 254 the transaction was aborted, but the
- 222 //>T* records were left locked, this is only for implicit transactions.
- 223 //>T*
- 224 //>W* Written by
- 225 //>T* Brian Connelly
- 226 //>T*
- 227 //>L* Language
- 228 //>T* Assembler
- 229 //>T* C
- 230 //>T*
- 231 //>E* Examples
- 232 //>T* ? TTSAbort() //RESULT: 0 {hopefully}
- 233 //>T*
- 234 //>O* See also
- 235 //>T* TTSIsAvail()
- 236 //>T* TTSEnd()
-
-
- PAGE 6
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 237 //>T* TTSBegin()
- 238 //>T* TTSStatus()
- 239 //>T* TTSGetAppT()
- 240 //>T* TTSSetAppT()
- 241 //>T* TTSGetWksT()
- 242 //>T* TTSSetWksT()
- 243 //>T*
- 244 //>-*************************************************************************
- 245
- 246 CLIPPER ttsabort (void)
- 247 /* this function aborts all current transactions, implicit or explicit
- 248 */
- 249 {
- ***** tts_lib.c(249) : warning C4204: 'ttsabort' : in-line assembler precludes global optimizations
- 250 int rc = 0;
- 251
- 252 _asm {
- 253 mov ah, 0xc7
- 254 mov al, 0x03
- 255 int 0x21
- 256 mov rc, al
- ***** tts_lib.c(256) : warning C4407: operand size conflict
- 257 }
- 258
- 259 _retni( rc );
- 260
- 261 return;
- 262 }
-
-
- ttsabort Local Symbols
-
- Name Class Type Size Offset Register
-
- rc. . . . . . . . . . . . auto -0002
-
- 263
- 264 //>+*************************************************************************
- 265 //>N* TTSStatus()
- 266 //>Q* Get the status of an ended transaction
- 267 //>T*
- 268 //>S* Syntax
- 269 //>T* TTSAbort( <iTransNumber>) -> iReturn
- 270 //>T*
- 271 //>A* Arguments
- 272 //>T* <iTransNumber> : transaction reference number from
- 273 //>T* call to TTSEnd()
- 274 //>T*
- 275 //>R* Returns
- 276 //>T* iReturn : 00 success
- 277 //>T* 255 transaction not yet written
- 278 //>T* 252 bad parameters
- 279 //>T*
- 280 //>D* Description
-
-
- PAGE 7
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 281 //>T* Simple clipper shell around TTSTransactionStatus() call.
- 282 //>T*
- 283 //>W* Written by
- 284 //>T* Brian Connelly
- 285 //>T*
- 286 //>L* Language
- 287 //>T* Assembler
- 288 //>T* C
- 289 //>T*
- 290 //>E* Examples
- 291 //>T* Local iRef := 0
- 292 //>T* ? TTSEnd( @iRef)
- 293 //>T* ? TTSStatus( iRef) //RESULT: 0 {hopefully}
- 294 //>T*
- 295 //>O* See also
- 296 //>T* TTSIsAvail()
- 297 //>T* TTSBegin()
- 298 //>T* TTSAbort()
- 299 //>T* TTSEnd()
- 300 //>T* TTSGetAppT()
- 301 //>T* TTSSetAppT()
- 302 //>T* TTSGetWksT()
- 303 //>T* TTSSetWksT()
- 304 //>T*
- 305 //>-*************************************************************************
- 306
- 307 CLIPPER ttsstatus (void)
- 308 /* this function tells you whether or not the chosen transaction has been
- 309 * written to disk yet.
- 310 */
- 311 {
- ***** tts_lib.c(311) : warning C4204: 'ttsstatus' : in-line assembler precludes global optimizations
- 312 unsigned ref = 0 , *ref_ptr = &ref;
- 313 int rc = 0;
- 314
- 315 if ( PCOUNT != 1 || !ISNUM(1) ) {
- 316 _retni( 252 );
- 317 return;
- 318 }
- 319
- 320 ref = (unsigned) _parni( 1 );
- 321
- 322 _asm {
- 323 mov ah, 0xc7
- 324 mov al, 0x04
- 325 mov cx, ref_ptr[0]
- ***** tts_lib.c(325) : warning C4407: operand size conflict
- 326 mov dx, ref_ptr[2]
- ***** tts_lib.c(326) : warning C4407: operand size conflict
- 327 int 0x21
- 328 mov rc, al
- ***** tts_lib.c(328) : warning C4407: operand size conflict
-
-
- PAGE 8
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 329 }
- 330
- 331 _retni( rc );
- 332
- 333 return;
- 334 }
-
-
- ttsstatus Local Symbols
-
- Name Class Type Size Offset Register
-
- ref . . . . . . . . . . . auto -0008
- rc. . . . . . . . . . . . auto -0006
- ref_ptr . . . . . . . . . auto -0004
-
- 335
- 336 //>+*************************************************************************
- 337 //>N* TTSGetAppT()
- 338 //>Q* Get the worstation thresholds for implicit transactions
- 339 //>T*
- 340 //>S* Syntax
- 341 //>T* TTSGetAppT( @<iLogLocks>, @<iPhysLocks>) -> iReturn
- 342 //>T*
- 343 //>A* Arguments
- 344 //>T* iLogLocks : Number of logical locks before implicit trans
- 345 //>T* [0 - 255]
- 346 //>T* iPhysLocks : Number of physical locks before implicit trans
- 347 //>T* [0 - 255]
- 348 //>T*
- 349 //>R* Returns
- 350 //>T* iReturn : 00 success
- 351 //>T* 252 bad parameters
- 352 //>T*
- 353 //>D* Description
- 354 //>T* Simple clipper shell around TTSGetApplicationThresholds() call.
- 355 //>T* Default thresholds are 0. A value of 255 disables implicit transactions
- 356 //>T* of that type.
- 357 //>T*
- 358 //>W* Written by
- 359 //>T* Brian Connelly
- 360 //>T*
- 361 //>L* Language
- 362 //>T* Assembler
- 363 //>T* C
- 364 //>T*
- 365 //>E* Examples
- 366 //>T* Local iLogicals, iPhysicals
- 367 //>T* ? TTSGetAppT( @iLogicals, @iPhysicals) //RESULT: 0
- 368 //>T*
- 369 //>O* See also
- 370 //>T* TTSIsAvail()
- 371 //>T* TTSBegin()
- 372 //>T* TTSAbort()
- 373 //>T* TTSEnd()
- 374 //>T* TTSStatus()
-
-
- PAGE 9
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 375 //>T* TTSSetAppT()
- 376 //>T* TTSGetWksT()
- 377 //>T* TTSSetWksT()
- 378 //>T*
- 379 //>-*************************************************************************
- 380
- 381 CLIPPER ttsgetappt (void)
- 382 /* this call returns the physical and logical lock thresholds that will
- 383 * trigger implicit transaction tracking. These thresholds last only the
- 384 * duration of the application and supersede the workstation thresholds.
- 385 */
- 386 {
- ***** tts_lib.c(386) : warning C4204: 'ttsgetappt' : in-line assembler precludes global optimizations
- 387 unsigned char plocks, llocks;
- 388 int rc = 0;
- 389
- 390 if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) || !ISBYREF(1) || !ISBYREF(2) ) {
- 391 _retni( 252 );
- 392 return;
- 393 }
- 394
- 395 _asm {
- 396 mov ah, 0xc7
- 397 mov al, 0x05
- 398 int 0x21
- 399 mov plocks, ch
- 400 mov llocks, cl
- 401 mov rc, al
- ***** tts_lib.c(401) : warning C4407: operand size conflict
- 402 }
- 403
- 404 _storni(1, plocks);
- 405 _storni(2, llocks);
- 406 _retni( rc);
- 407
- 408 return;
- 409 }
-
-
- ttsgetappt Local Symbols
-
- Name Class Type Size Offset Register
-
- plocks. . . . . . . . . . auto -0006
- llocks. . . . . . . . . . auto -0004
- rc. . . . . . . . . . . . auto -0002
-
- 410
- 411 //>+*************************************************************************
- 412 //>N* TTSSetAppT()
- 413 //>Q* Set the worstation thresholds for implicit transactions
- 414 //>T*
- 415 //>S* Syntax
- 416 //>T* TTSGetAppT( <iLogLocks>, <iPhysLocks>) -> iReturn
-
-
- PAGE 10
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 417 //>T*
- 418 //>A* Arguments
- 419 //>T* iLogLocks : Number of logical locks before implicit trans
- 420 //>T* [0 - 255]
- 421 //>T* iPhysLocks : Number of physical locks before implicit trans
- 422 //>T* [0 - 255]
- 423 //>T*
- 424 //>R* Returns
- 425 //>T* iReturn : 00 success
- 426 //>T* 252 bad parameters
- 427 //>T*
- 428 //>D* Description
- 429 //>T* Simple clipper shell around TTSSetApplicationThresholds() call.
- 430 //>T* Default thresholds are 0. A value of 255 disables implicit transactions
- 431 //>T* of that type.
- 432 //>T*
- 433 //>W* Written by
- 434 //>T* Brian Connelly
- 435 //>T*
- 436 //>L* Language
- 437 //>T* Assembler
- 438 //>T* C
- 439 //>T*
- 440 //>E* Examples
- 441 //>T* Local iLogicals := 255, iPhysicals := 255
- 442 //>T* ? TTSSetAppT( iLogicals, iPhysicals) //RESULT: 0
- 443 //>T*
- 444 //>O* See also
- 445 //>T* TTSIsAvail()
- 446 //>T* TTSBegin()
- 447 //>T* TTSAbort()
- 448 //>T* TTSEnd()
- 449 //>T* TTSStatus()
- 450 //>T* TTSGetAppT()
- 451 //>T* TTSGetWksT()
- 452 //>T* TTSSetWksT()
- 453 //>T*
- 454 //>-*************************************************************************
- 455
- 456 CLIPPER ttssetappt (void)
- 457 /* this call is used to set the physical and logical lock thresholds for
- 458 * implicit transaction tracking. These thresholds last only for the
- 459 * duration of the application and supersede the workstation thresholds.
- 460 * Setting a threshold to 0xff disables implict transactions for that kind
- 461 * of lock.
- 462 */
- 463 {
- ***** tts_lib.c(463) : warning C4204: 'ttssetappt' : in-line assembler precludes global optimizations
- 464 unsigned char plocks, llocks;
- 465 int rc = 0;
- 466
- 467 if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) ) {
- 468 _retni( BAD_PARAMS );
- 469 return;
- 470 }
-
-
- PAGE 11
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 471
- 472 _asm {
- 473 mov ah, 0xc7
- 474 mov al, 0x06
- 475 mov ch, plocks
- 476 mov cl, llocks
- 477 int 0x21
- 478 mov rc, al
- ***** tts_lib.c(478) : warning C4407: operand size conflict
- 479 }
- 480
- 481 _retni( rc);
- 482
- 483 return;
- 484 }
-
-
- ttssetappt Local Symbols
-
- Name Class Type Size Offset Register
-
- plocks. . . . . . . . . . auto -0006
- llocks. . . . . . . . . . auto -0004
- rc. . . . . . . . . . . . auto -0002
-
- 485
- 486 //>+*************************************************************************
- 487 //>N* TTSGetWksT()
- 488 //>Q* Get the worstation thresholds for implicit transactions
- 489 //>T*
- 490 //>S* Syntax
- 491 //>T* TTSGetWksT( @<iLogLocks>, @<iPhysLocks>) -> iReturn
- 492 //>T*
- 493 //>A* Arguments
- 494 //>T* iLogLocks : Number of logical locks before implicit trans
- 495 //>T* [0 - 255]
- 496 //>T* iPhysLocks : Number of physical locks before implicit trans
- 497 //>T* [0 - 255]
- 498 //>T*
- 499 //>R* Returns
- 500 //>T* iReturn : 00 success
- 501 //>T* 252 bad parameters
- 502 //>T*
- 503 //>D* Description
- 504 //>T* Simple clipper shell around TTSGetWorkstationThresholds() call.
- 505 //>T* Default thresholds are 0. A value of 255 disables implicit transactions
- 506 //>T* of that type.
- 507 //>T*
- 508 //>W* Written by
- 509 //>T* Brian Connelly
- 510 //>T*
- 511 //>L* Language
- 512 //>T* Assembler
- 513 //>T* C
- 514 //>T*
-
-
- PAGE 12
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 515 //>E* Examples
- 516 //>T* Local iLogicals, iPhysicals
- 517 //>T* ? TTSGetWksT( @iLogicals, @iPhysicals) //RESULT: 0
- 518 //>T*
- 519 //>O* See also
- 520 //>T* TTSIsAvail()
- 521 //>T* TTSBegin()
- 522 //>T* TTSAbort()
- 523 //>T* TTSEnd()
- 524 //>T* TTSStatus()
- 525 //>T* TTSSetAppT()
- 526 //>T* TTSGetAppT()
- 527 //>T* TTSSetWksT()
- 528 //>T*
- 529 //>-*************************************************************************
- 530
- 531 CLIPPER ttsgetwkst (void)
- 532 /* this call returns the physical and logical lock thresholds that will
- 533 * trigger implicit transaction tracking. These thresholds last until reset.
- 534 * These values are used as the default for applications that don't set
- 535 * their own thresholds.
- 536 */
- 537 {
- ***** tts_lib.c(537) : warning C4204: 'ttsgetwkst' : in-line assembler precludes global optimizations
- 538 unsigned char plocks, llocks;
- 539 int rc = 0;
- 540
- 541 if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) || !ISBYREF(1) || !ISBYREF(2) ) {
- 542 _retni( BAD_PARAMS );
- 543 return;
- 544 }
- 545
- 546 _asm {
- 547 mov ah, 0xc7
- 548 mov al, 0x07
- 549 int 0x21
- 550 mov plocks, ch
- 551 mov llocks, cl
- 552 mov rc, al
- ***** tts_lib.c(552) : warning C4407: operand size conflict
- 553 }
- 554
- 555 _storni(1, plocks);
- 556 _storni(2, llocks);
- 557
- 558 _retni( rc);
- 559
- 560 return;
- 561 }
-
-
-
- PAGE 13
- 06-02-92
- 15:38:16
-
- Microsoft C Compiler Version 6.00A
-
- ttsgetwkst Local Symbols
-
- Name Class Type Size Offset Register
-
- plocks. . . . . . . . . . auto -0006
- llocks. . . . . . . . . . auto -0004
- rc. . . . . . . . . . . . auto -0002
-
- 562
- 563 //>+*************************************************************************
- 564 //>N* TTSSetWksT()
- 565 //>Q* Set the worstation thresholds for implicit transactions
- 566 //>T*
- 567 //>S* Syntax
- 568 //>T* TTSSetWksT( <iLogLocks>, <iPhysLocks>) -> iReturn
- 569 //>T*
- 570 //>A* Arguments
- 571 //>T* iLogLocks : Number of logical locks before implicit trans
- 572 //>T* [0 - 255]
- 573 //>T* iPhysLocks : Number of physical locks before implicit trans
- 574 //>T* [0 - 255]
- 575 //>T*
- 576 //>R* Returns
- 577 //>T* iReturn : 00 success
- 578 //>T* 252 bad parameters
- 579 //>T*
- 580 //>D* Description
- 581 //>T* Simple clipper shell around TTSSetWorkstationThresholds() call.
- 582 //>T* Default thresholds are 0. A value of 255 disables implicit transactions
- 583 //>T* of that type.
- 584 //>T*
- 585 //>W* Written by
- 586 //>T* Brian Connelly
- 587 //>T*
- 588 //>L* Language
- 589 //>T* Assembler
- 590 //>T* C
- 591 //>T*
- 592 //>E* Examples
- 593 //>T* Local iLogicals := 255, iPhysicals := 255
- 594 //>T* ? TTSSetWksT( iLogicals, iPhysicals) //RESULT: 0
- 595 //>T*
- 596 //>O* See also
- 597 //>T* TTSIsAvail()
- 598 //>T* TTSBegin()
- 599 //>T* TTSAbort()
- 600 //>T* TTSEnd()
- 601 //>T* TTSStatus()
- 602 //>T* TTSGetAppT()
- 603 //>T* TTSGetWksT()
- 604 //>T* TTSSetAppT()
- 605 //>T*
- 606 //>-*************************************************************************
- 607
- 608 CLIPPER ttssetwkst (void)
- 609 /* this call sets the physical and logical lock thresholds that will
-
-
- PAGE 14
- 06-02-92
- 15:38:16
-
- Line# Source Line Microsoft C Compiler Version 6.00A
-
- 610 * trigger implicit transaction tracking. These thresholds last until reset.
- 611 * These values are used as the default for applications that don't set
- 612 * their own thresholds.
- 613 * Setting a threshold to 0xff disables implict transactions for that kind
- 614 * of lock.
- 615 */
- 616 {
- ***** tts_lib.c(616) : warning C4204: 'ttssetwkst' : in-line assembler precludes global optimizations
- 617 unsigned char plocks, llocks;
- 618 int rc = 0;
- 619
- 620 if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) ) {
- 621 _retni( 252 );
- 622 return;
- 623 }
- 624
- 625 _asm {
- 626 mov ah, 0xc7
- 627 mov al, 0x08
- 628 mov ch, plocks
- 629 mov cl, llocks
- 630 int 0x21
- 631 mov rc, al
- ***** tts_lib.c(631) : warning C4407: operand size conflict
- 632 }
- 633
- 634 _retni( rc);
- 635
- 636 return;
- 637 }
-
-
- ttssetwkst Local Symbols
-
- Name Class Type Size Offset Register
-
- plocks. . . . . . . . . . auto -0006
- llocks. . . . . . . . . . auto -0004
- rc. . . . . . . . . . . . auto -0002
-
-
- Global Symbols
-
- Name Class Type Size Offset
-
- _parinfo. . . . . . . . . extern far function *** ***
- _parni. . . . . . . . . . extern far function *** ***
- _retni. . . . . . . . . . extern far function *** ***
- _storni . . . . . . . . . extern far function *** ***
- _stornl . . . . . . . . . extern far function *** ***
- ttsabort. . . . . . . . . global far function *** 00cc
- ttsbegin. . . . . . . . . global far function *** 0020
- ttsend. . . . . . . . . . global far function *** 0040
- ttsgetappt. . . . . . . . global far function *** 0156
-
-
- PAGE 15
- 06-02-92
- 15:38:16
-
- Microsoft C Compiler Version 6.00A
-
-
- Global Symbols
-
- Name Class Type Size Offset
-
- ttsgetwkst. . . . . . . . global far function *** 0256
- ttsisavail. . . . . . . . global far function *** 0000
- ttssetappt. . . . . . . . global far function *** 01f8
- ttssetwkst. . . . . . . . global far function *** 02f8
- ttsstatus . . . . . . . . global far function *** 00ec
-
- Code size = 0356 (854)
- Data size = 0000 (0)
- Bss size = 0000 (0)
-
- No errors detected
-