Changeset: ba061366646f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ba061366646f
Modified Files:
gdk/gdk.h
gdk/gdk_private.h
gdk/gdk_utils.c
Branch: Feb2013
Log Message:
Cleanup: removed two unused (never changed) variables.
diffs (99 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -2208,8 +2208,6 @@ gdk_export str GDKstrdup(const char *s);
* @tab
* GDKmessage
* @item bit
- * @tab GDKsilent
- * @item int
* @tab
* GDKfatal(str msg)
* @item int
@@ -2235,9 +2233,8 @@ gdk_export str GDKstrdup(const char *s);
* should show if this mechanism is sufficient. Most routines return
* a pointer with zero to indicate an error.
*
- * The error messages are also copied to standard output unless
- * GDKsilent is set to a non-zero value. The last error message is
- * kept around in a global variable.
+ * The error messages are also copied to standard output. The last
+ * error message is kept around in a global variable.
*
* Error messages can also be collected in a user-provided buffer,
* instead of being echoed to a stream. This is a thread-specific
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -111,8 +111,6 @@ extern batlock_t GDKbatLock[BBP_BATMASK
extern bbplock_t GDKbbpLock[BBP_THREADMASK + 1];
extern size_t GDK_mmap_minsize; /* size after which we use memory
mapped files */
extern MT_Lock GDKnameLock;
-extern int GDKrecovery;
-extern int GDKsilent; /* should GDK shut up? */
extern MT_Lock GDKthreadLock;
extern MT_Lock GDKtmLock;
extern MT_Lock MT_system_lock;
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -893,8 +893,6 @@ GDKmunmap(void *addr, size_t size)
* Their value is turned into a blanc space.
*/
-int GDKrecovery = 0;
-
#define CATNAP 50 /* time to sleep in ms for catnaps */
static MT_Id GDKvmtrim_id;
@@ -1209,9 +1207,6 @@ GDKlockHome(void)
GDKfatal("GDKlockHome: could not move to %s\n",
GDKdbpathStr);
IODEBUG THRprintf(GDKstdout, "#GDKlockHome: created directory
%s\n", GDKdbpathStr);
}
- if (GDKrecovery && unlink(GDKLOCK) < 0) {
- GDKfatal("GDKlockHome: unlock DB failed\n");
- }
if (MT_lockf(GDKLOCK, F_TLOCK, 4, 1) < 0) {
GDKlockFile = 0;
GDKfatal("GDKlockHome: Database lock '%s' denied\n", GDKLOCK);
@@ -1292,7 +1287,6 @@ GDKgetHome(void)
* GDKerrorCount(); Furthermore, threads may have set their private
* error buffer.
*/
-int GDKsilent = 0;
static int THRerrorcount[THREADDATA];
/* do the real work for GDKaddbuf below. */
@@ -1331,7 +1325,7 @@ doGDKaddbuf(const char *prefix, const ch
dst += sufflen;
}
*dst = '\0';
- } else if (!GDKsilent) {
+ } else {
/* construct format string because the format string
* must start with ! */
char format[32];
@@ -1506,7 +1500,6 @@ GDKfatal(const char *format, ...)
char message[GDKERRLEN];
size_t len = strlen(GDKFATAL);
va_list ap;
- FILE *fd = stderr;
GDKdebug |= IOMASK;
#ifndef NATIVE_WIN32
@@ -1521,11 +1514,10 @@ GDKfatal(const char *format, ...)
vsnprintf(message + len, sizeof(message) - (len + 2), format, ap);
va_end(ap);
- if (GDKsilent == 0) {
- fputs(message, fd);
- fputs("\n", fd);
- fflush(fd);
- }
+ fputs(message, stderr);
+ fputs("\n", stderr);
+ fflush(stderr);
+
/*
* Real errors should be saved in the lock file for post-crash
* inspection.
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list