From 1cd225bb6bf84c149827d9474c4d0f2f7ec52c9c Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 24 Jul 2000 21:21:21 +0000 Subject: [PATCH] bzero -> memset svn path=/trunk/kdegraphics/kdvi/; revision=58590 --- dviwin.cpp | 3 ++- dviwin_draw.cpp | 3 ++- pk.cpp | 5 +++-- vf.cpp | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dviwin.cpp b/dviwin.cpp index 36407c745..bd903387c 100644 --- a/dviwin.cpp +++ b/dviwin.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -391,7 +392,7 @@ void dviWindow::setFile( const char *fname ) PostScriptOutPutString = new QString(); (void) lseek(fileno(dviFile->file), dviFile->page_offset[current_page], SEEK_SET); - bzero((char *) &currinf.data, sizeof(currinf.data)); + memset((char *) &currinf.data, 0, sizeof(currinf.data)); currinf.fonttable = tn_table; currinf.end = dvi_buffer; currinf.pos = dvi_buffer; diff --git a/dviwin_draw.cpp b/dviwin_draw.cpp index 6bea6ceac..ae4d9406f 100644 --- a/dviwin_draw.cpp +++ b/dviwin_draw.cpp @@ -52,6 +52,7 @@ //#define DEBUG 0 #include +#include #include "dviwin.h" #include "glyph.h" @@ -536,7 +537,7 @@ void dviWindow::draw_page(void) // Step 4: Now really write the text (void) lseek(fileno(dviFile->file), dviFile->page_offset[current_page], SEEK_SET); - bzero((char *) &currinf.data, sizeof(currinf.data)); + memset((char *) &currinf.data, 0, sizeof(currinf.data)); currinf.fonttable = tn_table; currinf.end = dvi_buffer; currinf.pos = dvi_buffer; diff --git a/pk.cpp b/pk.cpp index deb167339..2b21a1a47 100644 --- a/pk.cpp +++ b/pk.cpp @@ -59,6 +59,7 @@ #include #include +#include #include "glyph.h" #include "oconfig.h" extern char *xmalloc (unsigned, const char *); @@ -259,7 +260,7 @@ void font::read_PK_char(unsigned int ch) * BYTES_PER_BMUNIT; PK_bitpos = -1; if (PK_dyn_f == 14) { /* get raster by bits */ - bzero(g->bitmap.bits, (int) g->bitmap.h * bytes_wide); + memset(g->bitmap.bits, 0, (int) g->bitmap.h * bytes_wide); for (i = 0; i < (int) g->bitmap.h; i++) { /* get all rows */ cp = ADD(g->bitmap.bits, i * bytes_wide); #ifndef MSBITFIRST @@ -376,7 +377,7 @@ void font::read_PK_index(void) * Prepare glyph array. */ glyphtable = (struct glyph *) xmalloc(max_num_of_chars_in_font * sizeof(struct glyph), "glyph array"); - bzero((char *) glyphtable, max_num_of_chars_in_font * sizeof(struct glyph)); + memset((char *) glyphtable, 0, max_num_of_chars_in_font * sizeof(struct glyph)); /* * Read glyph directory (really a whole pass over the file). */ diff --git a/vf.cpp b/vf.cpp index f3a75358b..ac93c9eec 100644 --- a/vf.cpp +++ b/vf.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include "dviwin.h" #include "oconfig.h" @@ -95,7 +96,7 @@ void font::read_VF_index(void) // Prepare macro array. macrotable = (macro *)xmalloc(max_num_of_chars_in_font*sizeof(macro),"macro table"); - bzero((char *) macrotable, max_num_of_chars_in_font*sizeof(macro)); + memset((char *) macrotable, 0, max_num_of_chars_in_font*sizeof(macro)); // Read macros. avail = availend = NULL;