Skip to content

Commit

Permalink
Use standard macros for format strings
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 11, 2017
1 parent f2252fd commit ef1d960
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions ccmain/pgedit.cpp
Expand Up @@ -544,8 +544,7 @@ BOOL8 Tesseract::process_cmd_win_event( // UI command semantics
break;

default:
sprintf(msg, "Unrecognised event " INT32FORMAT "(%s)",
cmd_event, new_value);
sprintf(msg, "Unrecognised event %" PRId32 "(%s)", cmd_event, new_value);
image_win->AddMessage(msg);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions ccstruct/blobbox.h
Expand Up @@ -734,8 +734,8 @@ class TO_BLOCK:public ELIST_LINK
for (row_it.mark_cycle_pt(); !row_it.cycled_list();
row_it.forward()) {
row = row_it.data();
tprintf("Row range (%g,%g), para_c=%g, blobcount=" INT32FORMAT
"\n", row->min_y(), row->max_y(), row->parallel_c(),
tprintf("Row range (%g,%g), para_c=%g, blobcount=%" PRId32 "\n",
row->min_y(), row->max_y(), row->parallel_c(),
row->blob_list()->length());
}
}
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/pdblock.cpp
Expand Up @@ -196,7 +196,7 @@ void PDBLK::plot( //draw outline
// serial,startpt.x(),startpt.y());
char temp_buff[34];
#if defined(__UNIX__) || defined(MINGW)
sprintf(temp_buff, INT32FORMAT, serial);
sprintf(temp_buff, "%" PRId32, serial);
#else
ultoa (serial, temp_buff, 10);
#endif
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/polyblk.cpp
Expand Up @@ -254,7 +254,7 @@ void POLY_BLOCK::plot(ScrollView* window, inT32 num) {
window->TextAttributes("Times", 80, false, false, false);
char temp_buff[34];
#if defined(__UNIX__) || defined(MINGW)
sprintf(temp_buff, INT32FORMAT, num);
sprintf(temp_buff, "%" PRId32, num);
#else
ltoa (num, temp_buff, 10);
#endif
Expand Down

0 comments on commit ef1d960

Please sign in to comment.