summaryrefslogtreecommitdiff
path: root/src/bin/tyls.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2013-02-02 07:39:47 +0000
committerCarsten Haitzler <raster@rasterman.com>2013-02-02 07:39:47 +0000
commit1af758d9c12a99dad2852c980b0844550cee708f (patch)
treec18285962932fb8c285ca8ba5f557a8e65e8e8d3 /src/bin/tyls.c
parentf32952ce49c20bf0fd3abc98f24a21e4fd207b43 (diff)
fix tyls -m
SVN revision: 83569
Diffstat (limited to 'src/bin/tyls.c')
-rw-r--r--src/bin/tyls.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bin/tyls.c b/src/bin/tyls.c
index ec02462..babc6b4 100644
--- a/src/bin/tyls.c
+++ b/src/bin/tyls.c
@@ -194,7 +194,10 @@ list_dir(const char *dir, int mode)
194 printf("%c%c%c%c", 33 + c, 33 + c, 33 + c, 33 + c); 194 printf("%c%c%c%c", 33 + c, 33 + c, 33 + c, 33 + c);
195 printf("%c}ie%c", 0x1b, 0); 195 printf("%c}ie%c", 0x1b, 0);
196 printf("%s", s); 196 printf("%s", s);
197 for (j = 0; j < (cw - len); j++) printf(" "); 197 if (c < (cols - 1))
198 {
199 for (j = 0; j < (cw - len); j++) printf(" ");
200 }
198 } 201 }
199 printf("\n"); 202 printf("\n");
200 for (c = 0; c < cols; c++) 203 for (c = 0; c < cols; c++)
@@ -209,7 +212,7 @@ list_dir(const char *dir, int mode)
209 cw = tw / cols; 212 cw = tw / cols;
210 size = ecore_file_size(buf); 213 size = ecore_file_size(buf);
211 size_print(sz, sizeof(sz), size); 214 size_print(sz, sizeof(sz), size);
212 len = eina_unicode_utf8_get_len(sz) + 2; 215 len = eina_unicode_utf8_get_len(sz) + 2 + 4;
213 if (cols > 1) len += 1; 216 if (cols > 1) len += 1;
214 printf("%c}ib%c", 0x1b, 0); 217 printf("%c}ib%c", 0x1b, 0);
215 printf("%c%c%c%c", 33 + c, 33 + c, 33 + c, 33 + c); 218 printf("%c%c%c%c", 33 + c, 33 + c, 33 + c, 33 + c);
@@ -231,7 +234,10 @@ list_dir(const char *dir, int mode)
231 printf(" "); 234 printf(" ");
232 } 235 }
233 } 236 }
234 for (j = 0; j < (cw - len); j++) printf(" "); 237 if (c < (cols - 1))
238 {
239 for (j = 0; j < (cw - len); j++) printf(" ");
240 }
235 } 241 }
236 printf("\n"); 242 printf("\n");
237 } 243 }