=== unrtf-0.19.7/attr.c
==================================================================
--- unrtf-0.19.7/attr.c	(revision 3771)
+++ unrtf-0.19.7/attr.c	(local)
@@ -390,7 +390,7 @@
 	AttrStack *prev_stack;
 
 	new_stack = (AttrStack*) my_malloc (sizeof (AttrStack));
-	bzero ((void*) new_stack, sizeof (AttrStack));
+	memset ((void*) new_stack, 0, sizeof (AttrStack));
 
 	prev_stack = stack_of_stacks_top;
 
=== unrtf-0.19.7/convert.c
==================================================================
--- unrtf-0.19.7/convert.c	(revision 3771)
+++ unrtf-0.19.7/convert.c	(local)
@@ -73,6 +73,7 @@
 #include "attr.h"
 
 
+extern int nopict_mode;
 
 /*
 #define BINARY_ATTRS
@@ -1148,8 +1149,10 @@
  *=======================================================================*/
 static int 
 cmd_bullet (Word *w, int align, char has_param, short param) {
-	printf (op->chars.bullet);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.bullet) {
+		printf (op->chars.bullet);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1161,8 +1164,10 @@
  *=======================================================================*/
 static int 
 cmd_ldblquote (Word *w, int align, char has_param, short param) {
-	printf (op->chars.left_dbl_quote);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.left_dbl_quote) {
+		printf (op->chars.left_dbl_quote);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1176,8 +1181,10 @@
 
 static int 
 cmd_rdblquote (Word *w, int align, char has_param, short param) {
-	printf (op->chars.right_dbl_quote);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.right_dbl_quote) {
+		printf (op->chars.right_dbl_quote);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1190,8 +1197,10 @@
  *=======================================================================*/
 static int 
 cmd_lquote (Word *w, int align, char has_param, short param) {
-	printf (op->chars.left_quote);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.left_quote) {
+		printf (op->chars.left_quote);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1205,8 +1214,10 @@
 
 static int 
 cmd_nonbreaking_space (Word *w, int align, char has_param, short param) {
-	printf (op->chars.nonbreaking_space);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.nonbreaking_space) {
+		printf (op->chars.nonbreaking_space);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1220,8 +1231,10 @@
 
 static int 
 cmd_nonbreaking_hyphen (Word *w, int align, char has_param, short param) {
-	printf (op->chars.nonbreaking_hyphen);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.nonbreaking_hyphen) {
+		printf (op->chars.nonbreaking_hyphen);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1235,8 +1248,10 @@
 
 static int 
 cmd_optional_hyphen (Word *w, int align, char has_param, short param) {
-	printf (op->chars.optional_hyphen);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.optional_hyphen) {
+		printf (op->chars.optional_hyphen);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1249,8 +1264,10 @@
  *=======================================================================*/
 static int 
 cmd_emdash (Word *w, int align, char has_param, short param) {
-	printf (op->chars.emdash);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.emdash) {
+		printf (op->chars.emdash);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1264,8 +1281,10 @@
 
 static int 
 cmd_endash (Word *w, int align, char has_param, short param) {
-	printf (op->chars.endash);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.endash) {
+		printf (op->chars.endash);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1279,8 +1298,10 @@
 
 static int 
 cmd_rquote (Word *w, int align, char has_param, short param) {
-	printf (op->chars.right_quote);
-	++total_chars_this_line; /* \tab */
+	if (op->chars.right_quote) {
+		printf (op->chars.right_quote);
+		++total_chars_this_line; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1293,8 +1314,10 @@
  *=======================================================================*/
 static int 
 cmd_par (Word *w, int align, char has_param, short param) {
-	printf (op->line_break);
-	total_chars_this_line = 0; /* \tab */
+	if (op->line_break) {
+		printf (op->line_break);
+		total_chars_this_line = 0; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1308,8 +1331,10 @@
 
 static int 
 cmd_line (Word *w, int align, char has_param, short param) {
-	printf (op->line_break);
-	total_chars_this_line = 0; /* \tab */
+	if (op->line_break) {
+		printf (op->line_break);
+		total_chars_this_line = 0; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1322,8 +1347,10 @@
  *=======================================================================*/
 
 static int cmd_page (Word *w, int align, char has_param, short param) {
-	printf (op->page_break);
-	total_chars_this_line = 0; /* \tab */
+	if (op->page_break) {
+		printf (op->page_break);
+		total_chars_this_line = 0; /* \tab */
+	}
 	return FALSE;
 }
 
@@ -1784,7 +1811,9 @@
 
 static int cmd_sect (Word *w, int align, char has_param, short param) {
 	/* XX kludge */
-	printf (op->paragraph_begin);
+	if (op->paragraph_begin) {
+		printf (op->paragraph_begin);
+	}
 	return FALSE;
 }
 
@@ -1796,9 +1825,12 @@
  *=======================================================================*/
 
 static int cmd_shp (Word *w, int align, char has_param, short param) {
-	printf (op->comment_begin);
-	printf ("Drawn Shape (ignored--not implemented yet)");
-	printf (op->comment_begin);
+	if (op->comment_begin) {
+		printf (op->comment_begin);
+		printf ("Drawn Shape (ignored--not implemented yet)");
+		printf (op->comment_begin);
+	}
+
 	return FALSE;
 }
 
@@ -1826,9 +1858,11 @@
 
 static int cmd_ansi (Word *w, int align, char has_param, short param) {
 	charset_type = CHARSET_ANSI;
-	printf (op->comment_begin);
-	printf ("document uses ANSI character set");
-	printf (op->comment_end);
+	if (op->comment_begin) {
+		printf (op->comment_begin);
+		printf ("document uses ANSI character set");
+		printf (op->comment_end);
+	}
 	return FALSE;
 }
 
@@ -1841,9 +1875,11 @@
 
 static int cmd_pc (Word *w, int align, char has_param, short param) {
 	charset_type = CHARSET_CP437 ;
-	printf (op->comment_begin);
-	printf ("document uses PC codepage 437 character set");
-	printf (op->comment_end);
+	if (op->comment_begin) {
+		printf (op->comment_begin);
+		printf ("document uses PC codepage 437 character set");
+		printf (op->comment_end);
+	}
 	return FALSE;
 }
 
@@ -1856,9 +1892,11 @@
 
 static int cmd_pca (Word *w, int align, char has_param, short param) {
 	charset_type = CHARSET_CP850;
-	printf (op->comment_begin);
-	printf ("document uses PC codepage 850 character set");
-	printf (op->comment_end);
+	if (op->comment_begin) {
+		printf (op->comment_begin);
+		printf ("document uses PC codepage 850 character set");
+		printf (op->comment_end);
+	}
 	return FALSE;
 }
 
@@ -1871,9 +1909,11 @@
 
 static int cmd_mac (Word *w, int align, char has_param, short param) {
 	charset_type = CHARSET_MAC;
-	printf (op->comment_begin);
-	printf ("document uses Macintosh character set");
-	printf (op->comment_end);
+	if (op->comment_begin) {
+		printf (op->comment_begin);
+		printf ("document uses Macintosh character set");
+		printf (op->comment_end);
+	}
 	return FALSE;
 }
 
@@ -2696,7 +2736,7 @@
 word_print_core (Word *w)
 {
 	char *s;
-	FILE *f=NULL;
+	FILE *pictfile=NULL;
 	int is_cell_group=FALSE;
 	int paragraph_begined=FALSE;
 	int paragraph_align=ALIGN_LEFT;
@@ -2736,7 +2776,7 @@
 				/*----------------------------------------*/
 				if (within_picture) {
 					starting_body();
-					if (!f) {
+					if (!pictfile && !nopict_mode) {
 						char *ext=NULL;
 						switch (picture_type) {
 						case PICT_WB: ext="bmp"; break;
@@ -2749,7 +2789,7 @@
 						}
 						sprintf (picture_path, "pict%03d.%s", 
 							picture_file_number++,ext);
-						f=fopen(picture_path,"w");
+						pictfile=fopen(picture_path,"w");
 					}
 
 					if (s[0]!=' ') {
@@ -2775,7 +2815,9 @@
 								if (tmp>'9') tmp-=('a'-10); 
 								else tmp-='0';
 								value+=tmp;
-								fprintf (f,"%c", value);
+								if (pictfile) {
+									fprintf (pictfile,"%c", value);
+								}
 							}
 						}
 					}
@@ -3013,13 +3055,13 @@
 	}
 
 	if (within_picture) {
-		if(f) { 
-			fclose(f);
+		if(pictfile) { 
+			fclose(pictfile);
 			printf (op->imagelink_begin);
 			printf ("%s", picture_path);
 			printf (op->imagelink_end);
-			within_picture=FALSE;
 		}
+		within_picture=FALSE;
 	}
 
 	/* Undo font attributes UNLESS we're doing table cells
=== unrtf-0.19.7/defs.h
==================================================================
--- unrtf-0.19.7/defs.h	(revision 3771)
+++ unrtf-0.19.7/defs.h	(local)
@@ -38,7 +38,7 @@
  *--------------------------------------------------------------------*/
 
 
-#define PROGRAM_VERSION "0.19.7"
+#define PROGRAM_VERSION "0.19.7bb1"
 #define PROGRAM_NAME "UnRTF"
 #define PROGRAM_WEBSITE "http://www.gnu.org/software/unrtf/unrtf.html"
 
=== unrtf-0.19.7/error.c
==================================================================
--- unrtf-0.19.7/error.c	(revision 3771)
+++ unrtf-0.19.7/error.c	(local)
@@ -39,9 +39,8 @@
 
 
 #include <stdio.h>
-#if linux || __DJGPP__ /* daved - 0.19.1, st001906 - 0.19.6 */
 #include <stdlib.h>
-#endif
+
 #include "defs.h"
 #include "main.h"
 
=== unrtf-0.19.7/main.c
==================================================================
--- unrtf-0.19.7/main.c	(revision 3771)
+++ unrtf-0.19.7/main.c	(local)
@@ -45,9 +45,7 @@
 
 
 #include <stdio.h>
-#if linux || __DJGPP__ /* daved - 0.19.0, st001906 - 0.19.6 */
 #include <stdlib.h>
-#endif
 #include <string.h>
 
 #include "defs.h"
=== unrtf-0.19.7/output.c
==================================================================
--- unrtf-0.19.7/output.c	(revision 3771)
+++ unrtf-0.19.7/output.c	(local)
@@ -36,10 +36,9 @@
 
 
 #include <stdio.h>
-#if linux || __DJGPP__ /* daved - 0.19.0,  st001906 - 0.19.6 */
 #include <stdlib.h>
-#endif
 #include <string.h>
+
 #include "malloc.h"
 #include "defs.h"
 #include "error.h"
@@ -64,7 +63,7 @@
 	if (!new_op)
 		error_handler ("cannot allocate output personality");
 
-	bzero ((void*) new_op, sizeof (OutputPersonality));
+	memset ((void*) new_op, 0, sizeof (OutputPersonality));
 	return new_op;
 }
 
