[閒聊] 關於 more 的變更

看板mud_sanc (Sanctuary - 聖殿)作者 (小太保)時間14年前 (2011/07/22 12:03), 編輯推噓1(103)
留言4則, 2人參與, 最新討論串1/1
我想改變成這種.. 瀏覽 第 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

07/22 12:53, , 1F
順便改大檔案的more可顯示...avert
07/22 12:53, 1F

07/22 12:54, , 2F
用=========這個我是覺得比較粗..比較一眼看的出來分
07/22 12:54, 2F

07/22 12:55, , 3F
格(雖然原式看久了也一眼看出...avert)
07/22 12:55, 3F

07/22 15:42, , 4F
read_file 的要改 config 檔, 有需要才改
07/22 15:42, 4F
文章代碼(AID): #1EAFPujg (mud_sanc)
文章代碼(AID): #1EAFPujg (mud_sanc)