Sophie

Sophie

distrib > Mageia > cauldron > i586 > by-pkgid > 2b6116c6d7ce6ce61c03cd7d5a22a36e > files > 5

colorer-take5-0-0.beta5.16.mga9.src.rpm

diff -Nru src/shared/colorer/viewer/ConsoleTools.cpp src/shared/colorer/viewer/ConsoleTools.cpp
--- src/shared/colorer/viewer/ConsoleTools.cpp	2006-11-24 15:15:42.000000000 +0100
+++ src/shared/colorer/viewer/ConsoleTools.cpp	2018-02-03 18:23:36.353805271 +0100
@@ -1,4 +1,5 @@
 
+#include<stdio.h>
 #include<time.h>
 
 #include<colorer/ParserFactory.h>
@@ -151,10 +152,10 @@
   re = new CRegExp();
   do{
     printf("\nregexp:");
-    gets(text);
+    fgets(text, sizeof(text), stdin);
     if (!re->setRE(&DString(text))) continue;
     printf("exprn:");
-    gets(text);
+    fgets(text, sizeof(text), stdin);
     res = re->parse(&DString(text), &match);
     printf("%s\nmatch:  ",res?"ok":"error");
     for(int i = 0; i < match.cMatch; i++){
diff -Nru src/shared/colorer/viewer/TextLinesStore.cpp src/shared/colorer/viewer/TextLinesStore.cpp
--- src/shared/colorer/viewer/TextLinesStore.cpp	2006-11-24 15:15:42.000000000 +0100
+++ src/shared/colorer/viewer/TextLinesStore.cpp	2018-02-03 18:33:14.679766243 +0100
@@ -30,7 +30,7 @@
 
   if (fileName == null){
     char line[256];
-    while(gets(line) != null){
+    while(fgets(line, sizeof(line), stdin) != null){
       lines.addElement(new SString(line));
       if (tab2spaces) replaceTabs(lines.size()-1);
     }