>From f4230386e5b00559f3de2301ce40d4c76de07d9b Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Wed, 29 Sep 2010 03:31:41 +0200
Subject: [PATCH] Remove #ifdef OLD_CODE

Signed-off-by: Tamas TEVESZ <[email protected]>
---
 WINGs/wmisc.c |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/WINGs/wmisc.c b/WINGs/wmisc.c
index ec0c6c0..2e2acaf 100644
--- a/WINGs/wmisc.c
+++ b/WINGs/wmisc.c
@@ -140,43 +140,6 @@ static int fitText(char *text, WMFont * font, int width, 
int wrap)
        return i;
 }
 
-#ifdef OLD_CODE
-static int fitText(char *text, WMFont * font, int width, int wrap)
-{
-       int i, j;
-       int w;
-
-       if (text[0] == 0)
-               return 0;
-
-       i = 0;
-       if (wrap) {
-               if (text[0] == '\n')
-                       return 0;
-
-               do {
-                       i++;
-                       w = WMWidthOfString(font, text, i);
-               } while (w < width && text[i] != '\n' && text[i] != 0);
-
-               if (text[i] == '\n')
-                       return i;
-
-               /* keep words complete */
-               if (!isspace(text[i])) {
-                       j = i;
-                       while (j > 1 && !isspace(text[j]) && text[j] != 0)
-                               j--;
-                       if (j > 1)
-                               i = j;
-               }
-       } else {
-               i = strcspn(text, "\n");
-       }
-       return i;
-}
-#endif
-
 int W_GetTextHeight(WMFont * font, char *text, int width, int wrap)
 {
        char *ptr = text;
-- 
1.7.0.4


-- 
[-]

mkdir /nonexistent
From f4230386e5b00559f3de2301ce40d4c76de07d9b Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Wed, 29 Sep 2010 03:31:41 +0200
Subject: [PATCH] Remove #ifdef OLD_CODE

Signed-off-by: Tamas TEVESZ <[email protected]>
---
 WINGs/wmisc.c |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/WINGs/wmisc.c b/WINGs/wmisc.c
index ec0c6c0..2e2acaf 100644
--- a/WINGs/wmisc.c
+++ b/WINGs/wmisc.c
@@ -140,43 +140,6 @@ static int fitText(char *text, WMFont * font, int width, int wrap)
 	return i;
 }
 
-#ifdef OLD_CODE
-static int fitText(char *text, WMFont * font, int width, int wrap)
-{
-	int i, j;
-	int w;
-
-	if (text[0] == 0)
-		return 0;
-
-	i = 0;
-	if (wrap) {
-		if (text[0] == '\n')
-			return 0;
-
-		do {
-			i++;
-			w = WMWidthOfString(font, text, i);
-		} while (w < width && text[i] != '\n' && text[i] != 0);
-
-		if (text[i] == '\n')
-			return i;
-
-		/* keep words complete */
-		if (!isspace(text[i])) {
-			j = i;
-			while (j > 1 && !isspace(text[j]) && text[j] != 0)
-				j--;
-			if (j > 1)
-				i = j;
-		}
-	} else {
-		i = strcspn(text, "\n");
-	}
-	return i;
-}
-#endif
-
 int W_GetTextHeight(WMFont * font, char *text, int width, int wrap)
 {
 	char *ptr = text;
-- 
1.7.0.4

Reply via email to