From 938150d01f82bc1df10a9a2ca2c1c09adcf94a80 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sun, 4 May 2008 21:48:44 +0100 Subject: [PATCH] cabinet: Indentation fix. --- dlls/cabinet/fdi.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index 468a68dcbd0..8b7500f85c0 100644 --- a/dlls/cabinet/fdi.c +++ b/dlls/cabinet/fdi.c @@ -160,21 +160,21 @@ void QTMupdatemodel(struct QTMmodel *model, int sym) { if (model->syms[0].cumfreq > 3800) { if (--model->shiftsleft) { for (i = model->entries - 1; i >= 0; i--) { - /* -1, not -2; the 0 entry saves this */ - model->syms[i].cumfreq >>= 1; - if (model->syms[i].cumfreq <= model->syms[i+1].cumfreq) { - model->syms[i].cumfreq = model->syms[i+1].cumfreq + 1; - } + /* -1, not -2; the 0 entry saves this */ + model->syms[i].cumfreq >>= 1; + if (model->syms[i].cumfreq <= model->syms[i+1].cumfreq) { + model->syms[i].cumfreq = model->syms[i+1].cumfreq + 1; + } } } else { model->shiftsleft = 50; for (i = 0; i < model->entries ; i++) { - /* no -1, want to include the 0 entry */ - /* this converts cumfreqs into frequencies, then shifts right */ - model->syms[i].cumfreq -= model->syms[i+1].cumfreq; - model->syms[i].cumfreq++; /* avoid losing things entirely */ - model->syms[i].cumfreq >>= 1; + /* no -1, want to include the 0 entry */ + /* this converts cumfreqs into frequencies, then shifts right */ + model->syms[i].cumfreq -= model->syms[i+1].cumfreq; + model->syms[i].cumfreq++; /* avoid losing things entirely */ + model->syms[i].cumfreq >>= 1; } /* now sort by frequencies, decreasing order -- this must be an @@ -182,22 +182,22 @@ void QTMupdatemodel(struct QTMmodel *model, int sym) { * characteristics */ for (i = 0; i < model->entries - 1; i++) { - for (j = i + 1; j < model->entries; j++) { - if (model->syms[i].cumfreq < model->syms[j].cumfreq) { - temp = model->syms[i]; - model->syms[i] = model->syms[j]; - model->syms[j] = temp; + for (j = i + 1; j < model->entries; j++) { + if (model->syms[i].cumfreq < model->syms[j].cumfreq) { + temp = model->syms[i]; + model->syms[i] = model->syms[j]; + model->syms[j] = temp; + } + } } - } - } - + /* then convert frequencies back to cumfreq */ for (i = model->entries - 1; i >= 0; i--) { - model->syms[i].cumfreq += model->syms[i+1].cumfreq; + model->syms[i].cumfreq += model->syms[i+1].cumfreq; } /* then update the other part of the table */ for (i = 0; i < model->entries; i++) { - model->tabloc[model->syms[i].sym] = i; + model->tabloc[model->syms[i].sym] = i; } } } @@ -882,7 +882,7 @@ static int LZXfdi_init(int window, fdi_decomp_state *decomp_state) { memcpy(CAB(lzx_position_base), base, sizeof(base)); /* calculate required position slots */ - if (window == 20) posn_slots = 42; + if (window == 20) posn_slots = 42; else if (window == 21) posn_slots = 50; else posn_slots = window << 1;