Back to index

php5  5.3.10
browscap.c
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Zeev Suraski <zeev@zend.com>                                 |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 /* $Id: browscap.c 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #include "php.h"
00022 #include "php_browscap.h"
00023 #include "php_ini.h"
00024 #include "php_string.h"
00025 #include "ext/pcre/php_pcre.h"
00026 
00027 #include "zend_ini_scanner.h"
00028 #include "zend_globals.h"
00029 
00030 typedef struct {
00031        HashTable *htab;
00032        zval *current_section;
00033        char *current_section_name;
00034        char filename[MAXPATHLEN];
00035 } browser_data;
00036 
00037 /* browser data defined in startup phase, eagerly loaded in MINIT */
00038 static browser_data global_bdata = {0};
00039 
00040 /* browser data defined in activation phase, lazily loaded in get_browser.
00041  * Per request and per thread, if applicable */
00042 ZEND_BEGIN_MODULE_GLOBALS(browscap)
00043        browser_data activation_bdata;
00044 ZEND_END_MODULE_GLOBALS(browscap)
00045 
00046 ZEND_DECLARE_MODULE_GLOBALS(browscap);
00047 
00048 #ifdef ZTS
00049 #define BROWSCAP_G(v)       TSRMG(browscap_globals_id, zend_browscap_globals *, v)
00050 #else
00051 #define BROWSCAP_G(v)       (browscap_globals.v)
00052 #endif
00053 
00054 #define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
00055 
00056 /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
00057 
00058 static void browscap_entry_dtor_request(zval **zvalue) /* {{{ */
00059 {
00060        if (Z_TYPE_PP(zvalue) == IS_ARRAY) {
00061               zend_hash_destroy(Z_ARRVAL_PP(zvalue));
00062               efree(Z_ARRVAL_PP(zvalue));
00063        } else if (Z_TYPE_PP(zvalue) == IS_STRING) {
00064               if (Z_STRVAL_PP(zvalue)) {
00065                      efree(Z_STRVAL_PP(zvalue));
00066               }
00067        }
00068        efree(*zvalue);
00069 }
00070 /* }}} */
00071 
00072 static void browscap_entry_dtor_persistent(zval **zvalue) /* {{{ */ {
00073        if (Z_TYPE_PP(zvalue) == IS_ARRAY) {
00074               zend_hash_destroy(Z_ARRVAL_PP(zvalue));
00075               free(Z_ARRVAL_PP(zvalue));
00076        } else if (Z_TYPE_PP(zvalue) == IS_STRING) {
00077               if (Z_STRVAL_PP(zvalue)) {
00078                      free(Z_STRVAL_PP(zvalue));
00079               }
00080        }
00081        free(*zvalue);
00082 }
00083 /* }}} */
00084 
00085 static void convert_browscap_pattern(zval *pattern, int persistent) /* {{{ */
00086 {
00087        int i, j=0;
00088        char *t;
00089 
00090        php_strtolower(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern));
00091 
00092        t = (char *) safe_pemalloc(Z_STRLEN_P(pattern), 2, 5, persistent);
00093 
00094        t[j++] = '\xA7'; /* section sign */
00095        t[j++] = '^';
00096 
00097        for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
00098               switch (Z_STRVAL_P(pattern)[i]) {
00099                      case '?':
00100                             t[j] = '.';
00101                             break;
00102                      case '*':
00103                             t[j++] = '.';
00104                             t[j] = '*';
00105                             break;
00106                      case '.':
00107                             t[j++] = '\\';
00108                             t[j] = '.';
00109                             break;
00110                      case '\\':
00111                             t[j++] = '\\';
00112                             t[j] = '\\';
00113                             break;
00114                      case '(':
00115                             t[j++] = '\\';
00116                             t[j] = '(';
00117                             break;
00118                      case ')':
00119                             t[j++] = '\\';
00120                             t[j] = ')';
00121                             break;
00122                      case '\xA7':
00123                             t[j++] = '\\';
00124                             t[j] = '\xA7';
00125                             break;
00126                      default:
00127                             t[j] = Z_STRVAL_P(pattern)[i];
00128                             break;
00129               }
00130        }
00131 
00132        t[j++] = '$';
00133        t[j++] = '\xA7';
00134 
00135        t[j]=0;
00136        Z_STRVAL_P(pattern) = t;
00137        Z_STRLEN_P(pattern) = j;
00138 }
00139 /* }}} */
00140 
00141 static void php_browscap_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg TSRMLS_DC) /* {{{ */
00142 {
00143        browser_data *bdata = arg;
00144        int persistent = bdata->htab->persistent;
00145        
00146        if (!arg1) {
00147               return;
00148        }
00149 
00150        switch (callback_type) {
00151               case ZEND_INI_PARSER_ENTRY:
00152                      if (bdata->current_section && arg2) {
00153                             zval *new_property;
00154                             char *new_key;
00155 
00156                             /* parent entry can not be same as current section -> causes infinite loop! */
00157                             if (!strcasecmp(Z_STRVAL_P(arg1), "parent") && 
00158                                    bdata->current_section_name != NULL &&
00159                                    !strcasecmp(bdata->current_section_name, Z_STRVAL_P(arg2))
00160                             ) {
00161                                    zend_error(E_CORE_ERROR, "Invalid browscap ini file: "
00162                                           "'Parent' value cannot be same as the section name: %s "
00163                                           "(in file %s)", bdata->current_section_name, INI_STR("browscap"));
00164                                    return;
00165                             }
00166 
00167                             new_property = (zval *) pemalloc(sizeof(zval), persistent);
00168                             INIT_PZVAL(new_property);
00169                             Z_TYPE_P(new_property) = IS_STRING;
00170 
00171                             /* Set proper value for true/false settings */
00172                             if ((Z_STRLEN_P(arg2) == 2 && !strncasecmp(Z_STRVAL_P(arg2), "on", sizeof("on") - 1)) ||
00173                                    (Z_STRLEN_P(arg2) == 3 && !strncasecmp(Z_STRVAL_P(arg2), "yes", sizeof("yes") - 1)) ||
00174                                    (Z_STRLEN_P(arg2) == 4 && !strncasecmp(Z_STRVAL_P(arg2), "true", sizeof("true") - 1))
00175                             ) {
00176                                    Z_STRVAL_P(new_property) = pestrndup("1", 1, persistent);
00177                                    Z_STRLEN_P(new_property) = 1;
00178                             } else if (
00179                                    (Z_STRLEN_P(arg2) == 2 && !strncasecmp(Z_STRVAL_P(arg2), "no", sizeof("no") - 1)) ||
00180                                    (Z_STRLEN_P(arg2) == 3 && !strncasecmp(Z_STRVAL_P(arg2), "off", sizeof("off") - 1)) ||
00181                                    (Z_STRLEN_P(arg2) == 4 && !strncasecmp(Z_STRVAL_P(arg2), "none", sizeof("none") - 1)) ||
00182                                    (Z_STRLEN_P(arg2) == 5 && !strncasecmp(Z_STRVAL_P(arg2), "false", sizeof("false") - 1))
00183                             ) {
00184                                    Z_STRVAL_P(new_property) = pestrndup("", 0, persistent);
00185                                    Z_STRLEN_P(new_property) = 0;
00186                             } else { /* Other than true/false setting */
00187                                    Z_STRVAL_P(new_property) = pestrndup(Z_STRVAL_P(arg2),
00188                                                  Z_STRLEN_P(arg2), persistent);
00189                                    Z_STRLEN_P(new_property) = Z_STRLEN_P(arg2);
00190                             }
00191                             new_key = pestrndup(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), persistent);
00192                             zend_str_tolower(new_key, Z_STRLEN_P(arg1));
00193                             zend_hash_update(Z_ARRVAL_P(bdata->current_section), new_key, Z_STRLEN_P(arg1) + 1, &new_property, sizeof(zval *), NULL);
00194                             pefree(new_key, persistent);
00195                      }
00196                      break;
00197               case ZEND_INI_PARSER_SECTION: {
00198                             zval *processed;
00199                             zval *unprocessed;
00200                             HashTable *section_properties;
00201 
00202                             /*printf("'%s' (%d)\n",$1.value.str.val,$1.value.str.len + 1);*/
00203                             bdata->current_section = (zval *) pemalloc(sizeof(zval), persistent);
00204                             INIT_PZVAL(bdata->current_section);
00205                             processed = (zval *) pemalloc(sizeof(zval), persistent);
00206                             INIT_PZVAL(processed);
00207                             unprocessed = (zval *) pemalloc(sizeof(zval), persistent);
00208                             INIT_PZVAL(unprocessed);
00209 
00210                             section_properties = (HashTable *) pemalloc(sizeof(HashTable), persistent);
00211                             zend_hash_init(section_properties, 0, NULL,
00212                                           (dtor_func_t) (persistent?browscap_entry_dtor_persistent
00213                                                                                      :browscap_entry_dtor_request),
00214                                           persistent);
00215                             Z_ARRVAL_P(bdata->current_section) = section_properties;
00216                             Z_TYPE_P(bdata->current_section) = IS_ARRAY;
00217                             if (bdata->current_section_name) {
00218                                    pefree(bdata->current_section_name, persistent);
00219                             }
00220                             bdata->current_section_name = pestrndup(Z_STRVAL_P(arg1),
00221                                           Z_STRLEN_P(arg1), persistent);
00222 
00223                             zend_hash_update(bdata->htab, Z_STRVAL_P(arg1), Z_STRLEN_P(arg1) + 1, (void *) &bdata->current_section, sizeof(zval *), NULL);
00224 
00225                             Z_STRVAL_P(processed) = Z_STRVAL_P(arg1);
00226                             Z_STRLEN_P(processed) = Z_STRLEN_P(arg1);
00227                             Z_TYPE_P(processed) = IS_STRING;
00228                             Z_STRVAL_P(unprocessed) = Z_STRVAL_P(arg1);
00229                             Z_STRLEN_P(unprocessed) = Z_STRLEN_P(arg1);
00230                             Z_TYPE_P(unprocessed) = IS_STRING;
00231                             Z_STRVAL_P(unprocessed) = pestrndup(Z_STRVAL_P(unprocessed), Z_STRLEN_P(unprocessed), persistent);
00232 
00233                             convert_browscap_pattern(processed, persistent);
00234                             zend_hash_update(section_properties, "browser_name_regex", sizeof("browser_name_regex"), (void *) &processed, sizeof(zval *), NULL);
00235                             zend_hash_update(section_properties, "browser_name_pattern", sizeof("browser_name_pattern"), (void *) &unprocessed, sizeof(zval *), NULL);
00236                      }
00237                      break;
00238        }
00239 }
00240 /* }}} */
00241 
00242 static int browscap_read_file(char *filename, browser_data *browdata, int persistent TSRMLS_DC) /* {{{ */
00243 {
00244        zend_file_handle fh = {0};
00245        
00246        if (filename == NULL || filename[0] == '\0') {
00247               return FAILURE;
00248        }
00249        
00250        browdata->htab = pemalloc(sizeof *browdata->htab, persistent);
00251        if (browdata->htab == NULL) {
00252               return FAILURE;
00253        }
00254 
00255        if (zend_hash_init_ex(browdata->htab, 0, NULL,
00256                      (dtor_func_t) (persistent?browscap_entry_dtor_persistent
00257                                                                 :browscap_entry_dtor_request),
00258                      persistent, 0) == FAILURE) {
00259               pefree(browdata->htab, persistent);
00260               browdata->htab = NULL;
00261               return FAILURE;
00262        }
00263 
00264        fh.handle.fp = VCWD_FOPEN(filename, "r");
00265        fh.opened_path = NULL;
00266        fh.free_filename = 0;
00267        if (!fh.handle.fp) {
00268               zend_hash_destroy(browdata->htab);
00269               pefree(browdata->htab, persistent);
00270               browdata->htab = NULL;
00271               zend_error(E_CORE_WARNING, "Cannot open '%s' for reading", filename);
00272               return FAILURE;
00273        }
00274        fh.filename = filename;
00275        Z_TYPE(fh) = ZEND_HANDLE_FP;
00276        browdata->current_section_name = NULL;
00277        zend_parse_ini_file(&fh, 1, ZEND_INI_SCANNER_RAW,
00278                      (zend_ini_parser_cb_t) php_browscap_parser_cb, browdata TSRMLS_CC);
00279        if (browdata->current_section_name != NULL) {
00280               pefree(browdata->current_section_name, persistent);
00281               browdata->current_section_name = NULL;
00282        }
00283        
00284        return SUCCESS;
00285 }
00286 /* }}} */
00287 
00288 #ifdef ZTS
00289 static void browscap_globals_ctor(zend_browscap_globals *browscap_globals TSRMLS_DC) /* {{{ */
00290 {
00291        browscap_globals->activation_bdata.htab = NULL;
00292        browscap_globals->activation_bdata.current_section = NULL;
00293        browscap_globals->activation_bdata.current_section_name = NULL;
00294        browscap_globals->activation_bdata.filename[0] = '\0';
00295 }
00296 /* }}} */
00297 #endif
00298 
00299 static void browscap_bdata_dtor(browser_data *bdata, int persistent TSRMLS_DC) /* {{{ */
00300 {
00301        if (bdata->htab != NULL) {
00302               zend_hash_destroy(bdata->htab);
00303               pefree(bdata->htab, persistent);
00304               bdata->htab = NULL;
00305        }
00306        bdata->filename[0] = '\0';
00307        /* current_section_* are only used during parsing */
00308 }
00309 /* }}} */
00310 
00311 /* {{{ PHP_INI_MH
00312  */
00313 PHP_INI_MH(OnChangeBrowscap)
00314 {
00315        if (stage == PHP_INI_STAGE_STARTUP) {
00316               /* value handled in browscap.c's MINIT */
00317               return SUCCESS;
00318        } else if (stage == PHP_INI_STAGE_ACTIVATE) {
00319               browser_data *bdata = &BROWSCAP_G(activation_bdata);
00320               if (bdata->filename[0] != '\0') {
00321                      browscap_bdata_dtor(bdata, 0 TSRMLS_CC);
00322               }
00323               if (VCWD_REALPATH(new_value, bdata->filename) == NULL) {
00324                      return FAILURE;
00325               }
00326               return SUCCESS;
00327        }
00328        
00329        return FAILURE;
00330 }
00331 /* }}} */
00332 
00333 PHP_MINIT_FUNCTION(browscap) /* {{{ */
00334 {
00335        char *browscap = INI_STR("browscap");
00336        
00337 #ifdef ZTS
00338        ts_allocate_id(&browscap_globals_id, sizeof(browser_data),
00339               (ts_allocate_ctor)browscap_globals_ctor, NULL);
00340 #endif
00341        /* ctor call not really needed for non-ZTS */
00342 
00343        if (browscap && browscap[0]) {
00344               if (browscap_read_file(browscap, &global_bdata, 1 TSRMLS_CC) == FAILURE) {
00345                      return FAILURE;
00346               }
00347        }
00348 
00349        return SUCCESS;
00350 }
00351 /* }}} */
00352 
00353 PHP_RSHUTDOWN_FUNCTION(browscap) /* {{{ */
00354 {
00355        browser_data *bdata = &BROWSCAP_G(activation_bdata);
00356        if (bdata->filename[0] != '\0') {
00357               browscap_bdata_dtor(bdata, 0 TSRMLS_CC);
00358        }
00359        
00360        return SUCCESS;
00361 }
00362 /* }}} */
00363 
00364 PHP_MSHUTDOWN_FUNCTION(browscap) /* {{{ */
00365 {
00366        browscap_bdata_dtor(&global_bdata, 1 TSRMLS_CC);
00367        
00368        return SUCCESS;
00369 }
00370 /* }}} */
00371 
00372 static int browser_reg_compare(zval **browser TSRMLS_DC, int num_args, va_list args, zend_hash_key *key) /* {{{ */
00373 {
00374        zval **browser_regex, **previous_match;
00375        pcre *re;
00376        int re_options;
00377        pcre_extra *re_extra;
00378        char *lookup_browser_name = va_arg(args, char *);
00379        int lookup_browser_length = va_arg(args, int);
00380        zval **found_browser_entry = va_arg(args, zval **);
00381 
00382        /* See if we have an exact match, if so, we're done... */
00383        if (*found_browser_entry) {
00384               if (zend_hash_find(Z_ARRVAL_PP(found_browser_entry), "browser_name_pattern", sizeof("browser_name_pattern"), (void**) &previous_match) == FAILURE) {
00385                      return 0;
00386               }
00387               else if (!strcasecmp(Z_STRVAL_PP(previous_match), lookup_browser_name)) {
00388                      return 0;
00389               }
00390        }
00391 
00392        if (zend_hash_find(Z_ARRVAL_PP(browser), "browser_name_regex", sizeof("browser_name_regex"), (void **) &browser_regex) == FAILURE) {
00393               return 0;
00394        }
00395 
00396        re = pcre_get_compiled_regex(Z_STRVAL_PP(browser_regex), &re_extra, &re_options TSRMLS_CC);
00397        if (re == NULL) {
00398               return 0;
00399        }
00400 
00401        if (pcre_exec(re, re_extra, lookup_browser_name, lookup_browser_length, 0, re_options, NULL, 0) == 0) {
00402               /* If we've found a possible browser, we need to do a comparison of the
00403                  number of characters changed in the user agent being checked versus
00404                  the previous match found and the current match. */
00405               if (*found_browser_entry) {
00406                      int i, prev_len = 0, curr_len = 0, ua_len;
00407                      zval **current_match;
00408 
00409                      if (zend_hash_find(Z_ARRVAL_PP(browser), "browser_name_pattern", sizeof("browser_name_pattern"), (void**) &current_match) == FAILURE) {
00410                             return 0;
00411                      }
00412 
00413                      ua_len = lookup_browser_length;
00414 
00415                      for (i = 0; i < Z_STRLEN_PP(previous_match); i++) {
00416                             switch (Z_STRVAL_PP(previous_match)[i]) {
00417                                    case '?':
00418                                    case '*':
00419                                           /* do nothing, ignore these characters in the count */
00420                                    break;
00421 
00422                                    default:
00423                                           ++prev_len;
00424                             }
00425                      }
00426 
00427                      for (i = 0; i < Z_STRLEN_PP(current_match); i++) {
00428                             switch (Z_STRVAL_PP(current_match)[i]) {
00429                                    case '?':
00430                                    case '*':
00431                                           /* do nothing, ignore these characters in the count */
00432                                    break;
00433 
00434                                    default:
00435                                           ++curr_len;
00436                             }
00437                      }
00438 
00439                      /* Pick which browser pattern replaces the least amount of
00440                         characters when compared to the original user agent string... */
00441                      if (ua_len - prev_len > ua_len - curr_len) {
00442                             *found_browser_entry = *browser;
00443                      }
00444               }
00445               else {
00446                      *found_browser_entry = *browser;
00447               }
00448        }
00449 
00450        return 0;
00451 }
00452 /* }}} */
00453 
00454 /* {{{ proto mixed get_browser([string browser_name [, bool return_array]])
00455    Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array. */
00456 PHP_FUNCTION(get_browser)
00457 {
00458        char *agent_name = NULL;
00459        int agent_name_len = 0;
00460        zend_bool return_array = 0;
00461        zval **agent, **z_agent_name, **http_user_agent;
00462        zval *found_browser_entry, *tmp_copy;
00463        char *lookup_browser_name;
00464        browser_data *bdata;
00465 
00466        if (BROWSCAP_G(activation_bdata).filename[0] != '\0') {
00467               bdata = &BROWSCAP_G(activation_bdata);
00468               if (bdata->htab == NULL) { /* not initialized yet */
00469                      if (browscap_read_file(bdata->filename, bdata, 0 TSRMLS_CC) == FAILURE) {
00470                             RETURN_FALSE;
00471                      }
00472               }
00473        } else {
00474               if (!global_bdata.htab) {
00475                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "browscap ini directive not set");
00476                      RETURN_FALSE;
00477               }
00478               bdata = &global_bdata;
00479        }
00480 
00481        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &agent_name, &agent_name_len, &return_array) == FAILURE) {
00482               return;
00483        }
00484 
00485        if (agent_name == NULL) {
00486               zend_is_auto_global("_SERVER", sizeof("_SERVER") - 1 TSRMLS_CC);
00487               if (!PG(http_globals)[TRACK_VARS_SERVER] ||
00488                      zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT"), (void **) &http_user_agent) == FAILURE
00489               ) {
00490                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "HTTP_USER_AGENT variable is not set, cannot determine user agent name");
00491                      RETURN_FALSE;
00492               }
00493               agent_name = Z_STRVAL_PP(http_user_agent);
00494               agent_name_len = Z_STRLEN_PP(http_user_agent);
00495        }
00496 
00497        lookup_browser_name = estrndup(agent_name, agent_name_len);
00498        php_strtolower(lookup_browser_name, agent_name_len);
00499 
00500        if (zend_hash_find(bdata->htab, lookup_browser_name, agent_name_len + 1, (void **) &agent) == FAILURE) {
00501               found_browser_entry = NULL;
00502               zend_hash_apply_with_arguments(bdata->htab TSRMLS_CC, (apply_func_args_t) browser_reg_compare, 3, lookup_browser_name, agent_name_len, &found_browser_entry);
00503 
00504               if (found_browser_entry) {
00505                      agent = &found_browser_entry;
00506               } else if (zend_hash_find(bdata->htab, DEFAULT_SECTION_NAME, sizeof(DEFAULT_SECTION_NAME), (void **) &agent) == FAILURE) {
00507                      efree(lookup_browser_name);
00508                      RETURN_FALSE;
00509               }
00510        }
00511 
00512        if (return_array) {
00513               array_init(return_value);
00514               zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_PP(agent), (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
00515        }
00516        else {
00517               object_init(return_value);
00518               zend_hash_copy(Z_OBJPROP_P(return_value), Z_ARRVAL_PP(agent), (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
00519        }
00520 
00521        while (zend_hash_find(Z_ARRVAL_PP(agent), "parent", sizeof("parent"), (void **) &z_agent_name) == SUCCESS) {
00522               if (zend_hash_find(bdata->htab, Z_STRVAL_PP(z_agent_name), Z_STRLEN_PP(z_agent_name) + 1, (void **)&agent) == FAILURE) {
00523                      break;
00524               }
00525 
00526               if (return_array) {
00527                      zend_hash_merge(Z_ARRVAL_P(return_value), Z_ARRVAL_PP(agent), (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *), 0);
00528               }
00529               else {
00530                      zend_hash_merge(Z_OBJPROP_P(return_value), Z_ARRVAL_PP(agent), (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *), 0);
00531               }
00532        }
00533 
00534        efree(lookup_browser_name);
00535 }
00536 /* }}} */
00537 
00538 /*
00539  * Local variables:
00540  * tab-width: 4
00541  * c-basic-offset: 4
00542  * End:
00543  * vim600: sw=4 ts=4 fdm=marker
00544  * vim<600: sw=4 ts=4
00545  */