slackbuilds_ponce/misc/langdrill/010_min_max.diff
Hunter Sezen 12e3c47e47 misc/langdrill: Added (language drill tests).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
2018-03-19 22:33:55 +00:00

21 lines
782 B
Diff

The minimum and maximum operators were never terribly portable and have
been dropped by GCC 4.2.
Index: langdrill-0.3/src/main.cc
===================================================================
--- langdrill-0.3.orig/src/main.cc 2007-07-15 12:52:38.000000000 +0100
+++ langdrill-0.3/src/main.cc 2007-07-15 12:54:01.000000000 +0100
@@ -460,9 +460,11 @@
// keys. In such a case, we must take some precations
setActiveButtons( keyTotalNr );
- // is this minimum operator portable ??
- // it should work with egcs at least !!
- int cols = keyTotalNr <? atoi(_setup.quizzAnswerNr);
+ int cols;
+ if (keyTotalNr < atoi(_setup.quizzAnswerNr))
+ cols = keyTotalNr;
+ else
+ cols = atoi(_setup.quizzAnswerNr);
int rows = keyTotalNr;
int *set = new int[cols];