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