bzero -> memset

svn path=/trunk/kdegraphics/kdvi/; revision=58590
remotes/origin/kdvi-2.0
David Faure 26 years ago
parent 0ae229ce9a
commit 1cd225bb6b
  1. 3
      dviwin.cpp
  2. 3
      dviwin_draw.cpp
  3. 5
      pk.cpp
  4. 3
      vf.cpp

@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <setjmp.h>
@ -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;

@ -52,6 +52,7 @@
//#define DEBUG 0
#include <stdlib.h>
#include <string.h>
#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;

@ -59,6 +59,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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).
*/

@ -27,6 +27,7 @@
#include <kdebug.h>
#include <klocale.h>
#include <stdio.h>
#include <string.h>
#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;

Loading…
Cancel
Save