#include <stdio.h>
#include "dbck.h"
+static char fix_qc_rcsid[] = "$Header$";
+
##char *_table;
##char *_idfield;
printf("%d entr%s deleted\n", rowcount, rowcount==1?"y":"ies");
else
printf("Not deleted\n");
+ modified(_table);
##}
printf("%d entr%s fixed\n", rowcount, rowcount==1?"y":"ies");
else
printf("Not fixed\n");
+ modified(table);
##}
-generic_fix(sq, pfunc, msg, ffunc, preen)
-struct save_queue *sq;
-char *msg;
-int (*pfunc)(), (*ffunc)();
-int preen;
-{
- int id;
-
- while (sq_get_data(sq, &id)) {
- if ((*pfunc)(id) == 0 && singe_fix(msg, preen))
- (*ffunc)(id);
- }
- sq_destroy(sq);
-}
-
-
int single_fix(msg, preen)
char *msg;
int preen;
}
+generic_fix(sq, pfunc, msg, ffunc, preen)
+struct save_queue *sq;
+char *msg;
+int (*pfunc)(), (*ffunc)();
+int preen;
+{
+ int id;
+
+ while (sq_get_data(sq, &id)) {
+ if ((*pfunc)(id) == 0 && single_fix(msg, preen))
+ (*ffunc)(id);
+ }
+ sq_destroy(sq);
+}
+
+
int prompt(msg)
char *msg;
{
if (prompt("Are you sure you want to quit")) {
if (prompt("Save database changes")) {
## end transaction
-## replace values (value = dcmenable)
-## where values.name = "dcm_enable"
-## exit
+ cleanup();
exit(0);
} else {
- cleanup();
+## abort
+## replace values (value = dcmenable)
+## where values.name = "dcm_enable"
+## exit
+ exit(1);
}
}
}
## retrieve (exists = any(tbl.name where tbl.name = value))
}
- printf("setting ID %s to %d", name, value);
+ printf("setting ID %s to %d\n", name, value);
## repeat replace v (#value = @value) where v.#name = @name
+ modified("values");
return(SMS_SUCCESS);
##}
printf("Fixed\n");
else
printf("Not fixed, rowcount = %d\n", rowcount);
+ modified(table);
return(id);
##}