回精華區
作者itoc.bbs@processor.tfcis.org (核心動力) 看板: Maple_itoc
標題Re: [問題] 點歌版的暱稱怎麼顯示出來呢?
時間動力核心 (04/21/04 10:32:58 Wed) Updated: 2004/04/21
※ 引述《boybaby.bbs@fy.adsldns.org (小灌養樂多)》之銘言:
> 點歌版裡面的暱稱點歌
> 怎麼顯示出暱稱者的名子呢??

  改 hdr-dump.c 特地用來看 ktv 板的 .DIR

: hdr-dump.c:main()

  while (read(fd, &hdr, sizeof(HDR)) == sizeof(HDR))
  {
    count++;
-   printf("%04d %c/%s %s (%s) %s %s\n", count, hdr.xname[7], hdr.xname,
-     hdr.owner, hdr.nick, hdr.date, hdr.title);
+   printf("%04d %c/%s %s (%s) %s %s\n", count, hdr.xname[7], hdr.xname,
+     hdr.owner + (strcmp(hdr.owner, STR_ANONYMOUS) ? 0 : IDLEN + 1),
+     hdr.nick, hdr.date, hdr.title);
  }

  然後上工作站執行

  % cd ~
  % bin/hdr-dump brd/ktv/.DIR

--
  Origin:  Maple-itoc˙動力核心  processor.tfcis.org 
  Modify: 2004/04/21 Wed 10:32:58
精華選讀←離開[主題上]主題下(k)上篇(j)下篇S/a搜尋 G串列 TAB精華 ↑↓捲 Pg/Space翻