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