build-fix.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. --- cuneiform-1.1.0/cuneiform_src/Kern/hhh/tigerh/h/strings.h 2017-11-30 11:25:24.409125695 +0700
  2. +++ cuneiform-1.1.0-char/cuneiform_src/Kern/hhh/tigerh/h/strings.h 2017-11-30 12:09:26.033501963 +0700
  3. @@ -80,6 +80,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  4. # include "ltconfig.h"
  5. # include "c_types.h"
  6. +# include "cttypes.h"
  7. struct _String;
  8. typedef struct _String STRING;
  9. --- cuneiform-linux-1.1.0/cuneiform_src/Kern/include/utf8-tables.h 2011-04-19 16:49:57.000000000 +0400
  10. +++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/include/utf8-tables.h 2017-07-05 16:35:34.338871445 +0300
  11. @@ -68,7 +68,7 @@
  12. #endif
  13. -const char win1250_to_utf8[][4] = {
  14. +const unsigned char win1250_to_utf8[][4] = {
  15. {0, 0, 0, 0},
  16. {1, 0, 0, 0},
  17. {2, 0, 0, 0},
  18. @@ -328,7 +328,7 @@
  19. };
  20. -const char win1251_to_utf8[][4] = {
  21. +const unsigned char win1251_to_utf8[][4] = {
  22. {0, 0, 0, 0},
  23. {1, 0, 0, 0},
  24. {2, 0, 0, 0},
  25. @@ -587,7 +587,7 @@
  26. {209, 143, 0, 0},
  27. };
  28. -const char win1252_to_utf8[][4] = {
  29. +const unsigned char win1252_to_utf8[][4] = {
  30. {0, 0, 0, 0},
  31. {1, 0, 0, 0},
  32. {2, 0, 0, 0},
  33. @@ -847,7 +847,7 @@
  34. };
  35. -const char win1254_to_utf8[][4] = {
  36. +const unsigned char win1254_to_utf8[][4] = {
  37. {0, 0, 0, 0},
  38. {1, 0, 0, 0},
  39. {2, 0, 0, 0},
  40. @@ -1107,7 +1107,7 @@
  41. };
  42. -const char win1257_to_utf8[][4] = {
  43. +const unsigned char win1257_to_utf8[][4] = {
  44. {0, 0, 0, 0},
  45. {1, 0, 0, 0},
  46. {2, 0, 0, 0},
  47. diff -wbBur cuneiform-linux-1.1.0/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h
  48. --- cuneiform-linux-1.1.0/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h 2011-04-19 16:49:57.000000000 +0400
  49. +++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rfrmt/sources/main/stdafx.h 2017-07-05 16:37:23.528866265 +0300
  50. @@ -74,6 +74,9 @@
  51. //отключаем warning о слишком длинных stl'ных именах
  52. #pragma warning(disable:4786)
  53. +#undef min
  54. +#undef max
  55. +
  56. #include <vector>
  57. typedef std::vector<uint16_t> vectorWord;
  58. diff -wbBur cuneiform-linux-1.1.0/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp
  59. --- cuneiform-linux-1.1.0/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp 2011-04-19 16:49:57.000000000 +0400
  60. +++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rimage/sources/main/cricontrol.cpp 2017-07-05 16:33:02.962211959 +0300
  61. @@ -594,8 +594,8 @@
  62. return FALSE;
  63. }
  64. - wNewHeight = (mbMarginsFlag ? abs(mrMargins.rmBottomMarg - mrMargins.rmTopMarg) : mpSourceDIB->GetLinesNumber());
  65. - wNewWidth = (mbMarginsFlag ? abs(mrMargins.rmLeftMarg - mrMargins.rmRightMarg) : mpSourceDIB->GetLineWidth());
  66. + wNewHeight = (mbMarginsFlag ? std::abs((long int)(mrMargins.rmBottomMarg - mrMargins.rmTopMarg)) : mpSourceDIB->GetLinesNumber());
  67. + wNewWidth = (mbMarginsFlag ? std::abs((long int)(mrMargins.rmLeftMarg - mrMargins.rmRightMarg)) : mpSourceDIB->GetLineWidth());
  68. mpSourceDIB->GetResolutionDPM( &wXResolution, &wYResolution);
  69. if ( !mpDestinationDIB->CreateDIBBegin( wNewWidth, wNewHeight, BitCount) )
  70. diff -wbBur cuneiform-linux-1.1.0/cuneiform_src/Kern/rout/src/codetables.cpp cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rout/src/codetables.cpp
  71. --- cuneiform-linux-1.1.0/cuneiform_src/Kern/rout/src/codetables.cpp 2011-04-19 16:49:57.000000000 +0400
  72. +++ cuneiform-linux-1.1.0.q/cuneiform_src/Kern/rout/src/codetables.cpp 2017-07-05 16:36:05.178869982 +0300
  73. @@ -939,11 +939,11 @@
  74. const char * getUTF8Str(const unsigned char in, const int codepage) {
  75. switch(codepage) {
  76. - case 1250 : return win1250_to_utf8[in];
  77. - case 1251 : return win1251_to_utf8[in];
  78. - case 1252 : return win1252_to_utf8[in];
  79. - case 1254 : return win1254_to_utf8[in];
  80. - case 1257 : return win1257_to_utf8[in];
  81. + case 1250 : return (const char *)win1250_to_utf8[in];
  82. + case 1251 : return (const char *)win1251_to_utf8[in];
  83. + case 1252 : return (const char *)win1252_to_utf8[in];
  84. + case 1254 : return (const char *)win1254_to_utf8[in];
  85. + case 1257 : return (const char *)win1257_to_utf8[in];
  86. default : return "?";
  87. }
  88. }