aboutsummaryrefslogtreecommitdiff
path: root/modules/guile/getpw.scm
AgeCommit message (Collapse)AuthorFiles
2021-05-26Update copyright yearsSergey Poznyakoff1
2019-05-10Support for Guile 2.2Sergey Poznyakoff1
* NEWS: Update. * README: Update. * configure.ac: Drop support for Guile versions prior to 2.2 and Mailutils prior to 3.0 * modules/guile/getpw.scm: Use inet-ntop instead of the withdrawn inet-ntoa. * modules/guile/guile.c: Rewrite for Guile 2.2
2014-08-23Update copyright yearsSergey Poznyakoff1
2010-06-21Change transformation syntax and method calling convention.Sergey Poznyakoff1
* include/smap/module.h (smap_module)<smap_xform>: Change signature. * modules/guile/getpw.scm (smap-xform): Change signature. * modules/guile/guile.c (guile_xform): Change signature. * src/query.c: Change transform syntax. New syntax is: "transform" "key"|"map" dbname. * src/smapd.cfin [GUILE]: Add sample transform entries.
2010-06-21Implement argument transformations.Sergey Poznyakoff1
Argument transformations allow to change map and/or key in the input query before actually processing it. They are implemented at the module level, via additional method in smap_module structure. * include/smap/module.h (SMAP_MODULE_VERSION): Define to 2. (SMAP_CAPA_DEFAULT): Change constant. (SMAP_CAPA_XFORM): New define. (smap_module)<smap_xform>: New member. * src/module.c (_load_module): Fix consistency checking. * src/query.c: New condition "key [op] value". New target "transform dbname". (query_cond_type): New constant query_cond_key. (map_comparison): Rename to comparison. All uses changed. (map_cond): Rename to comp_cond. All uses changed. (dispatch_rule)<xform>: New member. (query_tok)<T_TRANSFORM, T_KEY>: New tokens. (query_kwtab): New keywords: key, transform. (parse_dispatch_map): Rename to parse_dispatch_comp; change signature. All uses changed. (parse_subcond): Handle T_KEY token. (parse_complex_dispatch): Handle T_KEY and T_TRANSFORM. (rule_fixup): New function. (link_dispatch_rules): Use rule_fixup. (find_dispatch_rule): Second argument defines where to start searching. (dispatch_query): Handle transformations. Add checking of return values. * modules/guile/guile.c (guile_proc_ind)<xform_proc>: New index. (guile_proc_name): New proc "xform". (guile_init_db): Bail out if neither query nor xform is defined. (guile_xform): New function. (module): Add guile_xform. * modules/guile/getpw.scm (smap-xform): Implement an example transformation. * modules/echo/echo.c (module): Update. * modules/mailutils/mailutils.c: Likewise.
2010-06-19Fix invocation of database initialization methods. Update server docs.Sergey Poznyakoff1
* include/smap/module.h (smap_module) <smap_init_db>: Change signature: pass database name as the first argument. * modules/echo/echo.c (echo_init_db): Update signature. * modules/guile/getpw.scm (smap-open): Likewise. * modules/guile/guile.c (_guile_database)<dbname>: new member. (call_init_handler): Pass #f if dbname is NULL. (guile_init_db): Initialize db->dbname; fix invocation of init_fun. * modules/mailutils/mailutils.c (_mu_smap_db)<id>: New member. (_mu_smap_result)<db>: New member. (expand_reply_text): Initialize "db" key to the name of the database. (_mu_auth_query, _mu_mbq_query): Set res.db (mod_mailutils_init_db): Update signature. Initialize db->id. * doc/ex-meta1.texi: New file. * doc/Makefile.am (smap_TEXINFOS): Add ex-meta1.texi. * doc/smap.texi: Finish server documentation.
2010-06-18Improve Guile interface.Sergey Poznyakoff1
* modules/guile/getpw.scm (smap-open) Return a meaningful value. (smap-query): Take db handle as first argument. * modules/guile/guile.c (guile_init_db): Initialize db->handle. (guile_call_proc): Open indicates error by returning SCM_UNSPECIFIED. (guile_close): Unprotect the handle even if no close procedure was registered. (guile_query): Pass database handle to the query function. * src/smapd.cfin [LOCAL]: Provide settings for local tests.
2010-06-18Fix Guile module loading.Sergey Poznyakoff1
* modules/guile/Makefile.am (AM_CPPFLAGS): Define ADDLOADPATH. * modules/guile/getpw.scm: Add comment. * modules/guile/guile.c (guile_init)[ADDLOADPATH]: Add it ti the current load path. * src/module.c (init_databases): Fix typo in diagnostic message.
2010-06-17Normalize package name spelling; remove trailing whitespace.Sergey Poznyakoff1
All sources affected.
2010-06-17Install a sample configuration file.Sergey Poznyakoff1
* src/smapd.cfin: New file. * src/Makefile.am (EXTRA_DIST): Add smapd.conf [MAILUTILS_COND]: Define DEF_MAILUTILS [GUILE_COND]: Define DEF_GUILE (.cfin.conf): New implicit rule. (noinst_DATA): New variable. (install-data-local): New rule. * Makefile.am (distuninstallcheck_listfiles): New variable. * src/.gitignore: Add smapd.conf * modules/guile/getpw.scm: New file. * modules/guile/Makefile.am (EXTRA_DIST, site_DATA): Add getpw.scm. * modules/guile/guile.c: Fix the use of set_load_path: it must be called after Guile framework has been initialized.

Return to:

Send suggestions and report system problems to the System administrator.