@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
-@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004
+@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2012, 2014
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
generate a file of calls to @code{scm_c_define_gsubr} which you can
@code{#include} into an initialization function.
-The snarfing mechanism works for many kind of initialiation actions,
+The snarfing mechanism works for many kind of initialization actions,
not just for collecting calls to @code{scm_c_define_gsubr}. For a
full list of what can be done, @xref{Snarfing Macros}.
#include <libguile.h>
SCM_DEFINE (clear_image, "clear-image", 1, 0, 0,
- (SCM image_smob),
+ (SCM image),
"Clear the image.")
@{
- /* C code to clear the image in @code{image_smob}... */
+ /* C code to clear the image in @code{image}... */
@}
void
The @code{SCM_DEFINE} declaration says that the C function
@code{clear_image} implements a Scheme function called
@code{clear-image}, which takes one required argument (of type
-@code{SCM} and named @code{image_smob}), no optional arguments, and no
-rest argument. The string @code{"Clear the image."} provides a short
-help text for the function, it is called a @dfn{docstring}.
-
-For historical reasons, the @code{SCM_DEFINE} macro also defines a
-static array of characters named @code{s_clear_image}, initialized to
-the string "clear-image". You shouldn't use this array, but you might
-need to be aware that it exists.
+@code{SCM} and named @code{image}), no optional arguments, and no rest
+argument. The string @code{"Clear the image."} provides a short help
+text for the function, it is called a @dfn{docstring}.
+
+@code{SCM_DEFINE} macro also defines a static array of characters
+initialized to the Scheme name of the function. In this case,
+@code{s_clear_image} is set to the C string, "clear-image". You might
+want to use this symbol when generating error messages.
Assuming the text above lives in a file named @file{image-type.c}, you
will need to execute the following command to prepare this file for