]> andersk Git - moira.git/blob - backup/dumprest.pc
Code style cleanup. (No functional changes)
[moira.git] / backup / dumprest.pc
1 /*
2  *      $Source$
3  *      $Author$
4  *      $Header$
5  *
6  *  (c) Copyright 1988 by the Massachusetts Institute of Technology.
7  *  For copying and distribution information, please see the file
8  *  <mit-copyright.h>.
9  *
10  */
11
12 #ifndef lint
13 static char *rcsid_dumprest_qc = "$Header$";
14 #endif lint
15
16 #include <stdio.h>
17 #include <mit-copyright.h>
18
19 int punt(char *msg)
20 {
21   perror(msg);
22   exit(1);
23 }
24
25 int dbmserr(void)
26 {
27   EXEC SQL BEGIN DECLARE SECTION;
28   char err_msg[256];
29   EXEC SQL END DECLARE SECTION;
30   int bufsize = 256, msglength = 0;
31
32   sqlglm(err_msg, &bufsize, &msglength);
33   err_msg[msglength] = '\0';
34   fprintf(stderr, "Fatal SQL error:\n%s", err_msg);
35   exit(1);
36 }
This page took 1.663852 seconds and 5 git commands to generate.