.---------------------------------------------------------------------------- .- .- xiconfig.gsl - Generate configuration .- .- Copyright (c) 1991-2003 iMatix Corporation .- .- ------------------ GPL Licensed Source Code ------------------ .- iMatix makes this software available under the GNU General .- Public License (GPL) license for open source projects. For .- details of the GPL license please see www.gnu.org or read the .- file license.gpl provided in this package. .- .- This program is free software; you can redistribute it and/or .- modify it under the terms of the GNU General Public License as .- published by the Free Software Foundation; either version 2 of .- the License, or (at your option) any later version. .- .- This program is distributed in the hope that it will be useful, .- but WITHOUT ANY WARRANTY; without even the implied warranty of .- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .- GNU General Public License for more details. .- .- You should have received a copy of the GNU General Public .- License along with this program in the file 'license.gpl'; if .- not, write to the Free Software Foundation, Inc., 59 Temple .- Place - Suite 330, Boston, MA 02111-1307, USA. .- .- You can also license this software under iMatix's General Terms .- of Business (GTB) for commercial projects. If you have not .- explicitly licensed this software under the iMatix GTB you may .- only use it under the terms of the GNU General Public License. .- .- For more information, send an email to info@imatix.com. .- -------------------------------------------------------------- .---------------------------------------------------------------------------- .- .for section by name where "$(type)" = "detail" | count (preload) > 0 . for item by name . if ! defined (default) . for config.domain where name = item.domain . item.default ?= domain.default? . endfor . endif . if ! defined (default) . echo "No default for $(section.name):$(name)" . endif . endfor item .endfor .- .if switches.build_header ?= 1 .echo "Generating xiconfig.h..." .output "xiconfig.h" /* ----------------------------------------------------------------- Name: xiconfig.h Title: Defines Xitami configuration table in memory Package: Xitami Generated by GSLgen from $(script) on $(date). -------------------------------------------------------------------*/ #ifndef _XICONFIG_INCLUDED #define _XICONFIG_INCLUDED static struct { char *name; char *value; } config_list [] = { .for section by name where "$(type)" = "detail" | count (preload) > 0 { "$(name):", NULL }, . for item by name { "$(name)", "$(default?:)" }, . endfor item . for preload /* $(name:) */ . for item by name { "$(name)", "$(value:)" }, . endfor item . endfor preload .endfor section { NULL, NULL } }; #endif .endif .- .if switches.build_config ?= 1 .echo "Generating xitami.cfg..." .output "xitami.cfg" # # xitami.cfg - Xitami configuration file # # This file is produced automatically using GSLgen through the Xitami # configurator. You can print it if you need a textual reference to the # Xitami configuration options, although the HTML version is easier to use. # # DON'T MODIFY THIS FILE... instead, create a file called 'defaults.cfg' # with the sections and entries you need. If you modify this file, any # changes WON'T BE SHOWN in the browser-based admin screens. Okay, we # warned you. # #*END .for section .text = string.justify (section., 70, "# ") # ------------------------------------------------------------------------- # $(NAME) configuration section # $(text:) [$(Name)] . for item . item.text = string.trim (item.?"") . for config.domain where name = item.domain . item.text += " " + string.trim (domain.?"") . endfor domain . text = string.justify (text, 70, "# ") $(text:) $(name)=$(default:) . endfor item . for preload # $(name:) . for item by name $(name)=$(value:) . endfor item . endfor preload .endfor section .endif .- .- NOTE: xiconfig.htp is generated in the current directory as that is the .- only one we can be sure exists. .- .if switches.build_doc ?= 1 .echo "Generating xiconfig.htp..." .output "xiconfig.htp" .- .- xiconfig.htp - Xitami configuration documentation .- .- Generated: $(date) $(time) from $(script). .- .for section \.build anchor config_$(name:c)

The [$(Name)] Section

$(section.:) .for example

This is an example of enties in the [$(Name)] section:

$(example.:)
.endfor example .if defined (info) More information is available. .endif .if count (item) > 0
. for item . for config.domain where name = item.domain . itemtext = string.trim (item.?"") . domaintext = string.trim (domain.?"") . if defined (domain.info) & ! defined (item.info) . item.info = domain.info . if domain.type = "select" . item.select = domain.name . endif . endif . endfor domain \.item $(name)
$(itemtext?:) $(domaintext?:) .if defined (item.info) More information is available. .endif .if defined (item.select) See possible values. .endif
Default: $(default:). . endfor item
.endif .if count (preload) > 0

These entries are loaded by default: . for preload . for item by name . endfor item . endfor preload
Entry:Definition
$(name:)
$(name:)$(value:)
.endif .endfor section

Field with specific values

These options occur in several sections and are selected from a list of possible values. .for domain where type = "SELECT" \.build anchor domain_$(name)

$(title:)

$(domain.:) These are the possible values for the $(title): .for value .endfor value
Value:Has this meaning:
$(name)$(value.:)
.endfor domain .endif