This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Whitespace cleanup in example code in docs.


The attached patch fixes a couple of whitespace issues in the
example code in libffi.texi (and one in the text).

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany
>From 3bf3fe488874b9693876f6d21a37f666098593d6 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <vogt@de.ibm.com>
Date: Fri, 14 Mar 2014 08:57:13 +0000
Subject: [PATCH 01/10] Fix whitespace issues in libffi.texi.

---
 doc/libffi.texi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/libffi.texi b/doc/libffi.texi
index 57dae0b..c1297aa 100644
--- a/doc/libffi.texi
+++ b/doc/libffi.texi
@@ -215,26 +215,26 @@ int main()
   void *values[1];
   char *s;
   ffi_arg rc;
-  
-  /* Initialize the argument info vectors */    
+
+  /* Initialize the argument info vectors */
   args[0] = &ffi_type_pointer;
   values[0] = &s;
-  
+
   /* Initialize the cif */
-  if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, 
-		       &ffi_type_sint, args) == FFI_OK)
+  if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
+                   &ffi_type_sint, args) == FFI_OK)
     @{
       s = "Hello World!";
       ffi_call(&cif, puts, &rc, values);
       /* rc now holds the result of the call to puts */
-      
-      /* values holds a pointer to the function's arg, so to 
-         call puts() again all we need to do is change the 
+
+      /* values holds a pointer to the function's arg, so to
+         call puts() again all we need to do is change the
          value of s */
       s = "This is cool!";
       ffi_call(&cif, puts, &rc, values);
     @}
-  
+
   return 0;
 @}
 @end example
@@ -416,7 +416,7 @@ Here is the corresponding code to describe this struct to
       tm_type.size = tm_type.alignment = 0;
       tm_type.type = FFI_TYPE_STRUCT;
       tm_type.elements = &tm_type_elements;
-    
+
       for (i = 0; i < 9; i++)
           tm_type_elements[i] = &ffi_type_sint;
 
@@ -425,7 +425,7 @@ Here is the corresponding code to describe this struct to
       tm_type_elements[11] = NULL;
 
       /* tm_type can now be used to represent tm argument types and
-	 return types for ffi_prep_cif() */
+      return types for ffi_prep_cif() */
     @}
 @end example
 
@@ -533,7 +533,7 @@ writable and executable addresses.
 @node Closure Example
 @section Closure Example
 
-A trivial example that creates a new @code{puts} by binding 
+A trivial example that creates a new @code{puts} by binding
 @code{fputs} with @code{stdin}.
 
 @example
-- 
1.8.4.2

>From 4888e280639af629f8e170564bef649bcc1a979f Mon Sep 17 00:00:00 2001
From: Dominik Vogt <vogt@de.ibm.com>
Date: Fri, 14 Mar 2014 09:07:00 +0000
Subject: [PATCH 02/10] ChangeLog

---
 ChangeLog | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f3121b0..ccd5f42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-14  Dominik Vogt  <vogt@linux.vnet.ibm.com>
+
+	* doc/libffi.texi: Fix whitespace problems in sample programs (and a
+	single other one).
+
 2014-03-03  Dominik Vogt  <vogt@linux.vnet.ibm.com>
 
 	* configure.ac (multi_os_directory): Use $CFLAGS to get correct dir
-- 
1.8.4.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]