From: Chris Allegretta Date: Wed, 23 May 2001 21:54:47 +0000 (+0000) Subject: do_browser() - Don't shift the size of the file is it's less than 1K. Fixed files... X-Git-Tag: v1.0.3~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a14c78c2eba05f4e6f7e2fbbb85dc75f2c3de542;p=nano.git do_browser() - Don't shift the size of the file is it's less than 1K. Fixed files less than 1K being displayed as 0B (Rocco) git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@669 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 9593b41d..609f3c88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ CVS code - cut_marked_segment() - Add bizarre copy of bot node, else *BSD goes ballistic (fixes BUG #60) +- files.c: + do_browser() + - Don't shift the size of the file is it's less than 1K. Fixed + files less than 1K being displayed as 0B (Rocco). - nano.c: do_alt_speller() - Try to go to the same line we were on before before spell check diff --git a/files.c b/files.c index 34d19f7c..ccccabc9 100644 --- a/files.c +++ b/files.c @@ -1307,7 +1307,7 @@ char *do_browser(char *inpath) strcpy(foo + longest - 2, "--"); } else if (st.st_size < (1 << 10)) /* less than 1 K */ sprintf(foo + longest - 7, "%4d B", - (int) st.st_size >> 10); + (int) st.st_size); else if (st.st_size >= (1 << 30)) /* at least 1 gig */ sprintf(foo + longest - 7, "%4d GB", (int) st.st_size >> 30);