1 const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.8 2001/11/13 00:14:07 jongfoster Exp $";
2 /*********************************************************************
4 * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
6 * Purpose : Simple CGIs to get information about JunkBuster's
9 * Functions declared include:
12 * Copyright : Written by and Copyright (C) 2001 the SourceForge
13 * IJBSWA team. http://ijbswa.sourceforge.net
15 * Based on the Internet Junkbuster originally written
16 * by and Copyright (C) 1997 Anonymous Coders and
17 * Junkbusters Corporation. http://www.junkbusters.com
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.
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.
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.
38 * $Log: cgisimple.c,v $
39 * Revision 1.8 2001/11/13 00:14:07 jongfoster
40 * Fixing stupid bug now I've figured out what || means.
41 * (It always returns 0 or 1, not one of it's paramaters.)
43 * Revision 1.7 2001/10/23 21:48:19 jongfoster
44 * Cleaning up error handling in CGI functions - they now send back
45 * a HTML error page and should never cause a FATAL error. (Fixes one
46 * potential source of "denial of service" attacks).
48 * CGI actions file editor that works and is actually useful.
50 * Ability to toggle JunkBuster remotely using a CGI call.
52 * You can turn off both the above features in the main configuration
53 * file, e.g. if you are running a multi-user proxy.
55 * Revision 1.6 2001/10/14 22:00:32 jongfoster
56 * Adding support for a 404 error when an invalid CGI page is requested.
58 * Revision 1.5 2001/10/07 15:30:41 oes
59 * Removed FEATURE_DENY_GZIP
61 * Revision 1.4 2001/10/02 15:31:12 oes
62 * Introduced show-request cgi
64 * Revision 1.3 2001/09/22 16:34:44 jongfoster
65 * Removing unneeded #includes
67 * Revision 1.2 2001/09/19 18:01:11 oes
68 * Fixed comments; cosmetics
70 * Revision 1.1 2001/09/16 17:08:54 jongfoster
71 * Moving simple CGI functions from cgi.c to new file cgisimple.c
74 **********************************************************************/
80 #include <sys/types.h>
87 #define snprintf _snprintf
88 #endif /* def _WIN32 */
92 #include "cgisimple.h"
102 const char cgisimple_h_rcs[] = CGISIMPLE_H_VERSION;
105 static char *show_rcs(void);
106 static jb_err show_defines(struct map *exports);
109 /*********************************************************************
111 * Function : cgi_default
113 * Description : CGI function that is called if no action was given.
114 * Lists menu of available unhidden CGIs.
117 * 1 : csp = Current client state (buffers, headers, etc...)
118 * 2 : rsp = http_response data structure for output
119 * 3 : parameters = map of cgi parameters
121 * CGI Parameters : none
123 * Returns : JB_ERR_OK on success
124 * JB_ERR_MEMORY on out-of-memory
125 * (Problems other than out-of-memory should be
126 * handled by this routine - it should set the
127 * rsp appropriately and return "success")
129 *********************************************************************/
130 jb_err cgi_default(struct client_state *csp,
131 struct http_response *rsp,
132 const struct map *parameters)
142 if (NULL == (exports = default_exports(csp, "")))
144 return JB_ERR_MEMORY;
147 /* If there were other parameters, export a dump as "cgi-parameters" */
148 if (parameters->first)
150 if (NULL == (p = dump_map(parameters)))
153 return JB_ERR_MEMORY;
155 tmp = strdup("<p>What made you think this cgi takes parameters?\n"
156 "Anyway, here they are, in case you're interested:</p>\n");
157 string_append(&tmp, p);
162 return JB_ERR_MEMORY;
164 if (map(exports, "cgi-parameters", 1, tmp, 0))
166 return JB_ERR_MEMORY;
171 if (map(exports, "cgi-parameters", 1, "", 1))
173 return JB_ERR_MEMORY;
177 return template_fill_for_cgi(csp, "default", exports, rsp);
183 /*********************************************************************
185 * Function : cgi_error_404
187 * Description : CGI function that is called if an unknown action was
191 * 1 : csp = Current client state (buffers, headers, etc...)
192 * 2 : rsp = http_response data structure for output
193 * 3 : parameters = map of cgi parameters
195 * CGI Parameters : none
197 * Returns : JB_ERR_OK on success
198 * JB_ERR_MEMORY on out-of-memory error.
200 *********************************************************************/
201 jb_err cgi_error_404(struct client_state *csp,
202 struct http_response *rsp,
203 const struct map *parameters)
211 if (NULL == (exports = default_exports(csp, NULL)))
213 return JB_ERR_MEMORY;
216 rsp->status = strdup("404 JunkBuster configuration page not found");
217 if (rsp->status == NULL)
220 return JB_ERR_MEMORY;
223 return template_fill_for_cgi(csp, "cgi-error-404", exports, rsp);
227 /*********************************************************************
229 * Function : cgi_show_request
231 * Description : Show the client's request and what sed() would have
235 * 1 : csp = Current client state (buffers, headers, etc...)
236 * 2 : rsp = http_response data structure for output
237 * 3 : parameters = map of cgi parameters
239 * CGI Parameters : none
241 * Returns : JB_ERR_OK on success
242 * JB_ERR_MEMORY on out-of-memory error.
244 *********************************************************************/
245 jb_err cgi_show_request(struct client_state *csp,
246 struct http_response *rsp,
247 const struct map *parameters)
256 if (NULL == (exports = default_exports(csp, "show-request")))
258 return JB_ERR_MEMORY;
262 * Repair the damage done to the IOB by get_header()
264 for (p = csp->iob->buf; p < csp->iob->eod; p++)
266 if (*p == '\0') *p = '\n';
270 * Export the original client's request and the one we would
271 * be sending to the server if this wasn't a CGI call
274 if (map(exports, "client-request", 1, csp->iob->buf, 1))
277 return JB_ERR_MEMORY;
280 if (map(exports, "processed-request", 1, sed(client_patterns, add_client_headers, csp), 0))
283 return JB_ERR_MEMORY;
286 return template_fill_for_cgi(csp, "show-request", exports, rsp);
290 /*********************************************************************
292 * Function : cgi_send_banner
294 * Description : CGI function that returns a banner.
297 * 1 : csp = Current client state (buffers, headers, etc...)
298 * 2 : rsp = http_response data structure for output
299 * 3 : parameters = map of cgi parameters
302 * type : Selects the type of banner between "trans" and "jb".
303 * Defaults to "jb" if absent or != "trans".
305 * Returns : JB_ERR_OK on success
306 * JB_ERR_MEMORY on out-of-memory error.
308 *********************************************************************/
309 jb_err cgi_send_banner(struct client_state *csp,
310 struct http_response *rsp,
311 const struct map *parameters)
313 if (strcmp(lookup(parameters, "type"), "trans"))
315 rsp->body = bindup(image_junkbuster_gif_data, image_junkbuster_gif_length);
316 rsp->content_length = image_junkbuster_gif_length;
320 rsp->body = bindup(image_blank_gif_data, image_blank_gif_length);
321 rsp->content_length = image_blank_gif_length;
324 if (rsp->body == NULL)
326 return JB_ERR_MEMORY;
329 if (enlist(rsp->headers, "Content-Type: image/gif"))
331 return JB_ERR_MEMORY;
341 /*********************************************************************
343 * Function : cgi_show_version
345 * Description : CGI function that returns a a web page describing the
346 * file versions of IJB.
349 * 1 : csp = Current client state (buffers, headers, etc...)
350 * 2 : rsp = http_response data structure for output
351 * 3 : parameters = map of cgi parameters
353 * CGI Parameters : none
355 * Returns : JB_ERR_OK on success
356 * JB_ERR_MEMORY on out-of-memory error.
358 *********************************************************************/
359 jb_err cgi_show_version(struct client_state *csp,
360 struct http_response *rsp,
361 const struct map *parameters)
369 if (NULL == (exports = default_exports(csp, "show-version")))
371 return JB_ERR_MEMORY;
374 if (map(exports, "sourceversions", 1, show_rcs(), 0))
377 return JB_ERR_MEMORY;
380 return template_fill_for_cgi(csp, "show-version", exports, rsp);
384 /*********************************************************************
386 * Function : cgi_show_status
388 * Description : CGI function that returns a a web page describing the
389 * current status of IJB.
392 * 1 : csp = Current client state (buffers, headers, etc...)
393 * 2 : rsp = http_response data structure for output
394 * 3 : parameters = map of cgi parameters
397 * file : Which file to show. Only first letter is checked,
399 * - "p"ermissions (actions) file
402 * Default is to show menu and other information.
404 * Returns : JB_ERR_OK on success
405 * JB_ERR_MEMORY on out-of-memory error.
407 *********************************************************************/
408 jb_err cgi_show_status(struct client_state *csp,
409 struct http_response *rsp,
410 const struct map *parameters)
416 char buf[BUFFER_SIZE];
418 const char * filename = NULL;
419 char * file_description = NULL;
420 #ifdef FEATURE_STATISTICS
421 float perc_rej; /* Percentage of http requests rejected */
423 int local_urls_rejected;
424 #endif /* ndef FEATURE_STATISTICS */
433 if (NULL == (exports = default_exports(csp, "show-status")))
435 return JB_ERR_MEMORY;
438 switch (*(lookup(parameters, "file")))
441 if (csp->actions_list)
443 filename = csp->actions_list->filename;
444 file_description = "Actions List";
451 filename = csp->rlist->filename;
452 file_description = "Regex Filter List";
460 filename = csp->tlist->filename;
461 file_description = "Trust List";
464 #endif /* def FEATURE_TRUST */
467 if (NULL != filename)
469 if ( map(exports, "file-description", 1, file_description, 1)
470 || map(exports, "filepath", 1, html_encode(filename), 0) )
473 return JB_ERR_MEMORY;
476 if ((fp = fopen(filename, "r")) == NULL)
478 if (map(exports, "content", 1, "<h1>ERROR OPENING FILE!</h1>", 1))
481 return JB_ERR_MEMORY;
487 while ((s != NULL) && fgets(buf, sizeof(buf), fp))
489 p = html_encode(buf);
492 string_append(&s, p);
494 string_append(&s, "<br>");
499 if (map(exports, "contents", 1, s, 0))
502 return JB_ERR_MEMORY;
506 return template_fill_for_cgi(csp, "show-status-file", exports, rsp);
509 if (map(exports, "redirect-url", 1, REDIRECT_URL, 1))
512 return JB_ERR_MEMORY;
516 for (i=0; i < Argc; i++)
518 string_append(&s, Argv[i]);
519 string_append(&s, " ");
521 if (map(exports, "invocation", 1, s, 0))
524 return JB_ERR_MEMORY;
527 err = map(exports, "options", 1, csp->config->proxy_args, 1);
528 if (!err) err = show_defines(exports);
530 #ifdef FEATURE_STATISTICS
531 local_urls_read = urls_read;
532 local_urls_rejected = urls_rejected;
535 * Need to alter the stats not to include the fetch of this
538 * Can't do following thread safely! doh!
541 * urls_rejected--; * This will be incremented subsequently *
544 if (local_urls_read == 0)
546 if (!err) err = map_block_killer(exports, "have-stats");
550 if (!err) err = map_block_killer(exports, "have-no-stats");
552 perc_rej = (float)local_urls_rejected * 100.0F /
553 (float)local_urls_read;
555 sprintf(buf, "%d", local_urls_read);
556 if (!err) err = map(exports, "requests-received", 1, buf, 1);
558 sprintf(buf, "%d", local_urls_rejected);
559 if (!err) err = map(exports, "requests-blocked", 1, buf, 1);
561 sprintf(buf, "%6.2f", perc_rej);
562 if (!err) err = map(exports, "percent-blocked", 1, buf, 1);
565 #else /* ndef FEATURE_STATISTICS */
566 err = err || map_block_killer(exports, "statistics");
567 #endif /* ndef FEATURE_STATISTICS */
569 if (csp->actions_list)
571 if (!err) err = map(exports, "actions-filename", 1, csp->actions_list->filename, 1);
575 if (!err) err = map(exports, "actions-filename", 1, "None specified", 1);
580 if (!err) err = map(exports, "re-filter-filename", 1, csp->rlist->filename, 1);
584 if (!err) err = map(exports, "re-filter-filename", 1, "None specified", 1);
590 if (!err) err = map(exports, "trust-filename", 1, csp->tlist->filename, 1);
594 if (!err) err = map(exports, "trust-filename", 1, "None specified", 1);
597 if (!err) err = map_block_killer(exports, "trust-support");
598 #endif /* ndef FEATURE_TRUST */
603 return JB_ERR_MEMORY;
606 return template_fill_for_cgi(csp, "show-status", exports, rsp);
610 /*********************************************************************
612 * Function : cgi_show_url_info
614 * Description : CGI function that determines and shows which actions
615 * junkbuster will perform for a given url, and which
616 * matches starting from the defaults have lead to that.
619 * 1 : csp = Current client state (buffers, headers, etc...)
620 * 2 : rsp = http_response data structure for output
621 * 3 : parameters = map of cgi parameters
624 * url : The url whose actions are to be determined.
625 * If url is unset, the url-given conditional will be
626 * set, so that all but the form can be suppressed in
629 * Returns : JB_ERR_OK on success
630 * JB_ERR_MEMORY on out-of-memory error.
632 *********************************************************************/
633 jb_err cgi_show_url_info(struct client_state *csp,
634 struct http_response *rsp,
635 const struct map *parameters)
637 const char *url_param_const;
645 if (NULL == (exports = default_exports(csp, "show-url-info")))
647 return JB_ERR_MEMORY;
650 url_param_const = lookup(parameters, "url");
651 if (*url_param_const == '\0')
653 if (map_block_killer(exports, "url-given")
654 || map(exports, "url", 1, "", 1))
657 return JB_ERR_MEMORY;
668 struct file_list *fl;
669 struct url_actions *b;
670 struct url_spec url[1];
671 struct current_action_spec action[1];
673 if (NULL == (url_param = strdup(url_param_const)))
676 return JB_ERR_MEMORY;
680 host += (strncmp(url_param, "http://", 7)) ? 0 : 7;
682 if (map(exports, "url", 1, host, 1)
683 || map(exports, "url-html", 1, html_encode(host), 0))
687 return JB_ERR_MEMORY;
690 init_current_action(action);
692 s = current_action_to_text(action);
693 if (map(exports, "default", 1, s , 0))
695 free_current_action(action);
698 return JB_ERR_MEMORY;
701 if (((fl = csp->actions_list) == NULL) || ((b = fl->f) == NULL))
705 err = map(exports, "matches", 1, "none" , 1)
706 || map(exports, "final", 1, lookup(exports, "default"), 1);
708 free_current_action(action);
714 return JB_ERR_MEMORY;
717 return template_fill_for_cgi(csp, "show-url-info", exports, rsp);
720 s = strchr(host, '/');
732 free_current_action(action);
735 return JB_ERR_MEMORY;
738 s = strchr(host, ':');
748 /* if splitting the domain fails, punt */
749 if (url->dbuf == NULL)
753 err = map(exports, "matches", 1, "none" , 1)
754 || map(exports, "final", 1, lookup(exports, "default"), 1);
758 free_current_action(action);
763 return JB_ERR_MEMORY;
766 return template_fill_for_cgi(csp, "show-url-info", exports, rsp);
769 matches = strdup("");
771 for (b = b->next; NULL != b; b = b->next)
773 if ((b->url->port == 0) || (b->url->port == port))
775 if ((b->url->domain[0] == '\0') || (domaincmp(b->url, url) == 0))
777 if ((b->url->path == NULL) ||
779 (regexec(b->url->preg, path, 0, NULL, 0) == 0)
781 (strncmp(b->url->path, path, b->url->pathlen) == 0)
785 s = actions_to_text(b->action);
793 free_current_action(action);
795 return JB_ERR_MEMORY;
797 string_append(&matches, "<b>{");
798 string_append(&matches, s);
799 string_append(&matches, " }</b><br>\n<code>");
800 string_append(&matches, b->url->spec);
801 string_append(&matches, "</code><br>\n<br>\n");
804 merge_current_action(action, b->action); /* FIXME: Add error checking */
819 free_current_action(action);
821 return JB_ERR_MEMORY;
827 matches = strdup("none");
829 if (map(exports, "matches", 1, matches , 0))
831 free_current_action(action);
833 return JB_ERR_MEMORY;
836 s = current_action_to_text(action);
838 free_current_action(action);
840 if (map(exports, "final", 1, s, 0))
843 return JB_ERR_MEMORY;
847 return template_fill_for_cgi(csp, "show-url-info", exports, rsp);
851 /*********************************************************************
853 * Function : cgi_robots_txt
855 * Description : CGI function to return "/robots.txt".
858 * 1 : csp = Current client state (buffers, headers, etc...)
859 * 2 : rsp = http_response data structure for output
860 * 3 : parameters = map of cgi parameters
862 * CGI Parameters : None
864 * Returns : JB_ERR_OK on success
865 * JB_ERR_MEMORY on out-of-memory error.
867 *********************************************************************/
868 jb_err cgi_robots_txt(struct client_state *csp,
869 struct http_response *rsp,
870 const struct map *parameters)
876 "# This is the Internet Junkbuster control interface.\n"
877 "# It isn't very useful to index it, and you're likely to break stuff.\n"
883 if (rsp->body == NULL)
885 return JB_ERR_MEMORY;
888 err = enlist_unique(rsp->headers, "Content-Type: text/plain", 13);
892 get_http_time(7 * 24 * 60 * 60, buf); /* 7 days into future */
893 if (!err) err = enlist_unique_header(rsp->headers, "Expires", buf);
895 return (err ? JB_ERR_MEMORY : JB_ERR_OK);
899 /*********************************************************************
901 * Function : show_defines
903 * Description : Add to a map the state od all conditional #defines
907 * 1 : exports = map to extend
909 * Returns : JB_ERR_OK on success
910 * JB_ERR_MEMORY on out-of-memory error.
912 *********************************************************************/
913 static jb_err show_defines(struct map *exports)
915 jb_err err = JB_ERR_OK;
918 if (!err) err = map_conditional(exports, "FEATURE_ACL", 1);
919 #else /* ifndef FEATURE_ACL */
920 if (!err) err = map_conditional(exports, "FEATURE_ACL", 0);
921 #endif /* ndef FEATURE_ACL */
923 #ifdef FEATURE_CGI_EDIT_ACTIONS
924 if (!err) err = map_conditional(exports, "FEATURE_CGI_EDIT_ACTIONS", 1);
925 #else /* ifndef FEATURE_COOKIE_JAR */
926 if (!err) err = map_conditional(exports, "FEATURE_CGI_EDIT_ACTIONS", 0);
927 #endif /* ndef FEATURE_COOKIE_JAR */
929 #ifdef FEATURE_COOKIE_JAR
930 if (!err) err = map_conditional(exports, "FEATURE_COOKIE_JAR", 1);
931 #else /* ifndef FEATURE_COOKIE_JAR */
932 if (!err) err = map_conditional(exports, "FEATURE_COOKIE_JAR", 0);
933 #endif /* ndef FEATURE_COOKIE_JAR */
935 #ifdef FEATURE_FAST_REDIRECTS
936 if (!err) err = map_conditional(exports, "FEATURE_FAST_REDIRECTS", 1);
937 #else /* ifndef FEATURE_FAST_REDIRECTS */
938 if (!err) err = map_conditional(exports, "FEATURE_FAST_REDIRECTS", 0);
939 #endif /* ndef FEATURE_FAST_REDIRECTS */
941 #ifdef FEATURE_FORCE_LOAD
942 if (!err) err = map_conditional(exports, "FEATURE_FORCE_LOAD", 1);
943 #else /* ifndef FEATURE_FORCE_LOAD */
944 if (!err) err = map_conditional(exports, "FEATURE_FORCE_LOAD", 0);
945 #endif /* ndef FEATURE_FORCE_LOAD */
947 #ifdef FEATURE_IMAGE_BLOCKING
948 if (!err) err = map_conditional(exports, "FEATURE_IMAGE_BLOCKING", 1);
949 #else /* ifndef FEATURE_IMAGE_BLOCKING */
950 if (!err) err = map_conditional(exports, "FEATURE_IMAGE_BLOCKING", 0);
951 #endif /* ndef FEATURE_IMAGE_BLOCKING */
953 #ifdef FEATURE_IMAGE_DETECT_MSIE
954 if (!err) err = map_conditional(exports, "FEATURE_IMAGE_DETECT_MSIE", 1);
955 #else /* ifndef FEATURE_IMAGE_DETECT_MSIE */
956 if (!err) err = map_conditional(exports, "FEATURE_IMAGE_DETECT_MSIE", 0);
957 #endif /* ndef FEATURE_IMAGE_DETECT_MSIE */
959 #ifdef FEATURE_KILL_POPUPS
960 if (!err) err = map_conditional(exports, "FEATURE_KILL_POPUPS", 1);
961 #else /* ifndef FEATURE_KILL_POPUPS */
962 if (!err) err = map_conditional(exports, "FEATURE_KILL_POPUPS", 0);
963 #endif /* ndef FEATURE_KILL_POPUPS */
965 #ifdef FEATURE_PTHREAD
966 if (!err) err = map_conditional(exports, "FEATURE_PTHREAD", 1);
967 #else /* ifndef FEATURE_PTHREAD */
968 if (!err) err = map_conditional(exports, "FEATURE_PTHREAD", 0);
969 #endif /* ndef FEATURE_PTHREAD */
971 #ifdef FEATURE_STATISTICS
972 if (!err) err = map_conditional(exports, "FEATURE_STATISTICS", 1);
973 #else /* ifndef FEATURE_STATISTICS */
974 if (!err) err = map_conditional(exports, "FEATURE_STATISTICS", 0);
975 #endif /* ndef FEATURE_STATISTICS */
977 #ifdef FEATURE_TOGGLE
978 if (!err) err = map_conditional(exports, "FEATURE_TOGGLE", 1);
979 #else /* ifndef FEATURE_TOGGLE */
980 if (!err) err = map_conditional(exports, "FEATURE_TOGGLE", 0);
981 #endif /* ndef FEATURE_TOGGLE */
984 if (!err) err = map_conditional(exports, "FEATURE_TRUST", 1);
985 #else /* ifndef FEATURE_TRUST */
986 if (!err) err = map_conditional(exports, "FEATURE_TRUST", 0);
987 #endif /* ndef FEATURE_TRUST */
990 if (!err) err = map_conditional(exports, "REGEX_GNU", 1);
991 #else /* ifndef REGEX_GNU */
992 if (!err) err = map_conditional(exports, "REGEX_GNU", 0);
993 #endif /* def REGEX_GNU */
996 if (!err) err = map_conditional(exports, "REGEX_PCRE", 1);
997 #else /* ifndef REGEX_PCRE */
998 if (!err) err = map_conditional(exports, "REGEX_PCRE", 0);
999 #endif /* def REGEX_PCRE */
1002 if (!err) err = map_conditional(exports, "STATIC_PCRE", 1);
1003 #else /* ifndef STATIC_PCRE */
1004 if (!err) err = map_conditional(exports, "STATIC_PCRE", 0);
1005 #endif /* ndef STATIC_PCRE */
1008 if (!err) err = map_conditional(exports, "STATIC_PCRS", 1);
1009 #else /* ifndef STATIC_PCRS */
1010 if (!err) err = map_conditional(exports, "STATIC_PCRS", 0);
1011 #endif /* ndef STATIC_PCRS */
1013 if (!err) err = map(exports, "FORCE_PREFIX", 1, FORCE_PREFIX, 1);
1019 /*********************************************************************
1021 * Function : show_rcs
1023 * Description : Create a string with the rcs info for all sourcefiles
1027 * Returns : A string, or NULL on out-of-memory.
1029 *********************************************************************/
1030 static char *show_rcs(void)
1032 char *result = strdup("");
1033 char buf[BUFFER_SIZE];
1035 /* Instead of including *all* dot h's in the project (thus creating a
1036 * tremendous amount of dependencies), I will concede to declaring them
1037 * as extern's. This forces the developer to add to this list, but oh well.
1040 #define SHOW_RCS(__x) \
1042 extern const char __x[]; \
1043 sprintf(buf, "%s\n", __x); \
1044 string_append(&result, buf); \
1047 /* In alphabetical order */
1048 SHOW_RCS(actions_h_rcs)
1049 SHOW_RCS(actions_rcs)
1052 #ifdef FEATURE_CGI_EDIT_ACTIONS
1053 SHOW_RCS(cgiedit_h_rcs)
1054 SHOW_RCS(cgiedit_rcs)
1055 #endif /* def FEATURE_CGI_EDIT_ACTIONS */
1056 SHOW_RCS(cgisimple_h_rcs)
1057 SHOW_RCS(cgisimple_rcs)
1059 SHOW_RCS(cygwin_h_rcs)
1061 SHOW_RCS(deanimate_h_rcs)
1062 SHOW_RCS(deanimate_rcs)
1063 SHOW_RCS(encode_h_rcs)
1064 SHOW_RCS(encode_rcs)
1065 SHOW_RCS(errlog_h_rcs)
1066 SHOW_RCS(errlog_rcs)
1067 SHOW_RCS(filters_h_rcs)
1068 SHOW_RCS(filters_rcs)
1069 SHOW_RCS(gateway_h_rcs)
1070 SHOW_RCS(gateway_rcs)
1072 SHOW_RCS(gnu_regex_h_rcs)
1073 SHOW_RCS(gnu_regex_rcs)
1074 #endif /* def GNU_REGEX */
1075 SHOW_RCS(jbsockets_h_rcs)
1076 SHOW_RCS(jbsockets_rcs)
1079 #ifdef FEATURE_KILL_POPUPS
1080 SHOW_RCS(killpopup_h_rcs)
1081 SHOW_RCS(killpopup_rcs)
1082 #endif /* def FEATURE_KILL_POPUPS */
1083 SHOW_RCS(list_h_rcs)
1085 SHOW_RCS(loadcfg_h_rcs)
1086 SHOW_RCS(loadcfg_rcs)
1087 SHOW_RCS(loaders_h_rcs)
1088 SHOW_RCS(loaders_rcs)
1089 SHOW_RCS(miscutil_h_rcs)
1090 SHOW_RCS(miscutil_rcs)
1091 SHOW_RCS(parsers_h_rcs)
1092 SHOW_RCS(parsers_rcs)
1094 SHOW_RCS(pcrs_h_rcs)
1095 SHOW_RCS(project_h_rcs)
1096 SHOW_RCS(ssplit_h_rcs)
1097 SHOW_RCS(ssplit_rcs)
1099 #ifndef _WIN_CONSOLE
1100 SHOW_RCS(w32log_h_rcs)
1101 SHOW_RCS(w32log_rcs)
1102 SHOW_RCS(w32res_h_rcs)
1103 SHOW_RCS(w32taskbar_h_rcs)
1104 SHOW_RCS(w32taskbar_rcs)
1105 #endif /* ndef _WIN_CONSOLE */
1106 SHOW_RCS(win32_h_rcs)
1108 #endif /* def _WIN32 */