home *** CD-ROM | disk | FTP | other *** search
- /* ==( gensup/trans.c )== */
- /* ----------------------------------------------- */
- /* Pro-C Copyright (C) 1988 - 1990 Vestronix Inc. */
- /* Modification to this source is not supported */
- /* by Vestronix Inc. */
- /* All Rights Reserved */
- /* ----------------------------------------------- */
- /* Written Nig 1-Jan-90 */
- /* Modified Nig 1-Jan-90 */
- /* ----------------------------------------------- */
- /* %W% (%H% %T%) */
-
-
-
- # include <stdio.h>
- # include <bench.h>
- # include <proc.io>
- # include "field.h"
- # include "iodef.h"
- # include "sup.h"
- # include "screen.h"
-
-
- int pending = 0;
-
- void tran_p(tab)
- struct _table *tab;
- {
- if (pending)
- return;
-
- /*
- * Switch on Transaction Processing for the duration
- */
- transact(tab->fd);
- }
-
- void roll_p(tab)
- struct _table *tab;
- {
- if (!pending)
- return;
-
- if (tab->query_box)
- {
- if (warning (99, TrnRollBack))
- rollback(tab->fd);
- }
- else
- rollback(tab->fd);
-
- pending = FALSE;
- }
-
- void comm_p(tab)
- struct _table *tab;
- {
- if (!pending)
- return;
-
- if (tab->query_box)
- {
- if (warning (99, TrnCommit))
- commit(tab->fd);
- }
- else
- commit(tab->fd);
-
- pending = FALSE;
- }
-
-
-