注释中的“@(#)<filename>”是什么意思?

What does "@(#)<filename>" signify in comments?

我正在查看古老的 Unix 游戏 Rogue 的源代码,我注意到每个文件开头的注释包含以下格式的一行:

@(#)init.c   4.31 (Berkeley) 02/05/99

我以前从未见过“@(#)”符号,而且我在任何地方都找不到对它的解释。谁能告诉我这是什么意思?

自然地,当我偶然发现对名为 Source Code Control System 的旧版本控制系统的引用时,我在发布问题后立即想到了这一点。神秘的评论是一个 "sccsid" 字符串。来自维基百科:

After compilation, this string can be found in binary and object files by looking for the pattern "@(#)" and can be used determine which source code files were used during compilation.

您可能对源代码控制系统感兴趣:https://en.wikipedia.org/wiki/Source_Code_Control_System