summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2010-04-14 09:46:44 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2010-04-14 09:46:44 (GMT)
commit302a74e565999792d3cac79df23ee93b01e49f52 (patch) (unidiff)
tree0d6b456092fb092ff71a46d2e23557b3955a9fb6
parent391b9afdd48db47f95567dbf1c3c9d2cc1029415 (diff)
downloadgamma-302a74e565999792d3cac79df23ee93b01e49f52.tar.gz
gamma-302a74e565999792d3cac79df23ee93b01e49f52.tar.bz2
Upgrade gint version.
* gint: Upgrade. * src/Makefile.am: Initialize BUILT_SOURCES. * src/gamma-expat.c: Use lower-case names for parameters to SCM interfaces. Improve docstrings. * src/gsql_conn.c: Likewise. * src/syslog-port.c: Likewise. * src/syslog.c: Likewise.
Diffstat (more/less context) (ignore whitespace changes)
m---------gint0
-rw-r--r--src/Makefile.am1
-rw-r--r--src/gamma-expat.c85
-rw-r--r--src/gsql_conn.c76
-rw-r--r--src/syslog-port.c6
-rw-r--r--src/syslog.c45
6 files changed, 128 insertions, 85 deletions
diff --git a/gint b/gint
Subproject c6a7620deb7e3e139329e2daad31d4071f01b43 Subproject 4254b0590e609b82dac3d688ecb401c9eefb7e2
diff --git a/src/Makefile.am b/src/Makefile.am
index 7ae8351..6fc983a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,5 +40,6 @@ AM_CPPFLAGS=-DDATADIR=\"$(guiledir)\"
40 40
41SUFFIXES= 41SUFFIXES=
42CLEANFILES= 42CLEANFILES=
43BUILT_SOURCES=
43include ../gint/gint.mk 44include ../gint/gint.mk
44 45
diff --git a/src/gamma-expat.c b/src/gamma-expat.c
index 2dcfbfa..b70fe32 100644
--- a/src/gamma-expat.c
+++ b/src/gamma-expat.c
@@ -110,16 +110,17 @@ make_user_data ()
110 110
111SCM_GLOBAL_SYMBOL(gamma_xml_error, "gamma-xml-error"); 111SCM_GLOBAL_SYMBOL(gamma_xml_error, "gamma-xml-error");
112 112
113SCM_DEFINE_PUBLIC(scm_xml_expat_version_string, "xml-expat-version-string", 0, 0, 0, 113SCM_DEFINE_PUBLIC(scm_xml_expat_version_string, "xml-expat-version-string",
114 (), 114 0, 0, 0,
115 "Return the version of the expat library as a string.") 115 (),
116 "Return the version of the expat library as a string.")
116{ 117{
117 return scm_from_locale_string(XML_ExpatVersion()); 118 return scm_from_locale_string(XML_ExpatVersion());
118} 119}
119 120
120SCM_DEFINE_PUBLIC(scm_xml_expat_version, "xml-expat-version", 0, 0, 0, 121SCM_DEFINE_PUBLIC(scm_xml_expat_version, "xml-expat-version", 0, 0, 0,
121 (), 122 (),
122 "Return expat library version information.") 123 "Return expat library version information.")
123{ 124{
124 XML_Expat_Version vinfo = XML_ExpatVersionInfo(); 125 XML_Expat_Version vinfo = XML_ExpatVersionInfo();
125 return scm_list_3(scm_from_int(vinfo.major), 126 return scm_list_3(scm_from_int(vinfo.major),
@@ -127,14 +128,15 @@ SCM_DEFINE_PUBLIC(scm_xml_expat_version, "xml-expat-version", 0, 0, 0,
127 scm_from_int(vinfo.micro)); 128 scm_from_int(vinfo.micro));
128} 129}
129 130
130SCM_DEFINE_PUBLIC(scm_xml_primitive_make_parser, "xml-primitive-make-parser", 0, 2, 0, 131SCM_DEFINE_PUBLIC(scm_xml_primitive_make_parser, "xml-primitive-make-parser",
131 (SCM enc, SCM sep), 132 0, 2, 0,
132 "Return a new parser. If @var{enc} is given, it must be one of:" 133 (SCM enc, SCM sep),
133 " \"US-ASCII\", \"UTF-8\", \"UTF-16\", \"ISO-8859-1\". If @var{sep}" 134"Return a new parser. If @var{enc} is given, it must be one of: "
134 "is given, the returned parser has namespace processing in effect. " 135"@samp{US-ASCII}, @samp{UTF-8}, @samp{UTF-16}, @samp{ISO-8859-1}. If @var{sep} "
135 "In that case, @var{sep} is a character which is used as a " 136"is given, the returned parser has namespace processing in effect. "
136 "separator between the namespace @acronym{URI} and the local part " 137"In that case, @var{sep} is a character which is used as a "
137 "of the name in returned namespace element and attribute names.") 138"separator between the namespace @acronym{URI} and the local part "
139"of the name in returned namespace element and attribute names.")
138#define FUNC_NAME s_scm_xml_primitive_make_parser 140#define FUNC_NAME s_scm_xml_primitive_make_parser
139{ 141{
140 XML_Char *encoding = NULL; 142 XML_Char *encoding = NULL;
@@ -160,8 +162,8 @@ SCM_DEFINE_PUBLIC(scm_xml_primitive_make_parser, "xml-primitive-make-parser", 0,
160#undef FUNC_NAME 162#undef FUNC_NAME
161 163
162SCM_DEFINE_PUBLIC(scm_xml_set_encoding, "xml-set-encoding", 2, 0, 0, 164SCM_DEFINE_PUBLIC(scm_xml_set_encoding, "xml-set-encoding", 2, 0, 0,
163 (SCM parser, SCM enc), 165 (SCM parser, SCM enc),
164 "Set the encoding to be used by the @var{parser}.") 166 "Set the encoding to be used by the @var{parser}.")
165#define FUNC_NAME s_scm_xml_set_encoding 167#define FUNC_NAME s_scm_xml_set_encoding
166{ 168{
167 struct gamma_xml_parser *gp; 169 struct gamma_xml_parser *gp;
@@ -188,8 +190,8 @@ SCM_DEFINE_PUBLIC(scm_xml_set_encoding, "xml-set-encoding", 2, 0, 0,
188#undef FUNC_NAME 190#undef FUNC_NAME
189 191
190SCM_DEFINE_PUBLIC(scm_xml_primitive_parse, "xml-primitive-parse", 3, 0, 0, 192SCM_DEFINE_PUBLIC(scm_xml_primitive_parse, "xml-primitive-parse", 3, 0, 0,
191 (SCM parser, SCM input, SCM isfinal), 193 (SCM parser, SCM input, SCM isfinal),
192 "Parse next piece of input") 194 "Parse next piece of input")
193#define FUNC_NAME s_scm_xml_primitive_parse 195#define FUNC_NAME s_scm_xml_primitive_parse
194{ 196{
195 struct gamma_xml_parser *gp; 197 struct gamma_xml_parser *gp;
@@ -234,8 +236,8 @@ SCM_DEFINE_PUBLIC(scm_xml_primitive_parse, "xml-primitive-parse", 3, 0, 0,
234#undef FUNC_NAME 236#undef FUNC_NAME
235 237
236SCM_DEFINE_PUBLIC(scm_xml_default_current, "xml-default-current", 1, 0, 0, 238SCM_DEFINE_PUBLIC(scm_xml_default_current, "xml-default-current", 1, 0, 0,
237 (SCM parser), 239 (SCM parser),
238 "Pass current markup to the default handler.") 240"Pass current markup to the default handler.")
239#define FUNC_NAME s_scm_xml_default_current 241#define FUNC_NAME s_scm_xml_default_current
240{ 242{
241 struct gamma_xml_parser *gp; 243 struct gamma_xml_parser *gp;
@@ -249,8 +251,8 @@ SCM_DEFINE_PUBLIC(scm_xml_default_current, "xml-default-current", 1, 0, 0,
249#undef FUNC_NAME 251#undef FUNC_NAME
250 252
251SCM_DEFINE_PUBLIC(scm_xml_error_string, "xml-error-string", 1, 0, 0, 253SCM_DEFINE_PUBLIC(scm_xml_error_string, "xml-error-string", 1, 0, 0,
252 (SCM code), 254 (SCM code),
253 "Return a textual description corresponding to the error @code{code}.") 255"Return a textual description of the error @code{code}.")
254#define FUNC_NAME s_scm_xml_error_string 256#define FUNC_NAME s_scm_xml_error_string
255{ 257{
256 const char *p; 258 const char *p;
@@ -260,10 +262,11 @@ SCM_DEFINE_PUBLIC(scm_xml_error_string, "xml-error-string", 1, 0, 0,
260} 262}
261#undef FUNC_NAME 263#undef FUNC_NAME
262 264
263SCM_DEFINE_PUBLIC(scm_xml_current_line_number, "xml-current-line-number", 1, 0, 0, 265SCM_DEFINE_PUBLIC(scm_xml_current_line_number, "xml-current-line-number",
264 (SCM parser), 266 1, 0, 0,
265 "Return the current line number in the input stream. " 267 (SCM parser),
266 "The first line is reported as 1.") 268"Return current line number in the input stream. "
269"The first line is reported as 1.")
267#define FUNC_NAME s_scm_xml_current_line_number 270#define FUNC_NAME s_scm_xml_current_line_number
268{ 271{
269 struct gamma_xml_parser *gp; 272 struct gamma_xml_parser *gp;
@@ -275,10 +278,11 @@ SCM_DEFINE_PUBLIC(scm_xml_current_line_number, "xml-current-line-number", 1, 0,
275} 278}
276#undef FUNC_NAME 279#undef FUNC_NAME
277 280
278SCM_DEFINE_PUBLIC(scm_xml_current_column_number, "xml-current-column-number", 1, 0, 0, 281SCM_DEFINE_PUBLIC(scm_xml_current_column_number, "xml-current-column-number",
279 (SCM parser), 282 1, 0, 0,
280 "Return the current column number in the input stream. " 283 (SCM parser),
281 "The first column is reported as 0.") 284"Return current column number in the input stream. "
285"The first column is reported as 0.")
282#define FUNC_NAME s_scm_xml_current_column_number 286#define FUNC_NAME s_scm_xml_current_column_number
283{ 287{
284 struct gamma_xml_parser *gp; 288 struct gamma_xml_parser *gp;
@@ -290,13 +294,14 @@ SCM_DEFINE_PUBLIC(scm_xml_current_column_number, "xml-current-column-number", 1,
290} 294}
291#undef FUNC_NAME 295#undef FUNC_NAME
292 296
293SCM_DEFINE_PUBLIC(scm_xml_current_byte_count, "xml-current-byte-count", 1, 0, 0, 297SCM_DEFINE_PUBLIC(scm_xml_current_byte_count, "xml-current-byte-count",
294 (SCM parser), 298 1, 0, 0,
295 "Return the number of bytes in the current event. " 299 (SCM parser),
296 "Returns 0 if the event is inside a reference to an internal " 300"Return the number of bytes in the current event. "
297 "entity and for the end-tag event for empty element tags " 301"Returns 0 if the event is inside a reference to an internal "
298 "(the later can be used to distinguish empty-element tags " 302"entity and for the end-tag event for empty element tags "
299 "from empty elements using separate start and end tags).") 303"(the later can be used to distinguish empty-element tags "
304"from empty elements using separate start and end tags).")
300#define FUNC_NAME s_scm_xml_current_byte_count 305#define FUNC_NAME s_scm_xml_current_byte_count
301{ 306{
302 struct gamma_xml_parser *gp; 307 struct gamma_xml_parser *gp;
@@ -884,9 +889,11 @@ find_generic_handler_setter(SCM key)
884 return -1; 889 return -1;
885} 890}
886 891
887SCM_DEFINE_PUBLIC(scm_xml_primitive_set_handler, "xml-primitive-set-handler", 3, 0, 0, 892SCM_DEFINE_PUBLIC(scm_xml_primitive_set_handler, "xml-primitive-set-handler",
888 (SCM parser, SCM key, SCM handler), 893 3, 0, 0,
889 "Set XML handler for event @code{key}.") 894 (SCM parser, SCM key, SCM handler),
895"Set XML callback handler for event @code{key} in parser @var{parser} "
896"to @var{handler}.")
890#define FUNC_NAME s_scm_xml_primitive_set_handler 897#define FUNC_NAME s_scm_xml_primitive_set_handler
891{ 898{
892 struct gamma_xml_parser *gp; 899 struct gamma_xml_parser *gp;
diff --git a/src/gsql_conn.c b/src/gsql_conn.c
index 86bf926..4d53a03 100644
--- a/src/gsql_conn.c
+++ b/src/gsql_conn.c
@@ -135,8 +135,35 @@ gamma_cvt_iface(SCM inval, void *outval, const char *func_name)
135 135
136 136
137SCM_DEFINE_PUBLIC (sql_open_connection, "sql-open-connection", 1, 0, 0, 137SCM_DEFINE_PUBLIC (sql_open_connection, "sql-open-connection", 1, 0, 0,
138 (SCM PARAM), 138 (SCM param),
139 "Connect to a database.") 139"Connect to a database. Take connection parameters from @var{param}, "
140"which must be a list of conses. In each cons, the @samp{car} contains "
141"a @dfn{key} identifying the parameter, and the @samp{cdr} supplies the "
142"value for that parameter.\n"
143"\n"
144"Valid keys are:\n"
145"@table @asis\n"
146"@item #:iface\n"
147"Defines the type of the @acronym{SQL} interface (either @samp{mysql} or "
148"@samp{postgres}.\n"
149"@item #:host\n"
150"Server host name.\n"
151"@item #:port\n"
152"Port number on @samp{#:host}.\n"
153"@item #:socket\n"
154"Socket path, if the server is listening on a UNIX socket. Either\n"
155"@samp{#:port} or @samp{#:socket} may be given, but not both.\n"
156"@item #:user\n"
157"Sets the @acronym{SQL} user name.\n"
158"@item #:pass\n"
159"Sets the password for @samp{#:user}\n"
160"@item #:ssl-cert\n"
161"Full pathname of the @acronym{SSL} certificate to use (MySQL only).\n"
162"@item #:config-file\n"
163"Read missing parameters from the specified file (MySQL only).\n"
164"@item #:config-group\n"
165"Read the specified group in the config file (MySQL only).\n"
166"@end table\n")
140#define FUNC_NAME s_sql_open_connection 167#define FUNC_NAME s_sql_open_connection
141{ 168{
142 int iface; 169 int iface;
@@ -148,44 +175,51 @@ SCM_DEFINE_PUBLIC (sql_open_connection, "sql-open-connection", 1, 0, 0,
148 175
149 SCM smob; 176 SCM smob;
150 177
151 SCM_ASSERT(scm_is_pair(PARAM), PARAM, SCM_ARG1, FUNC_NAME); 178 SCM_ASSERT(scm_is_pair(param), param, SCM_ARG1, FUNC_NAME);
152 gamma_parmlist_parse (PARAM, dcltab, 179 gamma_parmlist_parse (param, dcltab,
153 GAMMA_PARMLIST_IGNORE_UNKNOWN, FUNC_NAME); 180 GAMMA_PARMLIST_IGNORE_UNKNOWN, FUNC_NAME);
154 181
155 smob = sql_iftab[iface].connect(PARAM, FUNC_NAME); 182 smob = sql_iftab[iface].connect(param, FUNC_NAME);
156 183
157 return smob; 184 return smob;
158} 185}
159#undef FUNC_NAME 186#undef FUNC_NAME
160 187
161SCM_DEFINE_PUBLIC (sql_close_connection, "sql-close-connection", 1, 0, 0, 188SCM_DEFINE_PUBLIC (sql_close_connection, "sql-close-connection", 1, 0, 0,
162 (SCM CONN), 189 (SCM conn),
163 "Close connection to a database.") 190 "Close connection to a database.")
164#define FUNC_NAME s_sql_close_connection 191#define FUNC_NAME s_sql_close_connection
165{ 192{
166 struct sql_connect *conn; 193 struct sql_connect *cp;
167 SCM_ASSERT(scm_is_sql_connect(CONN), CONN, SCM_ARG1, FUNC_NAME); 194 SCM_ASSERT(scm_is_sql_connect(conn), conn, SCM_ARG1, FUNC_NAME);
168 conn = (struct sql_connect *)SCM_CDR(CONN); 195 cp = (struct sql_connect *)SCM_CDR(conn);
169 sql_iftab[conn->iface].close(conn); 196 sql_iftab[cp->iface].close(cp);
170 return SCM_UNSPECIFIED; 197 return SCM_UNSPECIFIED;
171} 198}
172#undef FUNC_NAME 199#undef FUNC_NAME
173 200
174SCM_DEFINE_PUBLIC (sql_query, "sql-query", 2, 0, 0, 201SCM_DEFINE_PUBLIC (sql_query, "sql-query", 2, 0, 0,
175 (SCM CONN, SCM QUERY), 202 (SCM conn, SCM query),
176 "Run an SQL query") 203"Send the SQL query @var{query} to the server using connection @var{conn} \
204and return the result.\n\
205If @var{query} is a @samp{SELECT}, or similar query, returning tuples, the \
206return value is a list of rows. Each row is a list of values, one for each \
207column. All values are returned as strings. NULL values are returned as \
208@samp{#f}.\n\n\
209If @var{query} is an @samp{UPDATE} (or a similar query), @code{sql-query} \
210returns number of rows affected by the query.\n")
177#define FUNC_NAME s_sql_query 211#define FUNC_NAME s_sql_query
178{ 212{
179 struct sql_connect *conn; 213 struct sql_connect *conn_ptr;
180 char *query; 214 char *query_ptr;
181 SCM ret; 215 SCM ret;
182 216
183 SCM_ASSERT(scm_is_sql_connect(CONN), CONN, SCM_ARG1, FUNC_NAME); 217 SCM_ASSERT(scm_is_sql_connect(conn), conn, SCM_ARG1, FUNC_NAME);
184 SCM_ASSERT(scm_is_string(QUERY), QUERY, SCM_ARG2, FUNC_NAME); 218 SCM_ASSERT(scm_is_string(query), query, SCM_ARG2, FUNC_NAME);
185 conn = (struct sql_connect *)SCM_CDR(CONN); 219 conn_ptr = (struct sql_connect *)SCM_CDR(conn);
186 query = scm_to_locale_string(QUERY); 220 query_ptr = scm_to_locale_string(query);
187 ret = sql_iftab[conn->iface].query(conn, query); 221 ret = sql_iftab[conn_ptr->iface].query(conn_ptr, query_ptr);
188 free(query); 222 free(query_ptr);
189 return ret; 223 return ret;
190} 224}
191#undef FUNC_NAME 225#undef FUNC_NAME
diff --git a/src/syslog-port.c b/src/syslog-port.c
index 3088f48..4b27ef9 100644
--- a/src/syslog-port.c
+++ b/src/syslog-port.c
@@ -167,9 +167,9 @@ _syslog_port_print(SCM exp, SCM port, scm_print_state *pstate)
167} 167}
168 168
169SCM_DEFINE_PUBLIC(scm_open_syslog_port, "open-syslog-port", 1, 0, 0, 169SCM_DEFINE_PUBLIC(scm_open_syslog_port, "open-syslog-port", 1, 0, 0,
170 (SCM prio), 170 (SCM prio),
171 "Create and open an output port connected to syslog priority " 171"Create and open an output port connected to syslog priority "
172 "@code{prio}.") 172"@code{prio}.")
173#define FUNC_NAME s_scm_open_syslog_port 173#define FUNC_NAME s_scm_open_syslog_port
174{ 174{
175 SCM_ASSERT(scm_is_integer(prio), prio, SCM_ARG1, FUNC_NAME); 175 SCM_ASSERT(scm_is_integer(prio), prio, SCM_ARG1, FUNC_NAME);
diff --git a/src/syslog.c b/src/syslog.c
index 088b7b2..82bc688 100644
--- a/src/syslog.c
+++ b/src/syslog.c
@@ -24,25 +24,26 @@
24static char *log_tag; 24static char *log_tag;
25 25
26SCM_DEFINE_PUBLIC(scm_openlog, "openlog", 3, 0, 0, 26SCM_DEFINE_PUBLIC(scm_openlog, "openlog", 3, 0, 0,
27 (SCM IDENT, SCM OPTION, SCM FACILITY), 27 (SCM ident, SCM option, SCM facility),
28"Opens a connection to the system logger for Guile program.\n" 28"Opens a connection to the system logger for Guile program.\n\
29"IDENT, OPTION and FACILITY have the same meaning as in openlog(3)") 29The arguments @var{ident}, @var{option} and @var{facility} have the same \
30meaning as in openlog(3)\n")
30#define FUNC_NAME s_scm_openlog 31#define FUNC_NAME s_scm_openlog
31{ 32{
32 SCM_ASSERT(scm_is_string(IDENT), IDENT, SCM_ARG1, FUNC_NAME); 33 SCM_ASSERT(scm_is_string(ident), ident, SCM_ARG1, FUNC_NAME);
33 if (log_tag) 34 if (log_tag)
34 free(log_tag); 35 free(log_tag);
35 log_tag = scm_to_locale_string(IDENT); 36 log_tag = scm_to_locale_string(ident);
36 SCM_ASSERT(scm_is_integer(OPTION), OPTION, SCM_ARG2, FUNC_NAME); 37 SCM_ASSERT(scm_is_integer(option), option, SCM_ARG2, FUNC_NAME);
37 SCM_ASSERT(scm_is_integer(FACILITY), FACILITY, SCM_ARG3, FUNC_NAME); 38 SCM_ASSERT(scm_is_integer(facility), facility, SCM_ARG3, FUNC_NAME);
38 openlog(log_tag, scm_to_int(OPTION), scm_to_int(FACILITY)); 39 openlog(log_tag, scm_to_int(option), scm_to_int(facility));
39 return SCM_UNSPECIFIED; 40 return SCM_UNSPECIFIED;
40} 41}
41#undef FUNC_NAME 42#undef FUNC_NAME
42 43
43SCM_DEFINE_PUBLIC(scm_openlog_p, "openlog?", 0, 0, 0, 44SCM_DEFINE_PUBLIC(scm_openlog_p, "openlog?", 0, 0, 0,
44 (), 45 (),
45 "Returns #t if @code{openlog} was called.") 46"Returns @samp{#t} if @code{openlog} has already been called.\n")
46#define FUNC_NAME s_scm_openlog_p 47#define FUNC_NAME s_scm_openlog_p
47{ 48{
48 return log_tag ? SCM_BOOL_T : SCM_BOOL_F; 49 return log_tag ? SCM_BOOL_T : SCM_BOOL_F;
@@ -50,8 +51,8 @@ SCM_DEFINE_PUBLIC(scm_openlog_p, "openlog?", 0, 0, 0,
50#undef FUNC_NAME 51#undef FUNC_NAME
51 52
52SCM_DEFINE_PUBLIC(scm_syslog_tag, "syslog-tag", 0, 0, 0, 53SCM_DEFINE_PUBLIC(scm_syslog_tag, "syslog-tag", 0, 0, 0,
53 (), 54 (),
54 "Returns the tag given to the recent @code{openlog}.") 55"Returns the tag given to the recent @code{openlog} invocation.\n")
55#define FUNC_NAME s_scm_syslog_tag 56#define FUNC_NAME s_scm_syslog_tag
56{ 57{
57 if (!log_tag) 58 if (!log_tag)
@@ -63,27 +64,27 @@ SCM_DEFINE_PUBLIC(scm_syslog_tag, "syslog-tag", 0, 0, 0,
63#undef FUNC_NAME 64#undef FUNC_NAME
64 65
65SCM_DEFINE_PUBLIC(scm_syslog, "syslog", 2, 0, 0, 66SCM_DEFINE_PUBLIC(scm_syslog, "syslog", 2, 0, 0,
66 (SCM PRIO, SCM TEXT), 67 (SCM prio, SCM text),
67 "Distributes TEXT via syslogd priority PRIO.") 68"Distributes @var{text} via syslogd priority @var{prio}.\n")
68#define FUNC_NAME s_scm_syslog 69#define FUNC_NAME s_scm_syslog
69{ 70{
70 int prio; 71 int nprio;
71 char *str; 72 char *str;
72 73
73 SCM_ASSERT(scm_is_integer(PRIO), PRIO, SCM_ARG1, FUNC_NAME); 74 SCM_ASSERT(scm_is_integer(prio), prio, SCM_ARG1, FUNC_NAME);
74 prio = scm_to_int(PRIO); 75 nprio = scm_to_int(prio);
75 76
76 SCM_ASSERT(scm_is_string(TEXT), TEXT, SCM_ARG2, FUNC_NAME); 77 SCM_ASSERT(scm_is_string(text), text, SCM_ARG2, FUNC_NAME);
77 str = scm_to_locale_string(TEXT); 78 str = scm_to_locale_string(text);
78 syslog(prio, "%s", str); 79 syslog(nprio, "%s", str);
79 free(str); 80 free(str);
80 return SCM_UNSPECIFIED; 81 return SCM_UNSPECIFIED;
81} 82}
82#undef FUNC_NAME 83#undef FUNC_NAME
83 84
84SCM_DEFINE_PUBLIC(scm_closelog, "closelog", 0, 0, 0, 85SCM_DEFINE_PUBLIC(scm_closelog, "closelog", 0, 0, 0,
85 (), 86 (),
86 "Closes the channel to the system logger opened by @code{openlog}.") 87"Closes the channel to the system logger opened by @code{openlog}.\n")
87#define FUNC_NAME s_scm_closelog 88#define FUNC_NAME s_scm_closelog
88{ 89{
89 closelog(); 90 closelog();

Return to:

Send suggestions and report system problems to the System administrator.