From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bake Timmons Newsgroups: gmane.lisp.guile.bugs Subject: bug#10521: Patch: Improve consistency of definitions of C functions in manual. Date: Sun, 15 Jan 2012 22:54:33 -0500 Message-ID: <87pqekgv46.fsf@goof.localdomain> Reply-To: b3timmons@speedymail.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1326686121 20176 80.91.229.12 (16 Jan 2012 03:55:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2012 03:55:21 +0000 (UTC) To: 10521@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jan 16 04:55:17 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RmdfA-0003Qa-95 for guile-bugs@m.gmane.org; Mon, 16 Jan 2012 04:55:16 +0100 Original-Received: from localhost ([::1]:43124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmdf9-0001ZC-TH for guile-bugs@m.gmane.org; Sun, 15 Jan 2012 22:55:15 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmdf6-0001Z3-Op for bug-guile@gnu.org; Sun, 15 Jan 2012 22:55:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rmdf4-0007iS-RD for bug-guile@gnu.org; Sun, 15 Jan 2012 22:55:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmdf4-0007iO-PN for bug-guile@gnu.org; Sun, 15 Jan 2012 22:55:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rmdfu-0001Bd-ED for bug-guile@gnu.org; Sun, 15 Jan 2012 22:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bake Timmons Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 16 Jan 2012 03:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10521 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13266861594550 (code B ref -1); Mon, 16 Jan 2012 03:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jan 2012 03:55:59 +0000 Original-Received: from localhost ([127.0.0.1]:59070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rmdfp-0001BJ-UR for submit@debbugs.gnu.org; Sun, 15 Jan 2012 22:55:59 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:47353) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <42toes@gmail.com>) id 1Rmdfm-0001BC-QM for submit@debbugs.gnu.org; Sun, 15 Jan 2012 22:55:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <42toes@gmail.com>) id 1Rmdeu-0007d0-Sp for submit@debbugs.gnu.org; Sun, 15 Jan 2012 22:55:02 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:42981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <42toes@gmail.com>) id 1Rmdeu-0007cu-PZ for submit@debbugs.gnu.org; Sun, 15 Jan 2012 22:55:00 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <42toes@gmail.com>) id 1Rmdes-0001Qs-Vq for bug-guile@gnu.org; Sun, 15 Jan 2012 22:55:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <42toes@gmail.com>) id 1Rmdeq-0007cb-Ok for bug-guile@gnu.org; Sun, 15 Jan 2012 22:54:58 -0500 Original-Received: from mail-qw0-f48.google.com ([209.85.216.48]:59950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <42toes@gmail.com>) id 1Rmdeq-0007cW-H0 for bug-guile@gnu.org; Sun, 15 Jan 2012 22:54:56 -0500 Original-Received: by qadz30 with SMTP id z30so2214989qad.0 for ; Sun, 15 Jan 2012 19:54:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:reply-to:date:message-id:user-agent :mime-version:content-type; bh=KT1kXSCHiR6EWcbyGKYDBP3r+oqsOonb2IzzVH71+TI=; b=xUfkAVWgSlkMla6dQXI9IX5V/R0Iul+FSDuVf9xDe8ULhfN430+hkDcb+5OOAx5Icn 9qFxKyv2inpS3aUK6AGcTEh/fZz1AHQoJjd+7WgMVEG1/lMgNt7gAPluYWS7aSnAEI79 8F9fkmIiNioRq2kLGVtTnbz48WptNY6i27oSM= Original-Received: by 10.224.116.211 with SMTP id n19mr11998156qaq.67.1326686095749; Sun, 15 Jan 2012 19:54:55 -0800 (PST) Original-Received: from goof.localdomain (dialup-4.248.60.192.Dial1.Washington2.Level3.net. [4.248.60.192]) by mx.google.com with ESMTPS id q14sm34422950qap.4.2012.01.15.19.54.45 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 Jan 2012 19:54:55 -0800 (PST) Original-Received: by goof.localdomain (Postfix, from userid 1000) id EADB981073; Sun, 15 Jan 2012 22:54:33 -0500 (EST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6044 Archived-At: --=-=-= Content-Type: text/plain Attached is a patch to improve the consistency of definitions of C functions in the manual. It adds missing parentheses and commas and fixes a untyped definition that should be a typed one. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Improve-consistency-of-definitions-of-C-functions-in.patch Content-Description: Improve consistency of definitions of C functions in manual. >From 0c3ee0770bb50d464661d25b5ca6d40f920c7cb8 Mon Sep 17 00:00:00 2001 From: Bake Timmons Date: Sun, 15 Jan 2012 22:18:08 -0500 Subject: [PATCH] Improve consistency of definitions of C functions in manual. * doc/ref/api-compound.texi * doc/ref/api-evaluation.texi * doc/ref/api-foreign.texi * doc/ref/api-io.texi * doc/ref/posix.texi * doc/ref/srfi-modules.texi: Add missing parentheses and commas to definitions of C functions. * doc/ref/api-data.texi: Change from @deffn to @deftypefn for C function with arguments not of SCM type. --- doc/ref/api-compound.texi | 6 ++-- doc/ref/api-data.texi | 12 +++--- doc/ref/api-evaluation.texi | 2 +- doc/ref/api-foreign.texi | 12 +++--- doc/ref/api-io.texi | 2 +- doc/ref/posix.texi | 4 +- doc/ref/srfi-modules.texi | 76 +++++++++++++++++++++--------------------- 7 files changed, 57 insertions(+), 57 deletions(-) diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi index bc997a3..6fc5b2e 100644 --- a/doc/ref/api-compound.texi +++ b/doc/ref/api-compound.texi @@ -777,7 +777,7 @@ in the vector. @rnindex vector-length @deffn {Scheme Procedure} vector-length vector -@deffnx {C Function} scm_vector_length vector +@deffnx {C Function} scm_vector_length (vector) Return the number of elements in @var{vector} as an exact integer. @end deffn @@ -787,7 +787,7 @@ Return the number of elements in @var{vec} as a @code{size_t}. @rnindex vector-ref @deffn {Scheme Procedure} vector-ref vec k -@deffnx {C Function} scm_vector_ref vec k +@deffnx {C Function} scm_vector_ref (vec, k) Return the contents of position @var{k} of @var{vec}. @var{k} must be a valid index of @var{vec}. @lisp @@ -816,7 +816,7 @@ error. @rnindex vector-set! @deffn {Scheme Procedure} vector-set! vec k obj -@deffnx {C Function} scm_vector_set_x vec k obj +@deffnx {C Function} scm_vector_set_x (vec, k, obj) Store @var{obj} in position @var{k} of @var{vec}. @var{k} must be a valid index of @var{vec}. The value returned by @samp{vector-set!} is unspecified. diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi index 4fc582e..9891d85 100644 --- a/doc/ref/api-data.texi +++ b/doc/ref/api-data.texi @@ -5266,15 +5266,15 @@ When you want to do more from C, you should convert between symbols and strings using @code{scm_symbol_to_string} and @code{scm_string_to_symbol} and work with the strings. -@deffn {C Function} scm_from_latin1_symbol (const char *name) -@deffnx {C Function} scm_from_utf8_symbol (const char *name) +@deftypefn {C Function} scm_from_latin1_symbol (const char *name) +@deftypefnx {C Function} scm_from_utf8_symbol (const char *name) Construct and return a Scheme symbol whose name is specified by the null-terminated C string @var{name}. These are appropriate when the C string is hard-coded in the source code. -@end deffn +@end deftypefn -@deffn {C Function} scm_from_locale_symbol (const char *name) -@deffnx {C Function} scm_from_locale_symboln (const char *name, size_t len) +@deftypefn {C Function} scm_from_locale_symbol (const char *name) +@deftypefnx {C Function} scm_from_locale_symboln (const char *name, size_t len) Construct and return a Scheme symbol whose name is specified by @var{name}. For @code{scm_from_locale_symbol}, @var{name} must be null terminated; for @code{scm_from_locale_symboln} the length of @var{name} is @@ -5284,7 +5284,7 @@ Note that these functions should @emph{not} be used when @var{name} is a C string constant, because there is no guarantee that the current locale will match that of the source code. In such cases, use @code{scm_from_latin1_symbol} or @code{scm_from_utf8_symbol}. -@end deffn +@end deftypefn @deftypefn {C Function} SCM scm_take_locale_symbol (char *str) @deftypefnx {C Function} SCM scm_take_locale_symboln (char *str, size_t len) diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi index 2f59de8..9fffb87 100644 --- a/doc/ref/api-evaluation.texi +++ b/doc/ref/api-evaluation.texi @@ -904,7 +904,7 @@ by @code{file-encoding}, if any, again by using @code{set-port-encoding!}. Then the code can be read as normal. @deffn {Scheme Procedure} file-encoding port -@deffnx {C Function} scm_file_encoding port +@deffnx {C Function} scm_file_encoding (port) Scan the port for an Emacs-like character coding declaration near the top of the contents of a port with random-accessible contents (@pxref{Recognize Coding, how Emacs recognizes file encoding,, emacs, diff --git a/doc/ref/api-foreign.texi b/doc/ref/api-foreign.texi index 82925e6..da926f4 100644 --- a/doc/ref/api-foreign.texi +++ b/doc/ref/api-foreign.texi @@ -540,7 +540,7 @@ A value returned by @code{dynamic-pointer} is a Scheme wrapper for a C pointer. @deffn {Scheme Procedure} pointer-address pointer -@deffnx {C Function} scm_pointer_address pointer +@deffnx {C Function} scm_pointer_address (pointer) Return the numerical value of @var{pointer}. @example @@ -594,7 +594,7 @@ module contains procedures that can be used to convert byte sequences to Scheme objects such as strings, floating point numbers, or integers. @deffn {Scheme Procedure} pointer->bytevector pointer len [offset [uvec_type]] -@deffnx {C Function} scm_foreign_to_bytevector pointer len offset uvec_type +@deffnx {C Function} scm_foreign_to_bytevector (pointer, len, offset, uvec_type) Return a bytevector aliasing the @var{len} bytes pointed to by @var{pointer}. @@ -614,7 +614,7 @@ Mutating the returned bytevector mutates the memory pointed to by @end deffn @deffn {Scheme Procedure} bytevector->pointer bv [offset] -@deffnx {C Function} scm_bytevector_to_pointer bv offset +@deffnx {C Function} scm_bytevector_to_pointer (bv, offset) Return a pointer pointer aliasing the memory pointed to by @var{bv} or @var{offset} bytes after @var{bv} when @var{offset} is passed. @end deffn @@ -740,7 +740,7 @@ its type, offset, and alignment. Guile has some primitives to support this. @deffn {Scheme Procedure} sizeof type -@deffnx {C Function} scm_sizeof type +@deffnx {C Function} scm_sizeof (type) Return the size of @var{type}, in bytes. @var{type} should be a valid C type, like @code{int}. @@ -751,7 +751,7 @@ also be a list of types, in which case the size of a @end deffn @deffn {Scheme Procedure} alignof type -@deffnx {C Function} scm_alignof type +@deffnx {C Function} scm_alignof (type) Return the alignment of @var{type}, in bytes. @var{type} should be a valid C type, like @code{int}. @@ -801,7 +801,7 @@ Of course, the land of C is not all nouns and no verbs: there are functions too, and Guile allows you to call them. @deffn {Scheme Procedure} pointer->procedure return_type func_ptr arg_types -@deffnx {C Procedure} scm_pointer_to_procedure return_type func_ptr arg_types +@deffnx {C Procedure} scm_pointer_to_procedure (return_type, func_ptr, arg_types) Make a foreign function. Given the foreign void pointer @var{func_ptr}, its argument and diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index 9b52766..24c2706 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -129,7 +129,7 @@ this fluid otherwise. @end defvr @deffn {Scheme Procedure} port-encoding port -@deffnx {C Function} scm_port_encoding +@deffnx {C Function} scm_port_encoding (port) Returns, as a string, the character encoding that @var{port} uses to interpret its input and output. The value @code{#f} is equivalent to @code{"ISO-8859-1"}. @end deffn diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi index d8e8bb6..2e8da4b 100644 --- a/doc/ref/posix.texi +++ b/doc/ref/posix.texi @@ -953,7 +953,7 @@ which is usual for ordinary file creation, @end deffn @deffn {Scheme Procedure} tmpfile -@deffnx {C Function} scm_tmpfile +@deffnx {C Function} scm_tmpfile () Return an input/output port to a unique temporary file named using the path prefix @code{P_tmpdir} defined in @file{stdio.h}. @@ -2841,7 +2841,7 @@ created with, @deffn {Scheme Procedure} make-socket-address AF_INET ipv4addr port @deffnx {Scheme Procedure} make-socket-address AF_INET6 ipv6addr port [flowinfo [scopeid]] @deffnx {Scheme Procedure} make-socket-address AF_UNIX path -@deffnx {C Function} scm_make_socket_address family address arglist +@deffnx {C Function} scm_make_socket_address (family, address, arglist) Return a new socket address object. The first argument is the address family, one of the @code{AF} constants, then the arguments vary according to the family. diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index 02681de..d00fbc4 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -1463,18 +1463,18 @@ indicated type. @deffnx {Scheme Procedure} make-f64vector n [value] @deffnx {Scheme Procedure} make-c32vector n [value] @deffnx {Scheme Procedure} make-c64vector n [value] -@deffnx {C Function} scm_make_u8vector n [value] -@deffnx {C Function} scm_make_s8vector n [value] -@deffnx {C Function} scm_make_u16vector n [value] -@deffnx {C Function} scm_make_s16vector n [value] -@deffnx {C Function} scm_make_u32vector n [value] -@deffnx {C Function} scm_make_s32vector n [value] -@deffnx {C Function} scm_make_u64vector n [value] -@deffnx {C Function} scm_make_s64vector n [value] -@deffnx {C Function} scm_make_f32vector n [value] -@deffnx {C Function} scm_make_f64vector n [value] -@deffnx {C Function} scm_make_c32vector n [value] -@deffnx {C Function} scm_make_c64vector n [value] +@deffnx {C Function} scm_make_u8vector (n, value) +@deffnx {C Function} scm_make_s8vector (n, value) +@deffnx {C Function} scm_make_u16vector (n, value) +@deffnx {C Function} scm_make_s16vector (n, value) +@deffnx {C Function} scm_make_u32vector (n, value) +@deffnx {C Function} scm_make_s32vector (n, value) +@deffnx {C Function} scm_make_u64vector (n, value) +@deffnx {C Function} scm_make_s64vector (n, value) +@deffnx {C Function} scm_make_f32vector (n, value) +@deffnx {C Function} scm_make_f64vector (n, value) +@deffnx {C Function} scm_make_c32vector (n, value) +@deffnx {C Function} scm_make_c64vector (n, value) Return a newly allocated homogeneous numeric vector holding @var{n} elements of the indicated type. If @var{value} is given, the vector is initialized with that value, otherwise the contents are @@ -1549,18 +1549,18 @@ Return the number of elements in @var{vec}. @deffnx {Scheme Procedure} f64vector-ref vec i @deffnx {Scheme Procedure} c32vector-ref vec i @deffnx {Scheme Procedure} c64vector-ref vec i -@deffnx {C Function} scm_u8vector_ref (vec i) -@deffnx {C Function} scm_s8vector_ref (vec i) -@deffnx {C Function} scm_u16vector_ref (vec i) -@deffnx {C Function} scm_s16vector_ref (vec i) -@deffnx {C Function} scm_u32vector_ref (vec i) -@deffnx {C Function} scm_s32vector_ref (vec i) -@deffnx {C Function} scm_u64vector_ref (vec i) -@deffnx {C Function} scm_s64vector_ref (vec i) -@deffnx {C Function} scm_f32vector_ref (vec i) -@deffnx {C Function} scm_f64vector_ref (vec i) -@deffnx {C Function} scm_c32vector_ref (vec i) -@deffnx {C Function} scm_c64vector_ref (vec i) +@deffnx {C Function} scm_u8vector_ref (vec, i) +@deffnx {C Function} scm_s8vector_ref (vec, i) +@deffnx {C Function} scm_u16vector_ref (vec, i) +@deffnx {C Function} scm_s16vector_ref (vec, i) +@deffnx {C Function} scm_u32vector_ref (vec, i) +@deffnx {C Function} scm_s32vector_ref (vec, i) +@deffnx {C Function} scm_u64vector_ref (vec, i) +@deffnx {C Function} scm_s64vector_ref (vec, i) +@deffnx {C Function} scm_f32vector_ref (vec, i) +@deffnx {C Function} scm_f64vector_ref (vec, i) +@deffnx {C Function} scm_c32vector_ref (vec, i) +@deffnx {C Function} scm_c64vector_ref (vec, i) Return the element at index @var{i} in @var{vec}. The first element in @var{vec} is index 0. @end deffn @@ -1577,18 +1577,18 @@ in @var{vec} is index 0. @deffnx {Scheme Procedure} f64vector-set! vec i value @deffnx {Scheme Procedure} c32vector-set! vec i value @deffnx {Scheme Procedure} c64vector-set! vec i value -@deffnx {C Function} scm_u8vector_set_x (vec i value) -@deffnx {C Function} scm_s8vector_set_x (vec i value) -@deffnx {C Function} scm_u16vector_set_x (vec i value) -@deffnx {C Function} scm_s16vector_set_x (vec i value) -@deffnx {C Function} scm_u32vector_set_x (vec i value) -@deffnx {C Function} scm_s32vector_set_x (vec i value) -@deffnx {C Function} scm_u64vector_set_x (vec i value) -@deffnx {C Function} scm_s64vector_set_x (vec i value) -@deffnx {C Function} scm_f32vector_set_x (vec i value) -@deffnx {C Function} scm_f64vector_set_x (vec i value) -@deffnx {C Function} scm_c32vector_set_x (vec i value) -@deffnx {C Function} scm_c64vector_set_x (vec i value) +@deffnx {C Function} scm_u8vector_set_x (vec, i, value) +@deffnx {C Function} scm_s8vector_set_x (vec, i, value) +@deffnx {C Function} scm_u16vector_set_x (vec, i, value) +@deffnx {C Function} scm_s16vector_set_x (vec, i, value) +@deffnx {C Function} scm_u32vector_set_x (vec, i, value) +@deffnx {C Function} scm_s32vector_set_x (vec, i, value) +@deffnx {C Function} scm_u64vector_set_x (vec, i, value) +@deffnx {C Function} scm_s64vector_set_x (vec, i, value) +@deffnx {C Function} scm_f32vector_set_x (vec, i, value) +@deffnx {C Function} scm_f64vector_set_x (vec, i, value) +@deffnx {C Function} scm_c32vector_set_x (vec, i, value) +@deffnx {C Function} scm_c64vector_set_x (vec, i, value) Set the element at index @var{i} in @var{vec} to @var{value}. The first element in @var{vec} is index 0. The return value is unspecified. @@ -1736,13 +1736,13 @@ Return the number of elements in @var{vec}. @end deffn @deffn {Scheme Procedure} uniform-vector-ref vec i -@deffnx {C Function} scm_uniform_vector_ref (vec i) +@deffnx {C Function} scm_uniform_vector_ref (vec, i) Return the element at index @var{i} in @var{vec}. The first element in @var{vec} is index 0. @end deffn @deffn {Scheme Procedure} uniform-vector-set! vec i value -@deffnx {C Function} scm_uniform_vector_set_x (vec i value) +@deffnx {C Function} scm_uniform_vector_set_x (vec, i, value) Set the element at index @var{i} in @var{vec} to @var{value}. The first element in @var{vec} is index 0. The return value is unspecified. -- 1.7.8.3 --=-=-=--