rbb         99/07/30 08:36:00

  Modified:    apr/network_io/unix sockopt.c
               apr/signal/unix signal.c
               apr/time/unix access.c time.c
  Log:
  More documentation updates.  All I have left to doc now is thread/process.  :)
  
  Revision  Changes    Path
  1.11      +29 -2     apache-apr/apr/network_io/unix/sockopt.c
  
  Index: sockopt.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/network_io/unix/sockopt.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- sockopt.c 1999/06/09 15:16:14     1.10
  +++ sockopt.c 1999/07/30 15:35:52     1.11
  @@ -107,7 +107,20 @@
       return APR_SUCCESS;
   }
   
  -
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_setsocketopt(ap_socket_t *, ap_int32_t , ap_int32_t)
  + *    Setup socket options for the specified socket 
  + * arg 1) The socket to set up.
  + * arg 2) The option we would like to configure.  One of:
  + *            APR_SO_DEBUG      --  turn on debugging information 
  + *            APR_SO_KEEPALIVE  --  keep connections active
  + *            APR_SO_LINGER     --  lingers on close if data is present
  + *            APR_SO_NONBLOCK   --  Turns blocking on/off for socket
  + *            APR_SO_REUSEADDR  --  The rules used in validating addresses
  + *                                  supplied to bind should allow reuse
  + *                                  of local addresses.
  + * arg 3) Are we turning the option on or off.
  + */
   ap_status_t ap_setsocketopt(struct socket_t *sock, ap_int32_t opt, 
ap_int32_t on)
   {
       int one;
  @@ -154,7 +167,15 @@
       return APR_SUCCESS;
   }         
   
  -ap_status_t ap_gethostname(ap_context_t *cont, char *buf, int len)
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_gethostname(ap_context_t *, char *, ap_int32_t)
  + *    Get name of the current machine 
  + * arg 1) The context to use.
  + * arg 2) A buffer to store the hostname in.
  + * arg 3) The maximum length of the hostname that can be stored in the
  + *        buffer provided. 
  + */
  +ap_status_t ap_gethostname(ap_context_t *cont, char *buf, ap_int32_t len)
   {
       if (gethostname(buf, len) == -1)
           return errno;
  @@ -162,6 +183,12 @@
           return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_remote_hostname(ap_socket_t *, char *)
  + *    Get name of the machine we are currently connected to. 
  + * arg 1) The socket to examine.
  + * arg 2) A buffer to store the hostname in.
  + */
   ap_status_t ap_get_remote_hostname(struct socket_t *sock, char **name)
   {
       (*name) = ap_pstrdup(sock->cntxt, sock->remote_hostname);
  
  
  
  1.3       +25 -4     apache-apr/apr/signal/unix/signal.c
  
  Index: signal.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/signal/unix/signal.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- signal.c  1999/07/13 19:51:35     1.2
  +++ signal.c  1999/07/30 15:35:55     1.3
  @@ -63,15 +63,29 @@
   #include <signal.h>
   #endif
   
  -
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_create_signal(ap_context_t *, ap_signum_t)
  + *    Create a signal for use later on. 
  + * arg 1) The context to operate on.
  + * arg 2) The signal we are creating.  One of:
  + *            List to come.  :)
  + * NOTE: This function must be called before the desired signal can be sent.
  + *       This is for Windows to be able to send signals, so your program
  + *       won't be portable without it. 
  + */                                                                          
   
   ap_status_t ap_create_signal(ap_context_t *cont, ap_signum_t signum)
   {
       return APR_SUCCESS;
   }
   
  -/* Signals can only be sent to the whole process group because I havne't 
  - * figured out how to send to individual children on Winodws yet.  When
  - * that is solved, this will change here.
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_send_signal(ap_context_t *, ap_signum_t)
  + *    Send a signal to your process group 
  + * arg 1) The context to operate on.
  + * arg 2) The signal we are sending.  Same as above list
  + * NOTE:  Signals can only be sent to the whole process group because I 
haven't 
  + *        figured out how to send to individual children on Windows yet.  
When
  + *        that is solved, this will change here.
    */
   ap_status_t ap_send_signal(ap_context_t *cont, ap_signum_t signum)
   {
  @@ -79,6 +93,13 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_setup_signal(ap_context_t *, ap_signum_t)
  + *    Setup the response when a process receives a particular signal. 
  + * arg 1) The context to operate on.
  + * arg 2) The signal we are expecting to receive.  Same as above list
  + * arg 3) The function to execute when this signal is received.
  + */
   ap_setup_signal(ap_context_t *cont, ap_signum_t signum, Sigfunc *func)
   {
       sigset_t newset;
  
  
  
  1.7       +91 -1     apache-apr/apr/time/unix/access.c
  
  Index: access.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/time/unix/access.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- access.c  1999/06/22 16:57:37     1.6
  +++ access.c  1999/07/30 15:35:57     1.7
  @@ -60,6 +60,12 @@
   #include <errno.h>
   #include <string.h>
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_curtime(ap_time_t *, ap_int64_t *)
  + *    Get the current time in seconds since Jan 1, 1970.
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_curtime(struct atime_t *time, ap_int64_t *rv)
   {
       if (time) {
  @@ -69,6 +75,12 @@
       return APR_ENOTIME;    
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_sec(ap_time_t *, ap_int64_t *)
  + *    Get the number of seconds since the top of the minute
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_sec(struct atime_t *time, ap_int32_t *rv)
   {
       if (time) {
  @@ -78,6 +90,12 @@
       return APR_ENOTIME;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_min(ap_time_t *, ap_int64_t *)
  + *    Get the number of minutes since the top of the hour 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_min(struct atime_t *time, ap_int32_t *rv)
   {
       if (time) {
  @@ -87,6 +105,12 @@
       return APR_ENOTIME;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_min(ap_time_t *, ap_int64_t *)
  + *    Get the number of minutes since the top of the hour 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_hour(struct atime_t *time, ap_int32_t *rv)
   {
       if (time) {
  @@ -96,6 +120,12 @@
       return APR_ENOTIME;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_mday(ap_time_t *, ap_int64_t *)
  + *    Get the number of days since the beginning of the month 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_mday(struct atime_t *time, ap_int32_t *rv)
   {
       if (time) {
  @@ -105,6 +135,12 @@
       return APR_ENOTIME;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_mon(ap_time_t *, ap_int64_t *)
  + *    Get the number of months since the beginning of the year 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_mon(struct atime_t *time, ap_int32_t *rv)
   {
       if (time) {
  @@ -114,6 +150,12 @@
       return APR_ENOTIME;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_year(ap_time_t *, ap_int64_t *)
  + *    Get the number of years since 1900 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_year(struct atime_t *time, ap_int32_t *rv)
   {
       if (time) {
  @@ -123,6 +165,12 @@
       return APR_ENOTIME;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_wday(ap_time_t *, ap_int64_t *)
  + *    Get the number of days since the beginning of the week. 0 == Sunday 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_get_wday(struct atime_t *time, ap_int32_t *rv)
   {
       if (time) {
  @@ -132,6 +180,12 @@
       return APR_ENOTIME;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_set_sec(ap_time_t *, ap_int64_t)
  + *    Set the number of sec since the top of the minute 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_set_sec(struct atime_t *time, ap_int32_t value)
   {
       if (!time) {
  @@ -148,6 +202,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_set_min(ap_time_t *, ap_int64_t)
  + *    Set the number of minutes since the top of the hour 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_set_min(struct atime_t *time, ap_int32_t value)
   {
       if (!time) {
  @@ -164,6 +224,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_set_min(ap_time_t *, ap_int64_t)
  + *    Set the number of hours since the beginning of the day 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_set_hour(struct atime_t *time, ap_int32_t value)
   {
       if (!time) {
  @@ -180,6 +246,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_set_mday(ap_time_t *, ap_int64_t)
  + *    Set the number of days since the beginning of the month 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_set_mday(struct atime_t *time, ap_int32_t value)
   {
       if (!time) {
  @@ -196,6 +268,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_set_mon(ap_time_t *, ap_int64_t)
  + *    Set the number of months since the beginning of the year 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_set_mon(struct atime_t *time, ap_int32_t value)
   {
       if (!time) {
  @@ -212,6 +290,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_set_min(ap_time_t *, ap_int64_t)
  + *    Set the number of years since the 1900 
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_set_year(struct atime_t *time, ap_int32_t value)
   {
       if (!time) {
  @@ -228,6 +312,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_set_wday(ap_time_t *, ap_int64_t)
  + *    Get the number of days since the beginning of the week.  0 == Sunday
  + * arg 1) The time value we care about.
  + * arg 2) Integer to store time value in
  + */
   ap_status_t ap_set_wday(struct atime_t *time, ap_int32_t value)
   {
       if (!time) {
  @@ -263,7 +353,7 @@
   
   /* ***APRDOC********************************************************
    * ap_status_t ap_set_timedata(ap_time_t *, void *)
  - *    Return the context associated with the current atime.
  + *    Set the context associated with the current atime.
    * arg 1) The currently open atime.
    * arg 2) The user data to associate with the atime.
    */
  
  
  
  1.8       +39 -0     apache-apr/apr/time/unix/time.c
  
  Index: time.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/apr/time/unix/time.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- time.c    1999/07/06 17:01:42     1.7
  +++ time.c    1999/07/30 15:35:57     1.8
  @@ -62,6 +62,12 @@
   #include <errno.h>
   #include <string.h>
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_make_time(ap_context_t *, ap_time_t *)
  + *    Create a time entity.
  + * arg 1) The context to operate on.
  + * arg 2) The new time entity to create.
  + */
   ap_status_t ap_make_time(ap_context_t *cont, struct atime_t **new)
   {
       (*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t));
  @@ -76,6 +82,11 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_current_time(ap_time_t *)
  + *    Return the number of seconds since January 1, 1970. 
  + * arg 1) The time entity to reference.
  + */
   ap_status_t ap_current_time(struct atime_t *new)
   {
       if (time(&new->currtime) == -1) {
  @@ -84,6 +95,15 @@
       return APR_SUCCESS; 
   }       
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_explode_time(ap_time_t *, ap_timetype_e)
  + *    Convert time value from number of seconds since epoch to a set
  + *    of integers representing the time in a human readable form.
  + * arg 1) The time entity to reference.
  + * arg 2) How to explode the time.  One of:
  + *            APR_LOCALTIME  -- Use local time
  + *            APR_UTCTIME    -- Use UTC time
  + */
   ap_status_t ap_explode_time(struct atime_t *time, ap_timetype_e type)
   {
       switch (type) {
  @@ -99,6 +119,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_implode_time(ap_time_t *)
  + *    Convert time value from human readable format to number of seconds 
  + *    since epoch
  + * arg 1) The time entity to reference.
  + */
   ap_status_t ap_implode_time(struct atime_t *time)
   {
       int year;
  @@ -134,6 +160,12 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_get_os_time(ap_time_t *, ap_os_time_t *)
  + *    Convert from apr time type to OS specific time value
  + * arg 1) The time value to convert.
  + * arg 2) The OS specific value to convert to.
  + */
   ap_status_t ap_get_os_time(struct atime_t *thetime, ap_os_time_t *atime)
   {
       if (thetime == NULL) {
  @@ -146,6 +178,13 @@
       return APR_SUCCESS;
   }
   
  +/* ***APRDOC********************************************************
  + * ap_status_t ap_put_os_time(ap_context_t *, ap_time_t **, ap_os_time_t *)
  + *    Convert to apr time type from OS specific time value
  + * arg 1) The context to use.
  + * arg 2) The time value to convert to.
  + * arg 3) The OS specific value to convert.
  + */
   ap_status_t ap_put_os_time(ap_context_t *cont, struct atime_t **thetime, 
                              ap_os_time_t *atime)
   {
  
  
  

Reply via email to