tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_map.c jk_msg_buff.c jk_msg_buff.h
Date Tue, 04 Dec 2001 19:09:20 GMT
costin      01/12/04 11:09:20

  Modified:    jk/native2/common jk_map.c jk_msg_buff.c jk_msg_buff.h
  Log:
  Remove include, update names.
  
  Consolidate methods related with map handling in jk_map.c
  
  Revision  Changes    Path
  1.2       +23 -4     jakarta-tomcat-connectors/jk/native2/common/jk_map.c
  
  Index: jk_map.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_map.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_map.c	2001/12/01 22:38:39	1.1
  +++ jk_map.c	2001/12/04 19:09:19	1.2
  @@ -58,14 +58,13 @@
   /***************************************************************************
    * Description: General purpose map object                                 *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
  - * Version:     $Revision: 1.1 $                                           *
  + * Version:     $Revision: 1.2 $                                           *
    ***************************************************************************/
   
   #include "jk_global.h"
   #include "jk_map.h"
   #include "jk_pool.h"
   #include "jk_map.h"
  -#include "jk_util.h"
   
   #define CAPACITY_INC_SIZE (50)
   #define LENGTH_OF_LINE    (1024)
  @@ -287,6 +286,25 @@
       return rc;
   }
   
  +
  +/* XXX Very strange hack to deal with special properties
  + */
  +int jk_is_some_property(const char *prp_name, const char *suffix)
  +{
  +    if (prp_name && suffix) {
  +		size_t prp_name_len = strlen(prp_name);
  +		size_t suffix_len = strlen(suffix);
  +		if (prp_name_len >= suffix_len) {
  +			const char *prp_suffix = prp_name + prp_name_len - suffix_len;
  +			if(0 == strcmp(suffix, prp_suffix)) {
  +		        return JK_TRUE;
  +			}
  +        }
  +    }
  +
  +    return JK_FALSE;
  +}
  +
   int map_read_properties(jk_map_t *m,
                           const char *f)
   {
  @@ -311,14 +329,15 @@
                           if(strlen(v) && strlen(prp)) {
                               char *oldv = map_get_string(m, prp, NULL);
                               v = map_replace_properties(v, m);
  +
                               if(oldv) {
                                   char *tmpv = jk_pool_alloc(&m->p, 
                                                              strlen(v) + strlen(oldv) + 3);
                                   if(tmpv) {
                                       char sep = '*';
  -                                    if(jk_is_path_poperty(prp)) {
  +                                    if(jk_is_some_property(prp, "path")) {
                                           sep = PATH_SEPERATOR;
  -                                    } else if(jk_is_cmd_line_poperty(prp)) {
  +                                    } else if(jk_is_some_property(prp, "cmd_line")) {
                                           sep = ' ';
                                       }
   
  
  
  
  1.3       +1 -2      jakarta-tomcat-connectors/jk/native2/common/jk_msg_buff.c
  
  Index: jk_msg_buff.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_msg_buff.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jk_msg_buff.c	2001/12/02 01:05:25	1.2
  +++ jk_msg_buff.c	2001/12/04 19:09:20	1.3
  @@ -60,11 +60,10 @@
    * Author:      Costin <costin@costin.dnt.ro>                              *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
    * Author:      Henri Gomez <hgomez@slib.fr>                               *
  - * Version:     $Revision: 1.2 $                                           *
  + * Version:     $Revision: 1.3 $                                           *
    ***************************************************************************/
   
   #include "jk_pool.h"
  -#include "jk_util.h"
   #include "jk_msg_buff.h"
   #include "jk_logger.h"
   
  
  
  
  1.2       +8 -6      jakarta-tomcat-connectors/jk/native2/common/jk_msg_buff.h
  
  Index: jk_msg_buff.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_msg_buff.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jk_msg_buff.h	2001/12/01 22:40:10	1.1
  +++ jk_msg_buff.h	2001/12/04 19:09:20	1.2
  @@ -59,12 +59,14 @@
    * Description: Data marshaling. XDR like                                  *
    * Author:      Costin <costin@costin.dnt.ro>                              *
    * Author:      Gal Shachor <shachor@il.ibm.com>                           *
  - * Version:     $Revision: 1.1 $                                           *
  + * Version:     $Revision: 1.2 $                                           *
    ***************************************************************************/
   
   #ifndef JK_MSG_BUF_H
   #define JK_MSG_BUF_H
   
  +#include "jk_pool.h"
  +#include "jk_logger.h"
   
   #ifdef __cplusplus
   extern "C" {
  @@ -213,11 +215,11 @@
   
   /* --------------------- Help ------------------------ */
   void jk_dump_buff(jk_logger_t *l, 
  -                      const char *file,
  -                      int line,
  -                      int level,
  -                      char * what,
  -                      jk_msg_buf_t * msg);
  +                  const char *file,
  +                  int line,
  +                  int level,
  +                  char * what,
  +                  jk_msg_buf_t * msg);
   
   #ifdef __cplusplus
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message