IJB now changes HTTP/1.1 to HTTP/1.0 in requests and answers.
[privoxy.git] / cgisimple.c
1 const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.2 2001/09/19 18:01:11 oes Exp $";
2 /*********************************************************************
3  *
4  * File        :  $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
5  *
6  * Purpose     :  Simple CGIs to get information about JunkBuster's
7  *                status.
8  *                
9  *                Functions declared include:
10  * 
11  *
12  * Copyright   :  Written by and Copyright (C) 2001 the SourceForge
13  *                IJBSWA team.  http://ijbswa.sourceforge.net
14  *
15  *                Based on the Internet Junkbuster originally written
16  *                by and Copyright (C) 1997 Anonymous Coders and 
17  *                Junkbusters Corporation.  http://www.junkbusters.com
18  *
19  *                This program is free software; you can redistribute it 
20  *                and/or modify it under the terms of the GNU General
21  *                Public License as published by the Free Software
22  *                Foundation; either version 2 of the License, or (at
23  *                your option) any later version.
24  *
25  *                This program is distributed in the hope that it will
26  *                be useful, but WITHOUT ANY WARRANTY; without even the
27  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
28  *                PARTICULAR PURPOSE.  See the GNU General Public
29  *                License for more details.
30  *
31  *                The GNU General Public License should be included with
32  *                this file.  If not, you can view it at
33  *                http://www.gnu.org/copyleft/gpl.html
34  *                or write to the Free Software Foundation, Inc., 59
35  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
36  *
37  * Revisions   :
38  *    $Log: cgisimple.c,v $
39  *    Revision 1.2  2001/09/19 18:01:11  oes
40  *    Fixed comments; cosmetics
41  *
42  *    Revision 1.1  2001/09/16 17:08:54  jongfoster
43  *    Moving simple CGI functions from cgi.c to new file cgisimple.c
44  *
45  *
46  **********************************************************************/
47 \f
48
49 #include "config.h"
50
51 #include <stdio.h>
52 #include <sys/types.h>
53 #include <stdlib.h>
54 #include <ctype.h>
55 #include <string.h>
56 #include <assert.h>
57
58 #ifdef _WIN32
59 #define snprintf _snprintf
60 #endif /* def _WIN32 */
61
62 #include "project.h"
63 #include "cgi.h"
64 #include "cgisimple.h"
65 #include "list.h"
66 #include "encode.h"
67 #include "jcc.h"
68 #include "filters.h"
69 #include "actions.h"
70 #include "miscutil.h"
71 #include "loadcfg.h"
72
73 const char cgisimple_h_rcs[] = CGISIMPLE_H_VERSION;
74
75
76 static char *show_rcs(void);
77 static void show_defines(struct map *exports);
78
79
80 /*********************************************************************
81  *
82  * Function    :  cgi_default
83  *
84  * Description :  CGI function that is called if no action was given.
85  *                Lists menu of available unhidden CGIs.
86  *               
87  * Parameters  :
88  *           1 :  csp = Current client state (buffers, headers, etc...)
89  *           2 :  rsp = http_response data structure for output
90  *           3 :  parameters = map of cgi parameters
91  *
92  * Returns     :  0
93  *
94  *********************************************************************/
95 int cgi_default(struct client_state *csp, struct http_response *rsp,
96                 struct map *parameters)
97 {
98    char *p;
99    char *tmp = NULL;
100    struct map * exports = default_exports(csp, "");
101
102    /* If there were other parameters, export a dump as "cgi-parameters" */
103    if(parameters)
104    {
105       p = dump_map(parameters);
106       tmp = strsav(tmp, "<p>What made you think this cgi takes parameters?\n"
107                         "Anyway, here they are, in case you're interested:</p>\n");
108       tmp = strsav(tmp, p);
109       map(exports, "cgi-parameters", 1, tmp, 0);
110       free(p);
111    }
112    else
113    {
114       map(exports, "cgi-parameters", 1, "", 1);
115    }
116
117    rsp->body = template_load(csp, "default");
118    template_fill(&rsp->body, exports);
119    free_map(exports);
120    return(0);
121
122 }
123
124
125 /*********************************************************************
126  *
127  * Function    :  cgi_send_banner
128  *
129  * Description :  CGI function that returns a banner. 
130  *
131  * Parameters  :
132  *           1 :  csp = Current client state (buffers, headers, etc...)
133  *           2 :  rsp = http_response data structure for output
134  *           3 :  parameters = map of cgi parameters
135  *
136  * CGI Parameters :
137  *           type : Selects the type of banner between "trans" and "jb".
138  *                  Defaults to "jb" if absent or != "trans".
139  *
140  * Returns     :  0
141  *
142  *********************************************************************/
143 int cgi_send_banner(struct client_state *csp, struct http_response *rsp,
144                     struct map *parameters)
145 {
146    if(strcmp(lookup(parameters, "type"), "trans"))
147    {
148       rsp->body = bindup(image_junkbuster_gif_data, image_junkbuster_gif_length);
149       rsp->content_length = image_junkbuster_gif_length;
150    }
151    else
152    {
153       rsp->body = bindup(image_blank_gif_data, image_blank_gif_length);
154       rsp->content_length = image_blank_gif_length;
155    }   
156
157    enlist(rsp->headers, "Content-Type: image/gif");
158    rsp->is_static = 1;
159
160    return(0);
161
162 }
163
164
165 /*********************************************************************
166  *
167  * Function    :  cgi_show_version
168  *
169  * Description :  CGI function that returns a a web page describing the
170  *                file versions of IJB.
171  *
172  * Parameters  :
173  *           1 :  csp = Current client state (buffers, headers, etc...)
174  *           2 :  rsp = http_response data structure for output
175  *           3 :  parameters = map of cgi parameters
176  *
177  * CGI Parameters : none
178  *
179  * Returns     :  0
180  *
181  *********************************************************************/
182 int cgi_show_version(struct client_state *csp, struct http_response *rsp,
183                      struct map *parameters)
184 {
185    struct map * exports = default_exports(csp, "show-version");
186
187    map(exports, "sourceversions", 1, show_rcs(), 0);  
188
189    rsp->body = template_load(csp, "show-version");
190    template_fill(&rsp->body, exports);
191    free_map(exports);
192
193    return(0);
194
195 }
196
197  
198 /*********************************************************************
199  *
200  * Function    :  cgi_show_status
201  *
202  * Description :  CGI function that returns a a web page describing the
203  *                current status of IJB.
204  *
205  * Parameters  :
206  *           1 :  csp = Current client state (buffers, headers, etc...)
207  *           2 :  rsp = http_response data structure for output
208  *           3 :  parameters = map of cgi parameters
209  *
210  * CGI Parameters : none
211  *
212  * Returns     :  0
213  *
214  *********************************************************************/
215 int cgi_show_status(struct client_state *csp, struct http_response *rsp,
216                     struct map *parameters)
217 {
218    char *s = NULL;
219    int i;
220
221    FILE * fp;
222    char buf[BUFFER_SIZE];
223    char * p;
224    const char * filename = NULL;
225    char * file_description = NULL;
226 #ifdef FEATURE_STATISTICS
227    float perc_rej;   /* Percentage of http requests rejected */
228    int local_urls_read;
229    int local_urls_rejected;
230 #endif /* ndef FEATURE_STATISTICS */
231
232    struct map * exports = default_exports(csp, "show-status");
233
234    switch (*(lookup(parameters, "file")))
235    {
236    case 'p':
237       if (csp->actions_list)
238       {
239          filename = csp->actions_list->filename;
240          file_description = "Actions List";
241       }
242       break;
243
244    case 'r':
245       if (csp->rlist)
246       {
247          filename = csp->rlist->filename;
248          file_description = "Regex Filter List";
249       }
250       break;
251
252 #ifdef FEATURE_TRUST
253    case 't':
254       if (csp->tlist)
255       {
256          filename = csp->tlist->filename;
257          file_description = "Trust List";
258       }
259       break;
260 #endif /* def FEATURE_TRUST */
261    }
262
263    if (NULL != filename)
264    {
265       map(exports, "file-description", 1, file_description, 1);
266       map(exports, "filepath", 1, html_encode(filename), 0);
267
268       if ((fp = fopen(filename, "r")) == NULL)
269       {
270          map(exports, "content", 1, "<h1>ERROR OPENING FILE!</h1>", 1);
271       }
272       else
273       {
274          while (fgets(buf, sizeof(buf), fp))
275          {
276             p = html_encode(buf);
277             if (p)
278             {
279                s = strsav(s, p);
280                freez(p);
281                s = strsav(s, "<br>");
282             }
283          }
284          fclose(fp);
285          map(exports, "contents", 1, s, 0);
286       }
287       rsp->body = template_load(csp, "show-status-file");
288       template_fill(&rsp->body, exports);
289       free_map(exports);
290       return(0);
291
292    }
293
294    map(exports, "redirect-url", 1, REDIRECT_URL, 1);
295    
296    s = NULL;
297    for (i=0; i < Argc; i++)
298    {
299       s = strsav(s, Argv[i]);
300       s = strsav(s, " ");
301    }
302    map(exports, "invocation", 1, s, 0);
303
304    map(exports, "options", 1, csp->config->proxy_args, 1);
305    show_defines(exports);
306
307 #ifdef FEATURE_STATISTICS
308    local_urls_read     = urls_read;
309    local_urls_rejected = urls_rejected;
310
311    /*
312     * Need to alter the stats not to include the fetch of this
313     * page.
314     *
315     * Can't do following thread safely! doh!
316     *
317     * urls_read--;
318     * urls_rejected--; * This will be incremented subsequently *
319     */
320
321    if (local_urls_read == 0)
322    {
323       map_block_killer(exports, "have-stats");
324    }
325    else
326    {
327       map_block_killer(exports, "have-no-stats");
328
329       perc_rej = (float)local_urls_rejected * 100.0F /
330             (float)local_urls_read;
331
332       sprintf(buf, "%d", local_urls_read);
333       map(exports, "requests-received", 1, buf, 1);
334
335       sprintf(buf, "%d", local_urls_rejected);
336       map(exports, "requests-blocked", 1, buf, 1);
337
338       sprintf(buf, "%6.2f", perc_rej);
339       map(exports, "percent-blocked", 1, buf, 1);
340    }
341
342 #else /* ndef FEATURE_STATISTICS */
343    map_block_killer(exports, "statistics");
344 #endif /* ndef FEATURE_STATISTICS */
345
346    if (csp->actions_list)
347    {
348       map(exports, "actions-filename", 1,  csp->actions_list->filename, 1);
349    }
350    else
351    {
352       map(exports, "actions-filename", 1, "None specified", 1);
353    }
354
355    if (csp->rlist)
356    {
357       map(exports, "re-filter-filename", 1,  csp->rlist->filename, 1);
358    }
359    else
360    {
361       map(exports, "re-filter-filename", 1, "None specified", 1);
362    }
363
364 #ifdef FEATURE_TRUST
365    if (csp->tlist)
366    {
367       map(exports, "trust-filename", 1,  csp->tlist->filename, 1);
368    }
369    else
370    {
371        map(exports, "trust-filename", 1, "None specified", 1);
372    }
373 #else
374    map_block_killer(exports, "trust-support");
375 #endif /* ndef FEATURE_TRUST */
376
377    rsp->body = template_load(csp, "show-status");
378    template_fill(&rsp->body, exports);
379    free_map(exports);
380    return(0);
381
382 }
383
384  
385 /*********************************************************************
386  *
387  * Function    :  cgi_show_url_info
388  *
389  * Description :  CGI function that determines and shows which actions
390  *                junkbuster will perform for a given url, and which
391  *                matches starting from the defaults have lead to that.
392  *
393  * Parameters  :
394  *           1 :  csp = Current client state (buffers, headers, etc...)
395  *           2 :  rsp = http_response data structure for output
396  *           3 :  parameters = map of cgi parameters
397  *
398  * CGI Parameters :
399  *            url : The url whose actions are to be determined.
400  *                  If url is unset, the url-given conditional will be
401  *                  set, so that all but the form can be suppressed in
402  *                  the template.
403  *
404  * Returns     :  0
405  *
406  *********************************************************************/
407 int cgi_show_url_info(struct client_state *csp, struct http_response *rsp,
408                       struct map *parameters)
409 {
410    char *url_param;
411    char *host = NULL;
412    struct map * exports = default_exports(csp, "show-url-info");
413
414    if (NULL == (url_param = strdup(lookup(parameters, "url"))) || *url_param == '\0')
415    {
416       map_block_killer(exports, "url-given");
417       map(exports, "url", 1, "", 1);
418    }
419    else
420    {
421       char *matches = NULL;
422       char *path;
423       char *s;
424       int port = 80;
425       int hits = 0;
426       struct file_list *fl;
427       struct url_actions *b;
428       struct url_spec url[1];
429       struct current_action_spec action[1];
430       
431       host = url_param;
432       host += (strncmp(url_param, "http://", 7)) ? 0 : 7;
433
434       map(exports, "url", 1, host, 1);
435       map(exports, "url-html", 1, html_encode(host), 0);
436
437       init_current_action(action);
438
439       s = current_action_to_text(action);
440       map(exports, "default", 1, s , 0);
441
442       if (((fl = csp->actions_list) == NULL) || ((b = fl->f) == NULL))
443       {
444          map(exports, "matches", 1, "none" , 1);
445          map(exports, "final", 1, lookup(exports, "default"), 1);
446
447          freez(url_param);
448          free_current_action(action);
449
450          rsp->body = template_load(csp, "show-url-info");
451          template_fill(&rsp->body, exports);
452          free_map(exports);
453
454          return 0;
455       }
456
457       s = strchr(host, '/');
458       if (s != NULL)
459       {
460          path = strdup(s);
461          *s = '\0';
462       }
463       else
464       {
465          path = strdup("");
466       }
467       s = strchr(host, ':');
468       if (s != NULL)
469       {
470          *s++ = '\0';
471          port = atoi(s);
472          s = NULL;
473       }
474
475       *url = dsplit(host);
476
477       /* if splitting the domain fails, punt */
478       if (url->dbuf == NULL)
479       {
480          map(exports, "matches", 1, "none" , 1);
481          map(exports, "final", 1, lookup(exports, "default"), 1);
482
483          freez(url_param);
484          freez(path);
485          free_current_action(action);
486
487          rsp->body = template_load(csp, "show-url-info");
488          template_fill(&rsp->body, exports);
489          free_map(exports);
490
491          return 0;
492       }
493
494       for (b = b->next; NULL != b; b = b->next)
495       {
496          if ((b->url->port == 0) || (b->url->port == port))
497          {
498             if ((b->url->domain[0] == '\0') || (domaincmp(b->url, url) == 0))
499             {
500                if ((b->url->path == NULL) ||
501 #ifdef REGEX
502                   (regexec(b->url->preg, path, 0, NULL, 0) == 0)
503 #else
504                   (strncmp(b->url->path, path, b->url->pathlen) == 0)
505 #endif
506                )
507                {
508                   s = actions_to_text(b->action);
509                   matches = strsav(matches, "<b>{");
510                   matches = strsav(matches, s);
511                   matches = strsav(matches, " }</b><br>\n<code>");
512                   matches = strsav(matches, b->url->spec);
513                   matches = strsav(matches, "</code><br>\n<br>\n");
514                   freez(s);
515
516                   merge_current_action(action, b->action);
517                   hits++;
518                }
519             }
520          }
521       }
522
523       if (hits)
524       {
525          map(exports, "matches", 1, matches , 0);
526       }
527       else
528       {
529          map(exports, "matches", 1, "none", 1);
530       }
531       matches = NULL;
532
533       freez(url->dbuf);
534       freez(url->dvec);
535
536       freez(url_param);
537       freez(path);
538
539       s = current_action_to_text(action);
540       map(exports, "final", 1, s, 0);
541       s = NULL;
542
543       free_current_action(action);
544    }
545
546    rsp->body = template_load(csp, "show-url-info");
547    template_fill(&rsp->body, exports);
548    free_map(exports);
549    return 0;
550
551 }
552
553
554 /*********************************************************************
555  *
556  * Function    :  cgi_robots_txt
557  *
558  * Description :  CGI function to return "/robots.txt".
559  *
560  * Parameters  :
561  *           1 :  csp = Current client state (buffers, headers, etc...)
562  *           2 :  rsp = http_response data structure for output
563  *           3 :  parameters = map of cgi parameters
564  *
565  * CGI Parameters : None
566  *
567  * Returns     :  0
568  *
569  *********************************************************************/
570 int cgi_robots_txt(struct client_state *csp, struct http_response *rsp,
571                    struct map *parameters)
572 {
573    char buf[100];
574
575    rsp->body = strdup(
576       "# This is the Internet Junkbuster control interface.\n"
577       "# It isn't very useful to index it, and you're likely to break stuff.\n"
578       "# So go away!\n"
579       "\n"
580       "User-agent: *\n"
581       "Disallow: /\n"
582       "\n");
583
584    enlist_unique(rsp->headers, "Content-Type: text/plain", 13);
585
586    rsp->is_static = 1;
587
588    get_http_time(7 * 24 * 60 * 60, buf); /* 7 days into future */
589    enlist_unique_header(rsp->headers, "Expires", buf);
590
591    return 0;
592
593 }
594
595
596 /*********************************************************************
597  *
598  * Function    :  show_defines
599  *
600  * Description :  Create a string with all conditional #defines used
601  *                when building
602  *
603  * Parameters  :  None
604  *
605  * Returns     :  string 
606  *
607  *********************************************************************/
608 static void show_defines(struct map *exports)
609 {
610
611 #ifdef FEATURE_ACL
612    map_conditional(exports, "FEATURE_ACL", 1);
613 #else /* ifndef FEATURE_ACL */
614    map_conditional(exports, "FEATURE_ACL", 0);
615 #endif /* ndef FEATURE_ACL */
616
617 #ifdef FEATURE_COOKIE_JAR
618    map_conditional(exports, "FEATURE_COOKIE_JAR", 1);
619 #else /* ifndef FEATURE_COOKIE_JAR */
620    map_conditional(exports, "FEATURE_COOKIE_JAR", 0);
621 #endif /* ndef FEATURE_COOKIE_JAR */
622
623 #ifdef FEATURE_DENY_GZIP
624    map_conditional(exports, "FEATURE_DENY_GZIP", 1);
625 #else /* ifndef FEATURE_DENY_GZIP */
626    map_conditional(exports, "FEATURE_DENY_GZIP", 0);
627 #endif /* ndef FEATURE_DENY_GZIP */
628
629 #ifdef FEATURE_FAST_REDIRECTS
630    map_conditional(exports, "FEATURE_FAST_REDIRECTS", 1);
631 #else /* ifndef FEATURE_FAST_REDIRECTS */
632    map_conditional(exports, "FEATURE_FAST_REDIRECTS", 0);
633 #endif /* ndef FEATURE_FAST_REDIRECTS */
634
635 #ifdef FEATURE_FORCE_LOAD
636    map_conditional(exports, "FEATURE_FORCE_LOAD", 1);
637 #else /* ifndef FEATURE_FORCE_LOAD */
638    map_conditional(exports, "FEATURE_FORCE_LOAD", 0);
639 #endif /* ndef FEATURE_FORCE_LOAD */
640
641 #ifdef FEATURE_IMAGE_BLOCKING
642    map_conditional(exports, "FEATURE_IMAGE_BLOCKING", 1);
643 #else /* ifndef FEATURE_IMAGE_BLOCKING */
644    map_conditional(exports, "FEATURE_IMAGE_BLOCKING", 0);
645 #endif /* ndef FEATURE_IMAGE_BLOCKING */
646
647 #ifdef FEATURE_IMAGE_DETECT_MSIE
648    map_conditional(exports, "FEATURE_IMAGE_DETECT_MSIE", 1);
649 #else /* ifndef FEATURE_IMAGE_DETECT_MSIE */
650    map_conditional(exports, "FEATURE_IMAGE_DETECT_MSIE", 0);
651 #endif /* ndef FEATURE_IMAGE_DETECT_MSIE */
652
653 #ifdef FEATURE_KILL_POPUPS
654    map_conditional(exports, "FEATURE_KILL_POPUPS", 1);
655 #else /* ifndef FEATURE_KILL_POPUPS */
656    map_conditional(exports, "FEATURE_KILL_POPUPS", 0);
657 #endif /* ndef FEATURE_KILL_POPUPS */
658
659 #ifdef FEATURE_PTHREAD
660    map_conditional(exports, "FEATURE_PTHREAD", 1);
661 #else /* ifndef FEATURE_PTHREAD */
662    map_conditional(exports, "FEATURE_PTHREAD", 0);
663 #endif /* ndef FEATURE_PTHREAD */
664
665 #ifdef FEATURE_STATISTICS
666    map_conditional(exports, "FEATURE_STATISTICS", 1);
667 #else /* ifndef FEATURE_STATISTICS */
668    map_conditional(exports, "FEATURE_STATISTICS", 0);
669 #endif /* ndef FEATURE_STATISTICS */
670
671 #ifdef FEATURE_TOGGLE
672    map_conditional(exports, "FEATURE_TOGGLE", 1);
673 #else /* ifndef FEATURE_TOGGLE */
674    map_conditional(exports, "FEATURE_TOGGLE", 0);
675 #endif /* ndef FEATURE_TOGGLE */
676
677 #ifdef FEATURE_TRUST
678    map_conditional(exports, "FEATURE_TRUST", 1);
679 #else /* ifndef FEATURE_TRUST */
680    map_conditional(exports, "FEATURE_TRUST", 0);
681 #endif /* ndef FEATURE_TRUST */
682
683 #ifdef REGEX_GNU
684    map_conditional(exports, "REGEX_GNU", 1);
685 #else /* ifndef REGEX_GNU */
686    map_conditional(exports, "REGEX_GNU", 0);
687 #endif /* def REGEX_GNU */
688
689 #ifdef REGEX_PCRE
690    map_conditional(exports, "REGEX_PCRE", 1);
691 #else /* ifndef REGEX_PCRE */
692    map_conditional(exports, "REGEX_PCRE", 0);
693 #endif /* def REGEX_PCRE */
694
695 #ifdef STATIC_PCRE
696    map_conditional(exports, "STATIC_PCRE", 1);
697 #else /* ifndef STATIC_PCRE */
698    map_conditional(exports, "STATIC_PCRE", 0);
699 #endif /* ndef STATIC_PCRE */
700
701 #ifdef STATIC_PCRS
702    map_conditional(exports, "STATIC_PCRS", 1);
703 #else /* ifndef STATIC_PCRS */
704    map_conditional(exports, "STATIC_PCRS", 0);
705 #endif /* ndef STATIC_PCRS */
706
707    map(exports, "FORCE_PREFIX", 1, FORCE_PREFIX, 1);
708
709 }
710
711
712 /*********************************************************************
713  *
714  * Function    :  show_rcs
715  *
716  * Description :  Create a string with the rcs info for all sourcefiles
717  *
718  * Parameters  :  None
719  *
720  * Returns     :  string 
721  *
722  *********************************************************************/
723 static char *show_rcs(void)
724 {
725    char *b = NULL;
726    char buf[BUFFER_SIZE];
727
728    /* Instead of including *all* dot h's in the project (thus creating a
729     * tremendous amount of dependencies), I will concede to declaring them
730     * as extern's.  This forces the developer to add to this list, but oh well.
731     */
732
733 #define SHOW_RCS(__x)            \
734    {                             \
735       extern const char __x[];   \
736       sprintf(buf, "%s\n", __x); \
737       b = strsav(b, buf);        \
738    }
739
740    /* In alphabetical order */
741    SHOW_RCS(actions_h_rcs)
742    SHOW_RCS(actions_rcs)
743    SHOW_RCS(cgi_h_rcs)
744    SHOW_RCS(cgi_rcs)
745 #ifdef FEATURE_CGI_EDIT_ACTIONS
746    SHOW_RCS(cgiedit_h_rcs)
747    SHOW_RCS(cgiedit_rcs)
748 #endif /* def FEATURE_CGI_EDIT_ACTIONS */
749    SHOW_RCS(cgisimple_h_rcs)
750    SHOW_RCS(cgisimple_rcs)
751 #ifdef __MINGW32__
752    SHOW_RCS(cygwin_h_rcs)
753 #endif
754    SHOW_RCS(deanimate_h_rcs)
755    SHOW_RCS(deanimate_rcs)
756    SHOW_RCS(encode_h_rcs)
757    SHOW_RCS(encode_rcs)
758    SHOW_RCS(errlog_h_rcs)
759    SHOW_RCS(errlog_rcs)
760    SHOW_RCS(filters_h_rcs)
761    SHOW_RCS(filters_rcs)
762    SHOW_RCS(gateway_h_rcs)
763    SHOW_RCS(gateway_rcs)
764 #ifdef GNU_REGEX
765    SHOW_RCS(gnu_regex_h_rcs)
766    SHOW_RCS(gnu_regex_rcs)
767 #endif /* def GNU_REGEX */
768    SHOW_RCS(jbsockets_h_rcs)
769    SHOW_RCS(jbsockets_rcs)
770    SHOW_RCS(jcc_h_rcs)
771    SHOW_RCS(jcc_rcs)
772 #ifdef FEATURE_KILL_POPUPS
773    SHOW_RCS(killpopup_h_rcs)
774    SHOW_RCS(killpopup_rcs)
775 #endif /* def FEATURE_KILL_POPUPS */
776    SHOW_RCS(list_h_rcs)
777    SHOW_RCS(list_rcs)
778    SHOW_RCS(loadcfg_h_rcs)
779    SHOW_RCS(loadcfg_rcs)
780    SHOW_RCS(loaders_h_rcs)
781    SHOW_RCS(loaders_rcs)
782    SHOW_RCS(miscutil_h_rcs)
783    SHOW_RCS(miscutil_rcs)
784    SHOW_RCS(parsers_h_rcs)
785    SHOW_RCS(parsers_rcs)
786    SHOW_RCS(pcrs_rcs)
787    SHOW_RCS(pcrs_h_rcs)
788    SHOW_RCS(project_h_rcs)
789    SHOW_RCS(ssplit_h_rcs)
790    SHOW_RCS(ssplit_rcs)
791 #ifdef _WIN32
792 #ifndef _WIN_CONSOLE
793    SHOW_RCS(w32log_h_rcs)
794    SHOW_RCS(w32log_rcs)
795    SHOW_RCS(w32res_h_rcs)
796    SHOW_RCS(w32taskbar_h_rcs)
797    SHOW_RCS(w32taskbar_rcs)
798 #endif /* ndef _WIN_CONSOLE */
799    SHOW_RCS(win32_h_rcs)
800    SHOW_RCS(win32_rcs)
801 #endif /* def _WIN32 */
802
803 #undef SHOW_RCS
804
805    return(b);
806
807 }
808
809
810 /*
811   Local Variables:
812   tab-width: 3
813   end:
814 */