Update of /cvsroot/mod-xhtml-neg/mod_xhtml_neg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4162
Modified Files:
mod_xhtml_neg.c
Log Message:
Function comments added.
Index: mod_xhtml_neg.c
===================================================================
RCS file: /cvsroot/mod-xhtml-neg/mod_xhtml_neg/mod_xhtml_neg.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** mod_xhtml_neg.c 12 Mar 2004 09:32:59 -0000 1.14
--- mod_xhtml_neg.c 12 Mar 2004 09:48:31 -0000 1.15
***************
*** 167,170 ****
--- 167,175 ----
/*
+ * Utility functions for strings, since we can't rely on these functions being
+ * included.
+ */
+
+ /*
* Test whether a string is empty without having to do a full scan of the
* string just to return a length, as per strlen.
***************
*** 197,202 ****
/*
! * Utility functions for strings, since we can't rely on these functions being
! * included.
*/
--- 202,206 ----
/*
! * Compare one string against another in a case-sensitive manner.
*/
***************
*** 231,234 ****
--- 235,242 ----
}
+ /*
+ * Compare one string against another in a case-insensitive manner.
+ */
+
static int mod_xhtml_stricmp( const char *str1, const char *str2 ) {
int offset = 0;
***************
*** 270,273 ****
--- 278,286 ----
}
+ /*
+ * Compare strings up to a specified limit in a case-sensitive manner.
+ * If a NULL byte is encountered, finish comparing at that character.
+ */
+
static int mod_xhtml_strncmp( const char *str1, const char *str2,
const int len ) {
***************
*** 302,305 ****
--- 315,323 ----
}
+ /*
+ * Compare strings up to a specified limit in a case-insensitive manner.
+ * If a NULL byte is encountered, finish comparing at that character.
+ */
+
static int mod_xhtml_strnicmp( const char *str1, const char *str2,
const int len ) {
***************
*** 344,347 ****
--- 362,370 ----
}
+ /*
+ * Determines if the given string end with the given suffix. Case matching
+ * can be enabled or disabled.
+ */
+
static int mod_xhtml_strendswith( const char *reference, const char *suffix,
const int casecompare ) {
***************
*** 1121,1125 ****
accept_charsets = do_accept_charset_line(r->pool, accept_charset);
! /* Allocate storage for index of result, used in Etag. */
result_rec = best_match( accept_types, content_types,
accept_charsets, conf->stars_ignore,
--- 1144,1148 ----
accept_charsets = do_accept_charset_line(r->pool, accept_charset);
! /* Find accept_rec of best result, if any. */
result_rec = best_match( accept_types, content_types,
accept_charsets, conf->stars_ignore,
***************
*** 1168,1171 ****
--- 1191,1198 ----
/* All Apache configuration file code goes here... */
+ /*
+ * Is this module active for the given directory.
+ */
+
static const char *set_xhtml_active(cmd_parms *cmd,
xhtml_dir_config *dir_config, int arg)
***************
*** 1182,1185 ****
--- 1209,1217 ----
}
+ /*
+ * Set whether HTTP 1.0 caching should be allowed. Default to "no" unless
+ * specifically overridden.
+ */
+
static const char *set_xhtml_cache_negotiated(cmd_parms *cmd, void *dummy,
int arg)
***************
*** 1197,1200 ****
--- 1229,1236 ----
}
+ /*
+ * Add content types for the given file extension.
+ */
+
static const char *add_xhtml_type(cmd_parms *cmd, xhtml_dir_config *t,
char *ext, char *contenttype)
***************
*** 1226,1229 ****
--- 1262,1270 ----
}
+ /*
+ * Note the minimun number of stars in an Accept token that should be
+ * ignored when performing negotiation.
+ */
+
static const char *add_xhtml_ignore(cmd_parms *cmd, xhtml_dir_config *t,
char *stars)
***************
*** 1244,1247 ****
--- 1285,1292 ----
}
+ /*
+ * Set the log file name for this module.
+ */
+
static const char *add_xhtml_log(cmd_parms *cmd, void *dummy, char *logfile)
{
***************
*** 1257,1260 ****
--- 1302,1309 ----
}
+ /*
+ * Create a default XHTML negotiation module configuration record.
+ */
+
static void *make_xhtml_neg_state (pool *p, server_rec *s)
{
***************
*** 1269,1272 ****
--- 1318,1325 ----
}
+ /*
+ * Create a default directory configuration module.
+ */
+
static void *create_xhtml_dir_config(pool *p, char *dummy)
{
***************
*** 1280,1283 ****
--- 1333,1340 ----
}
+ /*
+ * Merge configuration info from different directories.
+ */
+
static void *merge_xhtml_dir_configs(pool *p, void *basev, void *addv)
{
***************
*** 1319,1322 ****
--- 1376,1383 ----
}
+ /*
+ * Initialize the log file, if one is specified.
+ */
+
static void init_xhtml_log (server_rec *s, pool *p)
{
|