Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://joe-2.9.6-2.src.rpm:223169/joe-2.9.6-wwrap.patch  info  downloads

diff -ru joe-2.9.6/uformat.c joe-devel/uformat.c
--- joe-2.9.6/uformat.c	Tue Apr 10 12:02:34 2001
+++ joe-devel/uformat.c	Sun Apr 29 12:18:51 2001
@@ -296,12 +296,7 @@
  * after . ? or !
  */
 
-void
-wrapword (p, indent, french, indents)
-     P *p;
-     long indent;
-     char *indents;
-{
+void wrapword (P *p, long indent, int french, char *indents) {
 	P *q;
 	int rmf = 0;
 	int c;
@@ -333,43 +328,47 @@
 	while (!pisbol (p) && piscol (p) > indent && !isblank (prgetc (p)));
 
 	/* If we found the beginning of a word... */
-	if (!pisbol (p) && piscol (p) > indent)
-	  {
-		  /* Move q to two (or one if 'french' is set) spaces after end of previous
-		     word */
-		  q = pdup (p);
-		  while (!pisbol (q))
-			  if (!isblank (c = prgetc (q)))
-			    {
-				    pgetc (q);
-				    if ((c == '.' || c == '?' || c == '!')
-					&& q->byte != p->byte && !french)
-					    pgetc (q);
-				    break;
-			    }
-		  pgetc (p);
-
-		  /* Delete space between start of word and end of previous word */
-		  to -= p->byte - q->byte;
-		  bdel (q, p);
-		  prm (q);
-
-		  /* Move word to beginning of next line */
-		  binsc (p, '\n'), ++to;
-		  if (p->b->o.crlf)
-			  ++to;
-		  pgetc (p);
-
-		  /* Indent to left margin */
-		  if (indents)
-			  binss (p, indents), to += strlen (indents);
-		  else
-			  while (indent--)
-				  binsc (p, ' '), ++to;
-
-		  if (rmf)
-			  free (indents);
-	  }
+	if (!pisbol (p) && piscol (p) > indent) {
+		/* Move q to two (or one if 'french' is set) spaces after end of
+		   previous word */
+		q = pdup (p);
+		while (!pisbol (q)) {
+			if (!isblank (c = prgetc (q))) {
+				pgetc (q);
+				if ((c == '.' || c == '?' || c == '!') && q->byte != p->byte && !french) {
+					pgetc (q);
+				}
+				break;
+			}
+		}
+		pgetc (p);
+		pgetc (q);
+
+		/* Delete space between start of word and end of previous word */
+		to -= p->byte - q->byte;
+		bdel (q, p);
+		prm (q);
+
+		/* Move word to beginning of next line */
+		binsc (p, '\n'), ++to;
+		if (p->b->o.crlf) {
+			++to;
+		}
+		pgetc (p);
+
+		/* Indent to left margin */
+		if (indents) {
+			binss (p, indents), to += strlen (indents);
+		} else {
+			while (indent--) {
+				binsc (p, ' '), ++to;
+			}
+		}
+
+		if (rmf) {
+			free (indents);
+		}
+	}
 
 	/* Move cursor back to original position */
 	pfwrd (p, to - p->byte);
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 IT MARUHN