From dda2e4fdca3c3d892ce28c8567a40271562e1c9f Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Sun, 14 Jul 2002 13:21:23 +0000 Subject: [PATCH] corrected warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/tex2rtf/src/tex2any.cpp | 8 ++++---- utils/tex2rtf/src/tex2any.h | 4 ++-- utils/tex2rtf/src/texutils.cpp | 26 +++++++++++++------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/utils/tex2rtf/src/tex2any.cpp b/utils/tex2rtf/src/tex2any.cpp index bfeecc2ebd..2fcb1d64ef 100644 --- a/utils/tex2rtf/src/tex2any.cpp +++ b/utils/tex2rtf/src/tex2any.cpp @@ -192,7 +192,7 @@ int tableNo = 0; FILE *CurrentOutput1 = NULL; FILE *CurrentOutput2 = NULL; FILE *Inputs[15]; -int LineNumbers[15]; +unsigned long LineNumbers[15]; char *FileNames[15]; int CurrentInputIndex = 0; @@ -436,7 +436,7 @@ bool read_a_line(char *buf) } int ch = -2; - int bufIndex = 0; + unsigned long bufIndex = 0; buf[0] = 0; while (ch != EOF && ch != 10) @@ -445,7 +445,7 @@ bool read_a_line(char *buf) { wxString errBuf; errBuf.Printf("Line %lu of file %s is too long. Lines can be no longer than %lu characters. Truncated.", - LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str(),MAX_LINE_BUFFER_SIZE); + LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str(), MAX_LINE_BUFFER_SIZE); OnError((char *)errBuf.c_str()); return FALSE; } @@ -466,7 +466,7 @@ bool read_a_line(char *buf) if (rightCurley > leftCurley) { wxString errBuf; - errBuf.Printf("An extra right Curley brace ('}') was detected at line %lu inside file %s",LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str()); + errBuf.Printf("An extra right Curley brace ('}') was detected at line %lu inside file %s", LineNumbers[CurrentInputIndex], (const char*) currentFileName.c_str()); OnError((char *)errBuf.c_str()); // Reduce the count of right Curley braces, so the mismatched count diff --git a/utils/tex2rtf/src/tex2any.h b/utils/tex2rtf/src/tex2any.h index 236ee2c82f..102dd98508 100644 --- a/utils/tex2rtf/src/tex2any.h +++ b/utils/tex2rtf/src/tex2any.h @@ -36,9 +36,9 @@ #ifdef __WXMSW__ - const int MAX_LINE_BUFFER_SIZE = 600; + const unsigned long MAX_LINE_BUFFER_SIZE = 600; #else - const int MAX_LINE_BUFFER_SIZE = 11000; + const unsigned long MAX_LINE_BUFFER_SIZE = 11000; #endif class TexMacroDef: public wxObject diff --git a/utils/tex2rtf/src/texutils.cpp b/utils/tex2rtf/src/texutils.cpp index 0115595936..3c159839a9 100644 --- a/utils/tex2rtf/src/texutils.cpp +++ b/utils/tex2rtf/src/texutils.cpp @@ -1580,24 +1580,24 @@ void InitialiseColourTable(void) * The purpose of this is to reduce the number of times wxYield is * called, since under Windows this can slow things down. */ - -static int yieldCount = 0; void Tex2RTFYield(bool force) { #ifdef __WXMSW__ - if (isSync) - return; + static int yieldCount = 0; - if (force) - yieldCount = 0; - if (yieldCount == 0) - { - if (wxTheApp) - wxYield(); - yieldCount = 10; - } - yieldCount --; + if (isSync) + return; + + if (force) + yieldCount = 0; + if (yieldCount == 0) + { + if (wxTheApp) + wxYield(); + yieldCount = 10; + } + yieldCount --; #endif } -- 2.45.2