X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/183d522362c95309d70baa418b54096599c17653..0d303f1764645284b33924c9be8bf29f0a32ca5c:/methods/rred.cc diff --git a/methods/rred.cc b/methods/rred.cc index fe7ef7322..cabb3c456 100644 --- a/methods/rred.cc +++ b/methods/rred.cc @@ -8,19 +8,18 @@ #include #include -#include #include #include #include #include #include +#include +#include #include #include #include -#include -#include #include #include #include @@ -469,7 +468,7 @@ class Patch { void write_diff(FILE *f) { - size_t line = 0; + unsigned long long line = 0; std::list::reverse_iterator ch; for (ch = filechanges.rbegin(); ch != filechanges.rend(); ++ch) { line += ch->offset + ch->del_cnt; @@ -482,11 +481,11 @@ class Patch { line -= ch->del_cnt; if (ch->add_cnt > 0) { if (ch->del_cnt == 0) { - fprintf(f, "%lua\n", line); + fprintf(f, "%llua\n", line); } else if (ch->del_cnt == 1) { - fprintf(f, "%luc\n", line+1); + fprintf(f, "%lluc\n", line+1); } else { - fprintf(f, "%lu,%luc\n", line+1, line+ch->del_cnt); + fprintf(f, "%llu,%lluc\n", line+1, line+ch->del_cnt); } mg_i = ch; @@ -496,9 +495,9 @@ class Patch { fprintf(f, ".\n"); } else if (ch->del_cnt == 1) { - fprintf(f, "%lud\n", line+1); + fprintf(f, "%llud\n", line+1); } else if (ch->del_cnt > 1) { - fprintf(f, "%lu,%lud\n", line+1, line+ch->del_cnt); + fprintf(f, "%llu,%llud\n", line+1, line+ch->del_cnt); } line -= ch->offset; }