bugGuile - Bugs: bug #31969, omission in docs of...

 
 

bug #31969: omission in docs of scm_misc_error()

Submitter:  None
Submitted:  Sat 25 Dec 2010 05:44:37 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 04 Jan 2011 05:31:58 PM UTC, comment #2: 

Thanks, applied with minor changes.

Ludovic Courtès <civodul>
Group administrator
Sat 25 Dec 2010 06:02:54 AM UTC, comment #1: 

The following patch is what I intended to attach to the initial
bug report:

diff --git a/guile.orig/doc/ref/api-control.texi b/guile/doc/ref/api-control.texi
index c8c93ba..08a8783 100644
--- a/guile.orig/doc/ref/api-control.texi
+++ b/guile/doc/ref/api-control.texi
@@ -1493,13 +1493,21 @@ and the call to these routines doesn't change @code{errno}.
 @deftypefnx {C Function} void scm_wrong_type_arg_msg (char @var{subr}, int @var{argnum}, SCM @var{bad_value}, const char @var{expected})
 @deftypefnx {C Function} void scm_memory_error (char *@var{subr})
 Throw an error with the various keys described above.
+@deftypefnx {C Function} void scm_misc_error (const char @var{subr}, const char @var{message}, SCM @var{args})
 
-For @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol
+In @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol
 which is the name of the procedure incorrectly invoked.  The other
 routines take the name of the invoked procedure as a C string.
 
 In @code{scm_wrong_type_arg_msg}, @var{expected} is a C string
 describing the type of argument that was expected.
+
+In @code{scm_misc_error}, @var{message} is the error message string,
+possibly containing @code{~S} and @code{~A} escapes.  When an error is
+reported, these are replaced by formatting the corresponding members of
+@var{args}: @code{~A} (was @code{%s} in older versions of Guile) formats
+using @code{display} and @code{~S} (was @code{%S}) formats using
+@code{write}.
 @end deftypefn
 

Bake Timmons <bt3>
Sat 25 Dec 2010 05:44:37 AM UTC, original submission:  

The docs fail to mention scm_misc_error().  A suggested patch is attached.
Thanks,
Bake Timmons
-email is unavailable-

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by civodul (Posted a comment)
  • -email is unavailable- added by bt3 (Posted a comment)
  • -email is unavailable- added by bt3
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-01-04 civodul StatusNone Fixed
        Open/ClosedOpen Closed
    2010-12-25 bt3 Carbon-Copy- Added bt3

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code