[Pkg-wmaker-commits] [wmbiff] 10/19: change signature of *Trim to reflect that they can't fail (void instead of int); the return values are ignored in wmbiff

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:02:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to tag wmbiff_0_4_11
in repository wmbiff.

commit 4c41b067673ccd4f648959b2411d8c08f179dde8
Author: bluehal <bluehal>
Date:   Sun Dec 29 02:31:26 2002 +0000

    change signature of *Trim to reflect that they can't fail (void instead of int); the return values are ignored in wmbiff
---
 wmbiff/charutil.c | 29 ++++++++++++++---------------
 wmbiff/charutil.h |  4 ++--
 2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/wmbiff/charutil.c b/wmbiff/charutil.c
index cdb22d4..27d4789 100644
--- a/wmbiff/charutil.c
+++ b/wmbiff/charutil.c
@@ -1,4 +1,4 @@
-/* $Id: charutil.c,v 1.13 2002/07/04 01:07:28 bluehal Exp $ */
+/* $Id: charutil.c,v 1.14 2002/12/29 02:31:26 bluehal Exp $ */
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -12,22 +12,18 @@
 #endif
 #include "charutil.h"
 
-static __inline__ int LeftTrim(char *psValue)
+static __inline__ void LeftTrim(char *psValue)
 {
-
 	char *psTmp = psValue;
 
 	while (*psTmp == ' ' || *psTmp == '\t')
 		psTmp++;
 
 	strcpy(psValue, psTmp);
-
-	return EXIT_SUCCESS;
 }
 
-static __inline__ int RightTrim(char *psValue)
+static __inline__ void RightTrim(char *psValue)
 {
-
 	long lLength = strlen(psValue) - 1;
 
 	while ((psValue[lLength] == ' ' || psValue[lLength] == '\t')
@@ -36,17 +32,12 @@ static __inline__ int RightTrim(char *psValue)
 	}
 
 	psValue[++lLength] = '\000';
-	return EXIT_SUCCESS;
 }
 
-int FullTrim(char *psValue)
+void FullTrim(char *psValue)
 {
-
-	if (LeftTrim(psValue) != 0)
-		return EXIT_FAILURE;
-	if (RightTrim(psValue) != 0)
-		return EXIT_FAILURE;
-	return EXIT_SUCCESS;
+  RightTrim(psValue);
+  LeftTrim(psValue);
 }
 
 void Bin2Hex(unsigned char *src, int length, char *dst)
@@ -242,3 +233,11 @@ char *strdup_ordie(const char *c)
 	}
 	return (ret);
 }
+/* vim:set ts=4: */
+/*
+ * Local Variables:
+ * tab-width: 4
+ * c-indent-level: 4
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/wmbiff/charutil.h b/wmbiff/charutil.h
index 25f3a38..a82d896 100644
--- a/wmbiff/charutil.h
+++ b/wmbiff/charutil.h
@@ -1,4 +1,4 @@
-/* $Id: charutil.h,v 1.8 2002/04/29 02:01:51 bluehal Exp $ */
+/* $Id: charutil.h,v 1.9 2002/12/29 02:31:26 bluehal Exp $ */
 /* Author: Mark Hurley  (debian4tux at telocity.com)
  *
  * Character / string manipulation utilities. 
@@ -20,7 +20,7 @@
 #endif
 #endif
 
-int FullTrim(char *psValue);
+void FullTrim(char *psValue);
 
 void Bin2Hex(unsigned char *src, int length, char *dst);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list