]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/tex2rtf/src/texutils.cpp
added QueryRawValue() to wxRegKey and test code for it in the sample
[wxWidgets.git] / utils / tex2rtf / src / texutils.cpp
index 5746339422b5fe604775474feb50d794bcf5c5dd..35ff57107ea51fb93607c33ba160406d5df94198 100644 (file)
@@ -239,9 +239,9 @@ int ParseUnitArgument(char *unitArg)
       if (strcmp(units, "in") == 0)
         conversionFactor = 72.0;
       else if (strcmp(units, "cm") == 0)
-        conversionFactor = 72.0/2.51;
+        conversionFactor = (float)72.0/(float)2.51;
       else if (strcmp(units, "mm") == 0)
-        conversionFactor = 72.0/25.1;
+        conversionFactor = (float)72.0/(float)25.1;
       else if (strcmp(units, "pt") == 0)
         conversionFactor = 1;
     }
@@ -528,10 +528,10 @@ void BibReadValue(istream& istr, char *buffer, bool ignoreBraces = TRUE,
   while (!istr.eof() && !stopping)
   {
 //    i ++;
-    if (i >= 2000)
+    if (i >= 4000)
     {
       char buf[100];
-      sprintf(buf, "Sorry, value > 2000 chars in bib file at line %ld, terminating.", BibLine);
+      sprintf(buf, "Sorry, value > 4000 chars in bib file at line %ld, terminating.", BibLine);
       wxFatalError(buf, "Tex2RTF Fatal Error");
     }
     istr.get(ch);
@@ -581,7 +581,7 @@ bool ReadBib(char *filename)
   OnInform("Reading .bib file...");
 
   char ch;
-  char fieldValue[2000];
+  char fieldValue[4000];
   char recordType[100];
   char recordKey[100];
   char recordField[100];
@@ -1569,7 +1569,8 @@ void Tex2RTFYield(bool force)
     yieldCount = 0;
   if (yieldCount == 0)
   {
-    wxYield();
+    if (wxTheApp)
+        wxYield();
     yieldCount = 10;
   }
   yieldCount --;