Annotation of cvsweb/cvsweb.conf, Revision 4.8
4.2 schwarze 1: # -*- perl -*-
4.8 ! schwarze 2: # $Id: cvsweb.conf,v 4.7 2019/11/11 14:37:54 schwarze Exp $
4.2 schwarze 3: # $doc: cvsweb.conf,v 1.38 2006/01/19 19:53:38 ceri
4: # $knu: cvsweb.conf,v 1.97 2005/06/19 09:13:50 scop
5: #
3.76 scop 6: # Configuration of cvsweb.cgi, a web interface to CVS repositories.
3.1 knu 7: #
8: # (c) 1998-1999 H. Zeller <zeller@think.de>
9: # 1999 H. Nordstrom <hno@hem.passagen.se>
3.30 knu 10: # 2000-2002 A. MUSHA <knu@FreeBSD.org>
3.95 scop 11: # 2002-2005 V. Skyttä <scop@FreeBSD.org>
3.1 knu 12: # based on work by Bill Fenner <fenner@FreeBSD.org>
13:
3.92 scop 14: #
15: # Unless otherwise noted, all boolean parameters here default to off
16: # when no value for them has been explicitly set.
17: #
18:
3.19 knu 19: # Set the path for the following commands:
3.47 scop 20: # cvs, rlog, rcsdiff
3.19 knu 21: # gzip (if you enable $allow_compress)
3.47 scop 22: # (g)tar, zip (if you enable $allow_tar)
3.71 scop 23: # enscript (if you enable $allow_enscript)
3.58 scop 24: #
3.73 scop 25: @command_path = qw(/bin /usr/bin /usr/local/bin);
3.19 knu 26:
3.47 scop 27: # Search the above directories for each command (prefer gtar over tar).
3.58 scop 28: #
4.7 schwarze 29: for (qw(cvs rlog rcsdiff gzip gtar zip enscript)) {
3.26 knu 30: $CMD{$_} = search_path($_);
3.19 knu 31: }
3.47 scop 32: $CMD{tar} = delete($CMD{gtar}) if $CMD{gtar};
33: $CMD{tar} ||= search_path('tar');
3.19 knu 34:
3.53 scop 35: # CVS roots
36: #
37: # CVSweb can handle several CVS repositories at once. Enter short (internal)
38: # symbolic repository names, their names in the UI and the actual locations
39: # here. The repositories will be listed in the order they're specified here.
40: #
3.93 scop 41: # Obviously, CVSweb will need read access to these repository dirs. If you
42: # receive an error that no valid CVS roots were found, double-check the file
43: # permissions and any other attributes your system may have for the repository
44: # directories, such as SELinux file contexts.
45: #
3.76 scop 46: # CVSweb will also load per-cvsroot configuration files if they exist.
47: # The symbolic_name (see below) of the CVS root will be concatenated into the
48: # name of the main (this) configuration file along with a hyphen, and that
49: # file will be loaded for that particular CVS root. For examples, see
50: # cvsweb.conf-* in the CVSweb distribution.
51: #
3.53 scop 52: # Note that only local repositories are currently supported. Things like
53: # :pserver:someone@xyz.com:/data/cvsroot won't work.
54: #
55: # 'symbolic_name' => ['Name to display', '/path/to/cvsroot']
56: #
3.17 knu 57: @CVSrepositories = (
4.4 schwarze 58: 'local' => ['Local Repository', '/cvs'],
3.26 knu 59: );
3.1 knu 60:
3.53 scop 61: # The default CVS root. Note that @CVSrepositories is list, not a hash,
62: # so you'll want to use 2 * 0-based-index-number here; or set this directly
63: # to the default's symbolic name. Unless specified, the first valid one in
64: # @CVSrepositories is used as the default.
65: #
66: # For example:
67: #
68: #$cvstreedefault = $CVSrepositories[2 * 0];
69: #$cvstreedefault = 'local';
3.1 knu 70:
3.88 scop 71: # Mirror sites. The keys will be used as link texts, and the values are
72: # URLs pointing to the corresponding mirrors.
73: #
74: #%MIRRORS = (
75: # 'Other location' => 'http://192.168.0.1/cgi-bin/cvsweb.cgi/',
76: # 'Yet another one' => 'http://192.168.0.2/cgi-bin/cvsweb.cgi/',
77: #);
78:
3.92 scop 79: # Manual gateway linking. This will be done only for views for which
80: # $allow_*_extra below is true.
3.76 scop 81: #
3.26 knu 82: $mancgi =
3.98 ceri 83: "http://www.FreeBSD.org/cgi/man.cgi?apropos=0&sektion=%s&query=%s&manpath=FreeBSD+7.0-current&format=html";
3.1 knu 84:
3.90 scop 85: # Defaults for user definable options.
3.76 scop 86: #
3.1 knu 87: %DEFAULTVALUE = (
3.26 knu 88:
3.76 scop 89: # sortby: File sort order
90: # file Sort by filename
91: # rev Sort by revision number
92: # date Sort by commit date
93: # author Sort by author
94: # log Sort by log message
95: "sortby" => "file",
96:
97: # ignorecase: Ignore case in sorts (filenames, authors, log messages)
98: # 0 Honor case
99: # 1 Ignore case
100: "ignorecase" => "0",
101:
102: # hideattic: Hide or show files in Attic
103: # 1 Hide files in Attic
104: # 0 Show files in Attic
105: "hideattic" => "1",
106:
107: # logsort: Sort order for CVS logs
108: # date Sort revisions by date
109: # rev Sort revision by revision number
110: # cvs Don't sort them. Same order as CVS/RCS shows them.
111: "logsort" => "date",
112:
113: # f: Default diff format
114: # h Human readable
115: # u Unified diff
116: # c Context diff
117: # uc Unified diff, enscript colored (falls back to "u" w/o enscript)
118: # cc Context diff, enscript colored (falls back to "c" w/o enscript)
119: "f" => "u",
120:
3.90 scop 121: # hidecvsroot: Don't show the CVSROOT directory. Note that this is
122: # just the default for a user settable option (like others in this
123: # %DEFAULTVALUE hash); it won't really prevent access to CVSROOT.
124: # See @ForbiddenFiles for that.
125: # 1 Do not include the top-level CVSROOT directory in dir listings
126: # 0 Treat the top-level CVSROOT directory just like all other dirs
3.76 scop 127: "hidecvsroot" => "0",
128:
3.90 scop 129: # hidenonreadable: Don't show files and directories that cannot be read
130: # in directory listings.
3.76 scop 131: # 1 Hide non-readable entries
132: # 0 Show non-readable entries
133: "hidenonreadable" => "1",
134:
135: # ln: Show line numbers in HTMLized views
136: # 1 Show line numbers
137: # 0 Don't show line numbers
138: "ln" => "0",
3.1 knu 139: );
140:
3.76 scop 141: #
142: # Layout options (see also the included CSS file)
143: #
3.1 knu 144:
145: # Wanna have a logo on the page ?
3.58 scop 146: #
3.79 scop 147: #$logo = '<p><img src="/icons/apache_pb.gif" alt="Powered by Apache" /></p>';
3.1 knu 148:
3.79 scop 149: # The title of the Page on startup. This will be put inside <h1> and <title>
150: # tags, and HTML escaped.
3.58 scop 151: #
3.1 knu 152: $defaulttitle = "CVS Repository";
153:
3.34 scop 154: # The address is shown on the footer. This will be put inside a <address> tag.
3.58 scop 155: #
4.5 schwarze 156: $address = '<span style="font-size: smaller">CVSweb</span>';
3.1 knu 157:
158: $long_intro = <<EOT;
159: <p>
3.81 scop 160: This is a WWW interface for CVS repositories.
3.67 scop 161: You can browse the file hierarchy by following directory links (which
162: have slashes after them, e.g. <code>src/</code>).
163: If you follow a link to a file, you will see its revision history.
164: Following a link labeled with a revision number will display that
165: revision of the file. In the revision history view, there is a link
166: near each revision to display diffs between that revision and the
167: previous one, and a form at the bottom of the page that allows you to
3.1 knu 168: display diffs between arbitrary revisions.
3.67 scop 169: </p><p>
3.33 scop 170: This script has been written by Bill Fenner and improved by Henner Zeller,
171: Henrik Nordström, and Ken Coar, then Akinori MUSHA brought it
3.22 knu 172: back to FreeBSD community and made further improvements; it is covered
3.33 scop 173: by <a
3.97 scop 174: href="http://www.opensource.org/licenses/bsd-license.html">The BSD License</a>.
3.67 scop 175: </p><p>
3.1 knu 176: If you would like to use this CGI script on your own web server and
4.5 schwarze 177: CVS tree, download the latest version from
178: <<a href="http://cvsweb.bsd.lv/">http://cvsweb.bsd.lv/</a>>.
3.1 knu 179: </p>
180: EOT
181:
182: $short_instruction = <<EOT;
183: <p>
184: Click on a directory to enter that directory. Click on a file to display
3.32 scop 185: its revision history and to get a chance to display diffs between revisions.
3.1 knu 186: </p>
187: EOT
188:
3.42 scop 189: # Icons for the web UI. If ICON-URL is empty, the TEXT representation is
190: # used. If you do not want to have a tool tip for an icon, set TEXT empty.
191: # The width and height of the icon allow the browser to correctly display
192: # the table while still loading the icons. If these icons are too large,
193: # check out the "mini" versions in the icons/ directory; they have a
194: # width/height of 16/16.
3.58 scop 195: #
3.42 scop 196: my $iconsdir = '/icons';
197:
3.51 scop 198: # format: TEXT ICON-URL width height
3.26 knu 199: %ICONS = (
3.51 scop 200: back => [('[BACK]', "$iconsdir/back.gif", 20, 22)],
201: dir => [('[DIR]', "$iconsdir/dir.gif", 20, 22)],
202: file => [('[TXT]', "$iconsdir/text.gif", 20, 22)],
3.87 scop 203: binfile => [('[BIN]', "$iconsdir/binary.gif", 20, 22)],
3.26 knu 204: );
3.15 knu 205: undef $iconsdir;
3.1 knu 206:
3.43 scop 207: # An URL where to find the CSS.
3.58 scop 208: #
3.43 scop 209: $cssurl = '/css/cvsweb.css';
210:
3.76 scop 211: # The length to which the last log entry should be truncated when shown
212: # in the directory view.
3.58 scop 213: #
3.1 knu 214: $shortLogLen = 80;
215:
3.76 scop 216: # Show author of last change?
3.58 scop 217: #
3.1 knu 218: $show_author = 1;
219:
3.76 scop 220: # Cell padding for directory table.
3.58 scop 221: #
3.1 knu 222: $tablepadding = 2;
223:
3.91 scop 224: # Regular expressions for files and directories which should be hidden.
3.75 scop 225: # Each regexp is compared against a path relative to a CVS root, after
226: # stripping the trailing ",v" if present. Matching files and directories
227: # are not displayed.
3.58 scop 228: #
3.27 knu 229: @ForbiddenFiles = (
3.74 scop 230: qr|^CVSROOT/+passwd$|o, # CVSROOT/passwd should not be 'cvs add'ed though.
231: qr|/\.cvspass$|o, # Ditto. Just in case.
3.75 scop 232: #qr|^my/+secret/+dir|o,
3.27 knu 233: );
3.1 knu 234:
3.77 scop 235: # Use CVSROOT/descriptions for describing the directories/modules?
3.69 scop 236: # See INSTALL, section 9.
3.1 knu 237: #
238: $use_descriptions = 0;
239:
3.76 scop 240: #
241: # Human readable diff.
242: #
3.1 knu 243: # (c) 1998 H. Zeller <zeller@think.de>
244: #
3.76 scop 245: # Generates two columns of color encoded diff; much like xdiff or GNU Emacs'
246: # ediff-mode.
3.1 knu 247: #
3.76 scop 248: # The diff-stuff is a piece of code I once made for cvs2html which is under
249: # GPL, see http://www.sslug.dk/cvs2html
3.1 knu 250: # (c) 1997/98 Peter Toft <pto@sslug.imm.dtu.dk>
251:
3.76 scop 252: # Make lines breakable so that the columns do not exceed the width of the
253: # browser?
3.58 scop 254: #
3.1 knu 255: $hr_breakable = 1;
256:
3.80 scop 257: # Print function names in diffs (unified and context only).
258: # See the -p option in the diff(1) man page.
3.58 scop 259: #
3.4 knu 260: $showfunc = 1;
3.1 knu 261:
3.76 scop 262: # Ignore whitespace in human readable diffs? ('-w' option to diff)
3.58 scop 263: #
3.7 knu 264: $hr_ignwhite = 0;
3.1 knu 265:
3.76 scop 266: # Ignore diffs which are caused by keyword substitution, $Id and friends?
267: # ('-kk' option to rcsdiff)
3.58 scop 268: #
3.1 knu 269: $hr_ignkeysubst = 1;
270:
3.76 scop 271: # The width of the textinput of the "request diff" form.
3.58 scop 272: #
3.1 knu 273: $inputTextSize = 12;
3.70 scop 274:
275: # Custom per MIME type diff tools, used for comparing binary files such as
276: # spreadsheets, images etc. Each key is a MIME type in lowercase.
277: # Each value is an array ref of available diff tools for that type, each of
278: # which is a hash ref with values (mandatory where default not listed):
279: # name: the name to show in the UI for this diff type
280: # cmd: full path to executable
281: # args: arguments as an array ref (not string!, defaults to no arguments)
282: # type: output MIME type (defaults to text/plain)
283: #
284: %DIFF_COMMANDS = (
285: #'text/xml' => [
286: # { name => 'XMLdiff',
287: # cmd => $CMD{xmldiff},
288: # },
289: # { name => 'XMLdiff (XUpdate)',
290: # cmd => $CMD{xmldiff},
291: # args => [ qw(-x) ],
292: # type => 'text/xml',
293: # },
294: #],
295: );
3.1 knu 296:
3.76 scop 297: #
298: # Mime types
299: #
3.1 knu 300:
3.52 scop 301: # The MIME type lookup works like this:
302: # 1) Look up from %MTYPES below with the file name extension (suffix).
303: # 2) If not found, use the MIME::Types(3) module if it's available.
304: # 3) If not found, lookup from the $mime_types file (see below).
305: # 4) If not found, try %MTYPES{'*'}.
306: # 5) If not found, use 'application/octet-stream' if the file's keyword
307: # substitution mode is b (ie. the file was checked in as binary to CVS),
308: # 'text/plain' otherwise.
3.1 knu 309:
3.52 scop 310: # Quick MIME type lookup; maps filename extensions to MIME types.
311: # Add common mappings here for fast lookup. You can also use this
312: # to override MIME::Types(3) or the $mime_types file (see below).
3.58 scop 313: #
3.1 knu 314: %MTYPES = (
3.26 knu 315: "html" => "text/html",
316: "shtml" => "text/html",
317: "gif" => "image/gif",
318: "jpeg" => "image/jpeg",
319: "jpg" => "image/jpeg",
320: "png" => "image/png",
321: "xpm" => "image/xpm",
3.52 scop 322: # "*" => "text/plain",
3.26 knu 323: );
3.52 scop 324:
325: # The traditional mime.types file, eg. the one from Apache is fine.
326: # See above where this gets used.
3.58 scop 327: #
4.3 schwarze 328: $mime_types = '/conf/mime.types';
3.11 knu 329:
3.56 scop 330: # Charset appended to the Content-Type HTTP header for text/* MIME types.
331: # Note that the web server may default to some charset which may take effect
332: # if you leave this parameter empty or unset.
3.69 scop 333: # For Apache, see also the AddDefaultCharset directive.
3.56 scop 334: #
3.13 knu 335: $charset = '';
3.26 knu 336:
3.13 knu 337: # e.g.
338: #$charset = $where =~ m,/ru[/_-], ? 'koi8-r'
339: # : $where =~ m,/zh[/_-], ? 'big5'
340: # : $where =~ m,/ja[/_-], ? 'x-euc-jp'
341: # : $where =~ m,/ko[/_-], ? 'x-euc-kr'
342: # : 'iso-8859-1';
3.29 knu 343:
344: # Output filter
3.58 scop 345: #
3.29 knu 346: $output_filter = '';
347:
348: # e.g.
349: ## unify/convert Japanese code into EUC-JP
350: #$output_filter= '/usr/local/bin/nkf -e';
3.1 knu 351:
352: ##############
353: # Misc
354: ##############
3.58 scop 355:
3.76 scop 356: # Allow annotation of files? See also @annotate_options below.
3.58 scop 357: #
3.1 knu 358: $allow_annotate = 1;
359:
3.96 scop 360: # Allow HTMLized versions of files?
3.58 scop 361: #
3.1 knu 362: $allow_markup = 1;
363:
3.96 scop 364: # Allow CVSweb to create mailto: links from email addresses in various
365: # HTMLized views? Default: yes.
366: #
367: #$allow_mailtos = 0;
368:
4.8 ! schwarze 369: ## Extra hyperlinking means hyperlinks to manual page
! 370: ## gateways, see $mancgi above.
3.92 scop 371:
3.76 scop 372: # Allow extra hyperlinking (such as PR cross-references) in logs?
3.92 scop 373: # Default: yes.
3.58 scop 374: #
3.92 scop 375: #$allow_log_extra = 0;
3.31 knu 376:
3.92 scop 377: # Allow extra hyperlinking in directory views?
3.58 scop 378: #
3.31 knu 379: $allow_dir_extra = 1;
380:
3.76 scop 381: # Allow extra hyperlinking in source code/formatted diff views?
3.58 scop 382: #
3.31 knu 383: $allow_source_extra = 1;
384:
3.76 scop 385: # Allow compression with gzip in general? Note that this also requires
386: # that the browser supports it, and will be disabled on the fly when necessary.
3.58 scop 387: #
3.92 scop 388: #$allow_compress = 1;
3.1 knu 389:
3.76 scop 390: # Show a form for setting options in the directory view?
3.58 scop 391: #
392: $edit_option_form = 1;
3.1 knu 393:
3.77 scop 394: # Show last changelog message for subdirectories?
3.1 knu 395: # The current implementation makes many assumptions and may show the
396: # incorrect file at some times. The main assumption is that the last
397: # modified file has the newest filedate. But some CVS operations
3.97 scop 398: # touch the file even when a new version isn't checked in, and TAG
399: # based browsing essentially puts this out of order unless the last
400: # checkin was on the same tag as you are viewing.
3.1 knu 401: # Enable this if you like the feature, but don't rely on correct results.
3.58 scop 402: #
3.92 scop 403: #$show_subdir_lastmod = 1;
3.1 knu 404:
3.76 scop 405: # Show CVS log when viewing file contents?
3.58 scop 406: #
3.1 knu 407: $show_log_in_markup = 1;
408:
3.77 scop 409: # Preformat when viewing file contents? This should be turned off
3.13 knu 410: # when you have files in the repository that are in a multibyte
411: # encoding which uses HTML special characters ([<>&"]) as part of a
3.97 scop 412: # multibyte character. (such as iso-2022-jp, ShiftJIS, etc.)
3.13 knu 413: # Otherwise those files will get screwed up in markup.
3.58 scop 414: #
3.59 scop 415: # Note: enscript(1) highlighting is preferred over the built-in preformatting,
416: # ie. this has no effect if $allow_enscript is true and enscript can highlight
417: # the file.
418: #
3.92 scop 419: #$preformat_in_markup = 1;
3.13 knu 420:
3.92 scop 421: # Default tab width used to expand tabs to spaces in various HTMLized views.
422: # Note that CVSweb scans the first few lines of sources for some common editor
423: # directives controlling the tab width. It uses the value from them if found,
424: # falling back to the value of $tabstop if not. Default: 8.
3.58 scop 425: #
3.92 scop 426: #$tabstop = 4;
3.1 knu 427:
3.58 scop 428: # If you wish to display absolute times in your local timezone,
3.82 scop 429: # then define @mytz and fill in the strings for your standard and
3.1 knu 430: # daylight time. Note that you must also make sure the system
431: # timezone is correctly set.
3.58 scop 432: #
433: #@mytz=("EST", "EDT");
3.1 knu 434:
3.82 scop 435: # CVSweb is friendly to caches by sending the HTTP Last-Modified
436: # header corresponding to the sent content. In the case of a
437: # checkout, this may require running rcslog on the file solely for the
438: # purpose of retrieving the timestamp to be sent. If you have a slow
3.92 scop 439: # server, you may want to turn this off for a small performance gain.
3.58 scop 440: #
3.1 knu 441: $use_moddate = 1;
442:
3.45 scop 443: # Maximum number of filenames to pass to rlog(1) in one command.
444: # If you see "Failed to spawn GNU rlog" errors with directories containing
445: # lots of files, experiment by setting this to different values and see if
446: # the error still occurs. A good value to start from would be eg. 200.
447: # Just comment this out if you're not bitten by the problem.
3.57 scop 448: #
3.45 scop 449: #$file_list_len = 200;
3.13 knu 450:
3.86 scop 451: # URL to the CVSHistory script. This should be absolute (but does not need
452: # to include the host and port if the script is on the same server as
453: # CVSweb).
454: #$cvshistory_url = "/cgi-bin/cvshistory.cgi";
455:
3.57 scop 456: # Whether to allow downloading a tarball or a zip of the current directory.
457: # While downloading of the entire repository is disallowed, depending on
458: # the directory this may take a lot of time and disk space. For some CVS
3.69 scop 459: # versions, the user account running CVSweb needs write access to
3.57 scop 460: # CVSROOT/val-tags. See also the tar, gzip and zip options below.
461: #
462: #$allow_tar = (($CMD{tar} && $CMD{gzip}) || $CMD{zip}) ? 1 : 0;
463:
3.13 knu 464: # Options to pass to tar(1).
3.57 scop 465: # For example: @tar_options = qw(--ignore-failed-read);
466: # GNU tar has some useful options against unexpected errors.
467: # Other useful options include "--owner=0" and "--group=0", see
468: # the tar(1) (or gtar(1)) manpage for details.
469: #
3.15 knu 470: @tar_options = qw();
3.26 knu 471:
3.19 knu 472: # Options to pass to gzip(1) when compressing a tarball to download.
3.57 scop 473: # For example: @gzip_options = qw(-3);
474: # Try lower compression level than 6 (default) if you want faster
475: # compression, or higher for better compression.
476: #
3.19 knu 477: @gzip_options = qw();
3.26 knu 478:
3.25 knu 479: # Options to pass to zip(1) when compressing a zip archive to download.
3.57 scop 480: # For example: @zip_options = qw(-3);
481: # Try lower compression level than 6 (default) if you want faster
482: # compression, or higher for better compression.
483: #
3.47 scop 484: @zip_options = qw(-q);
3.26 knu 485:
3.13 knu 486: # Options to pass to cvs(1).
3.63 scop 487: # For cvs versions 1.11 to 1.11.6 (broken in < 1.11, removed in 1.11.7), you
488: # can use the '-l' option to prevent cvs from writing to the history file.
489: # For other cvs versions, either suppress history logging by using the
3.69 scop 490: # LogHistory parameter in CVSROOT/config or make sure that the CVSweb user
3.63 scop 491: # can read and write to CVSROOT/history.
3.61 scop 492: # FreeBSD's and OpenBSD's cvs(1) has long since supported -R (read only access
493: # mode) option, which considerably speeds up checkouts over NFS. For other
3.62 scop 494: # platforms, the -R option and the CVSREADONLYFS environment variable are
495: # available in cvs >= 1.12.1. A similar effect is provided by -u on NetBSD.
3.57 scop 496: #
3.85 scop 497: @cvs_options = qw(-f);
3.47 scop 498: push @cvs_options, '-R' if ($^O eq 'freebsd' || $^O eq 'openbsd');
499: push @cvs_options, '-u' if ($^O eq 'netbsd');
3.62 scop 500: # Only affects cvs >= 1.12.1, but doesn't hurt older ones.
501: $ENV{CVSREADONLYFS} = 1 unless exists($ENV{CVSREADONLYFS});
3.26 knu 502:
3.39 scop 503: # Options to pass to the 'cvs annotate' command, usually the normal
504: # @cvs_options are good enough here.
3.57 scop 505: # To make annotate work against a read only repository, add -n, ie.:
506: # @annotate_options = (@cvs_options, '-n');
507: #
3.39 scop 508: @annotate_options = @cvs_options;
509:
3.54 scop 510: # Options to pass to rcsdiff(1).
511: # Probably the only useful one here is -q (suppress diagnostic output).
3.57 scop 512: #
3.54 scop 513: @rcsdiff_options = qw(-q);
3.48 scop 514:
515: # Enables syntax highlighting using GNU Enscript if set.
3.64 scop 516: # You will need GNU Enscript version 1.6.3 or newer for this to work.
3.57 scop 517: #
3.48 scop 518: #$allow_enscript = $CMD{enscript} ? 1 : 0;
519:
520: # Options to pass to enscript(1).
3.54 scop 521: # Do not set the -q, --language, -o or --highlight options here.
3.48 scop 522: # Most useful styles are probably emacs, emacs_verbose and msvc.
3.57 scop 523: #
3.48 scop 524: @enscript_options = qw(--style=emacs --color=1);
525:
526: # Enscript highlight rule to filename regex mappings. The set of useful
527: # mappings depends on what highlight rules the system has installed.
3.57 scop 528: #
3.48 scop 529: %enscript_types =
530: (
531: 'ada' => qr/\.ad(s|b|a)$/o,
532: 'asm' => qr/\.[Ss]$/o,
533: 'awk' => qr/\.awk$/o,
534: 'bash' => qr/\.(bash(_profile|rc)|inputrc)$/o,
535: 'c' => qr/\.(c|h)$/o,
536: 'changelog' => qr/^changelog$/io,
537: 'cpp' => qr/\.(c\+\+|C|H|cpp|cc|cxx)$/o,
538: 'csh' => qr/\.(csh(rc)?|log(in|out)|history)$/o,
539: 'elisp' => qr/\.e(l|macs)$/o,
540: 'fortran' => qr/\.[fF]$/o,
541: 'haskell' => qr/\.(l?h|l?g)s$/o,
542: 'html' => qr/\.x?html?$/o,
543: 'idl' => qr/\.idl$/o,
544: 'inf' => qr/\.inf$/io,
545: 'java' => qr/\.java$/o,
3.83 scop 546: 'javascript' => qr/\.(js|pac)$/o,
3.48 scop 547: 'ksh' => qr/\.ksh$/o,
548: 'm4' => qr/\.m4$/o,
3.83 scop 549: 'makefile' => qr/(GNU)?[Mm]akefile(?!\.PL\b)|\.(ma?ke?|am)$/o,
3.48 scop 550: 'matlab' => qr/\.m$/o,
551: 'nroff' => qr/\.man$/o,
552: 'pascal' => qr/\.p(as|p)?$/io,
3.83 scop 553: 'perl' => qr/\.p(m|(er)?l)$/io,
3.48 scop 554: 'postscript' => qr/\.e?ps$/io,
555: 'python' => qr/\.py$/o,
556: 'rfc' => qr/\b((rfc|draft)\..*\.txt)$/o,
557: 'scheme' => qr/\.(scm|scheme)$/o,
558: 'sh' => qr/\.sh$/o,
559: 'skill' => qr/\.il$/o,
560: 'sql' => qr/\.sql$/o,
561: 'states' => qr/\.st$/o,
562: 'synopsys' => qr/\.s(cr|yn(th)?)$/o,
563: 'tcl' => qr/\.tcl$/o,
564: 'tcsh' => qr/\.tcshrc$/o,
565: 'tex' => qr/\.tex$/o,
566: 'vba' => qr/\.vba$/o,
567: 'verilog' => qr/\.(v|vh)$/o,
568: 'vhdl' => qr/\.vhdl?$/o,
569: 'vrml' => qr/\.wrl$/o,
570: 'wmlscript' => qr/\.wmls(cript)?$/o,
571: 'zsh' => qr/\.(zsh(env|rc)|z(profile|log(in|out)))$/o,
572: );
3.39 scop 573:
3.89 scop 574: # Troubleshooting: in case of problems, setting this to 1 will cause more
575: # error output into your web server error log. Under normal operation,
576: # this should be set to 0 or commented out.
577: #
578: #$DEBUG = 1;
579:
3.94 scop 580: # Enable this to let CVSweb load extra configuration files from the "conf.d"
581: # subdirectory of the directory this file is located in. This enables site
582: # specific configuration without having to modify this "master" configuration
583: # file (except for enabling this functionality below :)
584: #
585: if (0) {
586: my $confdir = catdir(dirname(__FILE__), 'conf.d');
587: if (opendir(CONFD, $confdir)) {
588: my @files = sort(map(catfile($confdir, $_), readdir(CONFD)));
589: close(CONFD);
590: for my $conffile (grep(-f && -r _, @files)) {
591: ($conffile) = ($conffile =~ /(.+\.conf)$/) or next;
592: do "$conffile" or config_error($conffile, $@);
593: }
594: }
595: }
596:
3.12 knu 597: 1;
3.26 knu 598:
3.57 scop 599: # EOF
CVSweb