You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2002/02/18 07:12:09 UTC
cvs commit: apr/include apr_general.h
wrowe 02/02/17 22:12:09
Modified: include apr_general.h
Log:
Drop the idea of a two-pass init, apr_app_initialize can handle it all.
Revision Changes Path
1.65 +17 -11 apr/include/apr_general.h
Index: apr_general.h
===================================================================
RCS file: /home/cvs/apr/include/apr_general.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- apr_general.h 15 Feb 2002 21:15:44 -0000 1.64
+++ apr_general.h 18 Feb 2002 06:12:09 -0000 1.65
@@ -172,12 +172,26 @@
/**
* Setup any APR internal data structures. This MUST be the first function
- * called for any APR program.
+ * called for any APR library.
* @deffunc apr_status_t apr_initialize(void)
+ * @remark See apr_app_initialize if this is an application, rather than
+ * a library consumer of apr.
*/
APR_DECLARE(apr_status_t) apr_initialize(void);
/**
+ * Set up an application with normalized argc, argv (and optionally env) in
+ * order to deal with platform-specific oddities, such as Win32 services,
+ * code pages and signals. This must be the first function called for any
+ * APR program.
+ * @deffunc apr_status_t apr_app_initialize(int *argc, char ***argv, char ***env)
+ * @remark See apr_initialize if this is a library consumer of apr.
+ * Otherwise, this call is identical to apr_initialize, and must be closed
+ * with a call to apr_terminate at the end of program execution.
+ */
+APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, char ***argv, char ***env);
+
+/**
* Tear down any APR internal data structures which aren't torn down
* automatically.
* @remark An APR program must call this function at termination once it
@@ -185,6 +199,8 @@
* atexit to ensure this is called. When using APR from a language
* other than C that has problems with the calling convention, use
* apr_terminate2() instead.
+ * Otherwise, this call is identical to apr_app_initialize, and must be
+ * closed with a call to apr_terminate at the end of program execution.
*/
APR_DECLARE_NONSTD(void) apr_terminate(void);
@@ -198,16 +214,6 @@
* while apr_terminate is recommended from c language applications.
*/
APR_DECLARE(void) apr_terminate2(void);
-
-/**
- * Set up an application with normalized argc, argv (and optionally env) in
- * order to deal with platform-specific oddities, such as Win32 services,
- * code pages and signals.
- * @remark An APR program should invoke apr_app_main immediately following
- * apr_initialize, so it behaves properly as a service on Win32 with respect
- * to its Unicode (utf-8) code page, services and signals.
- */
-APR_DECLARE(apr_status_t) apr_app_main(int *argc, char ***argv, char ***env);
/** @} */