瀏覽代碼

Optimize print entry

master
Arun Prakash Jana 5 年之前
父節點
當前提交
7aa72ddd79
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      src/nnn.c

+ 3
- 1
src/nnn.c 查看文件

@@ -3172,13 +3172,15 @@ static void printent(const struct entry *ent, uint namecols, bool sel)

static void printent_long(const struct entry *ent, uint namecols, bool sel)
{
char timebuf[18], permbuf[8] = " ", ind1 = '\0', ind2 = '\0', special = '\0';
char timebuf[18], permbuf[8], ind1 = '\0', ind2 = '\0', special = '\0';

/* Timestamp */
strftime(timebuf, sizeof(timebuf), "%F %R", localtime(&ent->t));
//timebuf[sizeof(timebuf)-1] = '\0';

/* Permissions */
permbuf[0] = permbuf[1] = permbuf[5] = ' ';
permbuf[6] = '\0';
permbuf[2] = '0' + ((ent->mode >> 6) & 7);
permbuf[3] = '0' + ((ent->mode >> 3) & 7);
permbuf[4] = '0' + (ent->mode & 7);


Loading…
取消
儲存