From 65c9f179999c3d17d67ce0fe08c8ec5d94160b78 Mon Sep 17 00:00:00 2001 From: Bradley Nicholes Date: Wed, 17 Mar 2004 01:03:27 +0000 Subject: 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103005 13f79535-47bb-0310-9956-ffa450edef68 --- support/htdbm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'support/htdbm.c') diff --git a/support/htdbm.c b/support/htdbm.c index bdf74d8de4..1d59110d15 100644 --- a/support/htdbm.c +++ b/support/htdbm.c @@ -105,9 +105,16 @@ struct htdbm_t { #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 @@ static apr_status_t htdbm_list(htdbm_t *htdbm) 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 main(int argc, const char * const argv[]) 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 @@ int main(int argc, const char * const argv[]) } } htdbm_terminate(h); - apr_terminate(); return 0; /* Suppress compiler warning. */ } -- cgit v1.2.3