home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / clipper / tts / tts_lib.lst < prev    next >
Encoding:
File List  |  1992-06-02  |  32.8 KB  |  894 lines

  1.  
  2.  
  3.                                                                                                                             PAGE   1
  4.                                                                                                                             06-02-92
  5.                                                                                                                             15:38:16
  6.  
  7.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  8.  
  9.       1 /*
  10.       2 * TTS libray for Clipper 5.01
  11.       3 *   Brian Connelly
  12.       4 */
  13.       5 #include <extend.h>
  14.       6 
  15.       7 
  16.       8 #include "tts_lib.h"    // return codes, etc.
  17. ***** tts_lib.c(8) : warning C4001: nonstandard extension used - 'single line comment'
  18.       9 
  19.      10 //>+*************************************************************************
  20.      11 //>N*    TTSIsAvail()
  21.      12 //>Q*    will tell you whether or not TTS is available and enabled
  22.      13 //>T*
  23.      14 //>S* Syntax
  24.      15 //>T*    TTSIsAvail()    ->    iReturn
  25.      16 //>T*
  26.      17 //>R* Returns
  27.      18 //>T*    iReturn :        00    not available
  28.      19 //>T*                01    available
  29.      20 //>T*                253 disabled
  30.      21 //>T*
  31.      22 //>D* Description
  32.      23 //>T*    Simple clipper shell around TTSIsAvailable() call.
  33.      24 //>T*
  34.      25 //>W* Written by
  35.      26 //>T*    Brian Connelly
  36.      27 //>T*
  37.      28 //>L* Language
  38.      29 //>T*        Assembler
  39.      30 //>T*        C
  40.      31 //>T*
  41.      32 //>E* Examples
  42.      33 //>T*        ? TTSIsAvail()        //RESULT: 0 {hopefully}
  43.      34 //>T*
  44.      35 //>O* See also
  45.      36 //>T*    TTSBegin()
  46.      37 //>T*    TTSEnd()
  47.      38 //>T*    TTSAbort()
  48.      39 //>T*    TTSStatus()
  49.      40 //>T*    TTSGetAppT()
  50.      41 //>T*    TTSSetAppT()
  51.      42 //>T*    TTSGetWksT()
  52.      43 //>T*    TTSSetWksT()
  53.      44 //>T*
  54.      45 //>-*************************************************************************
  55.      46 
  56.      47 CLIPPER ttsisavail (void)
  57.      48 /* this function will tell you whether TTS is available and/or disabled
  58.      49 */
  59.      50 {
  60. ***** tts_lib.c(50) : warning C4204: 'ttsisavail' : in-line assembler precludes global optimizations
  61.      51     int rc = 0;
  62.      52 
  63.  
  64.  
  65.                                                                                                                             PAGE   2
  66.                                                                                                                             06-02-92
  67.                                                                                                                             15:38:16
  68.  
  69.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  70.  
  71.      53     _asm {
  72.      54     mov ah, 0xc7
  73.      55     mov al, 0x02
  74.      56     int 0x21
  75.      57     mov rc, al
  76. ***** tts_lib.c(57) : warning C4407: operand size conflict
  77.      58     }
  78.      59 
  79.      60     _retni( rc );
  80.      61 
  81.      62 return;
  82.      63 }
  83.  
  84.  
  85. ttsisavail  Local Symbols
  86.  
  87. Name                      Class   Type              Size   Offset  Register
  88.  
  89. rc. . . . . . . . . . . . auto                             -0002 
  90.  
  91.      64 
  92.      65 //>+*************************************************************************
  93.      66 //>N*    TTSBegin()
  94.      67 //>Q*    Begins an explicit transaction
  95.      68 //>T*
  96.      69 //>S* Syntax
  97.      70 //>T*    TTSBegin()    ->    iReturn
  98.      71 //>T*
  99.      72 //>R* Returns
  100.      73 //>T*    iReturn :        00    success
  101.      74 //>T*                150 out of dynamic worksapce on server
  102.      75 //>T*                255 explicit transaction already active
  103.      76 //>T*                254 implicit transaction already active
  104.      77 //>T*
  105.      78 //>D* Description
  106.      79 //>T*        Simple clipper shell around TTSBeginTransaction() call.
  107.      80 //>T*    Note: On return code of 255 the explicit transaction will continue
  108.      81 //>T*    normally. On a return code of 254 the implicit transaction will
  109.      82 //>T*    as an explicit transaction. On a return code of 150, you are in some
  110.      83 //>T*    serious trouble.
  111.      84 //>T*
  112.      85 //>W* Written by
  113.      86 //>T*    Brian Connelly
  114.      87 //>T*
  115.      88 //>L* Language
  116.      89 //>T*        Assembler
  117.      90 //>T*        C
  118.      91 //>T*
  119.      92 //>E* Examples
  120.      93 //>T*        ? TTSBegin()        //RESULT: 0 {hopefully}
  121.      94 //>T*
  122.      95 //>O* See also
  123.      96 //>T*    TTSIsAvail()
  124.      97 //>T*    TTSEnd()
  125.      98 //>T*    TTSAbort()
  126.  
  127.  
  128.                                                                                                                             PAGE   3
  129.                                                                                                                             06-02-92
  130.                                                                                                                             15:38:16
  131.  
  132.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  133.  
  134.      99 //>T*    TTSStatus()
  135.     100 //>T*    TTSGetAppT()
  136.     101 //>T*    TTSSetAppT()
  137.     102 //>T*    TTSGetWksT()
  138.     103 //>T*    TTSSetWksT()
  139.     104 //>T*
  140.     105 //>-*************************************************************************
  141.     106 
  142.     107 CLIPPER ttsbegin (void)
  143.     108 /* this functions notifies Netware to begin tts backups on all tts file
  144.     109 *   output, from this moment on.
  145.     110 */
  146.     111 {
  147. ***** tts_lib.c(111) : warning C4204: 'ttsbegin' : in-line assembler precludes global optimizations
  148.     112     int rc = 0;
  149.     113 
  150.     114     _asm {
  151.     115     mov ah, 0xc7
  152.     116     mov al, 0x00
  153.     117     int 0x21
  154.     118     mov rc, al
  155. ***** tts_lib.c(118) : warning C4407: operand size conflict
  156.     119     }
  157.     120 
  158.     121     _retni( rc );
  159.     122 
  160.     123 return;
  161.     124 }
  162.  
  163.  
  164. ttsbegin  Local Symbols
  165.  
  166. Name                      Class   Type              Size   Offset  Register
  167.  
  168. rc. . . . . . . . . . . . auto                             -0002 
  169.  
  170.     125 
  171.     126 //>+*************************************************************************
  172.     127 //>N*    TTSEnd()
  173.     128 //>Q*    Ends an explicit (or implicit) transaction
  174.     129 //>T*
  175.     130 //>S* Syntax
  176.     131 //>T*    TTSEnd( @<iTransNumber>)    ->    iReturn
  177.     132 //>T*
  178.     133 //>A* Arguments
  179.     134 //>T*    <iTransNumber>        : optional transaction reference number for
  180.     135 //>T*                call to TTSStatus()
  181.     136 //>T*
  182.     137 //>R* Returns
  183.     138 //>T*    iReturn :        00    success
  184.     139 //>T*                255 no explicit transaction active
  185.     140 //>T*                254 transaction ended, records locked
  186.     141 //>T*                253 tts is disabled
  187.     142 //>T*                252 BAD PARAMETERS
  188.  
  189.  
  190.                                                                                                                             PAGE   4
  191.                                                                                                                             06-02-92
  192.                                                                                                                             15:38:16
  193.  
  194.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  195.  
  196.     143 //>T*
  197.     144 //>D* Description
  198.     145 //>T*        Simple clipper shell around TTSEndTransaction() call.
  199.     146 //>T*    Note: On return code of 254 the transaction was aborted, but the
  200.     147 //>T*    records were left locked, this is only for implicit transactions.
  201.     148 //>T*
  202.     149 //>W* Written by
  203.     150 //>T*    Brian Connelly
  204.     151 //>T*
  205.     152 //>L* Language
  206.     153 //>T*        Assembler
  207.     154 //>T*        C
  208.     155 //>T*
  209.     156 //>E* Examples
  210.     157 //>T*        Local iRef := 0
  211.     158 //>T*        ? TTSEnd( @iRef)        //RESULT: 0 {hopefully}
  212.     159 //>T*
  213.     160 //>O* See also
  214.     161 //>T*    TTSIsAvail()
  215.     162 //>T*    TTSBegin()
  216.     163 //>T*    TTSAbort()
  217.     164 //>T*    TTSStatus()
  218.     165 //>T*    TTSGetAppT()
  219.     166 //>T*    TTSSetAppT()
  220.     167 //>T*    TTSGetWksT()
  221.     168 //>T*    TTSSetWksT()
  222.     169 //>T*
  223.     170 //>-*************************************************************************
  224.     171 
  225.     172 CLIPPER ttsend (void)
  226.     173 /* this function notifies Netware to end the current transaction. It will
  227.     174 *   return a completion code as well as a transaction number, that can
  228.     175 *   be used to track when the transaction is actually written.
  229.     176 */
  230.     177 {
  231. ***** tts_lib.c(177) : warning C4204: 'ttsend' : in-line assembler precludes global optimizations
  232.     178     unsigned    ref = 0 , *ref_ptr = &ref;
  233.     179     int rc;
  234.     180 
  235.     181     if ( PCOUNT == 1 )
  236.     182     if ( !ISBYREF(1) || !ISNUM(1) ) {
  237.     183         _retni( 252 );
  238.     184         return;
  239.     185     }
  240.     186 
  241.     187     _asm {
  242.     188     mov ah, 0xc7
  243.     189     mov al, 0x01
  244.     190     int 0x21
  245.     191     cmp al, 0
  246.     192     jne NoRef
  247.     193     mov ref_ptr[0], cx
  248. ***** tts_lib.c(193) : warning C4407: operand size conflict
  249.     194     mov ref_ptr[2], dx
  250.  
  251.  
  252.                                                                                                                             PAGE   5
  253.                                                                                                                             06-02-92
  254.                                                                                                                             15:38:16
  255.  
  256.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  257.  
  258. ***** tts_lib.c(194) : warning C4407: operand size conflict
  259.     195 NoRef:    mov rc, al
  260. ***** tts_lib.c(195) : warning C4407: operand size conflict
  261.     196     }
  262.     197 
  263.     198     if ( PCOUNT == 1)
  264.     199     _stornl( (long) ref, 1);
  265.     200 
  266.     201     _retni( rc );
  267.     202 
  268.     203 return;
  269.     204 }
  270.  
  271.  
  272. ttsend  Local Symbols
  273.  
  274. Name                      Class   Type              Size   Offset  Register
  275.  
  276. ref . . . . . . . . . . . auto                             -0008 
  277. rc. . . . . . . . . . . . auto                             -0006 
  278. ref_ptr . . . . . . . . . auto                             -0004 
  279.  
  280.     205 
  281.     206 //>+*************************************************************************
  282.     207 //>N*    TTSAbort()
  283.     208 //>Q*    Aborts all transactions.
  284.     209 //>T*
  285.     210 //>S* Syntax
  286.     211 //>T*    TTSAbort()    ->    iReturn
  287.     212 //>T*
  288.     213 //>R* Returns
  289.     214 //>T*    iReturn :        00    success
  290.     215 //>T*                255 no explicit transaction active
  291.     216 //>T*                254 transaction ends record locked
  292.     217 //>T*                253 tts is disabled
  293.     218 //>T*
  294.     219 //>D* Description
  295.     220 //>T*        Simple clipper shell around TTSAbortTransaction() call.
  296.     221 //>T*    Note: On return code of 254 the transaction was aborted, but the
  297.     222 //>T*    records were left locked, this is only for implicit transactions.
  298.     223 //>T*
  299.     224 //>W* Written by
  300.     225 //>T*    Brian Connelly
  301.     226 //>T*
  302.     227 //>L* Language
  303.     228 //>T*        Assembler
  304.     229 //>T*        C
  305.     230 //>T*
  306.     231 //>E* Examples
  307.     232 //>T*        ? TTSAbort()        //RESULT: 0 {hopefully}
  308.     233 //>T*
  309.     234 //>O* See also
  310.     235 //>T*    TTSIsAvail()
  311.     236 //>T*    TTSEnd()
  312.  
  313.  
  314.                                                                                                                             PAGE   6
  315.                                                                                                                             06-02-92
  316.                                                                                                                             15:38:16
  317.  
  318.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  319.  
  320.     237 //>T*    TTSBegin()
  321.     238 //>T*    TTSStatus()
  322.     239 //>T*    TTSGetAppT()
  323.     240 //>T*    TTSSetAppT()
  324.     241 //>T*    TTSGetWksT()
  325.     242 //>T*    TTSSetWksT()
  326.     243 //>T*
  327.     244 //>-*************************************************************************
  328.     245 
  329.     246 CLIPPER ttsabort (void)
  330.     247 /* this function aborts all current transactions, implicit or explicit
  331.     248 */
  332.     249 {
  333. ***** tts_lib.c(249) : warning C4204: 'ttsabort' : in-line assembler precludes global optimizations
  334.     250     int rc = 0;
  335.     251 
  336.     252     _asm {
  337.     253     mov ah, 0xc7
  338.     254     mov al, 0x03
  339.     255     int 0x21
  340.     256     mov rc, al
  341. ***** tts_lib.c(256) : warning C4407: operand size conflict
  342.     257     }
  343.     258 
  344.     259     _retni( rc );
  345.     260 
  346.     261 return;
  347.     262 }
  348.  
  349.  
  350. ttsabort  Local Symbols
  351.  
  352. Name                      Class   Type              Size   Offset  Register
  353.  
  354. rc. . . . . . . . . . . . auto                             -0002 
  355.  
  356.     263 
  357.     264 //>+*************************************************************************
  358.     265 //>N*    TTSStatus()
  359.     266 //>Q*    Get the status of an ended transaction
  360.     267 //>T*
  361.     268 //>S* Syntax
  362.     269 //>T*    TTSAbort( <iTransNumber>)    ->    iReturn
  363.     270 //>T*
  364.     271 //>A* Arguments
  365.     272 //>T*    <iTransNumber>        : transaction reference number from
  366.     273 //>T*                call to TTSEnd()
  367.     274 //>T*
  368.     275 //>R* Returns
  369.     276 //>T*    iReturn :        00    success
  370.     277 //>T*                255 transaction not yet written
  371.     278 //>T*                252 bad parameters
  372.     279 //>T*
  373.     280 //>D* Description
  374.  
  375.  
  376.                                                                                                                             PAGE   7
  377.                                                                                                                             06-02-92
  378.                                                                                                                             15:38:16
  379.  
  380.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  381.  
  382.     281 //>T*        Simple clipper shell around TTSTransactionStatus() call.
  383.     282 //>T*
  384.     283 //>W* Written by
  385.     284 //>T*    Brian Connelly
  386.     285 //>T*
  387.     286 //>L* Language
  388.     287 //>T*        Assembler
  389.     288 //>T*        C
  390.     289 //>T*
  391.     290 //>E* Examples
  392.     291 //>T*        Local iRef := 0
  393.     292 //>T*        ? TTSEnd( @iRef)
  394.     293 //>T*        ? TTSStatus( iRef)        //RESULT:   0 {hopefully}
  395.     294 //>T*
  396.     295 //>O* See also
  397.     296 //>T*    TTSIsAvail()
  398.     297 //>T*    TTSBegin()
  399.     298 //>T*    TTSAbort()
  400.     299 //>T*    TTSEnd()
  401.     300 //>T*    TTSGetAppT()
  402.     301 //>T*    TTSSetAppT()
  403.     302 //>T*    TTSGetWksT()
  404.     303 //>T*    TTSSetWksT()
  405.     304 //>T*
  406.     305 //>-*************************************************************************
  407.     306 
  408.     307 CLIPPER ttsstatus (void)
  409.     308 /* this function tells you whether or not the chosen transaction has been
  410.     309 *   written to disk yet.
  411.     310 */
  412.     311 {
  413. ***** tts_lib.c(311) : warning C4204: 'ttsstatus' : in-line assembler precludes global optimizations
  414.     312     unsigned  ref = 0 , *ref_ptr = &ref;
  415.     313     int rc = 0;
  416.     314 
  417.     315     if ( PCOUNT != 1 || !ISNUM(1) ) {
  418.     316     _retni( 252 );
  419.     317     return;
  420.     318     }
  421.     319 
  422.     320     ref = (unsigned) _parni( 1 );
  423.     321 
  424.     322     _asm {
  425.     323     mov ah, 0xc7
  426.     324     mov al, 0x04
  427.     325     mov cx, ref_ptr[0]
  428. ***** tts_lib.c(325) : warning C4407: operand size conflict
  429.     326     mov dx, ref_ptr[2]
  430. ***** tts_lib.c(326) : warning C4407: operand size conflict
  431.     327     int 0x21
  432.     328     mov rc, al
  433. ***** tts_lib.c(328) : warning C4407: operand size conflict
  434.  
  435.  
  436.                                                                                                                             PAGE   8
  437.                                                                                                                             06-02-92
  438.                                                                                                                             15:38:16
  439.  
  440.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  441.  
  442.     329     }
  443.     330 
  444.     331     _retni( rc );
  445.     332 
  446.     333 return;
  447.     334 }
  448.  
  449.  
  450. ttsstatus  Local Symbols
  451.  
  452. Name                      Class   Type              Size   Offset  Register
  453.  
  454. ref . . . . . . . . . . . auto                             -0008 
  455. rc. . . . . . . . . . . . auto                             -0006 
  456. ref_ptr . . . . . . . . . auto                             -0004 
  457.  
  458.     335 
  459.     336 //>+*************************************************************************
  460.     337 //>N*    TTSGetAppT()
  461.     338 //>Q*    Get the worstation thresholds for implicit transactions
  462.     339 //>T*
  463.     340 //>S* Syntax
  464.     341 //>T*    TTSGetAppT( @<iLogLocks>, @<iPhysLocks>)    ->    iReturn
  465.     342 //>T*
  466.     343 //>A* Arguments
  467.     344 //>T*        iLogLocks        : Number of logical locks before implicit trans
  468.     345 //>T*                [0 - 255]
  469.     346 //>T*        iPhysLocks        : Number of physical locks before implicit trans
  470.     347 //>T*                [0 - 255]
  471.     348 //>T*
  472.     349 //>R* Returns
  473.     350 //>T*    iReturn :        00    success
  474.     351 //>T*                252 bad parameters
  475.     352 //>T*
  476.     353 //>D* Description
  477.     354 //>T*        Simple clipper shell around TTSGetApplicationThresholds() call.
  478.     355 //>T*    Default thresholds are 0. A value of 255 disables implicit transactions
  479.     356 //>T*    of that type.
  480.     357 //>T*
  481.     358 //>W* Written by
  482.     359 //>T*    Brian Connelly
  483.     360 //>T*
  484.     361 //>L* Language
  485.     362 //>T*        Assembler
  486.     363 //>T*        C
  487.     364 //>T*
  488.     365 //>E* Examples
  489.     366 //>T*        Local iLogicals, iPhysicals
  490.     367 //>T*        ? TTSGetAppT( @iLogicals, @iPhysicals)    //RESULT:   0
  491.     368 //>T*
  492.     369 //>O* See also
  493.     370 //>T*    TTSIsAvail()
  494.     371 //>T*    TTSBegin()
  495.     372 //>T*    TTSAbort()
  496.     373 //>T*    TTSEnd()
  497.     374 //>T*    TTSStatus()
  498.  
  499.  
  500.                                                                                                                             PAGE   9
  501.                                                                                                                             06-02-92
  502.                                                                                                                             15:38:16
  503.  
  504.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  505.  
  506.     375 //>T*    TTSSetAppT()
  507.     376 //>T*    TTSGetWksT()
  508.     377 //>T*    TTSSetWksT()
  509.     378 //>T*
  510.     379 //>-*************************************************************************
  511.     380 
  512.     381 CLIPPER ttsgetappt (void)
  513.     382 /* this call returns the physical and logical lock thresholds that will
  514.     383 *   trigger implicit transaction tracking. These thresholds last only the
  515.     384 *   duration of the application and supersede the workstation thresholds.
  516.     385 */
  517.     386 {
  518. ***** tts_lib.c(386) : warning C4204: 'ttsgetappt' : in-line assembler precludes global optimizations
  519.     387     unsigned char plocks, llocks;
  520.     388     int rc = 0;
  521.     389 
  522.     390     if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) || !ISBYREF(1) || !ISBYREF(2) ) {
  523.     391     _retni( 252 );
  524.     392     return;
  525.     393     }
  526.     394 
  527.     395     _asm {
  528.     396     mov ah, 0xc7
  529.     397     mov al, 0x05
  530.     398     int 0x21
  531.     399     mov plocks, ch
  532.     400     mov llocks, cl
  533.     401     mov rc, al
  534. ***** tts_lib.c(401) : warning C4407: operand size conflict
  535.     402     }
  536.     403 
  537.     404     _storni(1, plocks);
  538.     405     _storni(2, llocks);
  539.     406     _retni( rc);
  540.     407 
  541.     408 return;
  542.     409 }
  543.  
  544.  
  545. ttsgetappt  Local Symbols
  546.  
  547. Name                      Class   Type              Size   Offset  Register
  548.  
  549. plocks. . . . . . . . . . auto                             -0006 
  550. llocks. . . . . . . . . . auto                             -0004 
  551. rc. . . . . . . . . . . . auto                             -0002 
  552.  
  553.     410 
  554.     411 //>+*************************************************************************
  555.     412 //>N*    TTSSetAppT()
  556.     413 //>Q*    Set the worstation thresholds for implicit transactions
  557.     414 //>T*
  558.     415 //>S* Syntax
  559.     416 //>T*    TTSGetAppT( <iLogLocks>, <iPhysLocks>)    ->    iReturn
  560.  
  561.  
  562.                                                                                                                             PAGE  10
  563.                                                                                                                             06-02-92
  564.                                                                                                                             15:38:16
  565.  
  566.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  567.  
  568.     417 //>T*
  569.     418 //>A* Arguments
  570.     419 //>T*        iLogLocks        : Number of logical locks before implicit trans
  571.     420 //>T*                [0 - 255]
  572.     421 //>T*        iPhysLocks        : Number of physical locks before implicit trans
  573.     422 //>T*                [0 - 255]
  574.     423 //>T*
  575.     424 //>R* Returns
  576.     425 //>T*    iReturn :        00    success
  577.     426 //>T*                252 bad parameters
  578.     427 //>T*
  579.     428 //>D* Description
  580.     429 //>T*        Simple clipper shell around TTSSetApplicationThresholds() call.
  581.     430 //>T*    Default thresholds are 0. A value of 255 disables implicit transactions
  582.     431 //>T*    of that type.
  583.     432 //>T*
  584.     433 //>W* Written by
  585.     434 //>T*    Brian Connelly
  586.     435 //>T*
  587.     436 //>L* Language
  588.     437 //>T*        Assembler
  589.     438 //>T*        C
  590.     439 //>T*
  591.     440 //>E* Examples
  592.     441 //>T*        Local iLogicals := 255, iPhysicals := 255
  593.     442 //>T*        ? TTSSetAppT( iLogicals, iPhysicals)    //RESULT:   0
  594.     443 //>T*
  595.     444 //>O* See also
  596.     445 //>T*    TTSIsAvail()
  597.     446 //>T*    TTSBegin()
  598.     447 //>T*    TTSAbort()
  599.     448 //>T*    TTSEnd()
  600.     449 //>T*    TTSStatus()
  601.     450 //>T*    TTSGetAppT()
  602.     451 //>T*    TTSGetWksT()
  603.     452 //>T*    TTSSetWksT()
  604.     453 //>T*
  605.     454 //>-*************************************************************************
  606.     455 
  607.     456 CLIPPER ttssetappt (void)
  608.     457 /* this call is used to set the physical and logical lock thresholds for
  609.     458 *   implicit transaction tracking. These thresholds last only for the
  610.     459 *   duration of the application and supersede the workstation thresholds.
  611.     460 *   Setting a threshold to 0xff disables implict transactions for that kind
  612.     461 *   of lock.
  613.     462 */
  614.     463 {
  615. ***** tts_lib.c(463) : warning C4204: 'ttssetappt' : in-line assembler precludes global optimizations
  616.     464     unsigned char plocks, llocks;
  617.     465     int rc = 0;
  618.     466 
  619.     467     if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) ) {
  620.     468     _retni( BAD_PARAMS );
  621.     469     return;
  622.     470     }
  623.  
  624.  
  625.                                                                                                                             PAGE  11
  626.                                                                                                                             06-02-92
  627.                                                                                                                             15:38:16
  628.  
  629.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  630.  
  631.     471 
  632.     472     _asm {
  633.     473     mov ah, 0xc7
  634.     474     mov al, 0x06
  635.     475     mov ch, plocks
  636.     476     mov cl, llocks
  637.     477     int 0x21
  638.     478     mov rc, al
  639. ***** tts_lib.c(478) : warning C4407: operand size conflict
  640.     479     }
  641.     480 
  642.     481     _retni( rc);
  643.     482 
  644.     483 return;
  645.     484 }
  646.  
  647.  
  648. ttssetappt  Local Symbols
  649.  
  650. Name                      Class   Type              Size   Offset  Register
  651.  
  652. plocks. . . . . . . . . . auto                             -0006 
  653. llocks. . . . . . . . . . auto                             -0004 
  654. rc. . . . . . . . . . . . auto                             -0002 
  655.  
  656.     485 
  657.     486 //>+*************************************************************************
  658.     487 //>N*    TTSGetWksT()
  659.     488 //>Q*    Get the worstation thresholds for implicit transactions
  660.     489 //>T*
  661.     490 //>S* Syntax
  662.     491 //>T*    TTSGetWksT( @<iLogLocks>, @<iPhysLocks>)    ->    iReturn
  663.     492 //>T*
  664.     493 //>A* Arguments
  665.     494 //>T*        iLogLocks        : Number of logical locks before implicit trans
  666.     495 //>T*                [0 - 255]
  667.     496 //>T*        iPhysLocks        : Number of physical locks before implicit trans
  668.     497 //>T*                [0 - 255]
  669.     498 //>T*
  670.     499 //>R* Returns
  671.     500 //>T*    iReturn :        00    success
  672.     501 //>T*                252 bad parameters
  673.     502 //>T*
  674.     503 //>D* Description
  675.     504 //>T*        Simple clipper shell around TTSGetWorkstationThresholds() call.
  676.     505 //>T*    Default thresholds are 0. A value of 255 disables implicit transactions
  677.     506 //>T*    of that type.
  678.     507 //>T*
  679.     508 //>W* Written by
  680.     509 //>T*    Brian Connelly
  681.     510 //>T*
  682.     511 //>L* Language
  683.     512 //>T*        Assembler
  684.     513 //>T*        C
  685.     514 //>T*
  686.  
  687.  
  688.                                                                                                                             PAGE  12
  689.                                                                                                                             06-02-92
  690.                                                                                                                             15:38:16
  691.  
  692.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  693.  
  694.     515 //>E* Examples
  695.     516 //>T*        Local iLogicals, iPhysicals
  696.     517 //>T*        ? TTSGetWksT( @iLogicals, @iPhysicals)    //RESULT:   0
  697.     518 //>T*
  698.     519 //>O* See also
  699.     520 //>T*    TTSIsAvail()
  700.     521 //>T*    TTSBegin()
  701.     522 //>T*    TTSAbort()
  702.     523 //>T*    TTSEnd()
  703.     524 //>T*    TTSStatus()
  704.     525 //>T*    TTSSetAppT()
  705.     526 //>T*    TTSGetAppT()
  706.     527 //>T*    TTSSetWksT()
  707.     528 //>T*
  708.     529 //>-*************************************************************************
  709.     530 
  710.     531 CLIPPER ttsgetwkst (void)
  711.     532 /* this call returns the physical and logical lock thresholds that will
  712.     533 *   trigger implicit transaction tracking. These thresholds last until reset.
  713.     534 *   These values are used as the default for applications that don't set
  714.     535 *   their own thresholds.
  715.     536 */
  716.     537 {
  717. ***** tts_lib.c(537) : warning C4204: 'ttsgetwkst' : in-line assembler precludes global optimizations
  718.     538     unsigned char plocks, llocks;
  719.     539     int rc = 0;
  720.     540 
  721.     541     if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) || !ISBYREF(1) || !ISBYREF(2) ) {
  722.     542     _retni( BAD_PARAMS );
  723.     543     return;
  724.     544     }
  725.     545 
  726.     546     _asm {
  727.     547     mov ah, 0xc7
  728.     548     mov al, 0x07
  729.     549     int 0x21
  730.     550     mov plocks, ch
  731.     551     mov llocks, cl
  732.     552     mov rc, al
  733. ***** tts_lib.c(552) : warning C4407: operand size conflict
  734.     553     }
  735.     554 
  736.     555     _storni(1, plocks);
  737.     556     _storni(2, llocks);
  738.     557 
  739.     558     _retni( rc);
  740.     559 
  741.     560 return;
  742.     561 }
  743.  
  744.  
  745.  
  746.                                                                                                                             PAGE  13
  747.                                                                                                                             06-02-92
  748.                                                                                                                             15:38:16
  749.  
  750.                                                                                                Microsoft C Compiler Version 6.00A   
  751.  
  752. ttsgetwkst  Local Symbols
  753.  
  754. Name                      Class   Type              Size   Offset  Register
  755.  
  756. plocks. . . . . . . . . . auto                             -0006 
  757. llocks. . . . . . . . . . auto                             -0004 
  758. rc. . . . . . . . . . . . auto                             -0002 
  759.  
  760.     562 
  761.     563 //>+*************************************************************************
  762.     564 //>N*    TTSSetWksT()
  763.     565 //>Q*    Set the worstation thresholds for implicit transactions
  764.     566 //>T*
  765.     567 //>S* Syntax
  766.     568 //>T*    TTSSetWksT( <iLogLocks>, <iPhysLocks>)    ->    iReturn
  767.     569 //>T*
  768.     570 //>A* Arguments
  769.     571 //>T*        iLogLocks        : Number of logical locks before implicit trans
  770.     572 //>T*                [0 - 255]
  771.     573 //>T*        iPhysLocks        : Number of physical locks before implicit trans
  772.     574 //>T*                [0 - 255]
  773.     575 //>T*
  774.     576 //>R* Returns
  775.     577 //>T*    iReturn :        00    success
  776.     578 //>T*                252 bad parameters
  777.     579 //>T*
  778.     580 //>D* Description
  779.     581 //>T*        Simple clipper shell around TTSSetWorkstationThresholds() call.
  780.     582 //>T*    Default thresholds are 0. A value of 255 disables implicit transactions
  781.     583 //>T*    of that type.
  782.     584 //>T*
  783.     585 //>W* Written by
  784.     586 //>T*    Brian Connelly
  785.     587 //>T*
  786.     588 //>L* Language
  787.     589 //>T*        Assembler
  788.     590 //>T*        C
  789.     591 //>T*
  790.     592 //>E* Examples
  791.     593 //>T*        Local iLogicals := 255, iPhysicals := 255
  792.     594 //>T*        ? TTSSetWksT( iLogicals, iPhysicals)    //RESULT:   0
  793.     595 //>T*
  794.     596 //>O* See also
  795.     597 //>T*    TTSIsAvail()
  796.     598 //>T*    TTSBegin()
  797.     599 //>T*    TTSAbort()
  798.     600 //>T*    TTSEnd()
  799.     601 //>T*    TTSStatus()
  800.     602 //>T*    TTSGetAppT()
  801.     603 //>T*    TTSGetWksT()
  802.     604 //>T*    TTSSetAppT()
  803.     605 //>T*
  804.     606 //>-*************************************************************************
  805.     607 
  806.     608 CLIPPER ttssetwkst (void)
  807.     609 /* this call sets the physical and logical lock thresholds that will
  808.  
  809.  
  810.                                                                                                                             PAGE  14
  811.                                                                                                                             06-02-92
  812.                                                                                                                             15:38:16
  813.  
  814.  Line#  Source Line                                                                            Microsoft C Compiler Version 6.00A   
  815.  
  816.     610 *   trigger implicit transaction tracking. These thresholds last until reset.
  817.     611 *   These values are used as the default for applications that don't set
  818.     612 *   their own thresholds.
  819.     613 *   Setting a threshold to 0xff disables implict transactions for that kind
  820.     614 *   of lock.
  821.     615 */
  822.     616 {
  823. ***** tts_lib.c(616) : warning C4204: 'ttssetwkst' : in-line assembler precludes global optimizations
  824.     617     unsigned char plocks, llocks;
  825.     618     int rc = 0;
  826.     619 
  827.     620     if ( PCOUNT != 2 || !ISNUM(1) || !ISNUM(2) ) {
  828.     621     _retni( 252 );
  829.     622     return;
  830.     623     }
  831.     624 
  832.     625     _asm {
  833.     626     mov ah, 0xc7
  834.     627     mov al, 0x08
  835.     628     mov ch, plocks
  836.     629     mov cl, llocks
  837.     630     int 0x21
  838.     631     mov rc, al
  839. ***** tts_lib.c(631) : warning C4407: operand size conflict
  840.     632     }
  841.     633 
  842.     634     _retni( rc);
  843.     635 
  844.     636 return;
  845.     637 }
  846.  
  847.  
  848. ttssetwkst  Local Symbols
  849.  
  850. Name                      Class   Type              Size   Offset  Register
  851.  
  852. plocks. . . . . . . . . . auto                             -0006 
  853. llocks. . . . . . . . . . auto                             -0004 
  854. rc. . . . . . . . . . . . auto                             -0002 
  855.  
  856.  
  857. Global Symbols
  858.  
  859. Name                      Class   Type              Size   Offset  
  860.  
  861. _parinfo. . . . . . . . . extern  far function       ***     ***
  862. _parni. . . . . . . . . . extern  far function       ***     ***
  863. _retni. . . . . . . . . . extern  far function       ***     ***
  864. _storni . . . . . . . . . extern  far function       ***     ***
  865. _stornl . . . . . . . . . extern  far function       ***     ***
  866. ttsabort. . . . . . . . . global  far function       ***    00cc
  867. ttsbegin. . . . . . . . . global  far function       ***    0020
  868. ttsend. . . . . . . . . . global  far function       ***    0040
  869. ttsgetappt. . . . . . . . global  far function       ***    0156
  870.  
  871.  
  872.                                                                                                                             PAGE  15
  873.                                                                                                                             06-02-92
  874.                                                                                                                             15:38:16
  875.  
  876.                                                                                                Microsoft C Compiler Version 6.00A   
  877.  
  878.  
  879. Global Symbols
  880.  
  881. Name                      Class   Type              Size   Offset  
  882.  
  883. ttsgetwkst. . . . . . . . global  far function       ***    0256
  884. ttsisavail. . . . . . . . global  far function       ***    0000
  885. ttssetappt. . . . . . . . global  far function       ***    01f8
  886. ttssetwkst. . . . . . . . global  far function       ***    02f8
  887. ttsstatus . . . . . . . . global  far function       ***    00ec
  888.  
  889. Code size = 0356 (854)
  890. Data size = 0000 (0)
  891. Bss size  = 0000 (0)
  892.  
  893. No errors detected
  894.