home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name qyverify -- Set or return DOS VERIFY state.
- *
- * Synopsis old_state = qyverify(set,new_state);
- *
- * int old_state The previous VERIFY state:
- * VER_ON (1) if checking is enabled,
- * VER_OFF (0) if not.
- * int set VER_SET (1) to set the state,
- * VER_GET (0) to return it.
- * int new_state If "set" is nonzero, this is the new
- * VERIFY state:
- * VER_ON (1) to enable checking,
- * VER_OFF (0) to disable it.
- *
- * Description This function returns the DOS VERIFY state and
- * optionally sets that state.
- *
- * If the VERIFY state is "on", DOS will verify the success
- * of each disk write as it is performed.
- *
- * Returns old_state The previous VERIFY state:
- * VER_ON (1) if checking is enabled,
- * VER_OFF (0) if not.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bquery.h>
-
- int qyverify(set,new_state)
- int set,new_state;
- {
- DOSREG dos_reg;
- int old_state;
-
- dos_reg.ax = 0x5400; /* DOS function 0x54, return */
- /* VERIFY state. */
- dos(&dos_reg);
- old_state = utlobyte(dos_reg.ax);
-
- if (set != VER_GET)
- {
- /* DOS function 0x33, set */
- /* VERIFY state. */
- dos_reg.ax = utbyword(0x2e,new_state);
- dos(&dos_reg);
- }
-
- return(old_state);
- }