2010-08-21 4 views
1

필자가 본 모든 소프트웨어에는 파일 시작 부분에 저작권 정책이 포함되어 있으며 많은 의견을 말합니다. 따라서 코드를보기 위해 아래로 스크롤해야합니다. 특히 코드 자체가 매우 짧은 경우에는 약간 짜증납니다.저작권 문구의 배치 및 형식이 적절합니까?

파일의 맨 아래에 저작권 선언문을 작성하고 모든 절을 단일 (또는 몇 줄) 줄에 결합하는 것이 더 좋을 것이라고 생각합니다. 이는 공식적인 문제를 해결하는 것일뿐입니다. 읽기 쉬운 버전은 LICENSE 파일에 있습니다.

하지만 지금까지 그런 실습을 보지 못했습니다. 그것은 단지 부족의 관습입니까 아니면 그 이유입니까?

편집 : 여기에 예를 들어 GNU의 STL 라이브러리에서 < 목록 > : 그것은 반드시 사용자 정의 또는 요구 사항은 아니지만

// <list> -*- C++ -*- 

// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 
// 
// This file is part of the GNU ISO C++ Library. This library is free 
// software; you can redistribute it and/or modify it under the 
// terms of the GNU General Public License as published by the 
// Free Software Foundation; either version 2, or (at your option) 
// any later version. 

// This library is distributed in the hope that it will be useful, 
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
// GNU General Public License for more details. 

// You should have received a copy of the GNU General Public License along 
// with this library; see the file COPYING. If not, write to the Free 
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
// USA. 

// As a special exception, you may use this file as part of a free software 
// library without restriction. Specifically, if other files instantiate 
// templates or use macros or inline functions from this file, or you compile 
// this file and link it with other files to produce an executable, this 
// file does not by itself cause the resulting executable to be covered by 
// the GNU General Public License. This exception does not however 
// invalidate any other reasons why the executable file might be covered by 
// the GNU General Public License. 

/* 
* 
* Copyright (c) 1994 
* Hewlett-Packard Company 
* 
* Permission to use, copy, modify, distribute and sell this software 
* and its documentation for any purpose is hereby granted without fee, 
* provided that the above copyright notice appear in all copies and 
* that both that copyright notice and this permission notice appear 
* in supporting documentation. Hewlett-Packard Company makes no 
* representations about the suitability of this software for any 
* purpose. It is provided "as is" without express or implied warranty. 
* 
* 
* Copyright (c) 1996,1997 
* Silicon Graphics Computer Systems, Inc. 
* 
* Permission to use, copy, modify, distribute and sell this software 
* and its documentation for any purpose is hereby granted without fee, 
* provided that the above copyright notice appear in all copies and 
* that both that copyright notice and this permission notice appear 
* in supporting documentation. Silicon Graphics makes no 
* representations about the suitability of this software for any 
* purpose. It is provided "as is" without express or implied warranty. 
*/ 

/** @file list 
* This is a Standard C++ Library header. You should @C#include this header 
* in your programs, rather than any of the "st[dl]_*.h" implementation files. 
*/ 

#ifndef _GLIBCXX_LIST 
#define _GLIBCXX_LIST 1 

#pragma GCC system_header 

#include <bits/functexcept.h> 
#include <bits/stl_algobase.h> 
#include <bits/allocator.h> 
#include <bits/stl_construct.h> 
#include <bits/stl_uninitialized.h> 
#include <bits/stl_list.h> 

#ifndef _GLIBCXX_EXPORT_TEMPLATE 
# include <bits/list.tcc> 
#endif 

#ifdef _GLIBCXX_DEBUG 
# include <debug/list> 
#endif 

#endif /* _GLIBCXX_LIST */ 

답변

1

는, 표준 코멘트 코드 정의를 진행해야한다고 지시하는 경향이있다. 예를 들어 NDOC notation을 살펴보십시오.

저작권의 경우 일반적으로 코드를 사용하기 전에 사람들이 읽고 싶어합니다. EULA는 항상 설치자의으로 표시됩니다. 저작권 고지가 코드 정의 맨 아래에 있으면 간과 될 가능성이 있습니다.

+0

그래도 나는 보통 문서 주석이 아닌 라이센스 통지에 관한 내용입니다. – doc

+0

그럼에도 불구하고 사람들은 자신이 아는 것에 집중하는 경향이 있습니다. 대다수의 사람들이 저작권에 자신의 저작권을 부여합니다. 왜 그렇습니까? 개인적으로, 나는 그것을 밑바닥에 두는 것에있어 아무 잘못도 보이지 않지만, 다른 모든 사람들이 다리에서 뛰어 내리고 있다면, 당신도 그들과 함께 할 수있을 것입니다, 그렇습니까? = p –

0

저작권 주석을 파일의 시작 부분에 넣으면 누군가가 파일을 열 때 저작권 진술이 표시됩니다 (누가 파일을 열면 마지막으로 방문한 행으로 자동으로 이동하는 편집기를 사용하지 않습니다). 저작권 주석이 파일의 맨 아래에 놓이게되면, 사람들은 저작권을보기 위해 끝까지 스크롤해야 할 것입니다. 저작권은 누군가가 관심을 가져야 할 첫 번째 것입니다.

+0

라이선스 정보를 얻기 위해 모든 출처를 읽었습니까? 문서, 웹 사이트 또는 LICENSE 파일과 같은 다른 장소에서 특정 소프트웨어의 라이센스에 대한 정보를 얻습니다. 내가 특정 소프트웨어의 개발에 관심이 있다면 어쨌든 저작권 고지를 발견 할 것입니다. 파일을 열 때마다 저작권을 보지 않고 코드에 쉽게 액세스 할 수있는 이점이 있습니다. – doc

+0

@doc : 소스 파일에 저작권 의견이있는 경우 그 것에 우선 순위를 부여합니다. 경우에 따라 프로그램에 전체 라이센스와 다른 (또는 약간 다른) 라이센스가있는 소스 파일을 포함하거나 파일을 다른 사람이 작성한 것일 수 있습니다. 이 경우 저작권 (또는 라이센스) 주석은 다른 장소에서보고 된 것과 다를 수 있습니다. – kiamlaluno