coar98/09/02 14:04:43
Modified:htdocs/manual/mod mod_autoindex.html
src CHANGES
src/modules/standard mod_autoindex.c
Log:
Update the filname column width-sizing piece of mod_autoindex
so that it's customisable with a NameLength keyword on the
IndexOptions directive. A value of '*' means 'as wide as the
longest filename,' which was the default effect of the last
patch in this area.
PR: 1949, 2324
Revision ChangesPath
1.21 +12 -2 apache-1.3/htdocs/manual/mod/mod_autoindex.html
Index: mod_autoindex.html
===
RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_autoindex.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- mod_autoindex.html1998/08/31 01:18:48 1.20
+++ mod_autoindex.html1998/09/02 21:04:39 1.21
@@ -482,10 +482,14 @@
DD!--%plaintext lt;?INDEX {\tt FancyIndexing} index optiongt; --
This turns on fancy indexing of directories.
BLOCKQUOTE
- STRONGNote that the SAMPFancyIndexing/SAMP and
+ STRONGNote that in versions of Apache prior to 1.3.2, the
+ SAMPFancyIndexing/SAMP and
SAMPIndexOptions/SAMP directives will override each other. You
should use SAMPIndexOptionsnbsp;FancyIndexing/SAMP in preference
- to the standalone SAMPFancyIndexing/SAMP directive./STRONG
+ to the standalone SAMPFancyIndexing/SAMP directive.
+ As of Apache 1.3.2, a standalone SAMPFancyIndexing/SAMP directive
+ is combined with any SAMPIndexOptions/SAMP directive already
+ specified for the current scope./STRONG
/BLOCKQUOTE
DTIconHeight[=pixels] (EMApache 1.3 and later/EM)
DD
@@ -512,6 +516,12 @@
images have been loaded. If no value is given for the option, it
defaults to the standard width of the icons supplied with the Apache
software.
+DTNameLength=[EMn/EM | *] (EMApache 1.3.2 and later/EM)
+DD
+The NameLength keyword allows you to specify the width of the
+filename column in bytes. If the keyword value is 'SAMP*/SAMP',
+then the column is automatically sized to the length of the longest
+filename in the display.
DTScanHTMLTitles
DD!--%plaintext lt;?INDEX {\tt ScanHTMLTitles} index optiongt; --
This enables the extraction of the title from HTML documents for fancy
1.1044+4 -0 apache-1.3/src/CHANGES
Index: CHANGES
===
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1043
retrieving revision 1.1044
diff -u -r1.1043 -r1.1044
--- CHANGES 1998/09/01 17:21:11 1.1043
+++ CHANGES 1998/09/02 21:04:40 1.1044
@@ -1,5 +1,9 @@
Changes with Apache 1.3.2
+ *) Add NameWidth keyword to IndexOptions directive so that the
+ width of the filename column is customisable. [Ken Coar, Dean Gaudet]
+ PR#1949, 2324.
+
*) Recognize lowercase _and_ uppercase `uname' results under
SCO OpenServer. [David Coelho [EMAIL PROTECTED]]
1.91 +103 -11 apache-1.3/src/modules/standard/mod_autoindex.c
Index: mod_autoindex.c
===
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- mod_autoindex.c 1998/08/31 01:18:53 1.90
+++ mod_autoindex.c 1998/09/02 21:04:41 1.91
@@ -94,6 +94,9 @@
#define SUPPRESS_PREAMBLE 64
#define SUPPRESS_COLSORT 128
+#define K_PAD 1
+#define K_NOPAD 0
+
/*
* Define keys for sorting.
*/
@@ -111,6 +114,11 @@
#define DEFAULT_ICON_WIDTH 20
#define DEFAULT_ICON_HEIGHT 22
+/*
+ * Other default dimensions.
+ */
+#define DEFAULT_NAME_WIDTH 23
+
struct item {
char *type;
char *apply_to;
@@ -122,6 +130,8 @@
char *default_icon;
int opts;
+int name_width;
+int name_adjust;
int icon_width;
int icon_height;
@@ -335,6 +345,19 @@
else if (!strncasecmp(w, IconHeight=, 11)) {
d_cfg-icon_height = atoi(w[11]);
}
+ else if (!strncasecmp(w, NameWidth=, 10)) {
+ if (w[10] == '*') {
+ d_cfg-name_adjust = 1;
+ }
+ else {
+ int width = atoi(w[10]);
+
+ if (width 1) {
+ return NameWidth value must be greater than 1;
+ }
+ d_cfg-name_width = width;
+ }
+ }
else {
return Invalid directory indexing option;
}
@@ -382,6 +405,8 @@
new-icon_width = 0;
new-icon_height = 0;
+new-name_width = DEFAULT_NAME_WIDTH;
+new-name_adjust = 0;
new-icon_list = ap_make_array(p, 4, sizeof(struct item));