![]() |
Eure Datei Header
Ich wüßte mal gerne, wie eure Datei-Header aussehen. Also meiner ist eigentlich ständigen Änderungen unterworfen:
Diesen habe ich lange Zeit verwendet:
Delphi-Quellcode:
Oder ein ganz alter:
(*======================================================================*
| Project : | | Unit : MpuTools.pas | | | | Notes : Contains helper functions for programming without the VCL | | | | | | Copyright (c) 2005, 2006 Michael Puff (MPu) | | Url : [url]http://www.michael-puff.de[/url] | | Mail : [email]mpuff@michael-puff.de[/email] | | | | Authors: | | Manuel Pöter (MPö) | | Url : [url]http://www.manuel-poeter.de[/url] | | Mail : [email]motzi@manuel-poeter.de[/email] | | Nico Bendlin (NBe) | | Url : [url]http://www.bendlins.de/nico[/url] | | Mail : - | | | | Version Date By Description | | ------- ---------- ---- ------------------------------------------| | 1.0 2005-07-08 MPu First release | | 1.1 2005-12-09 NBe LinkerTimeStamp | | 1.2 2006-03-09 MPö Added some Unicode functions | | | *======================================================================*)
Delphi-Quellcode:
Zuir Zeit finde ich den oberen aber etwas lang und die History wurde auch nicht immer gepflegt, so dass sie eigentlich nutzlos wurde.
{************************************************************}
{ } { ExifReader - Version 1.1 } { } { Copyright (c) 2004 Michael Puff } { } { When I die I want 'Hello, world' carved on my headstone. } { } {************************************************************} Ich habe mich gerade für einen etwas schlankeren Header entschieden, den Microsoft so ähnlich auch in seinen Includedateien nutzt:
Delphi-Quellcode:
Alternativ mit der Copyrigth Notic da drunter:
(******************************************************************************
* * * NetAPI -- NetAPI function declarations * * * * Copyright (c) 2006 Michael Puff [url]http://www.michael-puff.de[/url] * * * ******************************************************************************)
Delphi-Quellcode:
(*****************************************************************************
* * * COPYRIGHT NOTICE * * * * Copyright (c) 2001-2006, Michael Puff ["copyright holder(s)"] * * All rights reserved. * * * * Redistribution and use in source and binary forms, with or without * * modification, are permitted provided that the following conditions * * are met: * * * * 1. Redistributions of source code must retain the above copyright * * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * * notice, this list of conditions and the following disclaimer in * * the documentation and/or other materials provided with the * * distribution. * * 3. The name(s) of the copyright holder(s) may not be used to endorse * * or promote products derived from this software without specific * * prior written permission. * * * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * * FORA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * * LIABILITY, OR TORT INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * * POSSIBILITY OF SUCH DAMAGE. * * * ******************************************************************************) |
Re: Eure Datei Header
Moin,
also wenn, wenn überhaupt, was selten vorkommt, da es meistens OS ist kommt nur ein kurzer Header hinein. Deine erste und zweite Variante ist dafür ausreichend. In Programmen für Firmen, Verkauf und oder Veröffentlichungen kommt ein erweiterter Infoheader mit History bzw. Änderungen hinein. |
Re: Eure Datei Header
Moin, moin zusammen,
da ich kaum OpenSource habe, sind die Header markant spartansich. Für ein Projekt wurde jetzt eine automatische Dokumentation gefordert und dafür haben wir Doxygen verwendet. Allerdings nicht um die Routinen herauszulesen sondern nur um die groben Aufgaben der Units in einer Webform generiert zu bekommen. Fazit am Unit-Anfang hängt die Doxygen-Beschreibung mit einigen HTML-Tags. Grüße // Martin |
Re: Eure Datei Header
Postet doch mal ein paar Header, die ihr so benutzt, ich bin da etwas neugierig, weil die verraten ja auch irgendwie die eigene Handschrift beim Programmieren. ;)
|
Re: Eure Datei Header
Delphi-Quellcode:
Mal ein früherer Header von mir, mittlerweile setz ich gar keine mehr ein weil ich nichts OpenSource veröffentliche.
//////////////////////////////////////////////////////////////////
// {Programmname} // // {Version} // // // // © 2005 Pierre // // // // Build with Borland Delphi {Version} // // // // Components - xxxxx // // - xxxxx // // - xxxxx // // - xxxxx // // // // Lizensinfos: // // // // // // Author: Pierre (Mail: xxxxxxx) // // Date: 12.10.2005 // ////////////////////////////////////////////////////////////////// |
Re: Eure Datei Header
Also wenn ich mal n paar Progs an Freunde oder irgendjemand geb, dann sieht das Ding meistens so aus:
Delphi-Quellcode:
jaaa..., so sieht der aus, und manchmal vllt. n bissle hässlicher...
///////////////////////////////////////////////////////////////////////////////
// // // ProgName Version 1.0 // // // // // // (C) by Hux - [url]http://wambo.hux.de[/url] // // Bei Fragen an: [email]HuxXx@arcor.de[/email] // // // // Last Update: 31.02.2006 // // // // // // Benötigte komponenten: // // - blablabla // // - Hab Hunger... // // - Nochmal was // // // // Comments: // // Hallo du mensch, das ist was was ich dir sagen möchte... // // Ich hab Hunger..., deshalb geh ich was essen... // // // /////////////////////////////////////////////////////////////////////////////// Aber ich geb meine Progs au net soooo oft an andere... Also .. Greetz by hux :dp: |
Re: Eure Datei Header
Delphi-Quellcode:
Der Header meines aktuellen Projektes sieht so aus:
{*******************************************************************************
* * * NetStatEx - Ver. 0.5 Beta * * * * This program is Copyright (C) 2006, * * Daniel Gilbert, [url]http://www.danielstools.de[/url] * * * * * * Some parts are taken from: * * * * THE WINAPI32 - TUTORIAL by * * Michael "Luckie" Puff, [url]http://www.luckie-online.de[/url] * * * * "Bounce for Sakura" by * * TurboPASCAL * * * * * * * *******************************************************************************}
Delphi-Quellcode:
Das Lustige ist, das ich eigentlich kaum Header setzte. Wenn, dann muss aber auf jeden Fall ein "*"-Rahmen drumherum sein. :stupid:
{*******************************************************************************
* * * Disc Tranquilizer :: 0.1 Beta * * by Daniel Gilbert, May 2006 * * * * [url]http://www.danielstools.de[/url] * * * * Uses the ARDEO - Engine * * ( © ® ™ by me :D , © 2005 - 2006 ) * * * * Icons are taken from: * * [url]http://www.famfamfam.com[/url] * * * * * * Michi wa chikashi to ie domo, ikazareba itarazu. * *******************************************************************************} |
Re: Eure Datei Header
C#:
Code:
(Huch. Hab meinen Namen gar nicht reingeschrieben... :oops: :mrgreen: )
/*
** ---------------------------------------------- ** | -=[ wtBot ]=- | ** | | ** | Ein mehr oder weniger brauchbarer IRC-Bot | ** | | ** | Created with SharpDevelop | ** ---------------------------------------------- */ |
Re: Eure Datei Header
Zur Zeit meistens der:
Code:
:mrgreen:
/***************************************************************************
* foobar.php * ------------------- * begin : Fri, May 26, 2006 * copyright : (C) 2006 alcaeus * email : alcaeus@*.* * ***************************************************************************/ In Delphi:
Delphi-Quellcode:
Greetz
{------------------------------------------------------------------------------}
{ } { Author: Andreas B. } { Project name: } { Overall Project version: #.# } { Part name: . } { Part version: #.#.#.# } { Module name: } { Filename: <name>.* } { Date created: 2005/mm/dd } { Last modified: 2005/mm/dd } { Description: } { Notes: } { } {------------------------------------------------------------------------------} alcaeus |
Re: Eure Datei Header
Header einer Unit:
Delphi-Quellcode:
Und Footer der Unit (gekürzt):
////////////////////////////////////////////////////////////////////////////////
// // // Classes\Bibliothek.Pas : Implementation der Bibliothek TBibliothek // // Original: maus.cpp/maus.h // // // //////////////////////////////////////////////////////////////////////////////// // // $Id: Bibliothek.pas,v 1.41 2006-03-28 22:41:15+02 muetze1 Exp $ //
Delphi-Quellcode:
Die ID und die Log werden vom RCS automatisch aktualisiert...
// Log List
// // $Log: Bibliothek.pas,v $ // Revision 1.41 2006-03-28 22:41:15+02 muetze1 // renamed Save() to SaveAs() // added Save() // // Revision 1.40 2006-02-26 01:08:41+01 muetze1 // - shortened load/save code due new LoadBIB(), SaveBIB() methods // - some bug fixes // // Revision 1.39 2006-02-11 16:37:29+01 muetze1 // - passing file name to error log entry // - property moved from TFBSElement to TAggregat // // Revision 1.38 2005-11-27 16:44:11+01 muetze1 // small changes // added file extension constants ... |
Re: Eure Datei Header
Also ich habe meißtens so einen:
Code:
In Delphi benutze ich eigentlich nie einen Header, da ich die Sources meißtens nicht veröffentliche.
/***************************************************************************
* functions.php * ------------------- * begin : Friday, Dec 16, 2005 * copyright : (C) 2006 Manuel Faux * email : [email]faux@*.com[/email] * website : [url]www.e-faux.com[/url] * * This program 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 of the License, or * (at your option) any later version. * * version : 2.1 * date : 11:30 2006-05-13 * description : This file is a collection of classes and often * used functions which are important for the whole * page. ***************************************************************************/ Grüße Faux |
Re: Eure Datei Header
Guten Abend!
Mein File-Header sieht so aus:
Delphi-Quellcode:
Eventuell habe ich noch eine Zeile mit der verwendeteten Lizenz (MPL, GPL, etc.).
{*******************************************************}
{ } { PROJEKTNAME } { } { Copyright (c) 2006 Nagl Andreas } { } {*******************************************************} mfg, Andreas |
Re: Eure Datei Header
Das ist so mein aktuelles Muster:
Delphi-Quellcode:
Wobei da nicht genutztes auch weggelassen wird und sowas wie 'ne History/ChangeLog würde dann darunter als eigener Block kommen (nach der Zeile "Unit xxx;"), aber da ich eh nie mit solchen Dingen hinterher komme, gibt's die meistens nicht.
(**FNSFI*Firma/Person*Projektkennung*Dateikennung*Status*Hash** )
(**RF*nötigeDatei*...****************************************** ) (**SF*dazugehörigeDatei*Hash*...******************************* ) ( ) ( Copyright (c) ... ) ( ) ( Project Projektname - Zusatz ) ( Filename Dateiname [Originaldateiname] ) ( Version Version ) ( Date Datum ) ( URL Downloadseite ) ( ) ( Password Passwort ) ( ) (************************************************************** ) ( ) ( Source(s): ) ( ) ( Name [Nickname] Homepage eMail ) ( ) ( >>> more information before the corresponding code sections ) ( >>> {** name(s) - info **} ) ( ) (***************************************************************) Es ist so gestaltet, das es auch "relativ" leicht von 'nem Programm eingelesen werden kann ... 's macht sich halt gut, wenn man die verschiedenen Versionen nicht selber Verwalten muß und ein Überblick welche Datei von Welcher benötigt wird ist auch schon mal ganz praktisch ^^ Hier ma so'n Aktueller.
Delphi-Quellcode:
(**FNSFI*FNSEnt*GEN*MEMORY*USE*1Pval1JdxO%************************** )
(**RF*VERSION*.CONSTS*TYPES*THREAD*INIT*SYSTEM*RESOURCES*BINARY***** ) (**RF*MATHB*FORMS*MSC.WINERROR************************************** ) ( ) ( Copyright (c) 1997-2006 FNS Enterprize's™ ) ( 2003-2006 himitsu @ Delphi-PRAXiS ) ( ) ( Project Generals ) ( Filename FNS_Memory.pas ) ( Version v2.1 ) ( Date 02.05.2006 ) ( ) (******************************************************************* ) ( ) ( Source(s): ) ( ) ( Pierre le Riche [url]http://fastmm.sourceforge.net[/url] [email]plr@psd.co.za[/email] ) ( ) ( >>> more information before the corresponding code sections ) ( >>> {** name(s) -- info **} ) ( ) (********************************************************************) |
Re: Eure Datei Header
Meine Header sehen meist so oder ähnlich aus:
Code:
bzw. mit Lizenz
////////////////////////////////////////////////////////////////////////////////
// // // Release 1.1.0 - 2006-05-25 // // // // Copyright (C) 2006 by Lars Kiesow // // [url]http://www.larskiesow.de[/url] // // // ////////////////////////////////////////////////////////////////////////////////
Code:
Allerdings variiert er auch immer ein wenig.
{
Release: 2006-05-09 Copyright (c) 2006, Lars Kiesow All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } |
Re: Eure Datei Header
wie verhält sich das eigentlich genau mit dem Copyright, reicht ein solcher Header aus um sicherzustellen, dass nichts lizenzwiedrig kopiert werden kann?
Weil eigentlich kann jemand den Code kopieren den Header anpassen und dann steht Aussage gegen Aussage, oder sehe ich das falsch? kann man das irgendwie absichern (eine unfälschbare Signatur oder sowas)? Gruß Frank |
Re: Eure Datei Header
Hi!
Kurz und knapp:
Delphi-Quellcode:
{* Unit myTypes - Frederic Kerber (Email-Adresse)
eigene Typ-Deklarationen, die im Projekt verwendet werden *} Ciao Frederic |
Re: Eure Datei Header
Zitat:
Gruß Frank |
Re: Eure Datei Header
Hi!
Hatte das nicht auf deinen Beitrag sondern allgemein auf das Thema bezogen! Ciao Frederic |
Re: Eure Datei Header
Zitat:
|
Re: Eure Datei Header
Ihr kommt gerade etwas vom Thema ab, glaube ich.
|
Re: Eure Datei Header
Mir fällt grade auf, dass ich die Rangfolgen etwas anpassen könnte. :gruebel:
Delphi-Quellcode:
{
####################################################################### # # # ____ __ __ # # /\ _`\ /\ \ /\ \ # # \ \ \/\_\ ___ \_\ \ __ _____ __ \_\ \ # # \ \ \/_/_ / __`\ /'_` \ /'__`\/\ '__`\ /'__`\ /'_` \ # # \ \ \L\ \/\ \L\ \/\ \L\ \ /\ __/\ \ \L\ \/\ \L\.\_ /\ \L\ \ # # \ \____/\ \____/\ \___,_\\ \____\\ \ ,__/\ \__/.\_\\ \___,_\ # # \/___/ \/___/ \/__,_ / \/____/ \ \ \/ \/__/\/_/ \/__,_ / # # \ \_\ # # \/_/ # # # ####################################################################### # # # Letze Änderung: 15.05.2006 # # Version: 1.0.0.30 # # Autor: Stefan Hollenbach # # Lizenz: General Public License # # # # This program 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 # # of the License, or (at your option) any later version. # # # # This program 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. # # # ####################################################################### } |
Re: Eure Datei Header
Delphi-Quellcode:
:mrgreen:
unit uCommon ;
interface uses uProjectClasses; ... ... |
Re: Eure Datei Header
Ich benutz gar keine Header. Kosten nur Zeit und bringen nichts :D Abgesehen davon entwickel ich auch nicht Open Source.
|
Re: Eure Datei Header
Klassischer Header für die öffentlichen Ein-Unit-Projekte. Ab einer gewissen Größe wird die History in eine eigene Datei ausgelagert...
Delphi-Quellcode:
ps: ich verwende keine Block-Kommentare, da einige Header-Templates u.a. für C und C++ verwendet werden.
////////////////////////////////////////////////////////////////////////////////
// // BIOS Helper for Delphi // // BIOS related utilities for Win32(i386) and Linux // //////////////////////////////////////////////////////////////////////////////// // // The Original Code is: // BiosHelp.pas, released 2001-09-02. // // The Initial Developer of the Original Code is Nico Bendlin. // // Portions created by Nico Bendlin are // Copyright (c) 2001-2005 Nico Bendlin. All Rights Reserved. // // Contributor(s): // Nico Bendlin <nicode@gmx.net> // // The contents of this file are subject to the Mozilla Public License Version // 1.1 (the "License"); you may not use this file except in compliance with the // License. You may obtain a copy of the License at [url]http://www.mozilla.org/MPL/[/url] // // Software distributed under the License is distributed on an "AS IS" basis, // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for // the specific language governing rights and limitations under the License. // // Alternatively, the contents of this file may be used under the terms of // either the GNU General Public License Version 2 or later (the "GPL"), or // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), // in which case the provisions of the GPL or the LGPL are applicable instead // of those above. If you wish to allow use of your version of this file only // under the terms of either the GPL or the LGPL, and not to allow others to // use your version of this file under the terms of the MPL, indicate your // decision by deleting the provisions above and replace them with the notice // and other provisions required by the GPL or the LGPL. If you do not delete // the provisions above, a recipient may use your version of this file under // the terms of any one of the MPL, the GPL or the LGPL. // //////////////////////////////////////////////////////////////////////////////// // // Revision: // // 2003-02-15 2.00 [NicoDE] // - generic dump method completely rewritten // - default range is now E000:0000-F000:FFFF // 2003-03-13 2.10 [NicoDE] // - introduced basic Linux support (/dev/mem) // 2003-04-10 2.20 [NicoDE] // - changes for Borland CBuilder compability // 2005-09-26 3.00 [NicoDE] // - added support for Windows XP x64 Edition // - default range is now C000:0000-F000:FFFF // - rdmAutomatic behavior changed for WinNT! // //////////////////////////////////////////////////////////////////////////////// |
Re: Eure Datei Header
Ach ja ... zu den langen Texten (Copyright / Lizenzinfo und so) ... das liegt bei meinem aktuellen "Großprojekt" in 'ner Extradatei (was ich bei weiteren "Mehrunitprojekten" wohl auch wieder so machen werde ... irgendwie war mir das Platzverschwebdubg in allen Dateien diesen langen Text aufzuführen (vorallem da ich für diesen eh noch keine endgültige Fassung hab, die mir gefällt -.-'')
Zitat:
Also solche Header reichen wohl aus, aber sicherstellen können die halt nüschts. Wie halt schon gesagt wurde, kannst du dann zwar versuchen zu Klagen und mußt dann nur noch irgendwie nachweisen, daß er/sie von dir geklaut hat. |
Re: Eure Datei Header
Also bei mir sieht das derzeit so aus:
Delphi-Quellcode:
Groß Copyright-Infos halt ich für unsinnig das in einen Kommentar reinzupacken,
{-----------------------------------------------------------------------------
Unit Name: blafasel.pas Author: Uwe Rupprecht Date: 21-Mai-2006 Version: 0.0.1 Purpose: class for blafasl History: - Description: class for blafasl, that tut irgendwas -----------------------------------------------------------------------------} da es das ganze einfach nur unübersichtlich macht. Wenn ich (z.B. bei einem OS-Projekt) in eine Unit gug, dann will ich wissen für was die gut ist und nicht unter welcher Lizenz das ganze steht. Dafür sollte eine eigene Textdatei beigefügt werden. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:53 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz