【 在 yaomaohua (胡搅蛮缠) 的大作中提到: 】
: 跟踪了一次丝路的设置过程,在这里写出来希望和我一样菜的小鸟们一起进步。
: 先是src/announce.c的2362行
: sethomefile(pathfile, currentuser->userid, "path8");
: sethomefile函数将‘将中文ID映射到A-Z的目录中’
: static inline char
: mytoupper(unsigned char ch)
: {
: if (isalpha(ch))
: return toupper(ch);
: else
: return ch % ('Z' - 'A') + 'A';
: }
: char *sethomefile(char *buf, const char *userid, const char *filename);
: 然后回到announce.c的2363行
: if ((fp = fopen(pathfile, "w")) == NULL)
: 如果这里的file path为空,则显示出announce.c的2273行的结果
: if (save_anpath(titles, paths) < 0) {
: prints("设置丝路错误! 按任意键继续");
: 即:
: add_anpath (title=0xbfe96280 "ht学习笔记", ' ' <repeats 28 times>, "(BM: hjmc)",
: path=0xbfe96390 "0Announce/groups/GROUP_1/ht_essay") at announce.c:2274
: 2274 prints("设置丝路错误! 按任意键继续");
出错的原因应该是不能以“写”模式打开路径文件,这里我不明白的是以“写”模式打开fp = fopen(pathfile,"w")的pathfile,那这个pathfile是哪一个文件,在何处有定义呢?请大虾指教!感谢!!!
--
FROM 220.172.240.*