2009-11-11 Chris Allegretta <chrisa@asty.org>
        * winio.c: Large tweaking of cursor and text display based on COLS not COLS - 1,
          due to finally understanding that display_string wasn't being called properly
          when softwrap was enabled.  Fixes Savnnah bug 27603, Return key doesn't scroll
          viewport reported by Hannes Schueller.
        * - Fix size_t formatting issues with -pedantic by converting vals to long unsigned
          for printing.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4420 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
diff --git a/src/text.c b/src/text.c
index f70f31d..a653edd 100644
--- a/src/text.c
+++ b/src/text.c
@@ -409,7 +409,7 @@
 	for (c = u->cutbuffer, t = openfile->current; c->next != NULL && t->next != NULL; ) {
 
 #ifdef DEBUG
-	fprintf(stderr, "Advancing, lineno  = %zd, data = \"%s\"\n", t->lineno, t->data);
+	fprintf(stderr, "Advancing, lineno  = %lu, data = \"%s\"\n", (unsigned long) t->lineno, t->data);
 #endif
 	    c = c->next;
 	    t = t->next;
@@ -943,8 +943,8 @@
     }
 
 #ifdef DEBUG
-    fprintf(stderr, "fs->current->data = \"%s\", current_x = %zd, u->begin = %d, type = %d\n",
-			fs->current->data,  fs->current_x, u->begin, current_action);
+    fprintf(stderr, "fs->current->data = \"%s\", current_x = %lu, u->begin = %d, type = %d\n",
+			fs->current->data,  (unsigned long) fs->current_x, u->begin, current_action);
     fprintf(stderr, "left add_undo...\n");
 #endif
     fs->last_action = current_action;
@@ -966,10 +966,10 @@
 	return;
 
 #ifdef DEBUG
-        fprintf(stderr, "action = %d, fs->last_action = %d,  openfile->current->lineno = %zd",
-		action, fs->last_action, openfile->current->lineno);
+        fprintf(stderr, "action = %d, fs->last_action = %d,  openfile->current->lineno = %lu",
+		action, fs->last_action, (unsigned long) openfile->current->lineno);
 	if (fs->current_undo)
-	    fprintf(stderr, "fs->current_undo->lineno = %zd\n",  fs->current_undo->lineno);
+	    fprintf(stderr, "fs->current_undo->lineno = %lu\n",  (unsigned long) fs->current_undo->lineno);
 	else
 	    fprintf(stderr, "\n");
 #endif
@@ -989,8 +989,8 @@
     switch (u->type) {
     case ADD:
 #ifdef DEBUG
-        fprintf(stderr, "fs->current->data = \"%s\", current_x = %zd, u->begin = %d\n",
-			fs->current->data,  fs->current_x, u->begin);
+        fprintf(stderr, "fs->current->data = \"%s\", current_x = %lu, u->begin = %d\n",
+			fs->current->data, (unsigned long) fs->current_x, u->begin);
 #endif
         len = strlen(u->strdata) + 2;
         data = nrealloc((void *) u->strdata, len * sizeof(char *));