~thestr4ng3r/mymcplus

078adab86042c4dabca1b7d3708bfacc006ee37b — Florian Märkl 3 years ago 72dd691
Remove more old_divs
3 files changed, 6 insertions(+), 6 deletions(-)

M mymc/gui.py
M mymc/lzari.py
M mymc/mymc.py
M mymc/gui.py => mymc/gui.py +3 -3
@@ 244,7 244,7 @@ class dirlist_control(wx.ListCtrl):
        for (i, a) in enumerate(self.dirtable):
            (ent, icon_sys, size, title) = a
            li = self.InsertItem(i, ent[8])
            self.SetItem(li, 1, "%dK" % (old_div(size, 1024)))
            self.SetItem(li, 1, "%dK" % (size // 1024))
            m = ent[6]
            m = ("%04d-%02d-%02d %02d:%02d"
                 % (m[5], m[4], m[3], m[2], m[1]))


@@ 651,8 651,8 @@ class gui_frame(wx.Frame):
        if mc == None:
            status = "No memory card image"
        else:
            free = old_div(mc.get_free_space(), 1024)
            limit = old_div(mc.get_allocatable_space(), 1024)
            free = mc.get_free_space() // 1024
            limit = mc.get_allocatable_space() // 1024
            status = "%dK of %dK free" % (free, limit)
        self.statusbar.SetStatusText(status, 1)


M mymc/lzari.py => mymc/lzari.py +2 -2
@@ 170,7 170,7 @@ class lzari_codec(object):
            c = 0
            for i in range(MAX_CHAR, 0, -1):
                self.sym_cum[MAX_CHAR - i] = c
                a = old_div((self.sym_freq[i] + 1), 2)
                a = (self.sym_freq[i] + 1) // 2
                self.sym_freq[i] = a
                c += a
            self.sym_cum[MAX_CHAR] = c


@@ 197,7 197,7 @@ class lzari_codec(object):
            c = 0
            for i in range(MAX_CHAR, 0, -1):
                sym_cum[i] = c
                a = old_div((sym_freq[i] + 1), 2)
                a = (sym_freq[i] + 1) // 2
                sym_freq[i] = a
                c += a
            sym_cum[0] = c

M mymc/mymc.py => mymc/mymc.py +1 -1
@@ 426,7 426,7 @@ def do_format(cmd, mcname, opts, args, opterr):
        opterr("Incorrect number of arguments.")
    pages_per_card = ps2mc.PS2MC_STANDARD_PAGES_PER_CARD
    if opts.clusters != None:
        pages_per_cluster = (old_div(ps2mc.PS2MC_CLUSTER_SIZE, ps2mc.PS2MC_STANDARD_PAGE_SIZE))
        pages_per_cluster = (ps2mc.PS2MC_CLUSTER_SIZE // ps2mc.PS2MC_STANDARD_PAGE_SIZE)
        pages_per_card = opts.clusters * pages_per_cluster
    params = (not opts.no_ecc,
          ps2mc.PS2MC_STANDARD_PAGE_SIZE,