home *** CD-ROM | disk | FTP | other *** search
-
- # include <stdio.h>
- # include <bench.h>
- # include <proc.io>
- # include "field.h"
- # include "screen.h"
- # include "iodef.h"
- # include "sup.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, TRN_ROLLBACK))
- 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, TRN_COMMIT))
- commit(tab->fd);
- }
- else
- commit(tab->fd);
-
- pending = FALSE;
- }
-
-
-