You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2004/03/17 02:03:27 UTC
cvs commit: httpd-2.0/support htdbm.c
bnicholes 2004/03/16 17:03:27
Modified: support htdbm.c
Log:
Add a terminate function that gets called on atexit() so that NetWare has the chance to pause the screen to view the output before the screen is destroyed.
Submitted by: Guenter Knauf <ef...@gmx.net>
Revision Changes Path
1.15 +10 -4 httpd-2.0/support/htdbm.c
Index: htdbm.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/htdbm.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- htdbm.c 9 Feb 2004 20:40:52 -0000 1.14
+++ htdbm.c 17 Mar 2004 01:03:27 -0000 1.15
@@ -105,9 +105,16 @@
#define HTDBM_NOFILE 4
#define HTDBM_STDIN 5
+static void terminate(void)
+{
+ apr_terminate();
+#ifdef NETWARE
+ pressanykey();
+#endif
+}
+
static void htdbm_terminate(htdbm_t *htdbm)
{
-
if (htdbm->dbm)
apr_dbm_close(htdbm->dbm);
htdbm->dbm = NULL;
@@ -254,7 +261,7 @@
fprintf(stderr, " %-32s", kb);
strncpy(rec, val.dptr, val.dsize);
rec[val.dsize] = '\0';
- cmnt = strchr(rec, ';');
+ cmnt = strchr(rec, ':');
if (cmnt)
fprintf(stderr, cmnt + 1);
fprintf(stderr, "\n");
@@ -387,7 +394,7 @@
int args_left = 2;
apr_app_initialize(&argc, &argv, NULL);
- atexit(apr_terminate);
+ atexit(terminate);
if ((rv = htdbm_init(&pool, &h)) != APR_SUCCESS) {
fprintf(stderr, "Unable to initialize htdbm terminating!\n");
@@ -569,7 +576,6 @@
}
}
htdbm_terminate(h);
- apr_terminate();
return 0; /* Suppress compiler warning. */
}