/**
 * File:	providers.scr
 * Summary:	Agent for predefined (system) providers
 * Authors:	Petr Blahos <pblahos@suse.cz>, Michal Svec <msvec@suse.cz>
 * Access:	read-only
 * See:		providers.rpm
 *
 * General syntax:
 *	# comment
 *	[provider_name]
 *	key=value
 *
 * $Id: providers.scr 12980 2003-12-06 20:51:23Z msvec $
 *
 * <p>Reads providers from files /usr/share/providers/*.conf.</p>
 */
.providers

`ag_ini(
    `IniAgent( [ "/usr/share/providers/*.conf",  ],
	$[
	    /* read-only */
	    "options"	: [ "read_only" ],
	    /* empty lines and whole-line comments */
	    "comments"	: [ "^[ \t]*$", "^[ \t]*#.*" ],
	    /* matching rules for sections */
	    "sections"	: [
		$[
		    "begin" : [ "[ \t]*\\[[ \t]*(.*[^ \t])[ \t]*\\][ \t]*", "[%s]" ],
		],
	    ],
	    /* matching rules for values */
	    "params" : [
		$[
		    "match" : [ "^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*\"([^\"]*)\"[ \t]*$" , "%s=\"%s\""],
		],
	    ],
	    /* rewrite rules */
	    "rewrite"	: [
		[ "/usr/share/providers/(.*)\.conf$",  "/usr/share/providers/%s.conf", ],
	    ],
	]
    )
)
