Added cgi_error_disabled
[privoxy.git] / urlmatch.c
1 const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.10.2.2 2002/09/25 14:53:15 oes Exp $";
2 /*********************************************************************
3  *
4  * File        :  $Source: /cvsroot/ijbswa/current/Attic/urlmatch.c,v $
5  *
6  * Purpose     :  Declares functions to match URLs against URL
7  *                patterns.
8  *
9  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
10  *                Privoxy team. http://www.privoxy.org/
11  *
12  *                Based on the Internet Junkbuster originally written
13  *                by and Copyright (C) 1997 Anonymous Coders and
14  *                Junkbusters Corporation.  http://www.junkbusters.com
15  *
16  *                This program is free software; you can redistribute it
17  *                and/or modify it under the terms of the GNU General
18  *                Public License as published by the Free Software
19  *                Foundation; either version 2 of the License, or (at
20  *                your option) any later version.
21  *
22  *                This program is distributed in the hope that it will
23  *                be useful, but WITHOUT ANY WARRANTY; without even the
24  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
25  *                PARTICULAR PURPOSE.  See the GNU General Public
26  *                License for more details.
27  *
28  *                The GNU General Public License should be included with
29  *                this file.  If not, you can view it at
30  *                http://www.gnu.org/copyleft/gpl.html
31  *                or write to the Free Software Foundation, Inc., 59
32  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
33  *
34  * Revisions   :
35  *    $Log: urlmatch.c,v $
36  *    Revision 1.10.2.2  2002/09/25 14:53:15  oes
37  *    Added basic support for OPTIONS and TRACE HTTP methods:
38  *    parse_http_url now recognizes the "*" URI as well as
39  *    the OPTIONS and TRACE method keywords.
40  *
41  *    Revision 1.10.2.1  2002/06/06 19:06:44  jongfoster
42  *    Adding support for proprietary Microsoft WebDAV extensions
43  *
44  *    Revision 1.10  2002/05/12 21:40:37  jongfoster
45  *    - Removing some unused code
46  *
47  *    Revision 1.9  2002/04/04 00:36:36  gliptak
48  *    always use pcre for matching
49  *
50  *    Revision 1.8  2002/04/03 23:32:47  jongfoster
51  *    Fixing memory leak on error
52  *
53  *    Revision 1.7  2002/03/26 22:29:55  swa
54  *    we have a new homepage!
55  *
56  *    Revision 1.6  2002/03/24 13:25:43  swa
57  *    name change related issues
58  *
59  *    Revision 1.5  2002/03/13 00:27:05  jongfoster
60  *    Killing warnings
61  *
62  *    Revision 1.4  2002/03/07 03:46:17  oes
63  *    Fixed compiler warnings
64  *
65  *    Revision 1.3  2002/03/03 14:51:11  oes
66  *    Fixed CLF logging: Added ocmd member for client's request to struct http_request
67  *
68  *    Revision 1.2  2002/01/21 00:14:09  jongfoster
69  *    Correcting comment style
70  *    Fixing an uninitialized memory bug in create_url_spec()
71  *
72  *    Revision 1.1  2002/01/17 20:53:46  jongfoster
73  *    Moving all our URL and URL pattern parsing code to the same file - it
74  *    was scattered around in filters.c, loaders.c and parsers.c.
75  *
76  *    Providing a single, simple url_match(pattern,url) function - rather than
77  *    the 3-line match routine which was repeated all over the place.
78  *
79  *    Renaming free_url to free_url_spec, since it frees a struct url_spec.
80  *
81  *    Providing parse_http_url() so that URLs can be parsed without faking a
82  *    HTTP request line for parse_http_request() or repeating the parsing
83  *    code (both of which were techniques that were actually in use).
84  *
85  *    Standardizing that struct http_request is used to represent a URL, and
86  *    struct url_spec is used to represent a URL pattern.  (Before, URLs were
87  *    represented as seperate variables and a partially-filled-in url_spec).
88  *
89  *
90  *********************************************************************/
91 \f
92
93 #include "config.h"
94
95 #ifndef _WIN32
96 #include <stdio.h>
97 #include <sys/types.h>
98 #endif
99
100 #include <stdlib.h>
101 #include <ctype.h>
102 #include <assert.h>
103 #include <string.h>
104
105 #if !defined(_WIN32) && !defined(__OS2__)
106 #include <unistd.h>
107 #endif
108
109 #include "project.h"
110 #include "urlmatch.h"
111 #include "ssplit.h"
112 #include "miscutil.h"
113 #include "errlog.h"
114
115 const char urlmatch_h_rcs[] = URLMATCH_H_VERSION;
116
117
118 /*********************************************************************
119  *
120  * Function    :  free_http_request
121  *
122  * Description :  Freez a http_request structure
123  *
124  * Parameters  :
125  *          1  :  http = points to a http_request structure to free
126  *
127  * Returns     :  N/A
128  *
129  *********************************************************************/
130 void free_http_request(struct http_request *http)
131 {
132    assert(http);
133
134    freez(http->cmd);
135    freez(http->ocmd);
136    freez(http->gpc);
137    freez(http->host);
138    freez(http->url);
139    freez(http->hostport);
140    freez(http->path);
141    freez(http->ver);
142    freez(http->host_ip_addr_str);
143    freez(http->dbuffer);
144    freez(http->dvec);
145    http->dcount = 0;
146 }
147
148
149 /*********************************************************************
150  *
151  * Function    :  parse_http_url
152  *
153  * Description :  Parse out the host and port from the URL.  Find the
154  *                hostname & path, port (if ':'), and/or password (if '@')
155  *
156  * Parameters  :
157  *          1  :  url = URL (or is it URI?) to break down
158  *          2  :  http = pointer to the http structure to hold elements.
159  *                       Will be zeroed before use.  Note that this
160  *                       function sets the http->gpc and http->ver
161  *                       members to NULL.
162  *          3  :  csp = Current client state (buffers, headers, etc...)
163  *
164  * Returns     :  JB_ERR_OK on success
165  *                JB_ERR_MEMORY on out of memory
166  *                JB_ERR_PARSE on malformed command/URL
167  *                             or >100 domains deep.
168  *
169  *********************************************************************/
170 jb_err parse_http_url(const char * url,
171                       struct http_request *http,
172                       struct client_state *csp)
173 {
174    /*
175     * Zero out the results structure
176     */
177    memset(http, '\0', sizeof(*http));
178
179
180    /*
181     * Save our initial URL
182     */
183    http->url = strdup(url);
184    if (http->url == NULL)
185    {
186       return JB_ERR_MEMORY;
187    }
188
189
190    /*
191     * Check for * URI. If found, we're done.
192     */  
193    if (*http->url == '*')
194    {
195       http->path = strdup("*");
196       http->hostport = strdup("");
197       return JB_ERR_OK;
198    }
199
200
201    /*
202     * Split URL into protocol,hostport,path.
203     */
204    {
205       char *buf;
206       char *url_noproto;
207       char *url_path;
208
209       buf = strdup(url);
210       if (buf == NULL)
211       {
212          return JB_ERR_MEMORY;
213       }
214
215       /* Find the start of the URL in our scratch space */
216       url_noproto = buf;
217       if (strncmpic(url_noproto, "http://",  7) == 0)
218       {
219          url_noproto += 7;
220          http->ssl = 0;
221       }
222       else if (strncmpic(url_noproto, "https://", 8) == 0)
223       {
224          url_noproto += 8;
225          http->ssl = 1;
226       }
227       else
228       {
229          http->ssl = 0;
230       }
231
232       url_path = strchr(url_noproto, '/');
233       if (url_path != NULL)
234       {
235          /*
236           * Got a path.
237           *
238           * NOTE: The following line ignores the path for HTTPS URLS.
239           * This means that you get consistent behaviour if you type a
240           * https URL in and it's parsed by the function.  (When the
241           * URL is actually retrieved, SSL hides the path part).
242           */
243          http->path = strdup(http->ssl ? "/" : url_path);
244          *url_path = '\0';
245          http->hostport = strdup(url_noproto);
246       }
247       else
248       {
249          /*
250           * Repair broken HTTP requests that don't contain a path,
251           * or CONNECT requests
252           */
253          http->path = strdup("/");
254          http->hostport = strdup(url_noproto);
255       }
256
257       free(buf);
258
259       if ( (http->path == NULL)
260         || (http->hostport == NULL))
261       {
262          free(buf);
263          free_http_request(http);
264          return JB_ERR_MEMORY;
265       }
266    }
267
268
269    /*
270     * Split hostport into user/password (ignored), host, port.
271     */
272    {
273       char *buf;
274       char *host;
275       char *port;
276
277       buf = strdup(http->hostport);
278       if (buf == NULL)
279       {
280          free_http_request(http);
281          return JB_ERR_MEMORY;
282       }
283
284       /* check if url contains username and/or password */
285       host = strchr(buf, '@');
286       if (host != NULL)
287       {
288          /* Contains username/password, skip it and the @ sign. */
289          host++;
290       }
291       else
292       {
293          /* No username or password. */
294          host = buf;
295       }
296
297       /* check if url contains port */
298       port = strchr(host, ':');
299       if (port != NULL)
300       {
301          /* Contains port */
302          /* Terminate hostname and point to start of port string */
303          *port++ = '\0';
304          http->port = atoi(port);
305       }
306       else
307       {
308          /* No port specified. */
309          http->port = (http->ssl ? 143 : 80);
310       }
311
312       http->host = strdup(host);
313
314       free(buf);
315
316       if (http->host == NULL)
317       {
318          free_http_request(http);
319          return JB_ERR_MEMORY;
320       }
321    }
322
323    /*
324     * Split domain name so we can compare it against wildcards
325     */
326
327    {
328       char *vec[BUFFER_SIZE];
329       size_t size;
330       char *p;
331
332       http->dbuffer = strdup(http->host);
333       if (NULL == http->dbuffer)
334       {
335          free_http_request(http);
336          return JB_ERR_MEMORY;
337       }
338
339       /* map to lower case */
340       for (p = http->dbuffer; *p ; p++)
341       {
342          *p = tolower((int)(unsigned char)*p);
343       }
344
345       /* split the domain name into components */
346       http->dcount = ssplit(http->dbuffer, ".", vec, SZ(vec), 1, 1);
347
348       if (http->dcount <= 0)
349       {
350          /*
351           * Error: More than SZ(vec) components in domain
352           *    or: no components in domain
353           */
354          free_http_request(http);
355          return JB_ERR_PARSE;
356       }
357
358       /* save a copy of the pointers in dvec */
359       size = http->dcount * sizeof(*http->dvec);
360
361       http->dvec = (char **)malloc(size);
362       if (NULL == http->dvec)
363       {
364          free_http_request(http);
365          return JB_ERR_MEMORY;
366       }
367
368       memcpy(http->dvec, vec, size);
369    }
370
371    return JB_ERR_OK;
372
373 }
374
375
376 /*********************************************************************
377  *
378  * Function    :  parse_http_request
379  *
380  * Description :  Parse out the host and port from the URL.  Find the
381  *                hostname & path, port (if ':'), and/or password (if '@')
382  *
383  * Parameters  :
384  *          1  :  req = HTTP request line to break down
385  *          2  :  http = pointer to the http structure to hold elements
386  *          3  :  csp = Current client state (buffers, headers, etc...)
387  *
388  * Returns     :  JB_ERR_OK on success
389  *                JB_ERR_MEMORY on out of memory
390  *                JB_ERR_CGI_PARAMS on malformed command/URL
391  *                                  or >100 domains deep.
392  *
393  *********************************************************************/
394 jb_err parse_http_request(const char *req,
395                           struct http_request *http,
396                           struct client_state *csp)
397 {
398    char *buf;
399    char *v[10];
400    int n;
401    jb_err err;
402    int is_connect = 0;
403
404    memset(http, '\0', sizeof(*http));
405
406    buf = strdup(req);
407    if (buf == NULL)
408    {
409       return JB_ERR_MEMORY;
410    }
411
412    n = ssplit(buf, " \r\n", v, SZ(v), 1, 1);
413    if (n != 3)
414    {
415       free(buf);
416       return JB_ERR_PARSE;
417    }
418
419    /* this could be a CONNECT request */
420    if (strcmpic(v[0], "connect") == 0)
421    {
422       /* Secure */
423       is_connect = 1;
424    }
425    /* or it could be any other basic HTTP request type */
426    else if ((0 == strcmpic(v[0], "get"))
427          || (0 == strcmpic(v[0], "head"))
428          || (0 == strcmpic(v[0], "post"))
429          || (0 == strcmpic(v[0], "put"))
430          || (0 == strcmpic(v[0], "delete"))
431          || (0 == strcmpic(v[0], "options"))
432          || (0 == strcmpic(v[0], "trace"))
433  
434          /* or a webDAV extension (RFC2518) */
435          || (0 == strcmpic(v[0], "propfind"))
436          || (0 == strcmpic(v[0], "proppatch"))
437          || (0 == strcmpic(v[0], "move"))
438          || (0 == strcmpic(v[0], "copy"))
439          || (0 == strcmpic(v[0], "mkcol"))
440          || (0 == strcmpic(v[0], "lock"))
441          || (0 == strcmpic(v[0], "unlock"))
442
443          /* Or a Microsoft webDAV extension for Exchange 2000.  See: */
444          /*   http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0001.html */
445          /*   http://msdn.microsoft.com/library/en-us/wss/wss/_webdav_methods.asp */ 
446          || (0 == strcmpic(v[0], "bcopy"))
447          || (0 == strcmpic(v[0], "bmove"))
448          || (0 == strcmpic(v[0], "bdelete"))
449          || (0 == strcmpic(v[0], "bpropfind"))
450          || (0 == strcmpic(v[0], "bproppatch"))
451
452          /* Or another Microsoft webDAV extension for Exchange 2000.  See: */
453          /*   http://systems.cs.colorado.edu/grunwald/MobileComputing/Papers/draft-cohen-gena-p-base-00.txt */
454          /*   http://lists.w3.org/Archives/Public/w3c-dist-auth/2002JanMar/0001.html */
455          /*   http://msdn.microsoft.com/library/en-us/wss/wss/_webdav_methods.asp */ 
456          || (0 == strcmpic(v[0], "subscribe"))
457          || (0 == strcmpic(v[0], "unsubscribe"))
458          || (0 == strcmpic(v[0], "notify"))
459          || (0 == strcmpic(v[0], "poll"))
460          )
461    {
462       /* Normal */
463       is_connect = 0;
464    }
465    else
466    {
467       /* Unknown HTTP method */
468       free(buf);
469       return JB_ERR_PARSE;
470    }
471
472    err = parse_http_url(v[1], http, csp);
473    if (err)
474    {
475       free(buf);
476       return err;
477    }
478
479    /*
480     * Copy the details into the structure
481     */
482    http->ssl = is_connect;
483    http->cmd = strdup(req);
484    http->gpc = strdup(v[0]);
485    http->ver = strdup(v[2]);
486
487    if ( (http->cmd == NULL)
488      || (http->gpc == NULL)
489      || (http->ver == NULL) )
490    {
491       free(buf);
492       free_http_request(http);
493       return JB_ERR_MEMORY;
494    }
495
496    free(buf);
497    return JB_ERR_OK;
498
499 }
500
501
502 /*********************************************************************
503  *
504  * Function    :  simple_domaincmp
505  *
506  * Description :  Domain-wise Compare fqdn's.  The comparison is
507  *                both left- and right-anchored.  The individual
508  *                domain names are compared with simplematch().
509  *                This is only used by domain_match.
510  *
511  * Parameters  :
512  *          1  :  pv = array of patterns to compare
513  *          2  :  fv = array of domain components to compare
514  *          3  :  len = length of the arrays (both arrays are the
515  *                      same length - if they weren't, it couldn't
516  *                      possibly be a match).
517  *
518  * Returns     :  0 => domains are equivalent, else no match.
519  *
520  *********************************************************************/
521 static int simple_domaincmp(char **pv, char **fv, int len)
522 {
523    int n;
524
525    for (n = 0; n < len; n++)
526    {
527       if (simplematch(pv[n], fv[n]))
528       {
529          return 1;
530       }
531    }
532
533    return 0;
534
535 }
536
537
538 /*********************************************************************
539  *
540  * Function    :  domain_match
541  *
542  * Description :  Domain-wise Compare fqdn's. Governed by the bimap in
543  *                pattern->unachored, the comparison is un-, left-,
544  *                right-anchored, or both.
545  *                The individual domain names are compared with
546  *                simplematch().
547  *
548  * Parameters  :
549  *          1  :  pattern = a domain that may contain a '*' as a wildcard.
550  *          2  :  fqdn = domain name against which the patterns are compared.
551  *
552  * Returns     :  0 => domains are equivalent, else no match.
553  *
554  *********************************************************************/
555 static int domain_match(const struct url_spec *pattern, const struct http_request *fqdn)
556 {
557    char **pv, **fv;  /* vectors  */
558    int    plen, flen;
559    int unanchored = pattern->unanchored & (ANCHOR_RIGHT | ANCHOR_LEFT);
560
561    plen = pattern->dcount;
562    flen = fqdn->dcount;
563
564    if (flen < plen)
565    {
566       /* fqdn is too short to match this pattern */
567       return 1;
568    }
569
570    pv   = pattern->dvec;
571    fv   = fqdn->dvec;
572
573    if (unanchored == ANCHOR_LEFT)
574    {
575       /*
576        * Right anchored.
577        *
578        * Convert this into a fully anchored pattern with
579        * the fqdn and pattern the same length
580        */
581       fv += (flen - plen); /* flen - plen >= 0 due to check above */
582       return simple_domaincmp(pv, fv, plen);
583    }
584    else if (unanchored == 0)
585    {
586       /* Fully anchored, check length */
587       if (flen != plen)
588       {
589          return 1;
590       }
591       return simple_domaincmp(pv, fv, plen);
592    }
593    else if (unanchored == ANCHOR_RIGHT)
594    {
595       /* Left anchored, ignore all extra in fqdn */
596       return simple_domaincmp(pv, fv, plen);
597    }
598    else
599    {
600       /* Unanchored */
601       int n;
602       int maxn = flen - plen;
603       for (n = 0; n <= maxn; n++)
604       {
605          if (!simple_domaincmp(pv, fv, plen))
606          {
607             return 0;
608          }
609          /*
610           * Doesn't match from start of fqdn
611           * Try skipping first part of fqdn
612           */
613          fv++;
614       }
615       return 1;
616    }
617
618 }
619
620
621 /*********************************************************************
622  *
623  * Function    :  create_url_spec
624  *
625  * Description :  Creates a "url_spec" structure from a string.
626  *                When finished, free with unload_url().
627  *
628  * Parameters  :
629  *          1  :  url = Target url_spec to be filled in.  Will be
630  *                      zeroed before use.
631  *          2  :  buf = Source pattern, null terminated.  NOTE: The
632  *                      contents of this buffer are destroyed by this
633  *                      function.  If this function succeeds, the
634  *                      buffer is copied to url->spec.  If this
635  *                      function fails, the contents of the buffer
636  *                      are lost forever.
637  *
638  * Returns     :  JB_ERR_OK - Success
639  *                JB_ERR_MEMORY - Out of memory
640  *                JB_ERR_PARSE - Cannot parse regex (Detailed message
641  *                               written to system log)
642  *
643  *********************************************************************/
644 jb_err create_url_spec(struct url_spec * url, const char * buf)
645 {
646    char *p;
647
648    assert(url);
649    assert(buf);
650
651    /* Zero memory */
652    memset(url, '\0', sizeof(*url));
653
654    /* save a copy of the orignal specification */
655    if ((url->spec = strdup(buf)) == NULL)
656    {
657       return JB_ERR_MEMORY;
658    }
659
660    if ((p = strchr(buf, '/')) != NULL)
661    {
662       if (NULL == (url->path = strdup(p)))
663       {
664          freez(url->spec);
665          return JB_ERR_MEMORY;
666       }
667       url->pathlen = strlen(url->path);
668       *p = '\0';
669    }
670    else
671    {
672       url->path    = NULL;
673       url->pathlen = 0;
674    }
675    if (url->path)
676    {
677       int errcode;
678       char rebuf[BUFFER_SIZE];
679
680       if (NULL == (url->preg = zalloc(sizeof(*url->preg))))
681       {
682          freez(url->spec);
683          freez(url->path);
684          return JB_ERR_MEMORY;
685       }
686
687       sprintf(rebuf, "^(%s)", url->path);
688
689       errcode = regcomp(url->preg, rebuf,
690             (REG_EXTENDED|REG_NOSUB|REG_ICASE));
691       if (errcode)
692       {
693          size_t errlen = regerror(errcode,
694             url->preg, rebuf, sizeof(rebuf));
695
696          if (errlen > (sizeof(rebuf) - (size_t)1))
697          {
698             errlen = sizeof(rebuf) - (size_t)1;
699          }
700          rebuf[errlen] = '\0';
701
702          log_error(LOG_LEVEL_ERROR, "error compiling %s: %s",
703             url->spec, rebuf);
704
705          freez(url->spec);
706          freez(url->path);
707          regfree(url->preg);
708          freez(url->preg);
709
710          return JB_ERR_PARSE;
711       }
712    }
713    if ((p = strchr(buf, ':')) == NULL)
714    {
715       url->port = 0;
716    }
717    else
718    {
719       *p++ = '\0';
720       url->port = atoi(p);
721    }
722
723    if (buf[0] != '\0')
724    {
725       char *v[150];
726       size_t size;
727
728       /* Parse domain part */
729       if (buf[strlen(buf) - 1] == '.')
730       {
731          url->unanchored |= ANCHOR_RIGHT;
732       }
733       if (buf[0] == '.')
734       {
735          url->unanchored |= ANCHOR_LEFT;
736       }
737
738       /* split domain into components */
739
740       url->dbuffer = strdup(buf);
741       if (NULL == url->dbuffer)
742       {
743          freez(url->spec);
744          freez(url->path);
745          regfree(url->preg);
746          freez(url->preg);
747          return JB_ERR_MEMORY;
748       }
749
750       /* map to lower case */
751       for (p = url->dbuffer; *p ; p++)
752       {
753          *p = tolower((int)(unsigned char)*p);
754       }
755
756       /* split the domain name into components */
757       url->dcount = ssplit(url->dbuffer, ".", v, SZ(v), 1, 1);
758
759       if (url->dcount < 0)
760       {
761          freez(url->spec);
762          freez(url->path);
763          regfree(url->preg);
764          freez(url->preg);
765          freez(url->dbuffer);
766          url->dcount = 0;
767          return JB_ERR_MEMORY;
768       }
769       else if (url->dcount != 0)
770       {
771
772          /* save a copy of the pointers in dvec */
773          size = url->dcount * sizeof(*url->dvec);
774
775          url->dvec = (char **)malloc(size);
776          if (NULL == url->dvec)
777          {
778             freez(url->spec);
779             freez(url->path);
780             regfree(url->preg);
781             freez(url->preg);
782             freez(url->dbuffer);
783             url->dcount = 0;
784             return JB_ERR_MEMORY;
785          }
786
787          memcpy(url->dvec, v, size);
788       }
789    }
790
791    return JB_ERR_OK;
792
793 }
794
795
796 /*********************************************************************
797  *
798  * Function    :  free_url_spec
799  *
800  * Description :  Called from the "unloaders".  Freez the url
801  *                structure elements.
802  *
803  * Parameters  :
804  *          1  :  url = pointer to a url_spec structure.
805  *
806  * Returns     :  N/A
807  *
808  *********************************************************************/
809 void free_url_spec(struct url_spec *url)
810 {
811    if (url == NULL) return;
812
813    freez(url->spec);
814    freez(url->dbuffer);
815    freez(url->dvec);
816    freez(url->path);
817    if (url->preg)
818    {
819       regfree(url->preg);
820       freez(url->preg);
821    }
822 }
823
824
825 /*********************************************************************
826  *
827  * Function    :  url_match
828  *
829  * Description :  Compare a URL against a URL pattern.
830  *
831  * Parameters  :
832  *          1  :  pattern = a URL pattern
833  *          2  :  url = URL to match
834  *
835  * Returns     :  0 iff the URL matches the pattern, else nonzero.
836  *
837  *********************************************************************/
838 int url_match(const struct url_spec *pattern,
839               const struct http_request *url)
840 {
841    return ((pattern->port == 0) || (pattern->port == url->port))
842        && ((pattern->dbuffer == NULL) || (domain_match(pattern, url) == 0))
843        && ((pattern->path == NULL) ||
844             (regexec(pattern->preg, url->path, 0, NULL, 0) == 0)
845       );
846 }
847
848
849 /*
850   Local Variables:
851   tab-width: 3
852   end:
853 */