/* $Id$ * * (c) Copyright 1988-1998 by the Massachusetts Institute of Technology. * For copying and distribution information, please see the file * . */ #include #include #include "dump_db.h" #include RCSID("$Header$"); extern void sqlglm(char *, unsigned int *, unsigned int *); void punt(char *msg) { perror(msg); exit(1); } void dbmserr(void) { EXEC SQL BEGIN DECLARE SECTION; char err_msg[256]; EXEC SQL END DECLARE SECTION; int bufsize = 256, msglength = 0; sqlglm(err_msg, &bufsize, &msglength); err_msg[msglength] = '\0'; fprintf(stderr, "Fatal SQL error:\n%s", err_msg); exit(1); }