diff --git a/ChangeLog.txt b/ChangeLog.txt index 5d728a2ecb..22e67b07c5 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,46 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-04-08 00:52 UTC+0200 Viktor Szakats (harbour syenar.net) + * bin/check.hb + + will now check for missing copyright/license message + in source files (except for tests and files shorter + than 20 lines) + + * contrib/hbamf/amf.h + * contrib/hbamf/amfstdio.c + * contrib/hbamf/hbamfobj.prg + * contrib/hbamf/hbcls.c + * contrib/hbgt/strasint.c + * contrib/hbhttpd/core.prg + * contrib/hbhttpd/widgets.prg + * contrib/hbmisc/hbedit.prg + * contrib/hbmisc/hbeditc.c + * contrib/hbmisc/stringsx.c + * contrib/hbmisc/udpds.prg + * contrib/hbnf/aredit.prg + * contrib/hbnf/easter.prg + * contrib/hbnf/mouse1.prg + * contrib/xhb/hbsyslog.c + * extras/guestbk/_cgi.prg + * extras/guestbk/_inifile.prg + * extras/guestbk/cgi.ch + * extras/hbdroid/hvminit.c + * extras/hbdroid/msginfo.c + * extras/hbusb/core.c + * extras/hbvpdf/hbvpdf.ch + + added copyright/license headers where missing + + * tests/inifiles.prg + + synced with another copy + + * include/hbclass.ch + * src/compiler/expropta.c + * src/compiler/exproptb.c + * src/macro/macroa.c + * src/macro/macrob.c + * minor cleanup + 2013-04-07 22:41 UTC+0200 Viktor Szakats (harbour syenar.net) * bin/commit.hb + do not add new empty entry template if one already diff --git a/bin/check.hb b/bin/check.hb index 2fcb9c4e69..a4b20f0463 100644 --- a/bin/check.hb +++ b/bin/check.hb @@ -145,6 +145,7 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) LOCAL aCanHaveIdent LOCAL hAllowedExt := LoadGitattributes( @aCanHaveIdent ) + LOCAL nLines /* TODO: extend as you go */ LOCAL hDoNotProcess := { ; @@ -214,7 +215,7 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) ENDIF ENDIF - cEOL := EOLDetect( cFile ) + cEOL := EOLDetect( cFile, @nLines ) IF Len( cEOL ) == 0 AAdd( aErr, "content: has mixed EOL types" ) @@ -288,9 +289,20 @@ STATIC FUNCTION CheckFile( cName, /* @ */ aErr, lApplyFixes ) ENDIF ENDIF + IF "|" + hb_FNameExt( cName ) + "|" $ "|.c|.h|.api|.prg|.hb|.ch|" .AND. ; + nLines > 20 .AND. ; + ! hb_DirSepToOS( "tests/" ) $ hb_FNameDir( cName ) .AND. ; + ! hb_DirSepToOS( "src/codepage/" ) $ hb_FNameDir( cName ) .AND. ; + ! hb_DirSepToOS( "src/lang/" ) $ hb_FNameDir( cName ) .AND. ; + ! "public domain" $ Lower( cFile ) .AND. ; + ! "copyright" $ Lower( cFile ) .AND. ; + ! "license" $ Lower( cFile ) + AAdd( aErr, "content: source code missing copyright/license" ) + ENDIF + IF "|" + hb_FNameExt( cName ) + "|" $ "|.c|.h|.api|" IF "//" $ StripCStrings( StripCComments( cFile ) ) - AAdd( aErr, "content: C file with C++ coment" ) + AAdd( aErr, "content: C file with C++ comment" ) ENDIF ENDIF ENDIF @@ -409,7 +421,7 @@ STATIC FUNCTION IsASCII7( cString, /* @ */ nChar ) RETURN .T. -STATIC FUNCTION EOLDetect( cFile ) +STATIC FUNCTION EOLDetect( cFile, /* @ */ nLines ) LOCAL nCR := 0 LOCAL nLF := 0 @@ -424,15 +436,21 @@ STATIC FUNCTION EOLDetect( cFile ) NEXT IF nCR > 0 .AND. nLF == 0 + nLines := nCR RETURN Chr( 13 ) ELSEIF nCR == 0 .AND. nLF > 0 + nLines := nLF RETURN Chr( 10 ) ELSEIF nCR == 0 .AND. nLF == 0 + nLines := 0 RETURN "binary" ELSEIF nCR == nLF + nLines := nCR RETURN Chr( 13 ) + Chr( 10 ) ENDIF + nLines := -1 + RETURN "" STATIC FUNCTION EndingWhitespace( cFile ) diff --git a/contrib/hbamf/amf.h b/contrib/hbamf/amf.h index 8d0ed99fe5..f9447f43b0 100644 --- a/contrib/hbamf/amf.h +++ b/contrib/hbamf/amf.h @@ -1,12 +1,51 @@ -/******* +/* + * Harbour Project source code: + * AMF3 headers + * Based on a AmFast C library for Python by Dave Thompson * - * Aleksander Czajczynski 2011-2012 + * Copyright 2011-2012 Aleksander Czajczynski + * www - http://harbour-project.org * - * AMF3 headers + * 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, or (at your option) + * any later version. * - * Based on a AmFast C library for Python by Dave Thompson + * 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. * - ********/ + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #ifndef __HBAMF_H #define __HBAMF_H diff --git a/contrib/hbamf/amfstdio.c b/contrib/hbamf/amfstdio.c index ed95ab55a4..29b5eb9f9a 100644 --- a/contrib/hbamf/amfstdio.c +++ b/contrib/hbamf/amfstdio.c @@ -1,11 +1,51 @@ -/******* +/* + * Harbour Project source code: + * Reading AMFIO data from standard input pipe * - * by Ilina Stoilkovska 2011 - * Aleksander Czajczynski 2012 + * Copyright 2011 Ilina Stoilkovska + * Copyright 2012 Aleksander Czajczynski + * www - http://harbour-project.org * - * Reading AMFIO data from standard input pipe + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #include "hbapi.h" #include "hbapiitm.h" diff --git a/contrib/hbamf/hbamfobj.prg b/contrib/hbamf/hbamfobj.prg index 5056589226..6b80f27359 100644 --- a/contrib/hbamf/hbamfobj.prg +++ b/contrib/hbamf/hbamfobj.prg @@ -1,12 +1,51 @@ -/******* -* -* Ilina Stoilkovska 2011 -* Aleksander Czajczynski 2011-2012 -* -* Basic routines for communications using AMFIO -* over standard IO pipes and TCP/IP -* -********/ +/* + * Harbour Project source code: + * Basic routines for communications using AMFIO over standard IO pipes and TCP/IP + * + * Copyright 2011-2012 Aleksander Czajczynski + * Copyright 2011 Ilina Stoilkovska + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #include "hbclass.ch" diff --git a/contrib/hbamf/hbcls.c b/contrib/hbamf/hbcls.c index 8565de4016..022af67eba 100644 --- a/contrib/hbamf/hbcls.c +++ b/contrib/hbamf/hbcls.c @@ -1,10 +1,50 @@ -/******* +/* + * Harbour Project source code: + * Some class support functions for AMF3 (de)serialization * - * by Aleksander Czajczynski 2011 + * Copyright 2011 Aleksander Czajczynski + * www - http://harbour-project.org * - * Some class support functions for AMF3 (de)serialization + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #include "hbapi.h" #include "hbapiitm.h" diff --git a/contrib/hbgt/strasint.c b/contrib/hbgt/strasint.c index c3f4d80055..5164017ff3 100644 --- a/contrib/hbgt/strasint.c +++ b/contrib/hbgt/strasint.c @@ -3,6 +3,9 @@ * Syntax..: int _GT_Internal_StringAsInt(char *String, int Start, int End) * Usage...: Convert a numeric value in a string to an int value. * By......: David A Pearson +* +* This is an original work by David A Pearson and is placed in the +* public domain. */ #include "hbapi.h" diff --git a/contrib/hbhttpd/core.prg b/contrib/hbhttpd/core.prg index 1231166e49..b4b90c7eaa 100644 --- a/contrib/hbhttpd/core.prg +++ b/contrib/hbhttpd/core.prg @@ -1,3 +1,7 @@ +/* + * Copyright 2009 Mindaugas Kavaliauskas + * www - http://harbour-project.org + */ #include "hbclass.ch" #include "error.ch" diff --git a/contrib/hbhttpd/widgets.prg b/contrib/hbhttpd/widgets.prg index dde350a375..a381bb9c35 100644 --- a/contrib/hbhttpd/widgets.prg +++ b/contrib/hbhttpd/widgets.prg @@ -1,3 +1,7 @@ +/* + * Copyright 2009 Mindaugas Kavaliauskas + * www - http://harbour-project.org + */ #include "hbclass.ch" diff --git a/contrib/hbmisc/hbedit.prg b/contrib/hbmisc/hbedit.prg index 1e642cc445..0c0b57803b 100644 --- a/contrib/hbmisc/hbedit.prg +++ b/contrib/hbmisc/hbedit.prg @@ -1,3 +1,7 @@ +/* + * Copyright 1999 Ryszard Glab + * www - http://harbour-project.org + */ #include "inkey.ch" #include "setcurs.ch" diff --git a/contrib/hbmisc/hbeditc.c b/contrib/hbmisc/hbeditc.c index 66f9af63fd..f5a5376e64 100644 --- a/contrib/hbmisc/hbeditc.c +++ b/contrib/hbmisc/hbeditc.c @@ -1,3 +1,8 @@ +/* + * Copyright 1999 Ryszard Glab + * www - http://harbour-project.org + */ + /* Known bugs: ---------- diff --git a/contrib/hbmisc/stringsx.c b/contrib/hbmisc/stringsx.c index e71437d20e..efa7940e81 100644 --- a/contrib/hbmisc/stringsx.c +++ b/contrib/hbmisc/stringsx.c @@ -1,3 +1,7 @@ +/* + * Copyright 1999 {list of individual authors and e-mail addresses} + * www - http://harbour-project.org + */ #include "hbapi.h" diff --git a/contrib/hbmisc/udpds.prg b/contrib/hbmisc/udpds.prg index e0cdf8a791..e7b0446317 100644 --- a/contrib/hbmisc/udpds.prg +++ b/contrib/hbmisc/udpds.prg @@ -1,3 +1,8 @@ +/* + * Copyright 2010 Mindaugas Kavaliauskas + * www - http://harbour-project.org + */ + /* * This module demonstrates a simple UDP Discovery Server * diff --git a/contrib/hbnf/aredit.prg b/contrib/hbnf/aredit.prg index 1f8f576f1a..d994f94677 100644 --- a/contrib/hbnf/aredit.prg +++ b/contrib/hbnf/aredit.prg @@ -2,6 +2,8 @@ * Author....: James J. Orlowski, M.D. * CIS ID....: 72707,601 * + * This is an original work by James Orlowski and is placed in the + * public domain. * * Modification history: * --------------------- diff --git a/contrib/hbnf/easter.prg b/contrib/hbnf/easter.prg index 2e1a0b6a7f..4e9a41a5f3 100644 --- a/contrib/hbnf/easter.prg +++ b/contrib/hbnf/easter.prg @@ -4,8 +4,7 @@ * * While I can say that I wrote the program, the algorithm is from Donald * Knuth's The Art of Computer Programming, Section 1.3.2. So, the source - * code is an original work by Paul Tucker and is placed in the public - * domain + * code is an original work by Paul Tucker and is placed in the public domain * * Modification history: * --------------------- diff --git a/contrib/hbnf/mouse1.prg b/contrib/hbnf/mouse1.prg index 67a1695cab..88d0b50c40 100644 --- a/contrib/hbnf/mouse1.prg +++ b/contrib/hbnf/mouse1.prg @@ -1,3 +1,7 @@ +/* + * The functions contained herein are the work of Viktor Szakats based + * on previous versions, all placed in the public domain. + */ THREAD STATIC t_lCrsState := .F. THREAD STATIC t_lMInit := .F. @@ -70,7 +74,6 @@ FUNCTION ft_MDblClk( nClick, nButton, nInterval, nRow, nCol, nStart ) RETURN lDouble FUNCTION ft_MInRegion( nTR, nLC, nBR, nRC ) - RETURN ; MRow() >= nTR .AND. MRow() <= nBR .AND. ; MCol() >= nLC .AND. MCol() <= nRC @@ -93,7 +96,6 @@ FUNCTION ft_MGetPos( /* @ */ nX, /* @ */ nY ) iif( hb_MMiddleDown(), 4, 0 ) FUNCTION ft_MSetPos( nX, nY ) - RETURN MSetPos( nX / 8, nY / 8 ) FUNCTION ft_MGetCoord( /* @ */ nX, /* @ */ nY ) @@ -107,7 +109,6 @@ FUNCTION ft_MGetCoord( /* @ */ nX, /* @ */ nY ) iif( hb_MMiddleDown(), 4, 0 ) FUNCTION ft_MSetCoord( nX, nY ) - RETURN MSetPos( nX, nY ) FUNCTION ft_MSetSens( nHoriz, nVert, nDouble ) @@ -209,15 +210,12 @@ FUNCTION ft_MYLimit( nMin, nMax ) horizontal position (col) as Y. [vszakats] */ FUNCTION ft_MGetX() - RETURN MRow() FUNCTION ft_MGetY() - RETURN MCol() FUNCTION ft_MGetPage() - RETURN 0 /* NOTE: Page is ignored in Harbour */ diff --git a/contrib/xhb/hbsyslog.c b/contrib/xhb/hbsyslog.c index 92ecabf5e7..3eaef763d2 100644 --- a/contrib/xhb/hbsyslog.c +++ b/contrib/xhb/hbsyslog.c @@ -1,5 +1,49 @@ /* - Event logging system + * Harbour Project source code: + * Event logging system + * + * Copyright 2004 Giancarlo Niccolai + * www - http://www.xharbour.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * */ #include "hbapi.h" diff --git a/extras/guestbk/_cgi.prg b/extras/guestbk/_cgi.prg index bf30a980bb..61633a637c 100644 --- a/extras/guestbk/_cgi.prg +++ b/extras/guestbk/_cgi.prg @@ -1,3 +1,50 @@ +/* + * Harbour Project source code + * + * Copyright (C) 1999 Eddie Runia + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + /* * * Harbour Test of a CGI/HTML-Generator class. diff --git a/extras/guestbk/_inifile.prg b/extras/guestbk/_inifile.prg index 31b3db1672..fc7084b444 100644 --- a/extras/guestbk/_inifile.prg +++ b/extras/guestbk/_inifile.prg @@ -1,3 +1,49 @@ +/* + * Harbour Project source code + * + * Copyright (C) 1999 Matthew Hamilton + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #include "fileio.ch" #include "hbclass.ch" @@ -274,9 +320,9 @@ METHOD ReadSections() CLASS TIniFile METHOD PROCEDURE UpdateFile() CLASS TIniFile - LOCAL i, j, hFile + LOCAL i, j - hFile := FCreate( ::Filename ) + LOCAL hFile := FCreate( ::Filename ) FOR i := 1 TO Len( ::Contents ) IF ::Contents[ i ][ 1 ] == NIL diff --git a/extras/guestbk/cgi.ch b/extras/guestbk/cgi.ch index f288828e6c..ceecfd9c44 100644 --- a/extras/guestbk/cgi.ch +++ b/extras/guestbk/cgi.ch @@ -1,3 +1,49 @@ +/* + * Harbour Project source code + * + * Copyright (C) 1999 Eddie Runia + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #define CGI_SERVER_SOFTWARE 1 #define CGI_SERVER_NAME 2 diff --git a/extras/hbdroid/hvminit.c b/extras/hbdroid/hvminit.c index 0f6cbf976c..794be02030 100644 --- a/extras/hbdroid/hvminit.c +++ b/extras/hbdroid/hvminit.c @@ -1,3 +1,49 @@ +/* + * Harbour Project source code + * + * Copyright (C) 2012 {list of individual authors and e-mail addresses} + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #include "hbapi.h" #include "hbvm.h" diff --git a/extras/hbdroid/msginfo.c b/extras/hbdroid/msginfo.c index 5f181fcd90..7fe6e69a42 100644 --- a/extras/hbdroid/msginfo.c +++ b/extras/hbdroid/msginfo.c @@ -1,3 +1,49 @@ +/* + * Harbour Project source code + * + * Copyright (C) 2012 {list of individual authors and e-mail addresses} + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #include "hbapi.h" #include "hbapistr.h" diff --git a/extras/hbusb/core.c b/extras/hbusb/core.c index fb7fb94999..1b8b172a4d 100644 --- a/extras/hbusb/core.c +++ b/extras/hbusb/core.c @@ -1,3 +1,50 @@ +/* + * Harbour Project source code + * + * Copyright (C) 2012 Doug (dougf at people dot net dot au) + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + /* TODO: change raw pointers to GC collected ones? */ #include "hbapi.h" diff --git a/extras/hbvpdf/hbvpdf.ch b/extras/hbvpdf/hbvpdf.ch index 170dfa3276..7566615737 100644 --- a/extras/hbvpdf/hbvpdf.ch +++ b/extras/hbvpdf/hbvpdf.ch @@ -1,3 +1,4 @@ +/* Copyright andvit@sympatico.ca */ #ifndef HBVPDF_CH #define HBVPDF_CH diff --git a/include/hbclass.ch b/include/hbclass.ch index 805eb3a948..c77440baff 100644 --- a/include/hbclass.ch +++ b/include/hbclass.ch @@ -3,10 +3,8 @@ * Header file for Class commands * * Copyright 1999 Antonio Linares - * * Copyright 2006 Przemyslaw Czerpak * most of rules rewritten - * * www - http://harbour-project.org * * This program is free software; you can redistribute it and/or modify diff --git a/src/compiler/expropta.c b/src/compiler/expropta.c index 830f9ac877..d2de8e5424 100644 --- a/src/compiler/expropta.c +++ b/src/compiler/expropta.c @@ -1,6 +1,5 @@ /* hbexpra.c is also included from ../macro/macro.c * However it produces a slighty different code if used in * macro compiler (there is an additional parameter passed to some functions) - * 1.23 - ignore this magic number - this is used to force compilation */ #include "hbexpra.c" diff --git a/src/compiler/exproptb.c b/src/compiler/exproptb.c index 457757ab02..c73c243755 100644 --- a/src/compiler/exproptb.c +++ b/src/compiler/exproptb.c @@ -1,6 +1,5 @@ /* hbexprb.c is also included from ../macro/macro.c * However it produces a slighty different code if used in * macro compiler (there is an additional parameter passed to some functions) - * 1.20 - ignore this magic number - this is used to force compilation */ #include "hbexprb.c" diff --git a/src/macro/macroa.c b/src/macro/macroa.c index 5522ebc2ee..fd19309f13 100644 --- a/src/macro/macroa.c +++ b/src/macro/macroa.c @@ -1,8 +1,7 @@ /* hbexpra.c is also included from ../compiler/expropta.c * However it produces a slighty different code if used in * macro compiler (there is an additional parameter passed to some functions) - * 1.21 - ignore this magic number - this is used to force compilation -*/ + */ #define HB_MACRO_SUPPORT diff --git a/src/macro/macrob.c b/src/macro/macrob.c index 6d14be38a6..791cb029e1 100644 --- a/src/macro/macrob.c +++ b/src/macro/macrob.c @@ -1,8 +1,7 @@ /* hbexprb.c is also included from ../compiler/exproptb.c * However it produces a slighty different code if used in * macro compiler (there is an additional parameter passed to some functions) - * 1.18 - ignore this magic number - this is used to force compilation -*/ + */ #define HB_MACRO_SUPPORT diff --git a/tests/inifiles.prg b/tests/inifiles.prg index 85c83d18c9..fc7084b444 100644 --- a/tests/inifiles.prg +++ b/tests/inifiles.prg @@ -1,36 +1,53 @@ +/* + * Harbour Project source code + * + * Copyright (C) 1999 Matthew Hamilton + * www - http://harbour-project.org + * + * 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, 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. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.txt. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ #include "fileio.ch" #include "hbclass.ch" -PROCEDURE Main( cFilename, cSection ) - - LOCAL oIni - LOCAL s, n - - hb_default( @cFilename, "harbour.ini" ) - hb_default( @cSection, "1" ) - - oIni := TIniFile():New( cFileName ) - n := Val( cSection ) - - ? - ? "Sections:" - s := oIni:ReadSections() - AEval( s, {| x | QOut( "[" + x + "]" ) } ) - - ? - ? "[" + s[ n ] + "]" - s := oIni:ReadSection( s[ n ] ) - AEval( s, {| x | QOut( x ) } ) - - oIni:WriteDate( "Date Test", "Today", Date() ) - oIni:WriteBool( "Bool Test", "True", .T. ) - ? oIni:ReadBool( "Bool Test", "True", .F. ) - - oIni:UpdateFile() - - RETURN - CREATE CLASS TIniFile VAR FileName