Or whatever the Windows equivalent for "search through all files with a .c extension for the text string 'int main(', while recursing into subdirectories, and display each and every match showing the file and line number.
Running the above in pidgin-2.7.1/pidgin gives gtkmain.c:521:int main(int argc, char *argv[]). The file gtkmain.c is just under 1000 lines, so maybe not the best place to start.
But the principle, of using the command line to search for functions in the code, has helped me in the past work my way around other peoples code (though admittedly, when I suggested this to you, I had not realized Pidgin was as complex as it is).
So I now consider it important to ask: to what end do you wish to understand the code?
Why do you want to edit the code?
Do you wish to provide GUI enhancements, or new features within the backend?
You really need to come up with something concrete to work towards. Run the program and identify something you want to do to it (and maybe let us know too). Once you have identified something through actually using Pidgin that you wish to modify in some way, then you can start looking in the code trying to figure out where that thing happens. Search within the code for text strings which appear in the GUI dialogs, or in the menus, or even the dialog window title.
Once you have found the code for a particular GUI dialog associated with whatever it is you wish to modify, perform another search in the code for references to that GUI dialog, and so on, and so on.
Making inroads into larger projects is not easy.
There is also the more experimental approach of editing a file and changing something, anything, re-compiling, and seeing what effects it might have. Though perhaps not the best of ideas with a networking program ;-)
There is a guide to building on Windows on their developer trac site. And as far as where to "start from", you may be best served going into their IRC channel #pidgin on Freenode and asking for help from some of the developers there. They may be able to point you in the best direction if not help you directly.
In my opinion, you should follow the manual for compilation in Linux, which will be a lot easier than compiling in Windows. Then, start reading the documentation/comments in the code and try to see if you can modify it.
发布评论
评论(3)
或者任何 Windows 等效项“搜索所有具有 .c 扩展名的文件以查找文本字符串“int main(”,同时递归到子目录,并显示显示文件和行号的每个匹配项。
在
pidgin-2.7.1/pidgin
给出gtkmain.c:521:int main(int argc, char *argv[])
文件 gtkmain.c 不到 1000 行,所以也许不是最好的起点,但是使用命令行搜索代码中的函数的原则在过去帮助我解决了其他人的代码(尽管不可否认,当我向你建议这一点时,我没有意识到 Pidgin 如此复杂),
所以我现在认为重要的是问:您希望了解代码的目的是什么?
要编辑代码?
您为什么 您希望在后端提供 GUI 增强功能或新功能吗?
您确实需要想出一些具体的东西来运行该程序并确定您想要对其执行的操作(也许可以让其执行)。我们也知道)。一旦您通过实际使用 Pidgin 确定了您希望以某种方式修改的内容,那么您就可以开始查看代码,尝试找出该内容发生的位置。在代码中搜索出现在 GUI 对话框、菜单甚至对话框窗口标题中的文本字符串。
一旦找到与您想要修改的内容相关联的特定 GUI 对话框的代码,请在代码中执行另一次搜索以查找对该 GUI 对话框的引用,依此类推。
进军更大的项目并不容易。
还有一种更具实验性的方法,即编辑文件并更改某些内容,重新编译,然后看看它可能会产生什么效果。虽然对于网络程序来说也许不是最好的想法;-)
Or whatever the Windows equivalent for "search through all files with a .c extension for the text string 'int main(', while recursing into subdirectories, and display each and every match showing the file and line number.
Running the above in
pidgin-2.7.1/pidgin
givesgtkmain.c:521:int main(int argc, char *argv[])
. The file gtkmain.c is just under 1000 lines, so maybe not the best place to start.But the principle, of using the command line to search for functions in the code, has helped me in the past work my way around other peoples code (though admittedly, when I suggested this to you, I had not realized Pidgin was as complex as it is).
So I now consider it important to ask: to what end do you wish to understand the code?
Why do you want to edit the code?
Do you wish to provide GUI enhancements, or new features within the backend?
You really need to come up with something concrete to work towards. Run the program and identify something you want to do to it (and maybe let us know too). Once you have identified something through actually using Pidgin that you wish to modify in some way, then you can start looking in the code trying to figure out where that thing happens. Search within the code for text strings which appear in the GUI dialogs, or in the menus, or even the dialog window title.
Once you have found the code for a particular GUI dialog associated with whatever it is you wish to modify, perform another search in the code for references to that GUI dialog, and so on, and so on.
Making inroads into larger projects is not easy.
There is also the more experimental approach of editing a file and changing something, anything, re-compiling, and seeing what effects it might have. Though perhaps not the best of ideas with a networking program ;-)
他们的 .pidgin.im" rel="nofollow noreferrer">开发者跟踪网站。至于“从哪里开始”,您最好进入 Freenode 上的 IRC 频道
#pidgin
并向那里的一些开发人员寻求帮助。即使不能直接帮助您,他们也可能为您指明最佳方向。There is a guide to building on Windows on their developer trac site. And as far as where to "start from", you may be best served going into their IRC channel
#pidgin
on Freenode and asking for help from some of the developers there. They may be able to point you in the best direction if not help you directly.我认为在Linux下编译应该按照手册进行,这会比在Windows下编译容易很多。然后,开始阅读代码中的文档/注释并尝试看看是否可以修改它。
In my opinion, you should follow the manual for compilation in Linux, which will be a lot easier than compiling in Windows. Then, start reading the documentation/comments in the code and try to see if you can modify it.