作者laechan (小太保)
看板mud_sanc
標題[閒聊] 關於 more 的變更
時間Fri Jul 22 12:03:00 2011
我想改變成這種..
瀏覽 第 5/18 頁 ( 25%) 目前顯示: 第 96~118 行
不是改變成上述格式,而是把..
1.目前正在瀏覽第幾頁/全部幾頁
2.目前瀏覽的這一頁是第 n~m 行
把上述兩個資訊顯示出來. 有空就做, 相關檔案
/std/user/more.c 先備份為 /std/user/more.20110722
static private mixed *files;
static private string more_file, *lines, last_regexp, chunkstr;
static private int more_line, from_file, num_lines, direction, chunk;
void write_more_line()
{
receive (sprintf("--More--行數(%d/%d)--按enter繼續--按q離開--",
more_line,num_lines));
}
應該不難,可能會先改成..
--More--頁(1/15)--行(23/337)--按enter繼續/按q離開--
Belldandy.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 117.19.83.112
1F:推 justinj :順便改大檔案的more可顯示...avert 07/22 12:53
2F:→ justinj :用=========這個我是覺得比較粗..比較一眼看的出來分 07/22 12:54
3F:→ justinj :格(雖然原式看久了也一眼看出...avert) 07/22 12:55
4F:→ laechan :read_file 的要改 config 檔, 有需要才改 07/22 15:42