prolint-cvs Mailing List for Prolint
Brought to you by:
johnallengreen,
jurjen
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(22) |
Sep
(22) |
Oct
(40) |
Nov
(16) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(3) |
Feb
(1) |
Mar
(3) |
Apr
(43) |
May
(4) |
Jun
(1) |
Jul
|
Aug
|
Sep
(14) |
Oct
(24) |
Nov
(17) |
Dec
(20) |
2005 |
Jan
(4) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
(2) |
Feb
|
Mar
(18) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(11) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <ju...@us...> - 2006-09-20 21:31:53
|
Revision: 281 http://svn.sourceforge.net/prolint/?rev=281&view=rev Author: jurjen Date: 2006-09-20 14:31:44 -0700 (Wed, 20 Sep 2006) Log Message: ----------- (just testing the new svn repository) Modified Paths: -------------- trunk/prolint/help/opensource.htxt Modified: trunk/prolint/help/opensource.htxt =================================================================== --- trunk/prolint/help/opensource.htxt 2006-08-09 20:44:51 UTC (rev 280) +++ trunk/prolint/help/opensource.htxt 2006-09-20 21:31:44 UTC (rev 281) @@ -1,6 +1,6 @@ <h1>The Prolint Open Source Project</h1> Prolint is maintained at:<br> -<a href="http://sourceforge.net/projects/prolint"><img src="http://sourceforge.net/sflogo.php?group_id=61115&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"></a> +<a href="http://oehive.org/prolint">http://oehive.org</a> <h2>Why Open Source</h2> One of the reasons is that the usefulness of Prolint will increase with the number of rules. The expectation is that the community can add rules much faster and smarter than one single person. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-09 20:45:16
|
Revision: 280 Author: jurjen Date: 2006-08-09 13:44:51 -0700 (Wed, 09 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=280&view=rev Log Message: ----------- Give a hint when the protools.dat file was not found, instead of silently fail Modified Paths: -------------- trunk/prolint/core/add2protools.p Modified: trunk/prolint/core/add2protools.p =================================================================== --- trunk/prolint/core/add2protools.p 2006-08-05 21:35:04 UTC (rev 279) +++ trunk/prolint/core/add2protools.p 2006-08-09 20:44:51 UTC (rev 280) @@ -25,7 +25,12 @@ GET-KEY-VALUE SECTION "ProTools" KEY "FunctionDefs" VALUE ProtoolsDatfile. -IF ProtoolsDatfile=? THEN RETURN. +IF ProtoolsDatfile=? OR ProtoolsDatfile="" THEN DO: + MESSAGE "Prolint cannot find the location of file 'protools.dat'" SKIP + "You probably have to use the standard PRO*Tools Customization dialog first, to specify that you want to save the palette position." + VIEW-AS ALERT-BOX INFORMATION. + RETURN. +END. /* read protools.dat */ INPUT FROM VALUE(ProtoolsDatfile). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-05 21:35:27
|
Revision: 279 Author: jurjen Date: 2006-08-05 14:35:04 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=279&view=rev Log Message: ----------- Release 65 Added Paths: ----------- tags/release_65/ Copied: tags/release_65 (from rev 278, trunk/prolint) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-05 19:58:18
|
Revision: 278 Author: jurjen Date: 2006-08-05 12:58:10 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=278&view=rev Log Message: ----------- Finishing release 65 Modified Paths: -------------- trunk/prolint/help/history.htxt trunk/prolint/help/release.ini trunk/prolint/regrtest/expect.log Modified: trunk/prolint/help/history.htxt =================================================================== --- trunk/prolint/help/history.htxt 2006-08-05 18:23:35 UTC (rev 277) +++ trunk/prolint/help/history.htxt 2006-08-05 19:58:10 UTC (rev 278) @@ -8,7 +8,21 @@ - what are the names of the various outputfiles for each outputhandler? - when running TTY, how do you change settings? --> +<h5>prolint release 65, 5 August 2006:</h5> +<ul> +<li>rule "findstate": fixed false positives that occured when the +unique index has a boolean field and the WHERE clause contains +something like "NOT thelogicalfield"</li> +<li>Hardened the regression test. The regression test now requires a +database named "prolintest.db" located in directoy +prolint/regrtest/db. A dictionary file is provided</li> +<li>tested with Proparse version 3.0b which was released this week</i> +<li>drastic housekeeping in the directories. The root of prolint is +now almost empty: most stuff is now stored in the new subdirectories prolint/core and +prolint/launch, some stuff is simply deleted</li> +</ul> + <h5>prolint release 64, 14 March 2006:</h5> <b>Important: Prolint 64 does not run in Progress version 8 anymore. Modified: trunk/prolint/help/release.ini =================================================================== --- trunk/prolint/help/release.ini 2006-08-05 18:23:35 UTC (rev 277) +++ trunk/prolint/help/release.ini 2006-08-05 19:58:10 UTC (rev 278) @@ -1,2 +1,2 @@ [current] -prolint=64 +prolint=65 Modified: trunk/prolint/regrtest/expect.log =================================================================== --- trunk/prolint/regrtest/expect.log 2006-08-05 18:23:35 UTC (rev 277) +++ trunk/prolint/regrtest/expect.log 2006-08-05 19:58:10 UTC (rev 278) @@ -80,6 +80,7 @@ rule=dotcomment; source=prolint/regrtest/dotcomment.i; line= 6; descr=PERIOD comments a statement rule=dotcomment; source=prolint/regrtest/dotcomment.i; line= 16; descr=PERIOD comments a statement rule=dotcomment; source=prolint/regrtest/dotcomment.i; line= 19; descr=PERIOD comments a statement +rule=dotcomment; source=prolint/regrtest/dotcomment.i; line= 23; descr=PERIOD comments a statement rule=emptyblock; source=prolint/regrtest/abbrevkwd.i; line= 61; descr=Empty FOR block rule=emptyblock; source=prolint/regrtest/blocklabel.i; line= 36; descr=Empty DO block rule=emptyblock; source=prolint/regrtest/nocomment.i; line= 114; descr=Empty PROCEDURE block @@ -104,6 +105,7 @@ rule=findstate-tt; source=prolint/regrtest/nowhere.i; line= 12; descr=FIND tt_nowhere statement defined without qualifer [ FIRST | LAST | NEXT | PREV | CURRENT ] rule=findstate-tt; source=prolint/regrtest/wholeindex.i; line= 18; descr=FIND tt_wholeindex statement defined without qualifer [ FIRST | LAST | NEXT | PREV | CURRENT ] rule=findstate-tt; source=prolint/regrtest/wholeindex.i; line= 21; descr=FIND buf_wholeindex statement defined without qualifer [ FIRST | LAST | NEXT | PREV | CURRENT ] +rule=findstate; source=prolint/regrtest/findstate.i; line= 18; descr=FIND testtable1 statement defined without qualifer [ FIRST | LAST | NEXT | PREV | CURRENT ] rule=findstate; source=prolint/regrtest/wholeindex.i; line= 15; descr=FIND buf_customer statement defined without qualifer [ FIRST | LAST | NEXT | PREV | CURRENT ] rule=fnusage; source=prolint/regrtest/varusage.i; line= 114; descr=External Function udf_varusage_2() is prototyped but not called in current program rule=groupassign; source=prolint/regrtest/abbrevkwd.i; line= 31; descr=Possibly group ASSIGN with line 27 @@ -146,7 +148,7 @@ rule=idiskeyword; source=prolint/regrtest/idiskeyword.p; line= 22; descr=name of index 'key' is a keyword rule=idiskeyword; source=prolint/regrtest/idiskeyword.p; line= 25; descr=name of buffer 'border-b' is a keyword rule=idiskeyword; source=prolint/regrtest/vardef.p; line= 8; descr=name of variable 'Name' is a keyword -rule=ifindent1; source=prolint/regrtest/dotcomment.i; line= 23; descr=#101: Node blablabla has greater indent than IF on line 22. Expected to be 0, is 1. +rule=ifindent1; source=prolint/regrtest/dotcomment.i; line= 24; descr=#101: Node MESSAGE has greater indent than IF on line 22. Expected to be 0, is 3. rule=ifindent1; source=prolint/regrtest/ifindent.i; line= 27; descr=#101: Node IF has greater indent than IF on line 25. Expected to be 0, is 2. rule=ifindent1; source=prolint/regrtest/ifindent.i; line= 28; descr=#102: More indent expected for node ELSE. Node's indent should be at least 2, is 0. rule=ifindent1; source=prolint/regrtest/ifindent.i; line= 44; descr=#101: Node vd2 has greater indent than IF on line 42. Expected to be 0, is 4. @@ -209,12 +211,9 @@ rule=lexcolon; source=prolint/regrtest/undoretry.p; line= 21; descr=DO block header should terminate with a COLON rule=lexcolon; source=prolint/regrtest/vardef.p; line= 22; descr=FUNCTION block header should terminate with a COLON rule=maxchar; source=prolint/regrtest/test4.p; line= 6; descr=String constant too long for Tranman (max 188) -rule=message; source=prolint/regrtest/dotcomment.i; line= 6; descr=use MESSAGE only in debug-mode -rule=message; source=prolint/regrtest/dotcomment.i; line= 9; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/dotcomment.i; line= 11; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/dotcomment.i; line= 13; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/dotcomment.i; line= 14; descr=use MESSAGE only in debug-mode -rule=message; source=prolint/regrtest/dotcomment.i; line= 16; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/dotcomment.i; line= 24; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/ifindentextra.i; line= 1; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/ifindentextra.i; line= 13; descr=use MESSAGE only in debug-mode @@ -229,12 +228,9 @@ rule=message; source=prolint/regrtest/strattrib.i; line= 60; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/vardef.p; line= 10; descr=use MESSAGE only in debug-mode rule=messagetype; source=prolint/regrtest/defaultname.w; line= 364; descr=ALERT BOX is missing alert type -rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 6; descr=ALERT BOX is missing alert type -rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 9; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 11; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 13; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 14; descr=ALERT BOX is missing alert type -rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 16; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/message.i; line= 6; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/message.i; line= 11; descr=ALERT BOX is missing alert type rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 4; descr= VARIABLE abbrev1 CHARACTER scope MAIN should start with "g" @@ -254,6 +250,7 @@ rule=nameconv; source=prolint/regrtest/do1.i; line= 3; descr= VARIABLE do1_1 INTEGER scope MAIN should start with "g" rule=nameconv; source=prolint/regrtest/do1.i; line= 4; descr= VARIABLE do1_2 INTEGER scope MAIN should start with "g" rule=nameconv; source=prolint/regrtest/dotcomment.i; line= 4; descr= VARIABLE dotcomment DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/findstate.i; line= 9; descr= VARIABLE v LOGICAL scope MAIN should start with "g" rule=nameconv; source=prolint/regrtest/i18nlength.i; line= 5; descr= VARIABLE i18nlength_1 CHARACTER scope MAIN should start with "g" rule=nameconv; source=prolint/regrtest/i18nlength.i; line= 6; descr= VARIABLE i18nlength_2 INTEGER scope MAIN should start with "g" rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 5; descr= VARIABLE X DECIMAL scope MAIN should start with "g" @@ -417,7 +414,6 @@ rule=nocomment; source=prolint/regrtest/nocomment.i; line= 114; descr=PROCEDURE ip_nocomment_7 is not commented rule=nocomment; source=prolint/regrtest/nocomment.i; line= 114; descr=PROCEDURE ip_nocomment_7 is not commented rule=nocomment; source=prolint/regrtest/vardef.p; line= 22; descr=function func1 is not commented -rule=noeffect; source=prolint/regrtest/dotcomment.i; line= 23; descr=Statement has no effect rule=noeffect; source=prolint/regrtest/ifindentextra.i; line= 6; descr=Statement has no effect rule=noeffect; source=prolint/regrtest/noeffect.i; line= 23; descr=Statement has no effect rule=noeffect; source=prolint/regrtest/noeffect.i; line= 24; descr=Statement has no effect @@ -597,7 +593,6 @@ rule=substitute; source=prolint/regrtest/substitute.i; line= 15; descr=replace string concatenation by SUBSTITUTE rule=substitute; source=prolint/regrtest/substitute.i; line= 33; descr=replace string concatenation by SUBSTITUTE rule=substitute; source=prolint/regrtest/substitute.i; line= 36; descr=replace string concatenation by SUBSTITUTE -rule=tablename; source=prolint/regrtest/dotcomment.i; line= 23; descr=field blablabla must be qualified with tablename rule=tableusage; source=prolint/regrtest/abbrevkwd.i; line= 41; descr=Global TEMPTABLE ttabbrev is not used rule=tableusage; source=prolint/regrtest/idiskeyword.p; line= 16; descr=Global TEMPTABLE OBJECT is not used rule=tableusage; source=prolint/regrtest/idiskeyword.p; line= 24; descr=Global BUFFER bcust-b is not used @@ -668,6 +663,7 @@ rule=varusage; source=prolint/regrtest/abbrevkwd.i; line= 9; descr=variable abbrev4 is never used rule=varusage; source=prolint/regrtest/abbrevkwd.i; line= 46; descr=variable abbrev5 is never used rule=varusage; source=prolint/regrtest/defaultname.w; line= 348; descr=variable UIB_S is assigned but never accessed +rule=varusage; source=prolint/regrtest/dotcomment.i; line= 4; descr=variable dotcomment is never used rule=varusage; source=prolint/regrtest/i18nlength.i; line= 6; descr=variable i18nlength_2 is assigned but never accessed rule=varusage; source=prolint/regrtest/nocomment.i; line= 54; descr=parameter test1 is never used rule=varusage; source=prolint/regrtest/nocomment.i; line= 54; descr=parameter test1 is never used This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-05 18:23:50
|
Revision: 277 Author: jurjen Date: 2006-08-05 11:23:35 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=277&view=rev Log Message: ----------- renamed the mvo-* procedures, so the "mvo-" prefix is now gone. Modified Paths: -------------- trunk/prolint/desktop.w Added Paths: ----------- trunk/prolint/launch/lintCurrent.p trunk/prolint/launch/lintFileList.p trunk/prolint/launch/lintOpen.p Removed Paths: ------------- trunk/prolint/launch/mvo-lintCurrent.p trunk/prolint/launch/mvo-lintFileList.p trunk/prolint/launch/mvo-lintOpen.p Modified: trunk/prolint/desktop.w =================================================================== --- trunk/prolint/desktop.w 2006-08-05 17:58:17 UTC (rev 276) +++ trunk/prolint/desktop.w 2006-08-05 18:23:35 UTC (rev 277) @@ -425,7 +425,7 @@ &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_current C-Win ON CHOOSE OF Btn_current IN FRAME DEFAULT-FRAME /* Lint Active AB */ DO: - RUN prolint/launch/mvo-lintcurrent.p. + RUN prolint/launch/lintcurrent.p. END. /* _UIB-CODE-BLOCK-END */ @@ -512,7 +512,7 @@ &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Open C-Win ON CHOOSE OF Btn_Open IN FRAME DEFAULT-FRAME /* Lint Open AB */ DO: - RUN prolint/launch/mvo-lintopen.p. + RUN prolint/launch/lintopen.p. END. /* _UIB-CODE-BLOCK-END */ Copied: trunk/prolint/launch/lintCurrent.p (from rev 276, trunk/prolint/launch/mvo-lintCurrent.p) =================================================================== --- trunk/prolint/launch/lintCurrent.p (rev 0) +++ trunk/prolint/launch/lintCurrent.p 2006-08-05 18:23:35 UTC (rev 277) @@ -0,0 +1,10 @@ +/* ------------------------------------------------------------- + file : prolint/launch/lintCurrent.p + by : Martijn Voncken + purpose : Lints current file in UIB. (no procedure editor files) + ------------------------------------------------------------- */ +DEF VAR cInfo AS CHAR NO-UNDO. + +RUN adeuib/_uibinfo.p(?,?,"FILE-NAME",output cInfo). + +RUN prolint/launch/lintfileList.p(cInfo). Copied: trunk/prolint/launch/lintFileList.p (from rev 276, trunk/prolint/launch/mvo-lintFileList.p) =================================================================== --- trunk/prolint/launch/lintFileList.p (rev 0) +++ trunk/prolint/launch/lintFileList.p 2006-08-05 18:23:35 UTC (rev 277) @@ -0,0 +1,66 @@ +/* ------------------------------------------------------------- + file : prolint/launch/lintFileList.p + by : Martijn Voncken + : took start.p by Jurjen Dijkstra and modified it for string-input + purpose : Prolint pcFileList(,-erperated char) and launch prolint.p. + ------------------------------------------------------------- */ + +DEFINE INPUT PARAMETER pcFileList AS CHAR NO-UNDO. + +DEFINE VARIABLE profile AS CHARACTER NO-UNDO. +DEFINE VARIABLE ClearOutput AS LOGICAL NO-UNDO. +DEFINE VARIABLE iFile AS INTEGER NO-UNDO. +DEFINE VARIABLE mruprofile AS CHARACTER NO-UNDO. + +IF pcFileList = "?":U OR pcFileList = "" OR pcFileList = ? THEN DO: + MESSAGE "No files to prolint":T VIEW-AS ALERT-BOX. + RETURN. +END. + +/* read most recently used profile (mruprofile) from Registry */ +mruprofile=?. +IF OPSYS = "WIN32":U THEN DO: + LOAD "SOFTWARE":U BASE-KEY "HKEY_CURRENT_USER":U. + USE "SOFTWARE":U. + GET-KEY-VALUE SECTION "Prolint\Selectfiles":U + KEY "mruprofile":U + VALUE mruprofile. + UNLOAD "SOFTWARE":U. + IF mruprofile <> ? THEN profile = mruprofile. +END. + +iFile = 0. /*!*/ + +RUN prolint/core/prolint.p ("", + THIS-PROCEDURE:HANDLE, + profile, + ClearOutput). + +PROCEDURE GetFirstLintSource : + /* purpose: prolint.p calls this ip to ask for the first sourcefile to analyze. + return ? if you don't have any sourcefiles. */ + DEFINE OUTPUT PARAMETER pSourceFile AS CHARACTER NO-UNDO. + + /*next == first*/ + RUN GetNextLintSource(OUTPUT pSourceFile). + +END PROCEDURE. + + +PROCEDURE GetNextLintSource : + /* purpose: prolint.p calls this ip to ask for the next sourcefile to analyze. + return ? if you don't have any sourcefiles. */ + DEFINE OUTPUT PARAMETER pSourceFile AS CHARACTER NO-UNDO INITIAL ?. + + iFile = iFile + 1. + IF NUM-ENTRIES(pcFileList) >= iFile THEN DO: + pSourceFile = SEARCH(entry(iFile,pcFileList)). + + IF pSourceFile = ? THEN /*invalid entry..*/ + RUN GetNextLintSource(OUTPUT pSourceFile). + END. + ELSE pSourceFile = ?. + +END PROCEDURE. + + Copied: trunk/prolint/launch/lintOpen.p (from rev 276, trunk/prolint/launch/mvo-lintOpen.p) =================================================================== --- trunk/prolint/launch/lintOpen.p (rev 0) +++ trunk/prolint/launch/lintOpen.p 2006-08-05 18:23:35 UTC (rev 277) @@ -0,0 +1,11 @@ +/* ------------------------------------------------------------- + file : prolint/launch/lintCurrent.p + by : Martijn Voncken + purpose : Lints all open files in UIB. (no procedure editor files) + ------------------------------------------------------------- */ + +DEF VAR cInfo AS CHAR NO-UNDO. + +RUN adeuib/_uibinfo.p(?,"SESSION","PROCEDURES RETURN NAME",output cInfo). + +RUN prolint/launch/lintfileList.p(cInfo). Deleted: trunk/prolint/launch/mvo-lintCurrent.p =================================================================== --- trunk/prolint/launch/mvo-lintCurrent.p 2006-08-05 17:58:17 UTC (rev 276) +++ trunk/prolint/launch/mvo-lintCurrent.p 2006-08-05 18:23:35 UTC (rev 277) @@ -1,10 +0,0 @@ -/* ------------------------------------------------------------- - file : prolint/launch/mvo-lintCurrent.p - by : Martijn Voncken - purpose : Lints current file in UIB. (no procedure editor files) - ------------------------------------------------------------- */ -DEF VAR cInfo AS CHAR NO-UNDO. - -RUN adeuib/_uibinfo.p(?,?,"FILE-NAME",output cInfo). - -RUN prolint/launch/mvo-lintfileList.p(cInfo). Deleted: trunk/prolint/launch/mvo-lintFileList.p =================================================================== --- trunk/prolint/launch/mvo-lintFileList.p 2006-08-05 17:58:17 UTC (rev 276) +++ trunk/prolint/launch/mvo-lintFileList.p 2006-08-05 18:23:35 UTC (rev 277) @@ -1,66 +0,0 @@ -/* ------------------------------------------------------------- - file : prolint/launch/mvo-lintFileList.p - by : Martijn Voncken - : took start.p by Jurjen Dijkstra and modified it for string-input - purpose : Prolint pcFileList(,-erperated char) and launch prolint.p. - ------------------------------------------------------------- */ - -DEFINE INPUT PARAMETER pcFileList AS CHAR NO-UNDO. - -DEFINE VARIABLE profile AS CHARACTER NO-UNDO. -DEFINE VARIABLE ClearOutput AS LOGICAL NO-UNDO. -DEFINE VARIABLE iFile AS INTEGER NO-UNDO. -DEFINE VARIABLE mruprofile AS CHARACTER NO-UNDO. - -IF pcFileList = "?":U OR pcFileList = "" OR pcFileList = ? THEN DO: - MESSAGE "No files to prolint":T VIEW-AS ALERT-BOX. - RETURN. -END. - -/* read most recently used profile (mruprofile) from Registry */ -mruprofile=?. -IF OPSYS = "WIN32":U THEN DO: - LOAD "SOFTWARE":U BASE-KEY "HKEY_CURRENT_USER":U. - USE "SOFTWARE":U. - GET-KEY-VALUE SECTION "Prolint\Selectfiles":U - KEY "mruprofile":U - VALUE mruprofile. - UNLOAD "SOFTWARE":U. - IF mruprofile <> ? THEN profile = mruprofile. -END. - -iFile = 0. /*!*/ - -RUN prolint/core/prolint.p ("", - THIS-PROCEDURE:HANDLE, - profile, - ClearOutput). - -PROCEDURE GetFirstLintSource : - /* purpose: prolint.p calls this ip to ask for the first sourcefile to analyze. - return ? if you don't have any sourcefiles. */ - DEFINE OUTPUT PARAMETER pSourceFile AS CHARACTER NO-UNDO. - - /*next == first*/ - RUN GetNextLintSource(OUTPUT pSourceFile). - -END PROCEDURE. - - -PROCEDURE GetNextLintSource : - /* purpose: prolint.p calls this ip to ask for the next sourcefile to analyze. - return ? if you don't have any sourcefiles. */ - DEFINE OUTPUT PARAMETER pSourceFile AS CHARACTER NO-UNDO INITIAL ?. - - iFile = iFile + 1. - IF NUM-ENTRIES(pcFileList) >= iFile THEN DO: - pSourceFile = SEARCH(entry(iFile,pcFileList)). - - IF pSourceFile = ? THEN /*invalid entry..*/ - RUN GetNextLintSource(OUTPUT pSourceFile). - END. - ELSE pSourceFile = ?. - -END PROCEDURE. - - Deleted: trunk/prolint/launch/mvo-lintOpen.p =================================================================== --- trunk/prolint/launch/mvo-lintOpen.p 2006-08-05 17:58:17 UTC (rev 276) +++ trunk/prolint/launch/mvo-lintOpen.p 2006-08-05 18:23:35 UTC (rev 277) @@ -1,11 +0,0 @@ -/* ------------------------------------------------------------- - file : prolint/launch/mvo-lintCurrent.p - by : Martijn Voncken - purpose : Lints all open files in UIB. (no procedure editor files) - ------------------------------------------------------------- */ - -DEF VAR cInfo AS CHAR NO-UNDO. - -RUN adeuib/_uibinfo.p(?,"SESSION","PROCEDURES RETURN NAME",output cInfo). - -RUN prolint/launch/mvo-lintfileList.p(cInfo). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-05 17:59:57
|
Revision: 276 Author: jurjen Date: 2006-08-05 10:58:17 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=276&view=rev Log Message: ----------- continued: clean up the root of prolint; move files to subdirectories. Modified Paths: -------------- trunk/prolint/ab/ab_event.p trunk/prolint/core/add2protools.p trunk/prolint/desktop.w trunk/prolint/help/desktop.htxt trunk/prolint/help/lintcfg.htxt trunk/prolint/help/newrule.htxt trunk/prolint/help/overview.htxt trunk/prolint/help/profiles.htxt trunk/prolint/help/regrtest.htxt trunk/prolint/help/run_prolint.htxt trunk/prolint/help/selectfiles.htxt trunk/prolint/help/settings.htxt trunk/prolint/outputhandlers/codepreview.w trunk/prolint/outputhandlers/logwin.w trunk/prolint/outputhandlers/logwin8.w trunk/prolint/outputhandlers/regrlog.p trunk/prolint/regrtest/test.p trunk/prolint/regrtest/test2.p trunk/prolint/rtb/addmenu.p Added Paths: ----------- trunk/prolint/core/dnewprofile.w trunk/prolint/core/dnewrule.w trunk/prolint/core/lintcfg.w trunk/prolint/core/lintcfgbycat.w trunk/prolint/core/selectfiles.w trunk/prolint/images/delete.gif trunk/prolint/images/desktop.gif trunk/prolint/images/exit.gif trunk/prolint/images/filter.gif trunk/prolint/images/first.gif trunk/prolint/images/help.gif trunk/prolint/images/hideTree.gif trunk/prolint/images/last.gif trunk/prolint/images/locked.gif trunk/prolint/images/next.gif trunk/prolint/images/openlog.gif trunk/prolint/images/prev.gif trunk/prolint/images/preview.gif trunk/prolint/images/prolint.gif trunk/prolint/images/protools.bmp trunk/prolint/images/repositionfailed.gif trunk/prolint/images/savelog.gif trunk/prolint/images/unlocked.gif trunk/prolint/launch/lintproglist.p trunk/prolint/launch/mvo-lintCurrent.p trunk/prolint/launch/mvo-lintFileList.p trunk/prolint/launch/mvo-lintOpen.p trunk/prolint/launch/start.p trunk/prolint/launch/test.p Removed Paths: ------------- trunk/prolint/dnewprofile.w trunk/prolint/dnewrule.w trunk/prolint/lintcfg.w trunk/prolint/lintcfgbycat.w trunk/prolint/lintproglist.p trunk/prolint/mvo-lintCurrent.p trunk/prolint/mvo-lintFileList.p trunk/prolint/mvo-lintOpen.p trunk/prolint/outputhandlers/delete.gif trunk/prolint/outputhandlers/desktop.gif trunk/prolint/outputhandlers/exit.gif trunk/prolint/outputhandlers/filter.gif trunk/prolint/outputhandlers/first.gif trunk/prolint/outputhandlers/help.gif trunk/prolint/outputhandlers/hideTree.gif trunk/prolint/outputhandlers/last.gif trunk/prolint/outputhandlers/locked.gif trunk/prolint/outputhandlers/next.gif trunk/prolint/outputhandlers/openlog.gif trunk/prolint/outputhandlers/prev.gif trunk/prolint/outputhandlers/preview.gif trunk/prolint/outputhandlers/prolint.gif trunk/prolint/outputhandlers/repositionfailed.gif trunk/prolint/outputhandlers/savelog.gif trunk/prolint/outputhandlers/unlocked.gif trunk/prolint/protools.bmp trunk/prolint/selectfiles.w trunk/prolint/start.p trunk/prolint/test.p Modified: trunk/prolint/ab/ab_event.p =================================================================== --- trunk/prolint/ab/ab_event.p 2006-08-05 16:54:06 UTC (rev 275) +++ trunk/prolint/ab/ab_event.p 2006-08-05 17:58:17 UTC (rev 276) @@ -176,9 +176,9 @@ Notes: ------------------------------------------------------------------------------*/ /* lintcfg has a conditional parameter, try it both with & without */ - RUN prolint/lintcfg.w PERSISTENT NO-ERROR. + RUN prolint/core/lintcfg.w PERSISTENT NO-ERROR. IF ERROR-STATUS:ERROR AND ERROR-STATUS:GET-NUMBER(1) = 3234 /* mismatched number of parameters */ - THEN RUN prolint/lintcfg.w PERSISTENT ("AppBuilder") NO-ERROR. + THEN RUN prolint/core/lintcfg.w PERSISTENT ("AppBuilder") NO-ERROR. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ Modified: trunk/prolint/core/add2protools.p =================================================================== --- trunk/prolint/core/add2protools.p 2006-08-05 16:54:06 UTC (rev 275) +++ trunk/prolint/core/add2protools.p 2006-08-05 17:58:17 UTC (rev 276) @@ -9,10 +9,20 @@ DEFINE VARIABLE ProtoolsDatfile AS CHARACTER NO-UNDO. DEFINE VARIABLE cProgram AS CHARACTER NO-UNDO. -DEFINE VARIABLE iOrder AS INTEGER NO-UNDO. DEFINE VARIABLE iMaxOrder AS INTEGER NO-UNDO. DEFINE VARIABLE hproc AS HANDLE NO-UNDO. +DEFINE VARIABLE NeedsNewBitmap AS LOGICAL NO-UNDO INITIAL FALSE. +DEFINE TEMP-TABLE ttTools NO-UNDO + FIELD caption AS CHARACTER + FIELD prog AS CHARACTER + FIELD glyph AS CHARACTER + FIELD dunno1 AS LOGICAL + FIELD dunno2 AS LOGICAL + FIELD ordnum AS INTEGER + FIELD dunno3 AS LOGICAL. + + GET-KEY-VALUE SECTION "ProTools" KEY "FunctionDefs" VALUE ProtoolsDatfile. IF ProtoolsDatfile=? THEN RETURN. @@ -20,36 +30,59 @@ /* read protools.dat */ INPUT FROM VALUE(ProtoolsDatfile). REPEAT: - ASSIGN cProgram = "" - iOrder = 0. - IMPORT ^ cProgram ^ ^ ^ iOrder ^. - IF cProgram MATCHES "*prolint*desktop*" THEN - lAlreadyInThere = TRUE. - IF iOrder > iMaxOrder THEN - iMaxOrder = iOrder. + CREATE ttTools. + IMPORT ttTools. + IF ttTools.ordnum > iMaxOrder THEN + iMaxOrder = ttTools.ordnum. END. INPUT CLOSE. +FOR EACH ttTools WHERE ttTools.prog="" : + DELETE ttTools. +END. +FIND ttTools WHERE ttTools.prog = "prolint/desktop.w" NO-ERROR. +IF AVAILABLE ttTools THEN DO: + lAlreadyInThere = TRUE. + IF ttTools.glyph = "prolint/protools.bmp" THEN DO: + ttTools.glyph = "prolint/images/protools.bmp". + MESSAGE "The bitmap for the Prolint Desktop in PRO*Tools will now be repaired...." VIEW-AS ALERT-BOX. + RUN RewriteProtools. + END. +END. + IF cAction = "ADD":U THEN DO: /* append to protools.dat, if still needed */ IF NOT lAlreadyInThere THEN DO: - OUTPUT TO VALUE(ProtoolsDatfile) APPEND. - PUT UNFORMATTED - SUBSTITUTE('"Prolint Desktop" "prolint/desktop.w" "prolint/protools.bmp" yes yes &1 no',STRING(iMaxOrder + 10)) - SKIP. - OUTPUT CLOSE. + CREATE ttTools. + ASSIGN ttTools.caption = "Prolint Desktop" + ttTools.prog = "prolint/desktop.w" + ttTools.glyph = "prolint/images/protools.bmp" + ttTools.dunno1 = yes + ttTools.dunno2 = yes + ttTools.ordnum = iMaxOrder + 10 + ttTools.dunno3 = NO. + RUN RewriteProtools. lAlreadyInThere = TRUE. - - /* try to close protools palette */ - hproc = SESSION:FIRST-PROCEDURE. - DO WHILE (VALID-HANDLE(hProc)) AND NOT (hProc:FILE-NAME MATCHES "*protools*_protool*") : - hproc = hproc:NEXT-SIBLING. - END. - IF (VALID-HANDLE(hProc)) AND (hProc:FILE-NAME MATCHES "*protools*_protool*") THEN - RUN Destroy IN hProc NO-ERROR. - MESSAGE "Re-open the PRO*Tools palette to see the new Prolint Desktop option" - VIEW-AS ALERT-BOX. END. END. +PROCEDURE RewriteProtools : + OUTPUT TO VALUE(ProtoolsDatfile). + FOR EACH ttTools : + EXPORT ttTools. + END. + OUTPUT CLOSE. + /* try to close protools palette */ + hproc = SESSION:FIRST-PROCEDURE. + DO WHILE (VALID-HANDLE(hProc)) AND NOT (hProc:FILE-NAME MATCHES "*protools*_protool*") : + hproc = hproc:NEXT-SIBLING. + END. + IF (VALID-HANDLE(hProc)) AND (hProc:FILE-NAME MATCHES "*protools*_protool*") THEN + RUN Destroy IN hProc NO-ERROR. + MESSAGE "Re-open the PRO*Tools palette to see the new Prolint Desktop option" + VIEW-AS ALERT-BOX. + +END PROCEDURE. + + Copied: trunk/prolint/core/dnewprofile.w (from rev 250, trunk/prolint/dnewprofile.w) =================================================================== --- trunk/prolint/core/dnewprofile.w (rev 0) +++ trunk/prolint/core/dnewprofile.w 2006-08-05 17:58:17 UTC (rev 276) @@ -0,0 +1,296 @@ +&ANALYZE-SUSPEND _VERSION-NUMBER UIB_v9r12 GUI +&ANALYZE-RESUME +&Scoped-define WINDOW-NAME CURRENT-WINDOW +&Scoped-define FRAME-NAME Dialog-Frame +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Dialog-Frame +/*------------------------------------------------------------------------ + + File: prolint/core/dnewprofile.w + + Description: creates a new profile, + wich is a subdirectory in prolint/settings + or in local-prolint/settings + + Input Parameters: + <none> + + Output Parameters: + pNewProfile as character: + ? when no new profile was created + + Author: Jurjen Dijkstra + + Created: 25 May 2002 + ------------------------------------------------------------------------ + + Copyright (C) 2002 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +------------------------------------------------------------------------*/ +/* This .W file was created with the Progress AppBuilder. */ +/*----------------------------------------------------------------------*/ + +/* *************************** Definitions ************************** */ + +/* Parameters Definitions --- */ +&IF DEFINED(UIB_is_running)=0 &THEN + DEFINE OUTPUT PARAMETER pNewProfile AS CHARACTER NO-UNDO. +&ELSE + DEFINE VARIABLE pNewProfile AS CHARACTER NO-UNDO. +&ENDIF +pNewProfile = ?. + +/* Local Variable Definitions --- */ + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK + +/* ******************** Preprocessor Definitions ******************** */ + +&Scoped-define PROCEDURE-TYPE Dialog-Box +&Scoped-define DB-AWARE no + +/* Name of first Frame and/or Browse and/or first Query */ +&Scoped-define FRAME-NAME Dialog-Frame + +/* Standard List Definitions */ +&Scoped-Define ENABLED-OBJECTS ed_newname rd_where Btn_OK Btn_Cancel +&Scoped-Define DISPLAYED-OBJECTS ed_newname rd_where + +/* Custom List Definitions */ +/* List-1,List-2,List-3,List-4,List-5,List-6 */ + +/* _UIB-PREPROCESSOR-BLOCK-END */ +&ANALYZE-RESUME + + + +/* *********************** Control Definitions ********************** */ + +/* Define a dialog box */ + +/* Definitions of the field level widgets */ +DEFINE BUTTON Btn_Cancel AUTO-END-KEY + LABEL "Cancel" + SIZE 15 BY 1.14 + BGCOLOR 8 . + +DEFINE BUTTON Btn_OK AUTO-GO + LABEL "OK" + SIZE 15 BY 1.14 + BGCOLOR 8 . + +DEFINE VARIABLE ed_newname AS CHARACTER FORMAT "X(256)":U + LABEL "New profile name" + VIEW-AS FILL-IN + SIZE 26 BY 1 NO-UNDO. + +DEFINE VARIABLE rd_where AS INTEGER INITIAL 1 + VIEW-AS RADIO-SET VERTICAL + RADIO-BUTTONS + "Create shared (in prolint/settings)", 1, +"Create local (in local-prolint/settings)", 2 + SIZE 41 BY 2.14 NO-UNDO. + + +/* ************************ Frame Definitions *********************** */ + +DEFINE FRAME Dialog-Frame + ed_newname AT ROW 2.43 COL 19 COLON-ALIGNED + rd_where AT ROW 3.86 COL 21 NO-LABEL + Btn_OK AT ROW 6.95 COL 14 + Btn_Cancel AT ROW 6.95 COL 32 + SPACE(18.19) SKIP(0.42) + WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER + SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE + TITLE "Create a new profile" + DEFAULT-BUTTON Btn_OK CANCEL-BUTTON Btn_Cancel. + + +/* *********************** Procedure Settings ************************ */ + +&ANALYZE-SUSPEND _PROCEDURE-SETTINGS +/* Settings for THIS-PROCEDURE + Type: Dialog-Box + Allow: Basic,Browse,DB-Fields,Query + Other Settings: COMPILE + */ +&ANALYZE-RESUME _END-PROCEDURE-SETTINGS + + + +/* *********** Runtime Attributes and AppBuilder Settings *********** */ + +&ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES +/* SETTINGS FOR DIALOG-BOX Dialog-Frame + */ +ASSIGN + FRAME Dialog-Frame:SCROLLABLE = FALSE + FRAME Dialog-Frame:HIDDEN = TRUE. + +/* _RUN-TIME-ATTRIBUTES-END */ +&ANALYZE-RESUME + + + + + +/* ************************ Control Triggers ************************ */ + +&Scoped-define SELF-NAME Dialog-Frame +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Dialog-Frame Dialog-Frame +ON WINDOW-CLOSE OF FRAME Dialog-Frame /* Create a new profile */ +DO: + APPLY "END-ERROR":U TO SELF. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME Btn_OK +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK Dialog-Frame +ON CHOOSE OF Btn_OK IN FRAME Dialog-Frame /* OK */ +DO: + DEFINE VARIABLE done AS LOGICAL NO-UNDO. + ASSIGN + ed_newname + rd_where. + RUN CreateNewProfile (OUTPUT done). + IF NOT done THEN + RETURN NO-APPLY. + ELSE + pNewProfile = ed_newname. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&UNDEFINE SELF-NAME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Dialog-Frame + + +/* *************************** Main Block *************************** */ + +/* Parent the dialog-box to the ACTIVE-WINDOW, if there is no parent. */ +IF VALID-HANDLE(ACTIVE-WINDOW) AND FRAME {&FRAME-NAME}:PARENT eq ? +THEN FRAME {&FRAME-NAME}:PARENT = ACTIVE-WINDOW. + + +/* Now enable the interface and wait for the exit condition. */ +/* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */ +MAIN-BLOCK: +DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK + ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK: + RUN enable_UI. + + FILE-INFO:FILE-NAME = "local-prolint/settings":U. + IF FILE-INFO:FULL-PATHNAME = ? THEN + rd_where:SENSITIVE = FALSE. + + WAIT-FOR GO OF FRAME {&FRAME-NAME}. +END. +RUN disable_UI. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +/* ********************** Internal Procedures *********************** */ + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE CreateNewProfile Dialog-Frame +PROCEDURE CreateNewProfile : +/*------------------------------------------------------------------------------ + Purpose: + Parameters: <none> + Notes: +------------------------------------------------------------------------------*/ + DEFINE OUTPUT PARAMETER done AS LOGICAL NO-UNDO INITIAL FALSE. + + DEFINE VARIABLE basedir AS CHARACTER NO-UNDO. + + IF ed_newname = "" THEN DO: + MESSAGE "Please enter a name" VIEW-AS ALERT-BOX. + RETURN. + END. + + IF rd_where=1 THEN + FILE-INFO:FILE-NAME = "prolint/settings". + ELSE + FILE-INFO:FILE-NAME = "local-prolint/settings". + basedir = FILE-INFO:FULL-PATHNAME. + + /* try to create the new subdirectory: */ + OS-CREATE-DIR VALUE(basedir + "/":U + ed_newname) NO-ERROR. + IF NOT ERROR-STATUS:ERROR THEN + done = TRUE. + ELSE + MESSAGE "Sorry, the subdirectory can not be created:" SKIP + ERROR-STATUS:GET-MESSAGE(1) + VIEW-AS ALERT-BOX. + + +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI Dialog-Frame _DEFAULT-DISABLE +PROCEDURE disable_UI : +/*------------------------------------------------------------------------------ + Purpose: DISABLE the User Interface + Parameters: <none> + Notes: Here we clean-up the user-interface by deleting + dynamic widgets we have created and/or hide + frames. This procedure is usually called when + we are ready to "clean-up" after running. +------------------------------------------------------------------------------*/ + /* Hide all frames. */ + HIDE FRAME Dialog-Frame. +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI Dialog-Frame _DEFAULT-ENABLE +PROCEDURE enable_UI : +/*------------------------------------------------------------------------------ + Purpose: ENABLE the User Interface + Parameters: <none> + Notes: Here we display/view/enable the widgets in the + user-interface. In addition, OPEN all queries + associated with each FRAME and BROWSE. + These statements here are based on the "Other + Settings" section of the widget Property Sheets. +------------------------------------------------------------------------------*/ + DISPLAY ed_newname rd_where + WITH FRAME Dialog-Frame. + ENABLE ed_newname rd_where Btn_OK Btn_Cancel + WITH FRAME Dialog-Frame. + VIEW FRAME Dialog-Frame. + {&OPEN-BROWSERS-IN-QUERY-Dialog-Frame} +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + Copied: trunk/prolint/core/dnewrule.w (from rev 274, trunk/prolint/dnewrule.w) =================================================================== --- trunk/prolint/core/dnewrule.w (rev 0) +++ trunk/prolint/core/dnewrule.w 2006-08-05 17:58:17 UTC (rev 276) @@ -0,0 +1,499 @@ +&ANALYZE-SUSPEND _VERSION-NUMBER UIB_v9r12 GUI +&ANALYZE-RESUME +&Scoped-define WINDOW-NAME CURRENT-WINDOW +&Scoped-define FRAME-NAME Dialog-Frame +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Dialog-Frame +/*------------------------------------------------------------------------ + + File: + + Description: + + Input Parameters: + <none> + + Output Parameters: + <none> + + Author: + + Created: +------------------------------------------------------------------------*/ +/* This .W file was created with the Progress AppBuilder. */ +/*----------------------------------------------------------------------*/ + +/* *************************** Definitions ************************** */ + +/* Parameters Definitions --- */ + +/* Local Variable Definitions --- */ + +DEFINE TEMP-TABLE tt_rules NO-UNDO + FIELD RuleID AS CHARACTER FORMAT "x(15)":U + FIELD severity AS INTEGER FORMAT "9":U + FIELD useproparse AS LOGICAL FORMAT "yes/no":U + FIELD uselisting AS LOGICAL FORMAT "yes/no":U + FIELD usexref AS LOGICAL FORMAT "yes/no":U + FIELD useproclist AS LOGICAL FORMAT "yes/no":U + FIELD ignoreUIB AS LOGICAL FORMAT "yes/no":U + FIELD description AS CHARACTER FORMAT "x(60)":U + FIELD category AS CHARACTER +INDEX idx_id AS PRIMARY RuleID. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK + +/* ******************** Preprocessor Definitions ******************** */ + +&Scoped-define PROCEDURE-TYPE Dialog-Box +&Scoped-define DB-AWARE no + +/* Name of first Frame and/or Browse and/or first Query */ +&Scoped-define FRAME-NAME Dialog-Frame + +/* Standard List Definitions */ +&Scoped-Define ENABLED-OBJECTS ed_ruleid ed_description ed_severity ~ +cb_category tg_proparse tg_xref tg_proclist tg_forgetab Btn_OK Btn_Cancel ~ +Btn_Help RECT-1 +&Scoped-Define DISPLAYED-OBJECTS ed_ruleid ed_description ed_severity ~ +cb_category tg_proparse tg_xref tg_proclist tg_forgetab FILL-IN-7 FILL-IN-8 ~ +FILL-IN-9 FILL-IN-10 FILL-IN-11 FILL-IN-12 FILL-IN-13 FILL-IN-14 + +/* Custom List Definitions */ +/* List-1,List-2,List-3,List-4,List-5,List-6 */ + +/* _UIB-PREPROCESSOR-BLOCK-END */ +&ANALYZE-RESUME + + + +/* *********************** Control Definitions ********************** */ + +/* Define a dialog box */ + +/* Definitions of the field level widgets */ +DEFINE BUTTON Btn_Cancel AUTO-END-KEY + LABEL "Cancel" + SIZE 15 BY 1.14 + BGCOLOR 8 . + +DEFINE BUTTON Btn_Help + LABEL "&Help" + SIZE 15 BY 1.14 + BGCOLOR 8 . + +DEFINE BUTTON Btn_OK AUTO-GO + LABEL "OK" + SIZE 15 BY 1.14 + BGCOLOR 8 . + +DEFINE VARIABLE cb_category AS CHARACTER FORMAT "X(256)":U + LABEL "category" + VIEW-AS COMBO-BOX INNER-LINES 5 + LIST-ITEMS "Item 1" + DROP-DOWN-LIST + SIZE 46 BY 1 NO-UNDO. + +DEFINE VARIABLE ed_description AS CHARACTER FORMAT "X(60)":U + LABEL "description" + VIEW-AS FILL-IN + SIZE 60 BY 1 NO-UNDO. + +DEFINE VARIABLE ed_ruleid AS CHARACTER FORMAT "X(15)":U + LABEL "rule-id" + VIEW-AS FILL-IN + SIZE 21 BY 1 NO-UNDO. + +DEFINE VARIABLE ed_severity AS INTEGER FORMAT "9":U INITIAL 5 + LABEL "severity" + VIEW-AS FILL-IN + SIZE 8.6 BY 1 NO-UNDO. + +DEFINE VARIABLE FILL-IN-10 AS CHARACTER FORMAT "X(256)":U INITIAL "default severity, number between 0 to 9 (inclusive)" + VIEW-AS TEXT + SIZE 48 BY .62 NO-UNDO. + +DEFINE VARIABLE FILL-IN-11 AS CHARACTER FORMAT "X(256)":U INITIAL "toggle ~"on~" if this rule cannot run without Proparse" + VIEW-AS TEXT + SIZE 51 BY .62 NO-UNDO. + +DEFINE VARIABLE FILL-IN-12 AS CHARACTER FORMAT "X(256)":U INITIAL "toggle ~"on~" if this rule needs to read XREF file" + VIEW-AS TEXT + SIZE 49 BY .62 NO-UNDO. + +DEFINE VARIABLE FILL-IN-13 AS CHARACTER FORMAT "X(256)":U INITIAL "toggle ~"on~" if this rule needs a list of startnodes for each ip/udf" + VIEW-AS TEXT + SIZE 60 BY .62 NO-UNDO. + +DEFINE VARIABLE FILL-IN-14 AS CHARACTER FORMAT "X(256)":U INITIAL "toggle ~"on~" if warnings for AB-generated code should be surpressed" + VIEW-AS TEXT + SIZE 65 BY .62 NO-UNDO. + +DEFINE VARIABLE FILL-IN-7 AS CHARACTER FORMAT "X(256)":U INITIAL "This program helps you insert a new entry to prolint/rules/rules.d" + VIEW-AS TEXT + SIZE 76 BY .62 NO-UNDO. + +DEFINE VARIABLE FILL-IN-8 AS CHARACTER FORMAT "X(256)":U INITIAL "rule-id is name of sourcefile without ~".p~"" + VIEW-AS TEXT + SIZE 39 BY .62 NO-UNDO. + +DEFINE VARIABLE FILL-IN-9 AS CHARACTER FORMAT "X(256)":U INITIAL "short description for browse in profile configuration dialog" + VIEW-AS TEXT + SIZE 55 BY .62 NO-UNDO. + +DEFINE RECTANGLE RECT-1 + EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL + SIZE 89 BY 1.67. + +DEFINE VARIABLE tg_forgetab AS LOGICAL INITIAL no + LABEL "ignore AB-generated code" + VIEW-AS TOGGLE-BOX + SIZE 30 BY .81 NO-UNDO. + +DEFINE VARIABLE tg_proclist AS LOGICAL INITIAL no + LABEL "uses ProcedureListGet" + VIEW-AS TOGGLE-BOX + SIZE 27 BY .81 NO-UNDO. + +DEFINE VARIABLE tg_proparse AS LOGICAL INITIAL yes + LABEL "requires Proparse" + VIEW-AS TOGGLE-BOX + SIZE 22 BY .81 NO-UNDO. + +DEFINE VARIABLE tg_xref AS LOGICAL INITIAL no + LABEL "requires compile xref" + VIEW-AS TOGGLE-BOX + SIZE 24 BY .81 NO-UNDO. + + +/* ************************ Frame Definitions *********************** */ + +DEFINE FRAME Dialog-Frame + ed_ruleid AT ROW 2.67 COL 14 COLON-ALIGNED + ed_description AT ROW 5.05 COL 14.2 COLON-ALIGNED + ed_severity AT ROW 7.19 COL 14 COLON-ALIGNED + cb_category AT ROW 8.86 COL 14 COLON-ALIGNED + tg_proparse AT ROW 10.52 COL 16 + tg_xref AT ROW 12.67 COL 16 + tg_proclist AT ROW 14.57 COL 16 + tg_forgetab AT ROW 16.48 COL 16 + Btn_OK AT ROW 19.1 COL 39 + Btn_Cancel AT ROW 19.1 COL 56 + Btn_Help AT ROW 19.1 COL 73 + FILL-IN-7 AT ROW 1.48 COL 1 COLON-ALIGNED NO-LABEL + FILL-IN-8 AT ROW 3.76 COL 14 COLON-ALIGNED NO-LABEL + FILL-IN-9 AT ROW 6.1 COL 14 COLON-ALIGNED NO-LABEL + FILL-IN-10 AT ROW 7.38 COL 24 COLON-ALIGNED NO-LABEL + FILL-IN-11 AT ROW 11.33 COL 17.8 COLON-ALIGNED NO-LABEL + FILL-IN-12 AT ROW 13.48 COL 17.8 COLON-ALIGNED NO-LABEL + FILL-IN-13 AT ROW 15.38 COL 17.8 COLON-ALIGNED NO-LABEL + FILL-IN-14 AT ROW 17.29 COL 17.8 COLON-ALIGNED NO-LABEL + RECT-1 AT ROW 18.86 COL 1 + SPACE(0.19) SKIP(0.00) + WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER + SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE + TITLE "Add a new rule to rules.d" + DEFAULT-BUTTON Btn_OK CANCEL-BUTTON Btn_Cancel. + + +/* *********************** Procedure Settings ************************ */ + +&ANALYZE-SUSPEND _PROCEDURE-SETTINGS +/* Settings for THIS-PROCEDURE + Type: Dialog-Box + Allow: Basic,Browse,DB-Fields,Query + */ +&ANALYZE-RESUME _END-PROCEDURE-SETTINGS + + + +/* *********** Runtime Attributes and AppBuilder Settings *********** */ + +&ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES +/* SETTINGS FOR DIALOG-BOX Dialog-Frame + */ +ASSIGN + FRAME Dialog-Frame:SCROLLABLE = FALSE + FRAME Dialog-Frame:HIDDEN = TRUE. + +/* SETTINGS FOR FILL-IN FILL-IN-10 IN FRAME Dialog-Frame + NO-ENABLE */ +/* SETTINGS FOR FILL-IN FILL-IN-11 IN FRAME Dialog-Frame + NO-ENABLE */ +/* SETTINGS FOR FILL-IN FILL-IN-12 IN FRAME Dialog-Frame + NO-ENABLE */ +/* SETTINGS FOR FILL-IN FILL-IN-13 IN FRAME Dialog-Frame + NO-ENABLE */ +/* SETTINGS FOR FILL-IN FILL-IN-14 IN FRAME Dialog-Frame + NO-ENABLE */ +/* SETTINGS FOR FILL-IN FILL-IN-7 IN FRAME Dialog-Frame + NO-ENABLE */ +/* SETTINGS FOR FILL-IN FILL-IN-8 IN FRAME Dialog-Frame + NO-ENABLE */ +/* SETTINGS FOR FILL-IN FILL-IN-9 IN FRAME Dialog-Frame + NO-ENABLE */ +/* _RUN-TIME-ATTRIBUTES-END */ +&ANALYZE-RESUME + + + + + +/* ************************ Control Triggers ************************ */ + +&Scoped-define SELF-NAME Dialog-Frame +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Dialog-Frame Dialog-Frame +ON WINDOW-CLOSE OF FRAME Dialog-Frame /* Add a new rule to rules.d */ +DO: + APPLY "END-ERROR":U TO SELF. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME Btn_Help +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Help Dialog-Frame +ON CHOOSE OF Btn_Help IN FRAME Dialog-Frame /* Help */ +OR HELP OF FRAME {&FRAME-NAME} +DO: + + DEF VAR ReturnValue AS INTEGER NO-UNDO. + + FILE-INFO:FILE-NAME = "prolint/help/newrule.htm":U. + {&_proparse_ prolint-nowarn(message)} + IF FILE-INFO:FULL-PATHNAME<>? THEN + RUN prolint/core/openhtml.p (FILE-INFO:FULL-PATHNAME). + ELSE + MESSAGE "no help found for dnewrule.w":T VIEW-AS ALERT-BOX. + +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME Btn_OK +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK Dialog-Frame +ON CHOOSE OF Btn_OK IN FRAME Dialog-Frame /* OK */ +DO: + ASSIGN ed_ruleid + ed_description + ed_severity + tg_proparse + tg_xref + tg_proclist + tg_forgetab + cb_category. + + IF ed_ruleid = "" THEN DO: + MESSAGE "please enter a rule-id" + VIEW-AS ALERT-BOX. + RETURN NO-APPLY. + END. + + IF ed_description = "" THEN DO: + MESSAGE "please enter a description" + VIEW-AS ALERT-BOX. + RETURN NO-APPLY. + END. + + IF cb_category = "" THEN DO: + MESSAGE "please choose a category" + VIEW-AS ALERT-BOX. + RETURN NO-APPLY. + END. + + IF ed_severity<0 OR ed_severity>9 THEN DO: + MESSAGE "severity should be at least 0, not greater than 9" + VIEW-AS ALERT-BOX. + RETURN NO-APPLY. + END. + + FIND tt_rules WHERE tt_rules.RuleID = ed_ruleid NO-LOCK NO-ERROR. + IF AVAILABLE tt_rules THEN DO: + MESSAGE SUBSTITUTE("rule &1 already exists", ed_ruleid) + VIEW-AS ALERT-BOX ERROR. + RETURN NO-APPLY. + END. + + + CREATE tt_rules. + ASSIGN tt_rules.RuleId = ed_ruleid + tt_rules.severity = ed_severity + tt_rules.useproparse = tg_proparse + tt_rules.uselisting = FALSE + tt_rules.usexref = tg_xref + tt_rules.useproclist = tg_proclist + tt_rules.ignoreUIB = tg_forgetab + tt_rules.DESCRIPTION = ed_description + tt_rules.category = cb_category. + RELEASE tt_rules. + + RUN WriteRules. + + MESSAGE "Now that you have created a new rule, would you please consider sharing it with the Prolint Open Source project?" + VIEW-AS ALERT-BOX QUESTION. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&UNDEFINE SELF-NAME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Dialog-Frame + + +/* *************************** Main Block *************************** */ + +/* Parent the dialog-box to the ACTIVE-WINDOW, if there is no parent. */ +IF VALID-HANDLE(ACTIVE-WINDOW) AND FRAME {&FRAME-NAME}:PARENT eq ? +THEN FRAME {&FRAME-NAME}:PARENT = ACTIVE-WINDOW. + + +/* Now enable the interface and wait for the exit condition. */ +/* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */ +MAIN-BLOCK: +DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK + ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK: + RUN ReadRules. + RUN enable_UI. + WAIT-FOR GO OF FRAME {&FRAME-NAME}. +END. +RUN disable_UI. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +/* ********************** Internal Procedures *********************** */ + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI Dialog-Frame _DEFAULT-DISABLE +PROCEDURE disable_UI : +/*------------------------------------------------------------------------------ + Purpose: DISABLE the User Interface + Parameters: <none> + Notes: Here we clean-up the user-interface by deleting + dynamic widgets we have created and/or hide + frames. This procedure is usually called when + we are ready to "clean-up" after running. +------------------------------------------------------------------------------*/ + /* Hide all frames. */ + HIDE FRAME Dialog-Frame. +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI Dialog-Frame _DEFAULT-ENABLE +PROCEDURE enable_UI : +/*------------------------------------------------------------------------------ + Purpose: ENABLE the User Interface + Parameters: <none> + Notes: Here we display/view/enable the widgets in the + user-interface. In addition, OPEN all queries + associated with each FRAME and BROWSE. + These statements here are based on the "Other + Settings" section of the widget Property Sheets. +------------------------------------------------------------------------------*/ + DISPLAY ed_ruleid ed_description ed_severity cb_category tg_proparse tg_xref + tg_proclist tg_forgetab FILL-IN-7 FILL-IN-8 FILL-IN-9 FILL-IN-10 + FILL-IN-11 FILL-IN-12 FILL-IN-13 FILL-IN-14 + WITH FRAME Dialog-Frame. + ENABLE ed_ruleid ed_description ed_severity cb_category tg_proparse tg_xref + tg_proclist tg_forgetab Btn_OK Btn_Cancel Btn_Help RECT-1 + WITH FRAME Dialog-Frame. + VIEW FRAME Dialog-Frame. + {&OPEN-BROWSERS-IN-QUERY-Dialog-Frame} +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ReadRules Dialog-Frame +PROCEDURE ReadRules : +/*------------------------------------------------------------------------------ + Purpose: + Parameters: <none> + Notes: +------------------------------------------------------------------------------*/ + DEFINE VARIABLE rules_d AS CHARACTER NO-UNDO. + DEFINE VARIABLE categorylist AS CHARACTER NO-UNDO. + + + FOR EACH tt_rules : + DELETE tt_rules. + END. + + FILE-INFO:FILE-NAME = "prolint/rules/rules.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN + rules_d = FILE-INFO:FULL-PATHNAME. + ELSE DO: + MESSAGE "Cannot find prolint/rules/rules.d" + VIEW-AS ALERT-BOX ERROR. + RETURN. + END. + + INPUT FROM VALUE(rules_d). + REPEAT: + CREATE tt_rules. + IMPORT tt_rules. + END. + INPUT CLOSE. + FOR EACH tt_rules WHERE tt_rules.RuleID = "" : + DELETE tt_rules. + END. + + categorylist = "". + FOR EACH tt_rules WHERE tt_rules.category<>"" : + IF LOOKUP(tt_rules.category, categorylist)=0 THEN + categorylist = categorylist + ",":U + tt_rules.category. + END. + categorylist = TRIM(categorylist,",":U). + + DO WITH FRAME {&FRAME-NAME} : + cb_category:LIST-ITEMS = categorylist. + END. + +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE WriteRules Dialog-Frame +PROCEDURE WriteRules : +/*------------------------------------------------------------------------------ + Purpose: + Parameters: <none> + Notes: +------------------------------------------------------------------------------*/ + + DEFINE VARIABLE rules_d AS CHARACTER NO-UNDO. + + FILE-INFO:FILE-NAME = "prolint/rules/rules.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN + rules_d = FILE-INFO:FULL-PATHNAME. + ELSE DO: + MESSAGE "Cannot find prolint/rules/rules.d" + VIEW-AS ALERT-BOX ERROR. + RETURN. + END. + + OUTPUT TO VALUE(rules_d). + FOR EACH tt_rules : + EXPORT tt_rules. + END. + OUTPUT CLOSE. + + MESSAGE "rule is now added to prolint/rules/rules.d" + VIEW-AS ALERT-BOX INFORMATION. + +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + Copied: trunk/prolint/core/lintcfg.w (from rev 274, trunk/prolint/lintcfg.w) =================================================================== --- trunk/prolint/core/lintcfg.w (rev 0) +++ trunk/prolint/core/lintcfg.w 2006-08-05 17:58:17 UTC (rev 276) @@ -0,0 +1,1175 @@ +&ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI +&ANALYZE-RESUME +&Scoped-define WINDOW-NAME C-Win +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS C-Win +/*------------------------------------------------------------------------ + + File: + prolint/core/lintcfg.w + + Description: + UI for maintaining the configuration files in prolint/settings + + Input Parameters: + pInitialProfile : initial value for combo-box "profile" + + Output Parameters: + <none> + + Author: + Jurjen Dijkstra + + Created: + July 3, 2001 + + ----------------------------------------------------------------- + + Copyright (C) 2001,2002,2003,2004 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------*/ +/* This .W file was created with the Progress AppBuilder. */ +/*----------------------------------------------------------------------*/ + +/* Create an unnamed pool to store all the widgets created + by this procedure. This is a good default which assures + that this procedure's triggers and internal procedures + will execute in this procedure's storage, and that proper + cleanup will occur on deletion of the procedure. */ + +CREATE WIDGET-POOL. + +/* *************************** Definitions ************************** */ +{prolint/core/dlc-version.i} + +/* Parameters Definitions --- */ + +/* pInitialProfile : initial value for combo-box "profile" */ +&IF DEFINED(UIB_is_running)=0 &THEN +DEFINE INPUT PARAMETER pInitialProfile AS CHARACTER NO-UNDO. +&ELSE +DEFINE VARIABLE pInitialProfile AS CHARACTER NO-UNDO. +&ENDIF + +/* Local Variable Definitions --- */ + +DEFINE VARIABLE CurrentProfile AS CHAR NO-UNDO INITIAL "":U. +DEFINE VARIABLE PrivateDir AS CHARACTER NO-UNDO. +DEFINE VARIABLE SharedDir AS CHARACTER NO-UNDO. +DEFINE VARIABLE RecentDir AS CHARACTER NO-UNDO. + +DEFINE TEMP-TABLE tt_rules NO-UNDO + FIELD RuleID AS CHARACTER FORMAT "x(15)":U + FIELD severity AS INTEGER FORMAT "9":U + FIELD useproparse AS LOGICAL FORMAT "x/ ":U + FIELD uselisting AS LOGICAL FORMAT "x/ ":U + FIELD usexref AS LOGICAL FORMAT "x/ ":U + FIELD useproclist AS LOGICAL FORMAT "x/ ":U + FIELD ignoreUIB AS LOGICAL FORMAT "x/ ":U + FIELD description AS CHARACTER FORMAT "x(60)":U + FIELD category AS CHARACTER + FIELD required AS LOGICAL INITIAL TRUE FORMAT "yes/no":U + FIELD customseverity AS INTEGER FORMAT "9":U + FIELD customrule AS LOGICAL INITIAL FALSE + INDEX idx_id AS PRIMARY RuleID. + +DEFINE TEMP-TABLE tt_output NO-UNDO + FIELD progname AS CHARACTER FORMAT "x(15)":U + FIELD DlcVersion AS INTEGER FORMAT ">9":U + FIELD WindowSystem AS CHARACTER + FIELD description AS CHARACTER FORMAT "x(80)":U + FIELD required AS LOGICAL FORMAT "yes/no":U INITIAL NO + INDEX idx_progname AS PRIMARY UNIQUE progname. + +DEFINE TEMP-TABLE tt_category NO-UNDO + FIELD catname AS CHARACTER + FIELD hframe AS HANDLE + FIELD hText AS HANDLE + FIELD numrules AS INTEGER. + +DEFINE VARIABLE categorytext AS CHARACTER NO-UNDO INITIAL "selected: &1 out of &2":T. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK + +/* ******************** Preprocessor Definitions ******************** */ + +&Scoped-define PROCEDURE-TYPE Window +&Scoped-define DB-AWARE no + +/* Name of first Frame and/or Browse and/or first Query */ +&Scoped-define FRAME-NAME DEFAULT-FRAME +&Scoped-define BROWSE-NAME brw_output + +/* Internal Tables (found by Frame, Query & Browse Queries) */ +&Scoped-define INTERNAL-TABLES tt_output + +/* Definitions for BROWSE brw_output */ +&Scoped-define FIELDS-IN-QUERY-brw_output tt_output.progname tt_output.required tt_output.description +&Scoped-define ENABLED-FIELDS-IN-QUERY-brw_output tt_output.required +&Scoped-define ENABLED-TABLES-IN-QUERY-brw_output tt_output +&Scoped-define FIRST-ENABLED-TABLE-IN-QUERY-brw_output tt_output +&Scoped-define SELF-NAME brw_output +&Scoped-define QUERY-STRING-brw_output FOR EACH tt_output +&Scoped-define OPEN-QUERY-brw_output OPEN QUERY {&SELF-NAME} FOR EACH tt_output. +&Scoped-define TABLES-IN-QUERY-brw_output tt_output +&Scoped-define FIRST-TABLE-IN-QUERY-brw_output tt_output + + +/* Definitions for FRAME DEFAULT-FRAME */ +&Scoped-define OPEN-BROWSERS-IN-QUERY-DEFAULT-FRAME ~ + ~{&OPEN-QUERY-brw_output} + +/* Standard List Definitions */ +&Scoped-Define ENABLED-OBJECTS btn_help btn_localdel cb-profiles brw_output ~ +btn_localcopy btn_new btn_shareddel ed_where +&Scoped-Define DISPLAYED-OBJECTS cb-profiles ed_where + +/* Custom List Definitions */ +/* List-1,List-2,List-3,List-4,List-5,List-6 */ + +/* _UIB-PREPROCESSOR-BLOCK-END */ +&ANALYZE-RESUME + + + +/* *********************** Control Definitions ********************** */ + +/* Define the widget handle for the window */ +DEFINE VAR C-Win AS WIDGET-HANDLE NO-UNDO. + +/* Definitions of the field level widgets */ +DEFINE BUTTON btn_help + LABEL "Help":T + SIZE 12 BY 1.14 TOOLTIP "Help". + +DEFINE BUTTON btn_localcopy + IMAGE-UP FILE "prolint/images/mklocal.bmp":U + IMAGE-INSENSITIVE FILE "prolint/images/mklocali.bmp":U NO-FOCUS + LABEL "Local Copy" + SIZE 12 BY 1.14 TOOLTIP "Make a local copy of this shared profile". + +DEFINE BUTTON btn_localdel + IMAGE-UP FILE "prolint/images/dellocal.bmp":U + IMAGE-INSENSITIVE FILE "prolint/images/dellocali.bmp":U NO-FOCUS + LABEL "Delete Local" + SIZE 12 BY 1.14 TOOLTIP "Delete this local profile (and maybe revert to shared profile)". + +DEFINE BUTTON btn_new + IMAGE-UP FILE "prolint/images/new.bmp":U NO-FOCUS + LABEL "New..." + SIZE 12 BY 1.14 TOOLTIP "Create a new profile". + +DEFINE BUTTON btn_shareddel + IMAGE-UP FILE "prolint/images/delshared.bmp":U + IMAGE-INSENSITIVE FILE "prolint/images/delsharedi.bmp":U NO-FOCUS + LABEL "Delete Shared" + SIZE 12 BY 1.14 TOOLTIP "Delete this shared profile". + +DEFINE VARIABLE cb-profiles AS CHARACTER FORMAT "X(256)":U INITIAL "<none>" + LABEL "Profile":T + VIEW-AS COMBO-BOX SORT INNER-LINES 10 + LIST-ITEMS "<none>" + DROP-DOWN-LIST + SIZE 41 BY 1 NO-UNDO. + +DEFINE VARIABLE ed_where AS CHARACTER FORMAT "X(256)":U + VIEW-AS TEXT + SIZE 61 BY .62 NO-UNDO. + +/* Query definitions */ +&ANALYZE-SUSPEND +DEFINE QUERY brw_output FOR + tt_output SCROLLING. +&ANALYZE-RESUME + +/* Browse definitions */ +DEFINE BROWSE brw_output +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS brw_output C-Win _FREEFORM + QUERY brw_output DISPLAY + tt_output.progname FORMAT "x(15)":U WIDTH-CHARS 15 + tt_output.required FORMAT "yes/no":U + tt_output.description FORMAT "x(80)":U LABEL "description" + +enable tt_output.required +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + WITH NO-ROW-MARKERS SEPARATORS SIZE 109 BY 5.24. + + +/* ************************ Frame Definitions *********************** */ + +DEFINE FRAME DEFAULT-FRAME + btn_help AT ROW 1 COL 50 + btn_localdel AT ROW 1 COL 26 + cb-profiles AT ROW 2.67 COL 8 COLON-ALIGNED + brw_output AT ROW 5.29 COL 3 + btn_localcopy AT ROW 1 COL 14 + btn_new AT ROW 1 COL 2 + btn_shareddel AT ROW 1 COL 38 + ed_where AT ROW 2.91 COL 50 COLON-ALIGNED NO-LABEL + "Select 1 or more outputhandlers:":T VIEW-AS TEXT + SIZE 32 BY .62 AT ROW 4.43 COL 3 + "Select which rules you want to run, by category:":T VIEW-AS TEXT + SIZE 51 BY .62 AT ROW 11.38 COL 3 + WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY + SIDE-LABELS NO-UNDERLINE THREE-D + AT COL 1 ROW 1 + SIZE 113.6 BY 22. + +DEFINE FRAME FRAME-categories + WITH 1 DOWN KEEP-TAB-ORDER OVERLAY + THREE-D + AT COL 3 ROW 12.24 + SCROLLABLE SIZE 109 BY 14.05 + BGCOLOR 15 . + + +/* *********************** Procedure Settings ************************ */ + +&ANALYZE-SUSPEND _PROCEDURE-SETTINGS +/* Settings for THIS-PROCEDURE + Type: Window + Allow: Basic,Browse,DB-Fields,Window,Query + Other Settings: COMPILE + */ +&ANALYZE-RESUME _END-PROCEDURE-SETTINGS + +/* ************************* Create Window ************************** */ + +&ANALYZE-SUSPEND _CREATE-WINDOW +IF SESSION:DISPLAY-TYPE = "GUI":U THEN + CREATE WINDOW C-Win ASSIGN + HIDDEN = YES + TITLE = "Prolint Profile configuration" + HEIGHT = 22 + WIDTH = 113.6 + MAX-HEIGHT = 25.1 + MAX-WIDTH = 120 + VIRTUAL-HEIGHT = 25.1 + VIRTUAL-WIDTH = 120 + RESIZE = yes + SCROLL-BARS = no + STATUS-AREA = no + BGCOLOR = ? + FGCOLOR = ? + KEEP-FRAME-Z-ORDER = yes + THREE-D = yes + MESSAGE-AREA = no + SENSITIVE = yes. +ELSE {&WINDOW-NAME} = CURRENT-WINDOW. +/* END WINDOW DEFINITION */ +&ANALYZE-RESUME + + + +/* *********** Runtime Attributes and AppBuilder Settings *********** */ + +&ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES +/* SETTINGS FOR WINDOW C-Win + VISIBLE,,RUN-PERSISTENT */ +/* REPARENT FRAME */ +ASSIGN FRAME FRAME-categories:FRAME = FRAME DEFAULT-FRAME:HANDLE. + +/* SETTINGS FOR FRAME DEFAULT-FRAME + */ +/* BROWSE-TAB brw_output cb-profiles DEFAULT-FRAME */ +/* SETTINGS FOR FRAME FRAME-categories + UNDERLINE */ +ASSIGN + FRAME FRAME-categories:HEIGHT = 10.19 + FRAME FRAME-categories:WIDTH = 109. + +IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win) +THEN C-Win:HIDDEN = no. + +/* _RUN-TIME-ATTRIBUTES-END */ +&ANALYZE-RESUME + + +/* Setting information for Queries and Browse Widgets fields */ + +&ANALYZE-SUSPEND _QUERY-BLOCK BROWSE brw_output +/* Query rebuild information for BROWSE brw_output + _START_FREEFORM +OPEN QUERY {&SELF-NAME} FOR EACH tt_output. + _END_FREEFORM + _Query is OPENED +*/ /* BROWSE brw_output */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _QUERY-BLOCK FRAME FRAME-categories +/* Query rebuild information for FRAME FRAME-categories + _Query is NOT OPENED +*/ /* FRAME FRAME-categories */ +&ANALYZE-RESUME + + + + + +/* ************************ Control Triggers ************************ */ + +&Scoped-define SELF-NAME C-Win +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL C-Win C-Win +ON END-ERROR OF C-Win /* Prolint Profile configuration */ +OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO: + /* This case occurs when the user presses the "Esc" key. + In a persistently run window, just ignore this. If we did not, the + application would exit. */ + IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL C-Win C-Win +ON WINDOW-CLOSE OF C-Win /* Prolint Profile configuration */ +DO: + /* This event will close the window and terminate the procedure. */ + APPLY "ENTRY":U TO cb-profiles IN FRAME {&FRAME-NAME}. + RUN SaveProfile (CurrentProfile). + APPLY "CLOSE":U TO THIS-PROCEDURE. + RETURN NO-APPLY. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME btn_help +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_help C-Win +ON CHOOSE OF btn_help IN FRAME DEFAULT-FRAME /* Help */ +DO: + + FILE-INFO:FILE-NAME = "prolint/help/lintcfg.htm":U. + {&_proparse_ prolint-nowarn(message)} + IF FILE-INFO:FULL-PATHNAME<>? THEN + RUN prolint/core/openhtml.p (FILE-INFO:FULL-PATHNAME). + ELSE + MESSAGE "no help found for lintcfg.w":T VIEW-AS ALERT-BOX. + + +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME btn_localcopy +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_localcopy C-Win +ON CHOOSE OF btn_localcopy IN FRAME DEFAULT-FRAME /* Local Copy */ +DO: + DEFINE VARIABLE targetdir AS CHARACTER NO-UNDO. + DEFINE VARIABLE basename AS CHARACTER NO-UNDO. + DEFINE VARIABLE fullpath AS CHARACTER NO-UNDO. + DEFINE VARIABLE attribs AS CHARACTER NO-UNDO. + + ASSIGN cb-profiles. + + IF cb-profiles=? OR cb-profiles="" OR cb-profiles="<none>":U THEN + RETURN NO-APPLY. + + targetdir = PrivateDir + "/":U + cb-profiles. + FILE-INFO:FILE-NAME = targetdir. + IF FILE-INFO:FULL-PATHNAME = ? THEN DO: + OS-CREATE-DIR VALUE(targetdir). + + FILE-INFO:FILE-NAME = SharedDir + "/":U + cb-profiles. + IF FILE-INFO:FULL-PATHNAME<>? THEN DO: + INPUT FROM OS-DIR (FILE-INFO:FULL-PATHNAME). + REPEAT: + IMPORT basename fullpath attribs. + IF NOT (attribs MATCHES "*D*":U OR basename=".":U OR basename="..":U) THEN + OS-COPY VALUE(fullpath) VALUE(targetdir). + END. + INPUT CLOSE. + END. + + + + RUN ImportCustomData. + END. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME btn_localdel +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_localdel C-Win +ON CHOOSE OF btn_localdel IN FRAME DEFAULT-FRAME /* Delete Local */ +DO: + ASSIGN cb-profiles. + + IF cb-profiles=? OR cb-profiles="" OR cb-profiles="<none>":U THEN + RETURN NO-APPLY. + + FILE-INFO:FILE-NAME = "local-prolint/settings/" + cb-profiles. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + OS-DELETE VALUE(FILE-INFO:FULL-PATHNAME) RECURSIVE. + cb-profiles:LIST-ITEMS = "<none>":U. + RUN GetProfiles. + cb-profiles:SCREEN-VALUE = "<none>":U. + CurrentProfile = "<none>":U. + APPLY "value-changed":U TO cb-profiles. + END. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME btn_new +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_new C-Win +ON CHOOSE OF btn_new IN FRAME DEFAULT-FRAME /* New... */ +DO: + DEFINE VARIABLE newprofile AS CHARACTER NO-UNDO. + + RUN prolint/core/dnewprofile.w (OUTPUT newprofile). + IF newprofile <> ? THEN DO: + RUN SaveProfile(CurrentProfile). + cb-profiles:LIST-ITEMS = cb-profiles:LIST-ITEMS + ",":U + newprofile. + cb-profiles:SCREEN-VALUE = newprofile. + APPLY "value-changed":U TO cb-profiles. + END. + + +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME btn_shareddel +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_shareddel C-Win +ON CHOOSE OF btn_shareddel IN FRAME DEFAULT-FRAME /* Delete Shared */ +DO: + ASSIGN cb-profiles. + + IF cb-profiles=? OR cb-profiles="" OR cb-profiles="<none>":U THEN + RETURN NO-APPLY. + + FILE-INFO:FILE-NAME = "prolint/settings/" + cb-profiles. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + OS-DELETE VALUE(FILE-INFO:FULL-PATHNAME) RECURSIVE. + cb-profiles:LIST-ITEMS = "<none>":U. + RUN GetProfiles. + cb-profiles:SCREEN-VALUE = "<none>":U. + CurrentProfile = "<none>":U. + APPLY "value-changed":U TO cb-profiles. + END. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define SELF-NAME cb-profiles +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cb-profiles C-Win +ON VALUE-CHANGED OF cb-profiles IN FRAME DEFAULT-FRAME /* Profile */ +DO: + ASSIGN cb-profiles. + IF cb-profiles <> CurrentProfile THEN + RUN SaveProfile(CurrentProfile). + CurrentProfile = cb-profiles. + RUN ImportCustomData. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +&Scoped-define BROWSE-NAME brw_output +&UNDEFINE SELF-NAME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK C-Win + + +/* *************************** Main Block *************************** */ + +/* Set CURRENT-WINDOW: this will parent dialog-boxes and frames. */ +ASSIGN CURRENT-WINDOW = {&WINDOW-NAME} + THIS-PROCEDURE:CURRENT-WINDOW = {&WINDOW-NAME}. + +/* The CLOSE event can be used from inside or outside the procedure to */ +/* terminate it. */ +ON CLOSE OF THIS-PROCEDURE + RUN disable_UI. + +/* Best default for GUI applications is... */ +PAUSE 0 BEFORE-HIDE. + +/* Now enable the interface and wait for the exit condition. */ +/* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */ +MAIN-BLOCK: +DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK + ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK: + + RUN GetDirectories. + RUN ImportDefaultData. + RUN enable_UI. + RUN GetProfiles. + RUN CreateCategories. + RUN DisplayCategoryUsage. + APPLY "entry":U TO cb-profiles. + + IF NOT THIS-PROCEDURE:PERSISTENT THEN + WAIT-FOR CLOSE OF THIS-PROCEDURE. +END. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + + +/* ********************** Internal Procedures *********************** */ + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE CreateCategories C-Win +PROCEDURE CreateCategories : +/*------------------------------------------------------------------------------ + Purpose: Make a list of categories. + Parameters: <none> + Notes: +------------------------------------------------------------------------------*/ + + FOR EACH tt_rules : + FIND tt_category WHERE tt_category.catname = tt_rules.category NO-ERROR. + IF NOT AVAILABLE tt_category THEN DO: + CREATE tt_category. + ASSIGN tt_category.catname = tt_rules.category. + END. + ASSIGN tt_category.numrules = tt_category.numrules + 1. + END. + + RUN CreateCategoryFrames. + +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE CreateCategoryFrames C-Win +PROCEDURE CreateCategoryFrames : +/*------------------------------------------------------------------------------ + Purpose: Create a "browse" where each row is in fact a frame, + representing a category + Parameters: <none> + Notes: +------------------------------------------------------------------------------*/ + + DEFINE VARIABLE frameheight AS INTEGER NO-UNDO INITIAL 25. + DEFINE VARIABLE NextY AS INTEGER NO-UNDO. + DEFINE VARIABLE hwidget AS HANDLE NO-UNDO. + DEFINE VARIABLE parentheight AS INTEGER NO-UNDO. + + parentheight = FRAME frame-categories:HEIGHT-PIXELS. + + FOR EACH tt_category BY tt_category.catname : + CREATE FRAME tt_category.hframe + ASSIGN + PARENT = FRAME frame-categories:FIRST-CHILD + X = 0 + Y = NextY + HEIGHT-PIXELS = frameheight + WIDTH-PIXELS = FRAME frame-categories:WIDTH-PIXELS + THREE-D = TRUE + BGCOLOR = FRAME frame-categories:BGCOLOR + FGCOLOR = FRAME frame-categories:FGCOLOR + BOX = NO + VISIBLE = YES. + + CREATE RECTANGLE hwidget + ASSIGN + PARENT = tt_category.hframe:FIRST-CHILD + X = 0 + Y = frameheight - 1 + HEIGHT-PIXELS = 1 + WIDTH-PIXELS = tt_category.hframe:WIDTH-PIXELS + FGCOLOR = 8 + VISIBLE = YES. + + NextY = NextY + frameheight. + + CREATE TEXT hwidget + ASSIGN + PARENT = tt_category.hframe:FIRST-CHILD + X = 10 + Y = 3 + WIDTH-PIXELS = 150 + HEIGHT-PIXELS = 20 + FORMAT = "x(256)" + SCREEN-VALUE = tt_category.catname + /* FONT = 6 */ + VISIBLE = YES. + + CREATE BUTTON hwidget + ASSIGN + PARENT = tt_category.hframe:FIRST-CHILD + X = 170 + Y = 3 + WIDTH-PIXELS = 50 + HEIGHT-PIXELS = 20 + LABEL = "All" + VISIBLE = YES + SENSITIVE = YES + TRIGGERS: + ON "CHOOSE":U PERSISTENT RUN SelectCategoryAll IN THIS-PROCEDURE (tt_category.catname). + END TRIGGERS. + + CREATE BUTTON hwidget + ASSIGN + PARENT = tt_category.hframe:FIRST-CHILD + X = 230 + Y = 3 + WIDTH-PIXELS = 50 + HEIGHT-PIXELS = 20 + LABEL = "None" + VISIBLE = YES + SENSITIVE = YES + TRIGGERS: + ON "CHOOSE":U PERSISTENT RUN SelectCategoryNone IN THIS-PROCEDURE (tt_category.catname). + END TRIGGERS. + + CREATE BUTTON hwidget + ASSIGN + PARENT = tt_category.hframe:FIRST-CHILD + X = 290 + Y = 3 + WIDTH-PIXELS = 50 + HEIGHT-PIXELS = 20 + LABEL = "Some..." + VISIBLE = YES + SENSITIVE = YES + TRIGGERS: + ON "CHOOSE":U PERSISTENT RUN SelectCategorySome IN THIS-PROCEDURE (tt_category.catname). + END TRIGGERS. + + CREATE TEXT tt_Category.hText + ASSIGN + PARENT = tt_category.hframe:FIRST-CHILD + X = 370 + Y = 3 + WIDTH-PIXELS = 150 + HEIGHT-PIXELS = 20 + FORMAT = "x(256)" + SCREEN-VALUE = "" + VISIBLE = YES. + + END. + + FRAME frame-categories:VIRTUAL-HEIGHT-PIXELS = NextY. + FRAME frame-categories:HEIGHT-PIXELS = parentheight. + +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI C-Win _DEFAULT-DISABLE +PROCEDURE disable_UI : +/*------------------------------------------------------------------------------ + Purpose: DISABLE the User Interface + Parameters: <none> + Notes: Here we clean-up the user-interface by deleting + dynamic widgets we have created and/or hide + frames. This procedure is usually called when + we are ready to "clean-up" after running. +------------------------------------------------------------------------------*/ + /* Delete the WINDOW we created */ + IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win) + THEN DELETE WIDGET C-Win. + IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DisplayCategoryUsage C-Win +PROCEDURE DisplayCategoryUsage : +/*------------------------------------------------------------------------------ + Purpose: Display how many rules are selected, by category + Parameters: <none> + Notes: +------------------------------------------------------------------------------*/ + DEFINE VARIABLE numselected AS INTEGER NO-UNDO. + + FOR EACH tt_category : + numselected = 0. + FOR EACH tt_rules WHERE tt_rules.category = tt_category.catname + AND tt_rules.required = TRUE: + numselected = numselected + 1. + END. + tt_category.hText:SCREEN-VALUE = SUBSTITUTE(categorytext, numselected, tt_category.numrules). + END. + + +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI C-Win _DEFAULT-ENABLE +PROCEDURE enable_UI : +/*------------------------------------------------------------------------------ + Purpose: ENABLE the User Interface + Parameters: <none> + Notes: Here we display/view/enable the widgets in the + user-interface. In addition, OPEN all queries + associated with each FRAME and BROWSE. + These statements here are based on the "Other + Settings" section of the widget Property Sheets. +------------------------------------------------------------------------------*/ + DISPLAY cb-profiles ed_where + WITH FRAME DEFAULT-FRAME IN WINDOW C-Win. + ENABLE btn_help btn_localdel cb-profiles brw_output btn_localcopy btn_new + btn_shareddel ed_where + WITH FRAME DEFAULT-FRAME IN WINDOW C-Win. + {&OPEN-BROWSERS-IN-QUERY-DEFAULT-FRAME} + VIEW FRAME FRAME-categories IN WINDOW C-Win. + {&OPEN-BROWSERS-IN-QUERY-FRAME-categories} + VIEW C-Win. +END PROCEDURE. + +/* _UIB-CODE-BLOCK-END */ +&ANALYZE-RESUME + +&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE GetDirectories C-Win +PROCEDURE GetDirectories : +/*------------------------------------------------------------------------------ + Purpose: +---... [truncated message content] |
From: <ju...@us...> - 2006-08-05 16:54:24
|
Revision: 275 Author: jurjen Date: 2006-08-05 09:54:06 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=275&view=rev Log Message: ----------- new directory structure Added Paths: ----------- trunk/prolint/launch/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-05 10:34:42
|
Revision: 274 Author: jurjen Date: 2006-08-05 03:32:40 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=274&view=rev Log Message: ----------- continued: clean up the root of prolint; move files to subdirectories (not finished yet, but it works so far) Modified Paths: -------------- trunk/prolint/core/filterplugins.p trunk/prolint/core/lintsuper.p trunk/prolint/core/prolint.p trunk/prolint/desktop.w trunk/prolint/dnewrule.w trunk/prolint/filters/filterparams.i trunk/prolint/help/desktop.htxt trunk/prolint/help/newrule.htxt trunk/prolint/help/rules/ifindent-details.htxt trunk/prolint/help/rules/ifindent.htxt trunk/prolint/lintcfg.w trunk/prolint/outputhandlers/PRO4mfile.p trunk/prolint/outputhandlers/dlgfilter.w trunk/prolint/outputhandlers/ed4win.p trunk/prolint/outputhandlers/logexcel.p trunk/prolint/outputhandlers/logfile.p trunk/prolint/outputhandlers/logwin.w trunk/prolint/outputhandlers/logwin8.w trunk/prolint/outputhandlers/prolintdb.p trunk/prolint/outputhandlers/regrlog.p trunk/prolint/outputhandlers/showhtml.p trunk/prolint/outputhandlers/tabfile.p trunk/prolint/prolintdb/dirstats.w trunk/prolint/prolintdb/incstats.w trunk/prolint/prolintdb/rulestats.w trunk/prolint/prolintdb/runffq.p trunk/prolint/rtb/checkin-handler.p trunk/prolint/rules/_template.p trunk/prolint/rules/abbrevkwd.p trunk/prolint/rules/abbrevtable.p trunk/prolint/rules/alertmessage.p trunk/prolint/rules/allfinds.p trunk/prolint/rules/backslash.p trunk/prolint/rules/blocklabel.p trunk/prolint/rules/colon-t.p trunk/prolint/rules/contains.p trunk/prolint/rules/create.p trunk/prolint/rules/dbtrigger.p trunk/prolint/rules/defaultname.p trunk/prolint/rules/do1.p trunk/prolint/rules/dotcomment.p trunk/prolint/rules/emptyblock.p trunk/prolint/rules/endtype.p trunk/prolint/rules/errortext.p trunk/prolint/rules/findstate-tt.p trunk/prolint/rules/findstate.p trunk/prolint/rules/fnusage.p trunk/prolint/rules/groupassign.p trunk/prolint/rules/i18nlength.p trunk/prolint/rules/idiskeyword.p trunk/prolint/rules/ifindent.p trunk/prolint/rules/ifparens.p trunk/prolint/rules/lexcolon.p trunk/prolint/rules/matches.p trunk/prolint/rules/maxchar.p trunk/prolint/rules/message.p trunk/prolint/rules/messagetype.p trunk/prolint/rules/namecheck.p trunk/prolint/rules/nameconv.i trunk/prolint/rules/nameconv.p trunk/prolint/rules/nobrackets.p trunk/prolint/rules/nocomment.p trunk/prolint/rules/noeffect.p trunk/prolint/rules/noerror.p trunk/prolint/rules/noundo.p trunk/prolint/rules/nowhere.p trunk/prolint/rules/obsoletenodes.p trunk/prolint/rules/oflink.p trunk/prolint/rules/query.p trunk/prolint/rules/runargs.p trunk/prolint/rules/runasnotfound.p trunk/prolint/rules/runname.p trunk/prolint/rules/runnotfound.p trunk/prolint/rules/sepdbui.p trunk/prolint/rules/sequence.p trunk/prolint/rules/shared.p trunk/prolint/rules/sharelock.p trunk/prolint/rules/sortaccess.p trunk/prolint/rules/strattrib.p trunk/prolint/rules/substitute.p trunk/prolint/rules/tablename.p trunk/prolint/rules/tableusage.p trunk/prolint/rules/ttlock.p trunk/prolint/rules/ttnoindex.p trunk/prolint/rules/undoretry.p trunk/prolint/rules/uninproc.p trunk/prolint/rules/unquoted.p trunk/prolint/rules/use-index.p trunk/prolint/rules/varusage.p trunk/prolint/rules/weakchar.p trunk/prolint/rules/when.p trunk/prolint/rules/where-udf.p trunk/prolint/rules/wholeindex.p trunk/prolint/selectfiles.w trunk/prolint/start.p Added Paths: ----------- trunk/prolint/core/_adetool.i trunk/prolint/core/add2protools.p trunk/prolint/core/checkrelease.p trunk/prolint/core/dlc-version.i trunk/prolint/core/openhtml.p trunk/prolint/core/ruleparams.i trunk/prolint/core/ttprocedure.i Removed Paths: ------------- trunk/prolint/_adetool.i trunk/prolint/add2protools.p trunk/prolint/checkrelease.p trunk/prolint/customize.i trunk/prolint/dlc-version.i trunk/prolint/openhtml.p trunk/prolint/ruleparams.i trunk/prolint/ttprocedure.i Deleted: trunk/prolint/_adetool.i =================================================================== --- trunk/prolint/_adetool.i 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/_adetool.i 2006-08-05 10:32:40 UTC (rev 274) @@ -1,53 +0,0 @@ -/********************************************************************* -* Copyright (C) 2000 by Progress Software Corporation ("PSC"), * -* 14 Oak Park, Bedford, MA 01730, and other contributors as listed * -* below. All Rights Reserved. * -* * -* The Initial Developer of the Original Code is PSC. The Original * -* Code is Progress IDE code released to open source December 1, 2000.* -* * -* The contents of this file are subject to the Possenet Public * -* License Version 1.0 (the "License"); you may not use this file * -* except in compliance with the License. A copy of the License is * -* available as of the date of this notice at * -* http://www.possenet.org/license.html * -* * -* Software distributed under the License is distributed on an "AS IS"* -* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. You* -* should refer to the License for the specific language governing * -* rights and limitations under the License. * -* * -* Contributors: * -* * -*********************************************************************/ - -/************************************************************************** - Procedure: _adetool.i - - Purpose: Defines an internal procedure called 'ADEPersistent'. This - should be included in any Persistent procedure which you do - not want to be automatically deleted by any ADE tools (e.g. - Editor, UIB). The program _runtool.p will check for the - existence of ADEPersistent in a procedure and will delete - it only if it doesn't exist. - - Syntax : {adecomm/_adetool.i} - - Parameters: None - - Description: - Notes : - Authors: Gerry Seidl - Date : 1/18/95 - - Notes : copied to directory prolint, in order to not have to install - directory adecomm just for proliny - Authors: Jurjen Dijkstra - Date : 8/30/2002 -**************************************************************************/ - -PROCEDURE ADEPersistent: - /* purpose : notify ADE so this persistent procedue will not be deleted */ - RETURN "OK":U. -END. - Deleted: trunk/prolint/add2protools.p =================================================================== --- trunk/prolint/add2protools.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/add2protools.p 2006-08-05 10:32:40 UTC (rev 274) @@ -1,55 +0,0 @@ -/* ==================================================================== - file : prolint/add2protools.p - by : Jurjen Dijkstra - purpose : Add Prolint Desktop to PRO*TOOLS palette - ==================================================================== */ - -DEFINE INPUT PARAMETER cAction AS CHARACTER NO-UNDO. -DEFINE OUTPUT PARAMETER lAlreadyInThere AS LOGICAL NO-UNDO INITIAL NO. - -DEFINE VARIABLE ProtoolsDatfile AS CHARACTER NO-UNDO. -DEFINE VARIABLE cProgram AS CHARACTER NO-UNDO. -DEFINE VARIABLE iOrder AS INTEGER NO-UNDO. -DEFINE VARIABLE iMaxOrder AS INTEGER NO-UNDO. -DEFINE VARIABLE hproc AS HANDLE NO-UNDO. - -GET-KEY-VALUE SECTION "ProTools" - KEY "FunctionDefs" VALUE ProtoolsDatfile. -IF ProtoolsDatfile=? THEN RETURN. - -/* read protools.dat */ -INPUT FROM VALUE(ProtoolsDatfile). -REPEAT: - ASSIGN cProgram = "" - iOrder = 0. - IMPORT ^ cProgram ^ ^ ^ iOrder ^. - IF cProgram MATCHES "*prolint*desktop*" THEN - lAlreadyInThere = TRUE. - IF iOrder > iMaxOrder THEN - iMaxOrder = iOrder. -END. -INPUT CLOSE. - -IF cAction = "ADD":U THEN DO: - /* append to protools.dat, if still needed */ - IF NOT lAlreadyInThere THEN DO: - OUTPUT TO VALUE(ProtoolsDatfile) APPEND. - PUT UNFORMATTED - SUBSTITUTE('"Prolint Desktop" "prolint/desktop.w" "prolint/protools.bmp" yes yes &1 no',STRING(iMaxOrder + 10)) - SKIP. - OUTPUT CLOSE. - lAlreadyInThere = TRUE. - - /* try to close protools palette */ - hproc = SESSION:FIRST-PROCEDURE. - DO WHILE (VALID-HANDLE(hProc)) AND NOT (hProc:FILE-NAME MATCHES "*protools*_protool*") : - hproc = hproc:NEXT-SIBLING. - END. - IF (VALID-HANDLE(hProc)) AND (hProc:FILE-NAME MATCHES "*protools*_protool*") THEN - RUN Destroy IN hProc NO-ERROR. - MESSAGE "Re-open the PRO*Tools palette to see the new Prolint Desktop option" - VIEW-AS ALERT-BOX. - END. -END. - - Deleted: trunk/prolint/checkrelease.p =================================================================== --- trunk/prolint/checkrelease.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/checkrelease.p 2006-08-05 10:32:40 UTC (rev 274) @@ -1,159 +0,0 @@ -/* =========================================================================== - file : prolint/checkrelease.p - purpose : check on internet if a new Prolint release is available - --------------------------------------------------------------------------- - - Copyright (C) 2001,2002 Jurjen Dijkstra - - This file is part of Prolint. - - Prolint is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - Prolint 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with Prolint; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - =========================================================================== */ - -{prolint/dlc-version.i} - -DEFINE VARIABLE RemoteRelease AS INTEGER NO-UNDO. -DEFINE VARIABLE LocalRelease AS INTEGER NO-UNDO. -DEFINE VARIABLE RemoteAvail AS LOGICAL NO-UNDO INITIAL YES. - -IF NOT (OPSYS MATCHES "win*") THEN DO: - MESSAGE "Sorry, need Windows for this feature." - VIEW-AS ALERT-BOX. - RETURN. -END. - -RUN GetRemoteRelease. -IF NOT RemoteAvail THEN - RETURN. - -RUN GetLocalRelease. - -IF RemoteRelease <= LocalRelease THEN - MESSAGE "Your release of Prolint is up to date." - VIEW-AS ALERT-BOX. -ELSE DO: - MESSAGE "You don't have the latest Prolint release:" SKIP - "release " RemoteRelease " is available," - "you are using release " LocalRelease SKIP(2) - "You will now be redirected to the Prolint website..." - VIEW-AS ALERT-BOX. - RUN prolint/openhtml.p("http://www.prolint.org/history.htm":U). -END. - -RETURN. - -/* ================ internal procs ========================== */ - -DEFINE VARIABLE remote_ini AS CHARACTER NO-UNDO. - -PROCEDURE GetRemoteRelease : - - DEFINE VARIABLE i AS INTEGER NO-UNDO. - DEFINE VARIABLE cLine AS CHARACTER NO-UNDO. - - RUN HTTPGet. - - DO i=1 TO NUM-ENTRIES(remote_ini, CHR(13)) : - cLine = TRIM(ENTRY(i, remote_ini, CHR(13)), CHR(10)). - - IF ENTRY(1, cLine, "=") = "prolint" THEN DO: - RemoteRelease = INTEGER(ENTRY(2, cLine, "=")). - RETURN. - END. - END. - -END PROCEDURE. - - -PROCEDURE GetLocalRelease : - - DEFINE VARIABLE cLine AS CHARACTER NO-UNDO. - - FILE-INFO:FILE-NAME = "prolint/help/release.ini". - - INPUT FROM VALUE(file-info:FULL-PATHNAME). - REPEAT: - IMPORT UNFORMATTED cLine NO-ERROR. - IF ENTRY(1, cLine, "=") = "prolint" THEN - LocalRelease = INTEGER(ENTRY(2, cLine, "=")). - END. - INPUT CLOSE. - -END PROCEDURE. - - -/* ============ the HTTP Get part : ============================== */ -/* (mostly copied from knowledgebase article 20011 and simplified) */ - -DEFINE VARIABLE vSocket AS HANDLE NO-UNDO. -DEFINE VARIABLE wloop AS LOGICAL NO-UNDO. -DEFINE VARIABLE vStr AS CHARACTER NO-UNDO. -DEFINE VARIABLE vBuffer AS MEMPTR NO-UNDO. - -PROCEDURE HTTPGet: - - DEFINE VARIABLE wstatus AS LOGICAL NO-UNDO. - - wloop = YES. - CREATE SOCKET vSocket. - vSocket:SET-READ-RESPONSE-PROCEDURE ("readHandler", THIS-PROCEDURE). - wstatus = vSocket:CONNECT("-H www.twiki.org -S 80") - NO-ERROR. - IF wstatus = NO THEN DO: - MESSAGE "Connection to http server is unavailable." - "There is perhaps a firewall or proxy problem.". - DELETE OBJECT vSocket. - RemoteAvail = FALSE. - RETURN. - END. - - vStr = "GET /release.ini HTTP/1.0~n~n~n". - - SET-SIZE(vBuffer) = LENGTH(vStr) + 1. - PUT-STRING(vBuffer,1) = vStr. - vSocket:WRITE(vBuffer, 1, LENGTH(vStr)). - SET-SIZE(vBuffer) = 0. - DO WHILE wloop: - WAIT-FOR READ-RESPONSE OF vSocket. - END. - vSocket:DISCONNECT(). - DELETE OBJECT vSocket. - - /* remove HHTP header */ - remote_ini = SUBSTRING (remote_ini, - INDEX(remote_ini, CHR(13) + CHR(10) + CHR(13) + CHR(10))). - -END PROCEDURE. - - -PROCEDURE readHandler: - DEFINE VARIABLE l AS INTEGER NO-UNDO. - DEFINE VARIABLE b AS MEMPTR NO-UNDO. - - l = vSocket:GET-BYTES-AVAILABLE(). - IF l > 0 THEN DO: - SET-SIZE(b) = l + 1. - vSocket:READ(b, 1, l, 1). - remote_ini = remote_ini + GET-STRING(b,1). - SET-SIZE(b) = 0. - wloop = YES. - END. - ELSE DO: - wloop = NO. - vSocket:DISCONNECT(). - END. -END. - - Copied: trunk/prolint/core/_adetool.i (from rev 250, trunk/prolint/_adetool.i) =================================================================== --- trunk/prolint/core/_adetool.i (rev 0) +++ trunk/prolint/core/_adetool.i 2006-08-05 10:32:40 UTC (rev 274) @@ -0,0 +1,53 @@ +/********************************************************************* +* Copyright (C) 2000 by Progress Software Corporation ("PSC"), * +* 14 Oak Park, Bedford, MA 01730, and other contributors as listed * +* below. All Rights Reserved. * +* * +* The Initial Developer of the Original Code is PSC. The Original * +* Code is Progress IDE code released to open source December 1, 2000.* +* * +* The contents of this file are subject to the Possenet Public * +* License Version 1.0 (the "License"); you may not use this file * +* except in compliance with the License. A copy of the License is * +* available as of the date of this notice at * +* http://www.possenet.org/license.html * +* * +* Software distributed under the License is distributed on an "AS IS"* +* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. You* +* should refer to the License for the specific language governing * +* rights and limitations under the License. * +* * +* Contributors: * +* * +*********************************************************************/ + +/************************************************************************** + Procedure: _adetool.i + + Purpose: Defines an internal procedure called 'ADEPersistent'. This + should be included in any Persistent procedure which you do + not want to be automatically deleted by any ADE tools (e.g. + Editor, UIB). The program _runtool.p will check for the + existence of ADEPersistent in a procedure and will delete + it only if it doesn't exist. + + Syntax : {adecomm/_adetool.i} + + Parameters: None + + Description: + Notes : + Authors: Gerry Seidl + Date : 1/18/95 + + Notes : copied to directory prolint, in order to not have to install + directory adecomm just for proliny + Authors: Jurjen Dijkstra + Date : 8/30/2002 +**************************************************************************/ + +PROCEDURE ADEPersistent: + /* purpose : notify ADE so this persistent procedue will not be deleted */ + RETURN "OK":U. +END. + Copied: trunk/prolint/core/add2protools.p (from rev 250, trunk/prolint/add2protools.p) =================================================================== --- trunk/prolint/core/add2protools.p (rev 0) +++ trunk/prolint/core/add2protools.p 2006-08-05 10:32:40 UTC (rev 274) @@ -0,0 +1,55 @@ +/* ==================================================================== + file : prolint/core/add2protools.p + by : Jurjen Dijkstra + purpose : Add Prolint Desktop to PRO*TOOLS palette + ==================================================================== */ + +DEFINE INPUT PARAMETER cAction AS CHARACTER NO-UNDO. +DEFINE OUTPUT PARAMETER lAlreadyInThere AS LOGICAL NO-UNDO INITIAL NO. + +DEFINE VARIABLE ProtoolsDatfile AS CHARACTER NO-UNDO. +DEFINE VARIABLE cProgram AS CHARACTER NO-UNDO. +DEFINE VARIABLE iOrder AS INTEGER NO-UNDO. +DEFINE VARIABLE iMaxOrder AS INTEGER NO-UNDO. +DEFINE VARIABLE hproc AS HANDLE NO-UNDO. + +GET-KEY-VALUE SECTION "ProTools" + KEY "FunctionDefs" VALUE ProtoolsDatfile. +IF ProtoolsDatfile=? THEN RETURN. + +/* read protools.dat */ +INPUT FROM VALUE(ProtoolsDatfile). +REPEAT: + ASSIGN cProgram = "" + iOrder = 0. + IMPORT ^ cProgram ^ ^ ^ iOrder ^. + IF cProgram MATCHES "*prolint*desktop*" THEN + lAlreadyInThere = TRUE. + IF iOrder > iMaxOrder THEN + iMaxOrder = iOrder. +END. +INPUT CLOSE. + +IF cAction = "ADD":U THEN DO: + /* append to protools.dat, if still needed */ + IF NOT lAlreadyInThere THEN DO: + OUTPUT TO VALUE(ProtoolsDatfile) APPEND. + PUT UNFORMATTED + SUBSTITUTE('"Prolint Desktop" "prolint/desktop.w" "prolint/protools.bmp" yes yes &1 no',STRING(iMaxOrder + 10)) + SKIP. + OUTPUT CLOSE. + lAlreadyInThere = TRUE. + + /* try to close protools palette */ + hproc = SESSION:FIRST-PROCEDURE. + DO WHILE (VALID-HANDLE(hProc)) AND NOT (hProc:FILE-NAME MATCHES "*protools*_protool*") : + hproc = hproc:NEXT-SIBLING. + END. + IF (VALID-HANDLE(hProc)) AND (hProc:FILE-NAME MATCHES "*protools*_protool*") THEN + RUN Destroy IN hProc NO-ERROR. + MESSAGE "Re-open the PRO*Tools palette to see the new Prolint Desktop option" + VIEW-AS ALERT-BOX. + END. +END. + + Copied: trunk/prolint/core/checkrelease.p (from rev 262, trunk/prolint/checkrelease.p) =================================================================== --- trunk/prolint/core/checkrelease.p (rev 0) +++ trunk/prolint/core/checkrelease.p 2006-08-05 10:32:40 UTC (rev 274) @@ -0,0 +1,159 @@ +/* =========================================================================== + file : prolint/core/checkrelease.p + purpose : check on internet if a new Prolint release is available + --------------------------------------------------------------------------- + + Copyright (C) 2001,2002 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + =========================================================================== */ + +{prolint/core/dlc-version.i} + +DEFINE VARIABLE RemoteRelease AS INTEGER NO-UNDO. +DEFINE VARIABLE LocalRelease AS INTEGER NO-UNDO. +DEFINE VARIABLE RemoteAvail AS LOGICAL NO-UNDO INITIAL YES. + +IF NOT (OPSYS MATCHES "win*") THEN DO: + MESSAGE "Sorry, need Windows for this feature." + VIEW-AS ALERT-BOX. + RETURN. +END. + +RUN GetRemoteRelease. +IF NOT RemoteAvail THEN + RETURN. + +RUN GetLocalRelease. + +IF RemoteRelease <= LocalRelease THEN + MESSAGE "Your release of Prolint is up to date." + VIEW-AS ALERT-BOX. +ELSE DO: + MESSAGE "You don't have the latest Prolint release:" SKIP + "release " RemoteRelease " is available," + "you are using release " LocalRelease SKIP(2) + "You will now be redirected to the Prolint website..." + VIEW-AS ALERT-BOX. + RUN prolint/core/openhtml.p("http://www.prolint.org/history.htm":U). +END. + +RETURN. + +/* ================ internal procs ========================== */ + +DEFINE VARIABLE remote_ini AS CHARACTER NO-UNDO. + +PROCEDURE GetRemoteRelease : + + DEFINE VARIABLE i AS INTEGER NO-UNDO. + DEFINE VARIABLE cLine AS CHARACTER NO-UNDO. + + RUN HTTPGet. + + DO i=1 TO NUM-ENTRIES(remote_ini, CHR(13)) : + cLine = TRIM(ENTRY(i, remote_ini, CHR(13)), CHR(10)). + + IF ENTRY(1, cLine, "=") = "prolint" THEN DO: + RemoteRelease = INTEGER(ENTRY(2, cLine, "=")). + RETURN. + END. + END. + +END PROCEDURE. + + +PROCEDURE GetLocalRelease : + + DEFINE VARIABLE cLine AS CHARACTER NO-UNDO. + + FILE-INFO:FILE-NAME = "prolint/help/release.ini". + + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + IMPORT UNFORMATTED cLine NO-ERROR. + IF ENTRY(1, cLine, "=") = "prolint" THEN + LocalRelease = INTEGER(ENTRY(2, cLine, "=")). + END. + INPUT CLOSE. + +END PROCEDURE. + + +/* ============ the HTTP Get part : ============================== */ +/* (mostly copied from knowledgebase article 20011 and simplified) */ + +DEFINE VARIABLE vSocket AS HANDLE NO-UNDO. +DEFINE VARIABLE wloop AS LOGICAL NO-UNDO. +DEFINE VARIABLE vStr AS CHARACTER NO-UNDO. +DEFINE VARIABLE vBuffer AS MEMPTR NO-UNDO. + +PROCEDURE HTTPGet: + + DEFINE VARIABLE wstatus AS LOGICAL NO-UNDO. + + wloop = YES. + CREATE SOCKET vSocket. + vSocket:SET-READ-RESPONSE-PROCEDURE ("readHandler", THIS-PROCEDURE). + wstatus = vSocket:CONNECT("-H www.twiki.org -S 80") + NO-ERROR. + IF wstatus = NO THEN DO: + MESSAGE "Connection to http server is unavailable." + "There is perhaps a firewall or proxy problem.". + DELETE OBJECT vSocket. + RemoteAvail = FALSE. + RETURN. + END. + + vStr = "GET /release.ini HTTP/1.0~n~n~n". + + SET-SIZE(vBuffer) = LENGTH(vStr) + 1. + PUT-STRING(vBuffer,1) = vStr. + vSocket:WRITE(vBuffer, 1, LENGTH(vStr)). + SET-SIZE(vBuffer) = 0. + DO WHILE wloop: + WAIT-FOR READ-RESPONSE OF vSocket. + END. + vSocket:DISCONNECT(). + DELETE OBJECT vSocket. + + /* remove HHTP header */ + remote_ini = SUBSTRING (remote_ini, + INDEX(remote_ini, CHR(13) + CHR(10) + CHR(13) + CHR(10))). + +END PROCEDURE. + + +PROCEDURE readHandler: + DEFINE VARIABLE l AS INTEGER NO-UNDO. + DEFINE VARIABLE b AS MEMPTR NO-UNDO. + + l = vSocket:GET-BYTES-AVAILABLE(). + IF l > 0 THEN DO: + SET-SIZE(b) = l + 1. + vSocket:READ(b, 1, l, 1). + remote_ini = remote_ini + GET-STRING(b,1). + SET-SIZE(b) = 0. + wloop = YES. + END. + ELSE DO: + wloop = NO. + vSocket:DISCONNECT(). + END. +END. + + Copied: trunk/prolint/core/dlc-version.i (from rev 262, trunk/prolint/dlc-version.i) =================================================================== --- trunk/prolint/core/dlc-version.i (rev 0) +++ trunk/prolint/core/dlc-version.i 2006-08-05 10:32:40 UTC (rev 274) @@ -0,0 +1,20 @@ + +/* Which (main) version of Progress are we running? */ +&IF INTEGER(ENTRY(1,PROVERSION,'.'))=8 &THEN + &GLOBAL-DEFINE dlc-version 8 +&ELSEIF INTEGER(ENTRY(1,PROVERSION,'.'))=9 &THEN + &GLOBAL-DEFINE dlc-version 9 +&ELSEIF INTEGER(ENTRY(1,PROVERSION,'.'))=10 &THEN + &GLOBAL-DEFINE dlc-version 10 +&ENDIF + +/* Is this session running in GUI, ChUI or Batch? + This defines which outputhandlers are supported, and some more */ +{&_proparse_ prolint-nowarn(varusage)} +DEFINE VARIABLE SessionWindowSystem AS CHARACTER NO-UNDO. +IF SESSION:BATCH-MODE THEN + SessionWindowSystem="". +ELSE + SessionWindowSystem=SESSION:DISPLAY-TYPE. + + \ No newline at end of file Modified: trunk/prolint/core/filterplugins.p =================================================================== --- trunk/prolint/core/filterplugins.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/core/filterplugins.p 2006-08-05 10:32:40 UTC (rev 274) @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------ */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE INPUT PARAMETER pProfileDirectory AS CHARACTER NO-UNDO. Modified: trunk/prolint/core/lintsuper.p =================================================================== --- trunk/prolint/core/lintsuper.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/core/lintsuper.p 2006-08-05 10:32:40 UTC (rev 274) @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------ */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE INPUT PARAMETER hparser AS HANDLE NO-UNDO. DEFINE INPUT PARAMETER hpFilterPlugins AS HANDLE NO-UNDO. @@ -34,7 +34,7 @@ DEFINE VARIABLE AbortSearch AS LOGICAL NO-UNDO. /* tt_procedure lists every procedure and function in a compilation unit */ - {prolint/ttprocedure.i} + {prolint/core/ttprocedure.i} /* tt_cacheRelativeName makes function RelativeFilename slightly faster */ DEFINE TEMP-TABLE tt_cacheRelativeName NO-UNDO Copied: trunk/prolint/core/openhtml.p (from rev 250, trunk/prolint/openhtml.p) =================================================================== --- trunk/prolint/core/openhtml.p (rev 0) +++ trunk/prolint/core/openhtml.p 2006-08-05 10:32:40 UTC (rev 274) @@ -0,0 +1,51 @@ +/* ======================================================================= + file : prolint/core/openhtml.p + purpose : open a HTML file in viewer + platform-independent + ======================================================================= */ + +DEFINE INPUT PARAMETER htmlfile AS CHARACTER NO-UNDO. + + DEFINE VARIABLE parentHwnd AS INTEGER NO-UNDO. + DEFINE VARIABLE cHelpfile AS CHARACTER NO-UNDO. + DEFINE VARIABLE cTopic AS CHARACTER NO-UNDO. + + IF OPSYS="WIN32":U THEN DO: + /* IF SESSION:DISPLAY-TYPE = "GUI":U THEN DO: + /* Windows GUI: try compiled HTML-help. Only because it's cool. */ + FILE-INFO:FILE-NAME = "prolint/prolint.chm". + chelpfile = FILE-INFO:FULL-PATHNAME. + cTopic = SUBSTRING(htmlfile, INDEX(chelpfile, "prolint.chm")). + SYSTEM-HELP chelpfile HELP-TOPIC ( cTopic ). + END. + ELSE */ DO: + /* Windows ChUI: open uncompiled HTML in default internet-browser. + Avoid OS-COMMAND because it does not seem to work very well. */ + IF FOCUS<>? THEN + parentHwnd = FOCUS:HWND. + ELSE + parentHwnd = 0. + RUN ShellExecuteA (parentHwnd, + "open":U, + htmlfile, + "", + "", + 1). + END. + END. + ELSE + /* Linux: open uncompiled HTML in default internet-browser */ + OS-COMMAND NO-WAIT START VALUE(htmlfile). + +RETURN. + +PROCEDURE ShellExecuteA EXTERNAL "shell32.dll":U PERSISTENT: + DEFINE INPUT PARAMETER HWND AS LONG NO-UNDO. + DEFINE INPUT PARAMETER lpOperation AS CHAR NO-UNDO. + DEFINE INPUT PARAMETER lpFile AS CHAR NO-UNDO. + DEFINE INPUT PARAMETER lpParameters AS CHAR NO-UNDO. + DEFINE INPUT PARAMETER lpDirectory AS CHAR NO-UNDO. + DEFINE INPUT PARAMETER nShowCmd AS LONG NO-UNDO. +END. + + Modified: trunk/prolint/core/prolint.p =================================================================== --- trunk/prolint/core/prolint.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/core/prolint.p 2006-08-05 10:32:40 UTC (rev 274) @@ -28,7 +28,7 @@ similar to bugfix 1.0d04 */ &SCOPED-DEFINE ProparseVersion "3.0b":U -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE INPUT PARAMETER pSourcefile AS CHARACTER NO-UNDO. /* a single filename to lint */ DEFINE INPUT PARAMETER hSourcefileList AS HANDLE NO-UNDO. /* handle to a list of filenames to lint */ Copied: trunk/prolint/core/ruleparams.i (from rev 273, trunk/prolint/ruleparams.i) =================================================================== --- trunk/prolint/core/ruleparams.i (rev 0) +++ trunk/prolint/core/ruleparams.i 2006-08-05 10:32:40 UTC (rev 274) @@ -0,0 +1,56 @@ +/* ------------------------------------------------------------------ + file : prolint/ruleparams.i + purpose : parameters and standard stuff for rules + ------------------------------------------------------------------ + + Copyright (C) 2001,2002 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ------------------------------------------------------------------ */ + +{prolint/core/dlc-version.i} + +{&_proparse_ prolint-nowarn(varusage)} +DEFINE INPUT PARAMETER xreffile AS CHARACTER NO-UNDO. /* name of file produced by "COMPILE compilationunit XREF xreffile" */ +{&_proparse_ prolint-nowarn(varusage)} +DEFINE INPUT PARAMETER listingfile AS CHARACTER NO-UNDO. /* name of file produced by "COMPILE compilationunit LISTING listingfile" */ +DEFINE INPUT PARAMETER hLintSuper AS HANDLE NO-UNDO. /* procedure-handle of prolint/core/lintsuper.p */ +DEFINE INPUT PARAMETER hparser AS HANDLE NO-UNDO. /* procedure-handle of proparse/api/proparse.p */ +{&_proparse_ prolint-nowarn(varusage)} +DEFINE INPUT PARAMETER hTopnode AS INTEGER NO-UNDO. /* node-handle of the "Program_root"-node */ +DEFINE INPUT PARAMETER compilationunit AS CHARACTER NO-UNDO. /* name of sourcefile under inspection */ +DEFINE INPUT PARAMETER severity AS INTEGER NO-UNDO. /* 0=informational, 9=critical */ +DEFINE INPUT PARAMETER rule_id AS CHARACTER NO-UNDO. /* identifier of this currently running rule */ +DEFINE INPUT PARAMETER pragma_number AS INTEGER NO-UNDO. /* attribute set on nodes following _proparse prolint-nowarn(rule_id) */ +DEFINE INPUT PARAMETER ignoreAB AS LOGICAL NO-UNDO. /* suppress warnings in AB/UIB generated code? */ +{&_proparse_ prolint-nowarn(varusage)} +DEFINE INPUT PARAMETER hpRulePersist AS HANDLE NO-UNDO. /* handle to persistent "rules/persist/[rule_id].p" */ + +IF LOGICAL(DYNAMIC-FUNCTION("ProlintProperty", "filters.IgnoreAppbuilderstuff"))=FALSE THEN + IgnoreAB = FALSE. + +RUN SetRuleParameters IN hLintSuper(pragma_number, severity, ignoreAB). +THIS-PROCEDURE:ADD-SUPER-PROCEDURE(hLintSuper). + +{proparse/api/proparse.i hparser} + +FUNCTION RelativeFilename RETURNS CHARACTER (pFileName AS CHARACTER) IN hLintSuper. +FUNCTION GetFieldnameFromFieldref RETURNS CHARACTER (INPUT nFieldRef AS INTEGER) IN hLintSuper. + + + + Copied: trunk/prolint/core/ttprocedure.i (from rev 250, trunk/prolint/ttprocedure.i) =================================================================== --- trunk/prolint/core/ttprocedure.i (rev 0) +++ trunk/prolint/core/ttprocedure.i 2006-08-05 10:32:40 UTC (rev 274) @@ -0,0 +1,7 @@ + + DEFINE TEMP-TABLE tt_procedure NO-UNDO + FIELD proctype AS CHARACTER + FIELD procname AS CHARACTER + FIELD startnode AS INTEGER + FIELD prototype AS LOGICAL + INDEX idx_proto AS PRIMARY prototype. Deleted: trunk/prolint/customize.i =================================================================== --- trunk/prolint/customize.i 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/customize.i 2006-08-05 10:32:40 UTC (rev 274) @@ -1,31 +0,0 @@ -/* ================================================================== - file : prolint/customize.i - purpose : include/exclude features - hint : copy this includefile to a location in the propath that is - found before the standard prolint/customize.i, because the - standard prolint/customize.i will be reset by each release - ----------------------------------------------------------------- - - Copyright (C) 2001,2002 Jurjen Dijkstra, Judy Hoffman Green - - This file is part of Prolint. - - Prolint is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - Prolint 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with Prolint; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ================================================================== */ - - - /* this include-file is empty. Prolint does not use it anymore. - Instead, we now use prolint/prolint.properties.p to set props at run-time! */ - Modified: trunk/prolint/desktop.w =================================================================== --- trunk/prolint/desktop.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/desktop.w 2006-08-05 10:32:40 UTC (rev 274) @@ -41,7 +41,7 @@ /* *************************** Definitions ************************** */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} /* Parameters Definitions --- */ @@ -489,7 +489,7 @@ FILE-INFO:FILE-NAME = "prolint/help/desktop.htm":U. htmlfile = file-info:FULL-PATHNAME. IF htmlfile<>? THEN - RUN prolint/openhtml.p(htmlfile). + RUN prolint/core/openhtml.p(htmlfile). END. @@ -524,7 +524,7 @@ ON CHOOSE OF Btn_protools IN FRAME DEFAULT-FRAME /* Add to protools */ DO: DEFINE VARIABLE done AS LOGICAL NO-UNDO. - RUN prolint/add2protools.p ("ADD":U, OUTPUT done). + RUN prolint/core/add2protools.p ("ADD":U, OUTPUT done). IF done THEN Btn_protools:VISIBLE = FALSE. END. @@ -586,7 +586,7 @@ &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_update C-Win ON CHOOSE OF Btn_update IN FRAME DEFAULT-FRAME /* Check for updates */ DO: - RUN prolint/checkrelease.p. + RUN prolint/core/checkrelease.p. END. /* _UIB-CODE-BLOCK-END */ @@ -620,7 +620,7 @@ RUN enable_UI. DEFINE VARIABLE AlreadyInThere AS LOGICAL NO-UNDO. - RUN prolint/add2protools.p ("CHECK":U, OUTPUT AlreadyInThere). + RUN prolint/core/add2protools.p ("CHECK":U, OUTPUT AlreadyInThere). IF AlreadyInThere THEN Btn_protools:VISIBLE = FALSE. @@ -657,7 +657,7 @@ FILE-INFO:FILE-NAME = "prolint/help/adecomm.htm":U. htmlfile = file-info:FULL-PATHNAME. IF htmlfile<>? THEN - RUN prolint/openhtml.p(htmlfile). + RUN prolint/core/openhtml.p(htmlfile). END. END. Deleted: trunk/prolint/dlc-version.i =================================================================== --- trunk/prolint/dlc-version.i 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/dlc-version.i 2006-08-05 10:32:40 UTC (rev 274) @@ -1,20 +0,0 @@ - -/* Which (main) version of Progress are we running? */ -&IF INTEGER(ENTRY(1,PROVERSION,'.'))=8 &THEN - &GLOBAL-DEFINE dlc-version 8 -&ELSEIF INTEGER(ENTRY(1,PROVERSION,'.'))=9 &THEN - &GLOBAL-DEFINE dlc-version 9 -&ELSEIF INTEGER(ENTRY(1,PROVERSION,'.'))=10 &THEN - &GLOBAL-DEFINE dlc-version 10 -&ENDIF - -/* Is this session running in GUI, ChUI or Batch? - This defines which outputhandlers are supported, and some more */ -{&_proparse_ prolint-nowarn(varusage)} -DEFINE VARIABLE SessionWindowSystem AS CHARACTER NO-UNDO. -IF SESSION:BATCH-MODE THEN - SessionWindowSystem="". -ELSE - SessionWindowSystem=SESSION:DISPLAY-TYPE. - - \ No newline at end of file Modified: trunk/prolint/dnewrule.w =================================================================== --- trunk/prolint/dnewrule.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/dnewrule.w 2006-08-05 10:32:40 UTC (rev 274) @@ -266,7 +266,7 @@ FILE-INFO:FILE-NAME = "prolint/help/newrule.htm":U. {&_proparse_ prolint-nowarn(message)} IF FILE-INFO:FULL-PATHNAME<>? THEN - RUN prolint/openhtml.p (FILE-INFO:FULL-PATHNAME). + RUN prolint/core/openhtml.p (FILE-INFO:FULL-PATHNAME). ELSE MESSAGE "no help found for dnewrule.w":T VIEW-AS ALERT-BOX. Modified: trunk/prolint/filters/filterparams.i =================================================================== --- trunk/prolint/filters/filterparams.i 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/filters/filterparams.i 2006-08-05 10:32:40 UTC (rev 274) @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------ */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE INPUT PARAMETER ProfileDirectory AS CHARACTER NO-UNDO. Modified: trunk/prolint/help/desktop.htxt =================================================================== --- trunk/prolint/help/desktop.htxt 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/help/desktop.htxt 2006-08-05 10:32:40 UTC (rev 274) @@ -32,7 +32,7 @@ This button determines which files are currently open in the AppBuilder, and will lint those files. <p> <h3>button "Check for updates"</h3> -run prolint/checkrelease.p<br> +run prolint/core/checkrelease.p<br> This button does a HTTP GET using Progress V9 sockets, to get the online copy of http://www.prolint.org/release.ini. This is a very small file. <br> It then compares it with file prolint/help/release.ini on your PC. If they are equal, you already have the latest release. Else you will be prompted to browse to http://www.prolint.org to download the newest release. Modified: trunk/prolint/help/newrule.htxt =================================================================== --- trunk/prolint/help/newrule.htxt 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/help/newrule.htxt 2006-08-05 10:32:40 UTC (rev 274) @@ -48,7 +48,7 @@ File "prolint/rules/_template.p is a template for a new rule. You can use it as a starting point, if you don't want to start from scratch. <p> -Each rule needs a couple of input parameters, which are defined by {prolint/ruleparams.i}. <br> +Each rule needs a couple of input parameters, which are defined by {prolint/core/ruleparams.i}. <br> I hope these parameters don't need introduction, although parameter "pragma_number" may be a stranger: <br> Pragmas are used for suppressing warnings. If the sourcefile contains a directive like {&_proparse prolint-nowarn(rule_id)}, then every node in the statement following the directive will get an attribute. The identifier of the attribute is an integer named "pragma_number", the value of the attribute is 1 (to indicate that the attribute is "set"). Modified: trunk/prolint/help/rules/ifindent-details.htxt =================================================================== --- trunk/prolint/help/rules/ifindent-details.htxt 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/help/rules/ifindent-details.htxt 2006-08-05 10:32:40 UTC (rev 274) @@ -127,17 +127,6 @@ Tabs: <br> Prolint treats Tab characters as only one single character, although they should contribute to a larger indent. We can fix that if you want. -<!-- -Tab characters can cause false positives when comparing indents. The rules -treat tabs in the hidden text as equivalent to 8 spaces. To modify -this value to be the most suitable for your environment, copy -the prolint/customize.i file to a location in your PROPATH that -is found before the standard prolint/customize.i, because the -standard prolint/customize.i will be reset by each release. Then, -set the IndentTabSize preprocessor in your copy of customize.i to your tab size. -Even this may not help if the developers of your code have used a -variety of tab widths during their development, but this is unlikely. ---> <p> <b>false positives</b><br> Preprocessing:<br> Modified: trunk/prolint/help/rules/ifindent.htxt =================================================================== --- trunk/prolint/help/rules/ifindent.htxt 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/help/rules/ifindent.htxt 2006-08-05 10:32:40 UTC (rev 274) @@ -12,7 +12,7 @@ <ol> <li>copy prolint/rules/ifindent1.p to prolint/custom/rules/ifindent1.p <li>remove all of the contents from prolint/custom/rules/ifindent1.p but be sure to keep the parameters: include <br> -{prolint/ruleparams.i} +{prolint/core/ruleparams.i} <li>create a file prolint/custom/rules/rules.d similar to prolint/rules/rules.d and make sure it contains a reference to "infindent1". <br>You now have a stub override for ifindent1.p. <li>Repeat steps 1-3 for ifindent2.p Modified: trunk/prolint/lintcfg.w =================================================================== --- trunk/prolint/lintcfg.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/lintcfg.w 2006-08-05 10:32:40 UTC (rev 274) @@ -54,7 +54,7 @@ CREATE WIDGET-POOL. /* *************************** Definitions ************************** */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} /* Parameters Definitions --- */ @@ -363,7 +363,7 @@ FILE-INFO:FILE-NAME = "prolint/help/lintcfg.htm":U. {&_proparse_ prolint-nowarn(message)} IF FILE-INFO:FULL-PATHNAME<>? THEN - RUN prolint/openhtml.p (FILE-INFO:FULL-PATHNAME). + RUN prolint/core/openhtml.p (FILE-INFO:FULL-PATHNAME). ELSE MESSAGE "no help found for lintcfg.w":T VIEW-AS ALERT-BOX. Deleted: trunk/prolint/openhtml.p =================================================================== --- trunk/prolint/openhtml.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/openhtml.p 2006-08-05 10:32:40 UTC (rev 274) @@ -1,51 +0,0 @@ -/* ======================================================================= - file : prolint/openhtml.p - purpose : open a HTML file in viewer - platform-independent - ======================================================================= */ - -DEFINE INPUT PARAMETER htmlfile AS CHARACTER NO-UNDO. - - DEFINE VARIABLE parentHwnd AS INTEGER NO-UNDO. - DEFINE VARIABLE cHelpfile AS CHARACTER NO-UNDO. - DEFINE VARIABLE cTopic AS CHARACTER NO-UNDO. - - IF OPSYS="WIN32":U THEN DO: - /* IF SESSION:DISPLAY-TYPE = "GUI":U THEN DO: - /* Windows GUI: try compiled HTML-help. Only because it's cool. */ - FILE-INFO:FILE-NAME = "prolint/prolint.chm". - chelpfile = FILE-INFO:FULL-PATHNAME. - cTopic = SUBSTRING(htmlfile, INDEX(chelpfile, "prolint.chm")). - SYSTEM-HELP chelpfile HELP-TOPIC ( cTopic ). - END. - ELSE */ DO: - /* Windows ChUI: open uncompiled HTML in default internet-browser. - Avoid OS-COMMAND because it does not seem to work very well. */ - IF FOCUS<>? THEN - parentHwnd = FOCUS:HWND. - ELSE - parentHwnd = 0. - RUN ShellExecuteA (parentHwnd, - "open":U, - htmlfile, - "", - "", - 1). - END. - END. - ELSE - /* Linux: open uncompiled HTML in default internet-browser */ - OS-COMMAND NO-WAIT START VALUE(htmlfile). - -RETURN. - -PROCEDURE ShellExecuteA EXTERNAL "shell32.dll":U PERSISTENT: - DEFINE INPUT PARAMETER HWND AS LONG NO-UNDO. - DEFINE INPUT PARAMETER lpOperation AS CHAR NO-UNDO. - DEFINE INPUT PARAMETER lpFile AS CHAR NO-UNDO. - DEFINE INPUT PARAMETER lpParameters AS CHAR NO-UNDO. - DEFINE INPUT PARAMETER lpDirectory AS CHAR NO-UNDO. - DEFINE INPUT PARAMETER nShowCmd AS LONG NO-UNDO. -END. - - Modified: trunk/prolint/outputhandlers/PRO4mfile.p =================================================================== --- trunk/prolint/outputhandlers/PRO4mfile.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/PRO4mfile.p 2006-08-05 10:32:40 UTC (rev 274) @@ -5,7 +5,7 @@ You can also import easily in Excel by : Jurjen Dijkstra & Yuriy Setrko (PRO4m adjustment) ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE VARIABLE logfile AS CHARACTER NO-UNDO. DEFINE VARIABLE delim AS CHARACTER NO-UNDO. Modified: trunk/prolint/outputhandlers/dlgfilter.w =================================================================== --- trunk/prolint/outputhandlers/dlgfilter.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/dlgfilter.w 2006-08-05 10:32:40 UTC (rev 274) @@ -39,7 +39,7 @@ ----------------------------------------------------------------------- */ /* *************************** Definitions ************************** */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} /* Parameters Definitions --- */ Modified: trunk/prolint/outputhandlers/ed4win.p =================================================================== --- trunk/prolint/outputhandlers/ed4win.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/ed4win.p 2006-08-05 10:32:40 UTC (rev 274) @@ -24,7 +24,7 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. Modified: trunk/prolint/outputhandlers/logexcel.p =================================================================== --- trunk/prolint/outputhandlers/logexcel.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/logexcel.p 2006-08-05 10:32:40 UTC (rev 274) @@ -22,7 +22,7 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ====================================================================== */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE VARIABLE logfile AS CHAR NO-UNDO INITIAL "prolint.xml":U. DEFINE VARIABLE chExcel AS COM-HANDLE. Modified: trunk/prolint/outputhandlers/logfile.p =================================================================== --- trunk/prolint/outputhandlers/logfile.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/logfile.p 2006-08-05 10:32:40 UTC (rev 274) @@ -22,7 +22,7 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE VARIABLE logfile AS CHAR NO-UNDO. Modified: trunk/prolint/outputhandlers/logwin.w =================================================================== --- trunk/prolint/outputhandlers/logwin.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/logwin.w 2006-08-05 10:32:40 UTC (rev 274) @@ -73,7 +73,7 @@ /* Local Variable Definitions --- */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE TEMP-TABLE tt_lint NO-UNDO FIELD ttDescription AS CHAR LABEL "description":T FORMAT "x(150)":U @@ -116,7 +116,7 @@ DEFINE VARIABLE isLocked AS INTEGER NO-UNDO INITIAL 0. /* make this window ADEPersistent */ -{prolint/_adetool.i} +{prolint/core/_adetool.i} {prolint/outputhandlers/logwin.i} &GLOBAL-DEFINE WHERE_TT WHERE tt_lint.ttDescription MATCHES fltDesc ~ @@ -2260,7 +2260,7 @@ {&_proparse_ prolint-nowarn(message)} IF fullpath<>? THEN - RUN prolint/openhtml.p(fullpath). + RUN prolint/core/openhtml.p(fullpath). ELSE MESSAGE "no help found for ":U pContext VIEW-AS ALERT-BOX. Modified: trunk/prolint/outputhandlers/logwin8.w =================================================================== --- trunk/prolint/outputhandlers/logwin8.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/logwin8.w 2006-08-05 10:32:40 UTC (rev 274) @@ -45,7 +45,7 @@ /* Local Variable Definitions --- */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE TEMP-TABLE tt_lint NO-UNDO FIELD ttDescription AS CHAR LABEL "description":T FORMAT "x(150)":U @@ -99,7 +99,7 @@ DEFINE VARIABLE cfgExtEditorParameters AS CHARACTER NO-UNDO. /* make this window ADEPersistent */ -{prolint/_adetool.i} +{prolint/core/_adetool.i} /* OS-COMMAND, but better: */ @@ -1278,7 +1278,7 @@ {&_proparse_ prolint-nowarn(message)} IF fullpath<>? THEN - RUN prolint/openhtml.p(fullpath). + RUN prolint/core/openhtml.p(fullpath). ELSE MESSAGE "no help found for ":U pContext VIEW-AS ALERT-BOX. Modified: trunk/prolint/outputhandlers/prolintdb.p =================================================================== --- trunk/prolint/outputhandlers/prolintdb.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/prolintdb.p 2006-08-05 10:32:40 UTC (rev 274) @@ -23,7 +23,7 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE VARIABLE cRuleList AS CHARACTER NO-UNDO. DEFINE VARIABLE dToday AS DATE NO-UNDO. Modified: trunk/prolint/outputhandlers/regrlog.p =================================================================== --- trunk/prolint/outputhandlers/regrlog.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/regrlog.p 2006-08-05 10:32:40 UTC (rev 274) @@ -23,7 +23,7 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE VARIABLE tempdir AS CHAR NO-UNDO. DEFINE VARIABLE logfile AS CHAR NO-UNDO. Modified: trunk/prolint/outputhandlers/showhtml.p =================================================================== --- trunk/prolint/outputhandlers/showhtml.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/showhtml.p 2006-08-05 10:32:40 UTC (rev 274) @@ -22,7 +22,7 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE VARIABLE logfile AS CHAR NO-UNDO. DEFINE VARIABLE oddrow AS LOGICAL NO-UNDO. @@ -155,7 +155,7 @@ FILE-INFO:FILE-NAME = logfile. fullname = FILE-INFO:FULL-PATHNAME. IF fullname NE ? THEN - RUN prolint/openhtml.p (fullname). + RUN prolint/core/openhtml.p (fullname). /* This procedure will not be invoked again, so it can exit */ DELETE PROCEDURE THIS-PROCEDURE. Modified: trunk/prolint/outputhandlers/tabfile.p =================================================================== --- trunk/prolint/outputhandlers/tabfile.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/outputhandlers/tabfile.p 2006-08-05 10:32:40 UTC (rev 274) @@ -24,7 +24,7 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} DEFINE VARIABLE logfile AS CHARACTER NO-UNDO. DEFINE VARIABLE delim AS CHARACTER NO-UNDO. Modified: trunk/prolint/prolintdb/dirstats.w =================================================================== --- trunk/prolint/prolintdb/dirstats.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/prolintdb/dirstats.w 2006-08-05 10:32:40 UTC (rev 274) @@ -44,7 +44,7 @@ /* Parameters Definitions --- */ /* Local Variable Definitions --- */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME Modified: trunk/prolint/prolintdb/incstats.w =================================================================== --- trunk/prolint/prolintdb/incstats.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/prolintdb/incstats.w 2006-08-05 10:32:40 UTC (rev 274) @@ -41,7 +41,7 @@ /* *************************** Definitions ************************** */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} /* Parameters Definitions --- */ Modified: trunk/prolint/prolintdb/rulestats.w =================================================================== --- trunk/prolint/prolintdb/rulestats.w 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/prolintdb/rulestats.w 2006-08-05 10:32:40 UTC (rev 274) @@ -44,7 +44,7 @@ /* Parameters Definitions --- */ /* Local Variable Definitions --- */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME Modified: trunk/prolint/prolintdb/runffq.p =================================================================== --- trunk/prolint/prolintdb/runffq.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/prolintdb/runffq.p 2006-08-05 10:32:40 UTC (rev 274) @@ -26,7 +26,7 @@ ======================================================================================= */ - {prolint/dlc-version.i} + {prolint/core/dlc-version.i} DEFINE VARIABLE LogwinRunning AS LOGICAL NO-UNDO. DEFINE VARIABLE hw AS HANDLE NO-UNDO. Modified: trunk/prolint/rtb/checkin-handler.p =================================================================== --- trunk/prolint/rtb/checkin-handler.p 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/rtb/checkin-handler.p 2006-08-05 10:32:40 UTC (rev 274) @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/dlc-version.i} +{prolint/core/dlc-version.i} {rtb/g/rtbglobl.i} Deleted: trunk/prolint/ruleparams.i =================================================================== --- trunk/prolint/ruleparams.i 2006-08-05 09:25:43 UTC (rev 273) +++ trunk/prolint/ruleparams.i 2006-08-05 10:32:40 UTC (rev 274) @@ -1,56 +0,0 @@ -/* ------------------------------------------------------------------ - file : prolint/ruleparams.i - purpose : parameters and standard stuff for rules - ------------------------------------------------------------------ - - Copyright (C) 2001,2002 Jurjen Dijkstra - - This file is part of Prolint. - - Prolint is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - Prolint 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with Prolint; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ------------------------------------------------------------------ */ - -{prolint/dlc-version.i} - -{&_proparse_ prolint-nowarn(varusage)} -DEFINE INPUT PARAMETER xreffile AS CHARACTER NO-UNDO. /* name of file produced by "COMPILE compilationunit XREF xreffile" */ -{&_proparse_ prolint-nowarn(varusage)} -DEFINE INPUT PARAMETER listingfile AS CHARACTER NO-UNDO. /* name of file produced by "COMPILE compilationunit LISTING listingfile" */ -DEFINE INPUT PARAMETER hLintSuper AS HANDLE NO-UNDO. /* procedure-handle of prolint/core/lintsuper.p */ -DEFINE INPUT PARAMETER hparser AS HANDLE NO-UNDO. /* procedure-handle of proparse/api/proparse.p */ -{&_proparse_ prolint-nowarn(varusage)} -DEFINE INPUT PARAMETER hTopnode AS INTEGER NO-UNDO. /* node-handle of the "Program_root"-node */ -DEFINE INPUT PARAMETER compilationunit AS CHARACTER NO-UNDO. /* name of sour... [truncated message content] |
From: <ju...@us...> - 2006-08-05 09:26:29
|
Revision: 273 Author: jurjen Date: 2006-08-05 02:25:43 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=273&view=rev Log Message: ----------- clean up the root of prolint; move files to subdirectories (not finished yet, but it works so far) Modified Paths: -------------- trunk/prolint/ab/ablint.p trunk/prolint/desktop.w trunk/prolint/filters/_template.pp trunk/prolint/filters/exclude.p trunk/prolint/filters/ignoreab.p trunk/prolint/filters/nowarn.p trunk/prolint/help/newrule.htxt trunk/prolint/help/overview.htxt trunk/prolint/help/run_prolint.htxt trunk/prolint/help/settings.htxt trunk/prolint/lintproglist.p trunk/prolint/mvo-lintFileList.p trunk/prolint/outputhandlers/logwin.w trunk/prolint/outputhandlers/logwin8.w trunk/prolint/rtb/checkin-event.p trunk/prolint/rtb/lintobj.p trunk/prolint/rtb/linttask.p trunk/prolint/ruleparams.i trunk/prolint/start.p trunk/prolint/test.p Added Paths: ----------- trunk/prolint/core/filterplugins.p trunk/prolint/core/lintsuper.p trunk/prolint/core/prolint.p trunk/prolint/core/propsuper.p trunk/prolint/images/prolint.ico Removed Paths: ------------- trunk/prolint/filterplugins.p trunk/prolint/lintsuper.p trunk/prolint/prolint.ico trunk/prolint/prolint.p trunk/prolint/propsuper.p trunk/prolint/publish.i trunk/prolint/publish_char.i trunk/prolint/publish_log.i trunk/prolint/publish_result.i trunk/prolint/subscribe.i trunk/prolint/unsubscribe.i trunk/prolint/v8pubsub.i trunk/prolint/v8pubsub.p Modified: trunk/prolint/ab/ablint.p =================================================================== --- trunk/prolint/ab/ablint.p 2006-08-05 08:59:22 UTC (rev 272) +++ trunk/prolint/ab/ablint.p 2006-08-05 09:25:43 UTC (rev 273) @@ -26,7 +26,7 @@ DEFINE INPUT PARAMETER pSourceFile AS CHARACTER NO-UNDO. -RUN prolint/prolint.p (pSourceFile, +RUN prolint/core/prolint.p (pSourceFile, ?, "AppBuilder":U, TRUE). Copied: trunk/prolint/core/filterplugins.p (from rev 262, trunk/prolint/filterplugins.p) =================================================================== --- trunk/prolint/core/filterplugins.p (rev 0) +++ trunk/prolint/core/filterplugins.p 2006-08-05 09:25:43 UTC (rev 273) @@ -0,0 +1,166 @@ +/* ------------------------------------------------------------------ + file : prolint/core/filterplugins.p + purpose : loads filter plug-ins + ----------------------------------------------------------------- + + Copyright (C) 2001,2002 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ------------------------------------------------------------------ */ + +{prolint/dlc-version.i} + +DEFINE INPUT PARAMETER pProfileDirectory AS CHARACTER NO-UNDO. + +DEFINE VARIABLE hLintSuper AS HANDLE NO-UNDO. +FUNCTION RelativeFilename RETURNS CHARACTER (pFileName AS CHARACTER) IN hLintSuper. + +/* temp-table definition tt_filters + contains the list of filter plugins */ +DEFINE TEMP-TABLE tt_filters NO-UNDO + FIELD filtername AS CHARACTER + FIELD hpFilter AS HANDLE. + +/* local tt_ignore. This is a filter, but not a plug-in. + this one is used for _proparse_ prolint-nowarn directives + for rules that cannot use proparse, like "whole-index" and "sort-access" */ +DEFINE TEMP-TABLE tt_ignore NO-UNDO + FIELD Sourcefile AS CHARACTER + FIELD RuleID AS CHARACTER + FIELD LineNumber AS INTEGER + INDEX idx_1 AS PRIMARY SourceFile RuleID LineNumber. + +ON "CLOSE":U OF THIS-PROCEDURE DO: + FOR EACH tt_filters : + APPLY "CLOSE":U TO tt_filters.hpFilter. + END. + DELETE PROCEDURE THIS-PROCEDURE. +END. + +RUN InitializePlugins. +SUBSCRIBE TO "Prolint_Status_FileEnd" ANYWHERE. +RETURN. + +/* ------------------------ internal procedures ------------------------------ */ + +PROCEDURE SethLintSuper : + DEFINE INPUT PARAMETER ph AS HANDLE NO-UNDO. + hLintSuper = ph. +END PROCEDURE. + +PROCEDURE InitializePlugins : + /* purpose: run filters\*.p persistent */ + DEFINE VARIABLE fulldir AS CHARACTER NO-UNDO. + DEFINE VARIABLE progname AS CHARACTER NO-UNDO. + + FILE-INFORMATION:FILE-NAME = "prolint/filters":U. + fulldir = FILE-INFORMATION:FULL-PATHNAME. + INPUT FROM OS-DIR ( fulldir ). + REPEAT: + IMPORT progname. + IF progname MATCHES "*~~.p":U THEN + DO: + CREATE tt_filters. + RUN VALUE( "prolint/filters/":U + progname ) + PERSISTENT SET tt_filters.hpFilter ( pProfileDirectory ). + tt_filters.filtername = LC( SUBSTRING( progname, 1, LENGTH( progname ) - 2 ) ). + END. + END. + INPUT CLOSE. + +END PROCEDURE. + + + +PROCEDURE AddNowarnFilter : + /* purpose: add entries for rules that do not use Proparse, + but still need to suppress warnings from _proparse_ directives + like rule whole-index */ + DEFINE INPUT PARAMETER pRuleID AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pSourcefile AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pLineNumber AS INTEGER NO-UNDO. + + DEFINE VARIABLE relname AS CHARACTER NO-UNDO. + relname = RelativeFilename( pSourcefile ). + + FIND tt_Ignore WHERE + tt_Ignore.sourcefile = relname + AND tt_Ignore.RuleId = pRuleId + AND tt_Ignore.LineNumber = pLineNumber NO-ERROR. + IF NOT AVAILABLE tt_Ignore THEN + DO: + CREATE tt_Ignore. + ASSIGN + tt_Ignore.sourcefile = relname + tt_Ignore.RuleId = pRuleId + tt_Ignore.LineNumber = pLineNumber. + END. + + +END PROCEDURE. + + + +PROCEDURE GetFilterResult : +/* purpose : call each filter's GetFilterResult procedure */ + DEFINE INPUT PARAMETER pCompilationUnit AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pFullSource AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pRelativeSource AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pLineNumber AS INTEGER NO-UNDO. + DEFINE INPUT PARAMETER pRuleID AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pIgnoreAB AS LOGICAL NO-UNDO. + DEFINE INPUT-OUTPUT PARAMETER pDescription AS CHARACTER NO-UNDO. + DEFINE INPUT-OUTPUT PARAMETER pSeverity AS INTEGER NO-UNDO. + DEFINE OUTPUT PARAMETER filteredby AS CHARACTER NO-UNDO. + + DEFINE VARIABLE filtered AS LOGICAL NO-UNDO. + + + filtered = CAN-FIND(tt_ignore WHERE tt_ignore.SourceFile = pRelativeSource + AND tt_ignore.RuleID = pRuleID + AND tt_ignore.LineNumber = pLineNumber). + + IF filtered THEN + filteredby = "pragma":U. + ELSE + FOR EACH tt_filters : + RUN GetFilterResult IN tt_filters.hpFilter (pCompilationUnit, + pFullSource, + pRelativeSource, + pLineNumber, + pRuleID, + pIgnoreAB, + INPUT-OUTPUT pDescription, + INPUT-OUTPUT pSeverity, + OUTPUT filtered). + IF filtered THEN DO: + filteredby = TRIM(filteredby + ",":U + tt_filters.filtername,",":U). + RETURN. + END. + END. + +END PROCEDURE. + + +PROCEDURE Prolint_Status_FileEnd : +/* purpose : linting of a compilation unit is done. You can clean up now */ + FOR EACH tt_ignore : + DELETE tt_ignore. + END. + +END PROCEDURE. + Copied: trunk/prolint/core/lintsuper.p (from rev 265, trunk/prolint/lintsuper.p) =================================================================== --- trunk/prolint/core/lintsuper.p (rev 0) +++ trunk/prolint/core/lintsuper.p 2006-08-05 09:25:43 UTC (rev 273) @@ -0,0 +1,512 @@ +/* ------------------------------------------------------------------ + file : prolint/core/lintsuper.p + purpose : super procedure for every rule + ----------------------------------------------------------------- + + Copyright (C) 2001,2002 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ------------------------------------------------------------------ */ + +{prolint/dlc-version.i} + +DEFINE INPUT PARAMETER hparser AS HANDLE NO-UNDO. +DEFINE INPUT PARAMETER hpFilterPlugins AS HANDLE NO-UNDO. +{proparse/api/proparse.i hparser} + +DEFINE VARIABLE IgnoreAB AS LOGICAL NO-UNDO INITIAL FALSE. +DEFINE VARIABLE ActivePragma AS INTEGER NO-UNDO. +DEFINE VARIABLE ActiveSeverity AS INTEGER NO-UNDO. +DEFINE VARIABLE AbortSearch AS LOGICAL NO-UNDO. + + /* tt_procedure lists every procedure and function in a compilation unit */ + {prolint/ttprocedure.i} + + /* tt_cacheRelativeName makes function RelativeFilename slightly faster */ + DEFINE TEMP-TABLE tt_cacheRelativeName NO-UNDO + FIELD longname AS CHAR + FIELD relativename AS CHAR + INDEX idx_1 AS PRIMARY UNIQUE longname. + DEFINE VARIABLE SearchPath AS CHARACTER NO-UNDO. + +ON "CLOSE":U OF THIS-PROCEDURE DO: + DELETE PROCEDURE THIS-PROCEDURE. +END. + +/* -------------------------------------------------------------------------------- + maintenance procedures for tt_procedure + (see BuildProcedureList in prolint.p) + -------------------------------------------------------------------------------- */ + +PROCEDURE ProcedureListClear : + /* empty the temp-table. */ + FOR EACH tt_procedure : + DELETE tt_procedure. + END. +END PROCEDURE. + + +PROCEDURE ProcedureListGet : + /* copy temp-table tt_procedure to calling procedure. + It would be cleaner to only output the handle, but then the calling procedure would + have to use dynamic FIND statements to navigate the temp-table. That's slightly slower */ + DEFINE OUTPUT PARAMETER TABLE FOR tt_procedure. +END PROCEDURE. + + +PROCEDURE ProcedureListAdd : + /* create a new record tt_procedure */ + DEFINE INPUT PARAMETER pProcType AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pProcName AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER pPrototype AS LOGICAL NO-UNDO. + DEFINE INPUT PARAMETER pStartnode AS INTEGER NO-UNDO. + + DEFINE VARIABLE vstartnode AS INTEGER NO-UNDO. + + ASSIGN + vstartnode = parserGetHandle(). + + parserCopyHandle(pStartnode, vstartnode). + + CREATE tt_procedure. + ASSIGN tt_procedure.proctype = pProctype + tt_procedure.procname = pProcName + tt_procedure.prototype = pPrototype + tt_procedure.startnode = vStartnode. + + /* do not releaseHandle(vStartnode)! */ + +END PROCEDURE. + + +/* -------------------------------------------------------------------------------- + misc functions and procedures + -------------------------------------------------------------------------------- */ + +PROCEDURE parsePropath : +/* purpose: makes function RelativeFilename faster */ + DEFINE VARIABLE i AS INTEGER NO-UNDO. + + DO i=1 TO NUM-ENTRIES(PROPATH) : + /* ignore PL files */ + FILE-INFO:FILE-NAME = ENTRY(i, PROPATH). + IF FILE-INFO:FULL-PATHNAME<>? AND FILE-INFO:FILE-TYPE MATCHES "*D*":U THEN DO: + SearchPath = SearchPath + ",":U + FILE-INFO:FULL-PATHNAME. + END. + END. + SearchPath = TRIM(SearchPath, ",":U). + SearchPath = REPLACE(SearchPath, "~\":U, "/"). +END PROCEDURE. + + +FUNCTION RelativeFilename RETURNS CHARACTER (pFileName AS CHARACTER): + DEFINE VARIABLE i AS INTEGER NO-UNDO. + DEFINE VARIABLE subdir AS CHARACTER NO-UNDO. + DEFINE VARIABLE tmp AS CHARACTER NO-UNDO. + DEFINE VARIABLE shortpath AS CHARACTER NO-UNDO. + + IF SearchPath = "" THEN RUN parsePropath. + pFileName = REPLACE(pFileName, "~\", "/"). + + /* search pFileName in cache, for speed */ + FIND tt_cacheRelativeName WHERE tt_cacheRelativeName.longname = pFileName NO-ERROR. + IF AVAILABLE tt_cacheRelativeName THEN + RETURN tt_cacheRelativeName.relativename. + + IF SUBSTRING(pFileName, 1, 2) = './':U THEN + pFileName = SUBSTRING(pFileName, 3). + + DO i=1 to num-entries(SearchPath) : + subdir = entry(i, SearchPath). + if length(subdir)<length(pFileName) then + if subdir = substring(pFileName,1,length(subdir)) then + DO: + shortpath = SUBSTRING(pFileName, length(subdir) + 2). + if length(shortpath) < length(pFileName) then DO: + FILE-INFO:FILE-NAME = shortpath. + IF REPLACE(FILE-INFO:FULL-PATHNAME,"~\","/") = pFileName THEN DO: + CREATE tt_cacheRelativeName. + ASSIGN tt_cacheRelativeName.longname = pFileName + tt_cacheRelativeName.relativename = shortpath. + RETURN shortpath. + END. + END. + END. + END. + RETURN pFileName. +END FUNCTION. + + +PROCEDURE GetFilePosition : +/* purpose: return linenumber and sourcefile where theNode is found */ + DEFINE INPUT PARAMETER theNode AS INTEGER NO-UNDO. + DEFINE OUTPUT PARAMETER LineNumber AS INTEGER NO-UNDO. + DEFINE OUTPUT PARAMETER SourceFile AS CHARACTER NO-UNDO. + + DEFINE VARIABLE subnode AS INTEGER NO-UNDO. + DEFINE VARIABLE numresults AS INTEGER NO-UNDO. + DEFINE VARIABLE i AS INTEGER NO-UNDO. + + ASSIGN + LineNumber = parserGetNodeLine(theNode) + SourceFile = parserGetNodeFilename(theNode). + + /* if TheNode is a synthetic node, then LineNumber will be 0 and SourceFile will be "". + in that case, query children/grandchildren until you find any non-synthetic node. + Just assume it's on the same line */ + IF LineNumber EQ 0 OR SourceFile EQ "" THEN DO: + subnode = parserGetHandle(). + numResults = parserQueryCreate(TheNode, "getfileposition":U, "":U). + i = 1. + DO WHILE (i LE numResults) AND (LineNumber EQ 0 OR SourceFile EQ ""): + parserQueryGetResult("getfileposition":U, i, subnode). + ASSIGN + LineNumber = parserGetNodeLine(subnode) + SourceFile = parserGetNodeFilename(subnode) + i = i + 1. + END. + parserQueryClear ("getfileposition":U). + parserReleaseHandle(subnode). + END. + + IF SourceFile NE "" THEN + SourceFile = RelativeFileName(SourceFile). + +END PROCEDURE. + + +FUNCTION GetFieldnameFromFieldref RETURNS CHARACTER (INPUT nFieldRef AS INTEGER) : + /* assuming nFieldRef is a "Field_ref" node, return the name of the field */ + + DEFINE VARIABLE child AS INTEGER NO-UNDO. + DEFINE VARIABLE retval AS CHARACTER NO-UNDO. + + child = parserGetHandle(). + + IF "ID":U <> parserNodeFirstChild(nFieldRef, child) THEN + IF "ID":U <> parserNodeNextSibling(child, child) THEN + parserNodeNextSibling(child, child). + + retval = parserGetNodeText(child). + parserReleaseHandle(child). + RETURN retval. + +END FUNCTION. + + +PROCEDURE SetRuleParameters : + /* purpose: helps {&_Proparse_ prolint-nowarn} directives */ + DEFINE INPUT PARAMETER pActivePragma AS INTEGER NO-UNDO. + DEFINE INPUT PARAMETER pActiveSeverity AS INTEGER NO-UNDO. + DEFINE INPUT PARAMETER pIgnoreAB AS LOGICAL NO-UNDO. + + ASSIGN + AbortSearch = FALSE + IgnoreAB = pIgnoreAB + ActivePragma = pActivePragma + ActiveSeverity = pActiveSeverity. + +END PROCEDURE. + + +PROCEDURE searchNode : + /* purpose: query the tree: + find all nodes of type NodeTypesToInspect within theNode. For every node + found run value(ipCallBack) which will implement the actual rule. + Params: theNode : a proparse node + ipCallBack : an internal procedure in a rule + NodeTypesToInspect : comma separated list of nodetypes */ + DEFINE INPUT PARAMETER theNode AS INTEGER NO-UNDO. + DEFINE INPUT PARAMETER ipCallBack AS CHAR NO-UNDO. + DEFINE INPUT PARAMETER NodetypesToInspect AS CHAR NO-UNDO. + + /* searching a tree (recursive) is probably faster than a query if no nodetypes are specified */ + /* actually this may not be true anymore with the latest version of proparse, have to test that */ + IF NodeTypesToInspect="" OR NodeTypesToInspect=? THEN + RUN SearchNodeTree IN TARGET-PROCEDURE (theNode, ipCallBack, NodeTypesToInspect). + ELSE + RUN searchNodeQueries IN TARGET-PROCEDURE (theNode, ipCallBack, NodeTypesToInspect). + +END PROCEDURE. + + +PROCEDURE searchNodeQueries : + /* purpose : like SearchNode, using queries in proparse */ + DEFINE INPUT PARAMETER theNode AS INTEGER NO-UNDO. + DEFINE INPUT PARAMETER ipCallBack AS CHAR NO-UNDO. + DEFINE INPUT PARAMETER NodetypesToInspect AS CHAR NO-UNDO. + + DEFINE VARIABLE numResults AS INTEGER NO-UNDO. + DEFINE VARIABLE q AS INTEGER NO-UNDO. + DEFINE VARIABLE i AS INTEGER NO-UNDO. + DEFINE VARIABLE queryname AS CHAR NO-UNDO. + DEFINE VARIABLE childnode AS INTEGER NO-UNDO. + DEFINE VARIABLE SearchChildren AS LOGICAL NO-UNDO INITIAL FALSE. + + childnode = parserGetHandle(). + + loop_nodetypes: + DO q=1 TO NUM-ENTRIES(NodetypesToInspect) : + /* invent a probably unique name */ + queryname = 'query_':U + ENTRY(q,NodetypesToInspect) + "_":U + STRING(theNode) + "_":U + STRING(q). + numResults = parserQueryCreate(theNode, queryname, ENTRY(q,NodetypesToInspect)). + loop_results: + DO i=1 TO numResults : + /* skip node if marked by FindProparseDirectives in prolint.p */ + IF parserQueryGetResult(queryname, i, childnode) THEN + IF 0=parserAttrGetI(childnode,ActivePragma) THEN + RUN VALUE(ipCallBack) IN TARGET-PROCEDURE (childnode, + OUTPUT AbortSearch, + OUTPUT SearchChildren). + IF AbortSearch THEN LEAVE loop_results. + END. + parserQueryClear(queryname). + IF AbortSearch THEN LEAVE loop_nodetypes. + END. + + parserReleaseHandle(childnode). + +END PROCEDURE. + + +PROCEDURE searchNodeTree : + /* purpose : like SearchNode, using a recursive loop. In general this is lots slower + than searchNodeQuery, although in some cases it's faster */ + DEFINE INPUT PARAMETER theNode AS INTEGER NO-UNDO. + DEFINE INPUT PARAMETER ipCallBack AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER NodetypesToInspect AS CHARACTER NO-UNDO. + + DEFINE VARIABLE child AS INTEGER NO-UNDO. + DEFINE VARIABLE nodetype AS CHARACTER NO-UNDO. + DEFINE VARIABLE SearchChildren AS LOGICAL NO-UNDO INITIAL YES. + DEFINE VARIABLE grandchild AS INTEGER NO-UNDO. + + ASSIGN + child = parserGetHandle() + grandchild = parserGetHandle(). + + IF 0=parserAttrGetI(theNode,ActivePragma) THEN + IF (NodetypesToInspect=?) OR (LOOKUP(parserGetNodeType(theNode),NodetypesToInspect) GT 0) THEN + RUN VALUE(ipCallBack) IN TARGET-PROCEDURE (theNode, + OUTPUT AbortSearch, + OUTPUT SearchChildren). + + IF SearchChildren AND (NOT AbortSearch) THEN DO: + ASSIGN nodetype = parserNodeFirstChild(theNode,child). + DO WHILE nodetype<>"" AND (NOT AbortSearch): + + /* if child is a new node head, run searchNodeTree with it (recursion) */ + IF parserNodeFirstChild(child, grandchild)<>"" THEN + RUN searchNodeTree IN TARGET-PROCEDURE (child, ipCallBack, NodetypesToInspect). + nodetype = parserNodeNextSibling(child,child). + END. + END. + + parserReleaseHandle(child). + parserReleaseHandle(grandchild). +END. + + +PROCEDURE PublishResult : + /* purpose: if a rule finds something to complain about, it runs this procedure, + using the default severity level for this rule. + Here is an opportunity to override PUBLISH "Prolint_AddResult" */ + DEFINE INPUT PARAMETER pCompilationUnit AS CHAR NO-UNDO. /* the sourcefile we're parsing */ + DEFINE INPUT PARAMETER pSource AS CHAR NO-UNDO. /* may be an includefile */ + DEFINE INPUT PARAMETER pLineNumber AS INTEGER NO-UNDO. /* line number in pSourceFile */ + DEFINE INPUT PARAMETER pDescription AS CHAR NO-UNDO. /* human-readable hint */ + DEFINE INPUT PARAMETER pRuleID AS CHAR NO-UNDO. /* defines rule-program and maps to help */ + + RUN PublishResultSeverity IN TARGET-PROCEDURE + (pCompilationunit, + pSource, + pLineNumber, + REPLACE(pDescription,"~n":U," ":U), + pRuleID, + ActiveSeverity). + +END PROCEDURE. + + +PROCEDURE PublishResultSeverity : + /* purpose: Like PublishResult, but with extra Severity parameter. + If a rule finds something to complain about, it runs this procedure. + Here is an opportunity to override PUBLISH "Prolint_AddResult" */ + DEFINE INPUT PARAMETER pCompilationUnit AS CHAR NO-UNDO. /* the sourcefile we're parsing */ + DEFINE INPUT PARAMETER pSource AS CHAR NO-UNDO. /* may be an includefile */ + DEFINE INPUT PARAMETER pLineNumber AS INTEGER NO-UNDO. /* line number in pSourceFile */ + DEFINE INPUT PARAMETER pDescription AS CHAR NO-UNDO. /* human-readable hint */ + DEFINE INPUT PARAMETER pRuleID AS CHAR NO-UNDO. /* defines rule-program and maps to help */ + DEFINE INPUT PARAMETER pCurrentSeverity AS INTEGER NO-UNDO. /* allows override of ActiveSeverity */ + + DEFINE VARIABLE filteredby AS CHARACTER NO-UNDO. /* comma-sep list of filters that deny this warning */ + DEFINE VARIABLE severity AS INTEGER NO-UNDO. + DEFINE VARIABLE RelativeSource AS CHARACTER NO-UNDO. + + ASSIGN + pDescription = REPLACE(REPLACE(pDescription,"~n":U," ":U),CHR(9)," ":U) + severity = IF pCurrentSeverity=? THEN ActiveSeverity ELSE pCurrentSeverity. + + /* replace fully-qualified path by relative path (relative to propath) */ + IF pCompilationUnit = pSource THEN + ASSIGN + pCompilationUnit = RelativeFileName(pCompilationUnit) + RelativeSource = pCompilationUnit. + ELSE + ASSIGN + pCompilationUnit = RelativeFileName(pCompilationUnit) + RelativeSource = RelativeFileName(pSource). + + RUN GetFilterResult IN hpFilterPlugins (pCompilationUnit, + pSource, + RelativeSource, + pLineNumber, + pRuleID, + IgnoreAB, + INPUT-OUTPUT pDescription, + INPUT-OUTPUT severity, + OUTPUT filteredby). + + IF filteredby <> "" THEN RETURN. /* TODO: send filteredby to outputhandlers */ + + PUBLISH "Prolint_AddResult":U (pCompilationunit, + RelativeSource, + pLineNumber, + REPLACE(pDescription,"~n":U," ":U), + pRuleID, + severity). + +END PROCEDURE. + + +PROCEDURE PublishResultSeverityRelative : + /* purpose: Like PublishResultSeverity, but this time we know for sure that filenames are already relative filenames */ + DEFINE INPUT PARAMETER pCompilationUnit AS CHAR NO-UNDO. /* the sourcefile we're parsing */ + DEFINE INPUT PARAMETER pSource AS CHAR NO-UNDO. /* may be an includefile */ + DEFINE INPUT PARAMETER pLineNumber AS INTEGER NO-UNDO. /* line number in pSourceFile */ + DEFINE INPUT PARAMETER pDescription AS CHAR NO-UNDO. /* human-readable hint */ + DEFINE INPUT PARAMETER pRuleID AS CHAR NO-UNDO. /* defines rule-program and maps to help */ + DEFINE INPUT PARAMETER pCurrentSeverity AS INTEGER NO-UNDO. /* allows override of ActiveSeverity */ + + DEFINE VARIABLE filteredby AS CHARACTER NO-UNDO. /* comma-sep list of filters that deny this warning */ + DEFINE VARIABLE severity AS INTEGER NO-UNDO. + DEFINE VARIABLE RelativeSource AS CHARACTER NO-UNDO. + + ASSIGN + pDescription = REPLACE(REPLACE(pDescription,"~n":U," ":U),CHR(9)," ":U) + severity = IF pCurrentSeverity=? THEN ActiveSeverity ELSE pCurrentSeverity. + + RUN GetFilterResult IN hpFilterPlugins (pCompilationUnit, + pSource, + pSource, + pLineNumber, + pRuleID, + IgnoreAB, + INPUT-OUTPUT pDescription, + INPUT-OUTPUT severity, + OUTPUT filteredby). + + IF filteredby <> "" THEN RETURN. /* TODO: send filteredby to outputhandlers */ + + PUBLISH "Prolint_AddResult":U (pCompilationunit, + pSource, + pLineNumber, + REPLACE(pDescription,"~n":U," ":U), + pRuleID, + severity). + +END PROCEDURE. + + + +PROCEDURE NextNaturalNode : +/* purpose: set a handle to point at the next non-synthetic node + There are at least two reasons for wanting the next non-synthetic node: + - finding line/filename (not stored in synthetic nodes) + - finding hidden tokens (are only attached to natural nodes) + This function became more necessary with the removal of parserHiddenGetAfter(). + Author: John Green + INPUT: start handle, target handle (may be the same as each other) + OUTPUT: TRUE if a natural node was found, FALSE otherwise. + NOTES: * If the start handle is a natural node, then targetHandle=startHandle, + and the return value is TRUE. + * If no natural node is found, + then targetHandle isn't pointing to anything useful. + * Siblings of startHandle are checked, but not parents. + * Watches for "operator nodes" which were made root to its operands. + From 1 + 2, we want the "1", not the "+". + * Are PROPARSEDIRECTIVE nodes natural? + Well, they have no text, but they do have a line number, + and they do hold hidden tokens. We use line number as our test, + which serves us correctly here for hidden tokens. +*/ + DEFINE INPUT PARAMETER startNode AS INTEGER NO-UNDO. + DEFINE INPUT PARAMETER targetNode AS INTEGER NO-UNDO. + DEFINE OUTPUT PARAMETER wasFound AS LOGICAL NO-UNDO. + + DEFINE VARIABLE operatorAttr AS CHARACTER NO-UNDO. + DEFINE VARIABLE nodeLine AS INTEGER NO-UNDO. + + /* Only copy start to target if they aren't the same handle */ + IF startNode <> targetNode THEN + parserCopyHandle(startNode, targetNode). + + /* exit condition - "natural" nodes have a line number */ + IF parserGetNodeLine(targetNode) <> 0 THEN DO: + wasFound = TRUE. + RETURN. + END. + + /* Check for child, then check for sibling, then fail */ + IF ( parserNodeFirstChild(targetNode, targetNode) = "" + AND parserNodeNextSibling(targetNode, targetNode) = "" + ) THEN DO: + wasFound = FALSE. + RETURN. + END. + + /* Now we have either the first child or the next sibling */ + nodeLine = parserGetNodeLine(targetNode). + DO WHILE nodeLine = 0: + IF parserNodeFirstChild(targetNode, targetNode) = "" THEN DO: + /* This would happen at end of file; ie: next sibling was Program_tail */ + wasFound = FALSE. + RETURN. + END. + nodeLine = parserGetNodeline(targetNode). + END. + + /* Now we have a natural node. + But if it's an *operator* node, then it's not really the *first* natural node! */ + operatorAttr = parserAttrGet(targetNode, "operator":U). + DO WHILE operatorAttr = "t":U : + findnatural: + DO WHILE TRUE: /* find first non-synthetic child */ + parserNodeFirstChild(targetNode, targetNode). + IF parserGetNodeLine(targetNode) <> 0 THEN + LEAVE findnatural. + END. + operatorAttr = parserAttrGet(targetNode, "operator":U). + END. + + /* Now we really have the first natural node. */ + wasFound = TRUE. + RETURN. + +END PROCEDURE. /* NextNaturalNode */ + + Copied: trunk/prolint/core/prolint.p (from rev 271, trunk/prolint/prolint.p) =================================================================== --- trunk/prolint/core/prolint.p (rev 0) +++ trunk/prolint/core/prolint.p 2006-08-05 09:25:43 UTC (rev 273) @@ -0,0 +1,1333 @@ +/* ========================================================================================== + file : prolint/core/prolint.p + purpose : scan sourcefile(s), look for sloppy programming and common mistakes + see prolint/help/index.htm + + Copyright (C) 2001,2002 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ========================================================================================== */ + +/* ProparseVersion is the expected/"supported" version of proparse.dll for this release of prolint. + When Joanju releases a new version of proparse, we need to do regression testing */ +/* Only the first four digits must match, because for example release 1.0d is functionally + similar to bugfix 1.0d04 */ +&SCOPED-DEFINE ProparseVersion "3.0b":U + +{prolint/dlc-version.i} + +DEFINE INPUT PARAMETER pSourcefile AS CHARACTER NO-UNDO. /* a single filename to lint */ +DEFINE INPUT PARAMETER hSourcefileList AS HANDLE NO-UNDO. /* handle to a list of filenames to lint */ +DEFINE INPUT PARAMETER pCustomprofile AS CHARACTER NO-UNDO. /* name of subdir in prolint/settings */ +DEFINE INPUT PARAMETER pClearOutput AS LOGICAL NO-UNDO. /* add to existing output, or start new log */ + +/* TODO: idea for future version: accept wildcards in pSourcefile and/or in records in hSourcefileList. + this current version expects specific filenames, wildcards are not supported */ + +DEFINE VARIABLE ProfileDirectory AS CHAR NO-UNDO. +DEFINE VARIABLE MaxSeverity AS INTEGER NO-UNDO. +DEFINE VARIABLE listingfile AS CHAR NO-UNDO. +DEFINE VARIABLE xreffile AS CHAR NO-UNDO. +DEFINE VARIABLE hparser AS HANDLE NO-UNDO. +DEFINE VARIABLE topnode AS INTEGER NO-UNDO. +DEFINE VARIABLE NeedProparse AS LOGICAL NO-UNDO INITIAL NO. +DEFINE VARIABLE HasProparse AS LOGICAL NO-UNDO INITIAL YES. +DEFINE VARIABLE HasJpplus AS LOGICAL NO-UNDO INITIAL NO. +DEFINE VARIABLE needCompilerStreamIO AS LOGICAL NO-UNDO INITIAL NO. +DEFINE VARIABLE NeedListing AS LOGICAL NO-UNDO INITIAL NO. +DEFINE VARIABLE NeedXref AS LOGICAL NO-UNDO INITIAL NO. +DEFINE VARIABLE NeedProclist AS LOGICAL NO-UNDO INITIAL NO. +DEFINE VARIABLE hLintSuper AS HANDLE NO-UNDO. +DEFINE VARIABLE grandchild AS INTEGER NO-UNDO. +DEFINE VARIABLE tempdir AS CHARACTER NO-UNDO. +DEFINE VARIABLE tmpTurbolintOut AS CHARACTER NO-UNDO. /* tempfile where turbolint.dll writes results to */ +DEFINE VARIABLE tmpTurbolintNowarn AS CHARACTER NO-UNDO. /* tempfile where turbolint.dll writes nowarn-lines to */ +DEFINE VARIABLE hTurbolint AS INTEGER NO-UNDO. /* hInstance of turbolint.dll */ +DEFINE VARIABLE hpFilterPlugins AS HANDLE NO-UNDO. +DEFINE VARIABLE hpProperties AS HANDLE NO-UNDO. + +{proparse/api/proparse.i hparser} + +DEFINE TEMP-TABLE tt_rules NO-UNDO + FIELD RuleID AS CHARACTER /* equals name of sourcefile, without path or extension */ + FIELD severity AS INTEGER /* importance. 1=minimum, 9=maximum. 0=don't run this rule */ + FIELD useproparse AS LOGICAL /* uses proparse.dll to inspect source */ + FIELD uselisting AS LOGICAL /* reads output from compile...listing */ + FIELD usexref AS LOGICAL /* reads output from compile...xref */ + FIELD useproclist AS LOGICAL /* needs a list of internal procedures and user-defined functions */ + FIELD ignoreAB AS LOGICAL /* suppress warnings from UIB/AB-generated code */ + FIELD pragma AS INTEGER /* unique integer, used for prolint-nowarn */ + FIELD custom AS LOGICAL /* is this a standard rule or is it found in prolint/custom/rules? */ + FIELD byturbolint AS LOGICAL /* will this rule be run by turbolint.dll */ + FIELD hpRulePersist AS HANDLE /* handle to persistent "rules/persist/[ruleid].p" */ + INDEX idx_id AS PRIMARY RuleID. + +DEFINE TEMP-TABLE tt_output NO-UNDO + FIELD progname AS CHARACTER + FIELD DlcVersion AS INTEGER + FIELD WindowSystem AS CHARACTER + INDEX idx_progname AS PRIMARY UNIQUE progname. + +DEFINE TEMP-TABLE tt_files NO-UNDO + FIELD sourcefile AS CHARACTER + INDEX idx_sourcefile AS PRIMARY UNIQUE sourcefile. + + RUN prolint/core/propsuper.p PERSISTENT SET hpProperties. + + /* make sure hParser is invalid. We will use function VALID-HANDLE() later, in GetProparseHandle */ + ASSIGN + hParser = ?. + + /* did the user install (purchase) proparse yet? If not most rules won't work. + Add a warning to the logfile to say proparse is required */ + IF opsys="UNIX":U THEN + hasProparse = NOT( SEARCH("proparse/libproparse.so":U)=? AND SEARCH("proparse/libproparse.sl":U)=? ). + ELSE + hasProparse = NOT( SEARCH("proparse/proparse.dll":U)=? ). + + /* pick a dir for temporary files */ + RUN MakeTempdir. + + /* the place to read your custom settings from */ + RUN GetProfileDirectory. + + /* We need to subscribe to "Prolint_AddResult" because we want to set MaxSeverity */ + SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. + + /* Initialize a place to store results: a logfile, the 'Prolint result window', whatever */ + RUN InitializeOutputhandler. + IF RETURN-VALUE="no handlers":U THEN DO: + {&_proparse_ prolint-nowarn(message)} + MESSAGE "prolint: no valid outputhandlers specified":U VIEW-AS ALERT-BOX. + RUN DeleteTempdir. + DELETE PROCEDURE hpProperties. + RETURN. + END. + + PUBLISH "Prolint_Status_Action" ("initializing..."). + PUBLISH "Prolint_Status_Profile" (pCustomProfile). + + /* Initialize the set of rules, eg populate tt_rules. + If there are no rules there is no point in continuing */ + RUN InitializeRules. + + /* are there any rules that need proparse but proparse isn't installed? */ + IF NeedProparse AND (NOT HasProparse) THEN + PUBLISH "Prolint_AddResult":U ("":U, "":U,"0":U, "proparse required but not found":T, "noproparse":U, 0). + + /* are there any rules at all? If not, close logfile and stop. */ + IF NOT CAN-FIND(FIRST tt_rules) THEN DO: + PUBLISH "Prolint_FinalizeResults". + RUN DeleteTempdir. + DELETE PROCEDURE hpProperties. + RETURN STRING(MaxSeverity). + END. + + RUN PublishRuleList. + + /* show hourglass cursor */ + RUN set-hourglass(TRUE). + + /* load and initialize proparse.dll */ + IF NeedProparse AND HasProparse THEN DO: + RUN GetProparseHandle. + RUN LoadTurbolintDLL. + END. + + /* start a super procedure, to be used by every rule */ + RUN prolint/core/filterplugins.p PERSISTENT SET hpFilterPlugins (ProfileDirectory). + RUN prolint/core/lintsuper.p PERSISTENT SET hLintSuper (hParser,hpFilterPlugins). + RUN SethLintSuper in hpFilterPlugins (hLintSuper). /* ugly circular reference, sorry */ + + /* Lint files: the file specified in pSourceFile plus the contents of hSourcefileList */ + IF VALID-HANDLE(hSourcefileList) THEN + CASE hSourcefileList:TYPE : + WHEN "TEMP-TABLE":U THEN RUN AddTemptableSourceFiles. + WHEN "PROCEDURE":U THEN RUN AddIPProvidedSourceFiles. + OTHERWISE DO: /* other types not supported. Suggestions? */ END. + END CASE. + + IF NOT(pSourceFile="":U OR pSourceFile=?) THEN + RUN AddOneSourceItem(pSourceFile). + + RUN CheckMultipleSetups. + + /* load all procedures in directory rules/persist */ + FOR EACH tt_rules WHERE tt_rules.byturbolint=FALSE NO-LOCK : + IF SEARCH("prolint/custom/rules/persist/":U + tt_rules.ruleid + ".p":U)<>? THEN + RUN VALUE("prolint/custom/rules/persist/":U + tt_rules.ruleid + ".p":U) PERSISTENT SET tt_rules.hpRulePersist(INPUT hLintSuper). + ELSE + IF SEARCH("prolint/rules/persist/":U + tt_rules.ruleid + ".p":U)<>? THEN + RUN VALUE("prolint/rules/persist/":U + tt_rules.ruleid + ".p":U) PERSISTENT SET tt_rules.hpRulePersist(INPUT hLintSuper). + END. + + /* lint all sourcefiles */ + RUN LintAllSourcefiles. + + /* unload rules/persist */ + FOR EACH tt_rules NO-LOCK : + IF VALID-HANDLE(tt_rules.hpRulePersist) THEN DO: + DELETE PROCEDURE tt_rules.hpRulePersist. + tt_rules.hpRulePersist = ?. + END. + END. + + /* tell the logfile/result-window we are done with it */ + PUBLISH "Prolint_FinalizeResults". + + /* release resources */ + RUN ClearProparseResources. + APPLY "CLOSE":U TO hLintSuper. + hLintSuper = ?. + APPLY "CLOSE":U TO hpFilterPlugins. + hpFilterPlugins = ?. + RUN ReleaseProparseHandle. + RUN DeleteTempdir. + IF hTurbolint<>0 THEN + RUN FreeLibrary (hTurbolint). + DELETE PROCEDURE hpProperties. + + /* stop hourglass cursor */ + RUN set-hourglass(FALSE). + + /* return highest severity to the caller */ + /* the calling application might need to know that we found something, + for example: Roundtable might decide NOT to complete this task */ +RETURN STRING(MaxSeverity). + + +/* ======================================================================================= + internal procedures + ======================================================================================= */ + +PROCEDURE GetProfileDirectory : + /* purpose: determine the location of configuration settings. + this would be "local-prolint/settings/" + pCustomProfile + or "prolint/settings/ + pCustomProfile + or just "prolint/settings" */ + + DEFINE VARIABLE PrivateDir AS CHARACTER NO-UNDO. + DEFINE VARIABLE SharedDir AS CHARACTER NO-UNDO. + DEFINE VARIABLE mandatory_d AS CHARACTER NO-UNDO. + DEFINE VARIABLE profile AS CHARACTER NO-UNDO. + + IF pCustomProfile = "":U OR pCustomProfile="<none>":U THEN DO: + FILE-INFO:FILE-NAME = "prolint/settings":U. + ProfileDirectory = FILE-INFO:FULL-PATHNAME. + END. + ELSE DO: + + FILE-INFO:FILE-NAME = "local-prolint/settings/":U + pCustomProfile. + PrivateDir = FILE-INFO:FULL-PATHNAME. + + FILE-INFO:FILE-NAME = "prolint/settings/":U + pCustomProfile. + SharedDir = FILE-INFO:FULL-PATHNAME. + + IF PrivateDir=? AND SharedDir=? THEN + ProfileDirectory = "prolint/settings":U. + ELSE + IF PrivateDir<>? AND SharedDir=? THEN + ProfileDirectory = PrivateDir. + ELSE + IF PrivateDir=? AND SharedDir<>? THEN + ProfileDirectory = SharedDir. + ELSE + IF PrivateDir<>? AND SharedDir<>? THEN DO: + /* are private settings allowed to override shared settings? */ + FILE-INFO:FILE-NAME = SharedDir + "/no-local-settings.lk":U. + IF FILE-INFO:FULL-PATHNAME = ? THEN + ProfileDirectory = PrivateDir. + ELSE + ProfileDirectory = SharedDir. /* ignore PrivateDir */ + END. + END. + +END PROCEDURE. + + + +PROCEDURE InitializeRules : + /* purpose : make a list of rules to run (populate tt_rules). + first import tt_rules from rules.d + then override them with configuration settings from rules.d */ + + DEFINE VARIABLE customrequired AS LOGICAL NO-UNDO. + DEFINE VARIABLE customrule AS CHAR NO-UNDO. + DEFINE VARIABLE customlevel AS INTEGER NO-UNDO. + DEFINE VARIABLE skippedrule AS CHARACTER NO-UNDO. + + DEFINE BUFFER buf_rules FOR tt_rules. + + /* import the custom rules (e.g. those NOT shipped by Prolint Open Source Project) */ + FILE-INFO:FILE-NAME = "prolint/custom/rules/rules.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + CREATE tt_rules. + IMPORT tt_rules EXCEPT tt_rules.pragma tt_rules.custom tt_rules.byturbolint tt_rules.hpRulePersist. + tt_rules.custom = FALSE. + tt_rules.byturbolint = FALSE. + IF CAN-FIND(buf_rules WHERE buf_rules.RuleID=tt_rules.RuleID AND ROWID(buf_rules) NE ROWID(tt_rules)) THEN + DELETE tt_rules. + END. + INPUT CLOSE. + END. + FOR EACH tt_rules WHERE tt_rules.RuleID = "" : + DELETE tt_rules. + END. + + /* import the default rules (e.g. those shipped by www.prolint.org) */ + FILE-INFO:FILE-NAME = "prolint/rules/rules.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + CREATE tt_rules. + IMPORT tt_rules EXCEPT tt_rules.pragma tt_rules.custom tt_rules.byturbolint tt_rules.hpRulePersist. + tt_rules.custom = FALSE. + tt_rules.byturbolint = FALSE. + IF CAN-FIND(buf_rules WHERE buf_rules.RuleID=tt_rules.RuleID AND ROWID(buf_rules) NE ROWID(tt_rules)) THEN + DELETE tt_rules. + END. + INPUT CLOSE. + END. + FOR EACH tt_rules WHERE tt_rules.RuleID = "" : + DELETE tt_rules. + END. + + /* modify standard severity: read custom severity from severity.d */ + /* notice: new rules added to rules.d will run with default severity. That's a good feature */ + FILE-INFO:FILE-NAME = ProfileDirectory + "/severity.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + customlevel = -1. /* if still -1 after import, means that user doesn't want to modify the default */ + IMPORT customrequired customrule customlevel. + FIND tt_rules WHERE tt_rules.RuleID = customrule NO-ERROR. + IF AVAILABLE tt_rules THEN + IF customrequired=FALSE THEN + DELETE tt_rules. + ELSE + IF NOT customlevel=-1 THEN + ASSIGN tt_rules.severity = customlevel. + END. + INPUT CLOSE. + END. + + /* skip rules which are listed in prolint/custom/rules/skiprules.d */ + FILE-INFO:FILE-NAME = "prolint/custom/rules/skiprules.lst":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + IMPORT UNFORMATTED skippedrule. + skippedrule = TRIM(skippedrule). + FOR EACH tt_rules WHERE tt_rules.RuleID=skippedrule : + DELETE tt_rules. + END. + END. + INPUT CLOSE. + END. + + /* locate the source for each rule: decide if it is a custom rule */ + FOR EACH tt_rules : + FILE-INFO:FILE-NAME = "prolint/custom/rules/":U + tt_rules.RuleId + ".p":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN + tt_rules.custom = TRUE. + END. + + + /* Clean up the list of rules. */ + + /* do we need Xref file or Listing file? Hope not, it slows down the process */ + ASSIGN + NeedProparse = FALSE + NeedListing = FALSE + NeedXref = FALSE + NeedProclist = FALSE. + + loop_needsomething: + FOR EACH tt_rules : + IF tt_rules.useproparse THEN NeedProparse = TRUE. + IF tt_rules.uselisting THEN NeedListing = TRUE. + IF tt_rules.usexref THEN NeedXref = TRUE. + IF tt_rules.useproclist THEN NeedProclist = TRUE. + + IF (NeedProparse AND NeedListing AND NeedXref AND NeedProclist) THEN + LEAVE loop_needsomething. + END. + + /* forget rules that depend on proparse if proparse isn't installed */ + IF NeedProparse AND NOT HasProparse THEN + FOR EACH tt_rules WHERE tt_rules.useproparse=YES : + DELETE tt_rules. + END. + + /* sanity check: + rules that don't need proparse or xref or listing are nonsense */ + FOR EACH tt_rules WHERE tt_rules.useproparse=NO AND tt_rules.uselisting=NO AND tt_rules.usexref=NO : + DELETE tt_rules. + END. + + /* finally, assign tt_rules.pragma a unique number, starting at 50001 */ + DEFINE VARIABLE vPragma AS INTEGER NO-UNDO INITIAL 50001. + FOR EACH tt_rules : + ASSIGN tt_rules.pragma = vPragma + vPragma = vPragma + 1. + END. + +END PROCEDURE. + + +PROCEDURE InitializeOutputhandler : + /* purpose: start one or more persistent procedures to publish the results to. + each pp can write a logfile or show results on screen, or whatever it wants to do */ + + DEFINE VARIABLE LogwinRunning AS LOGICAL NO-UNDO INITIAL NO. + DEFINE VARIABLE handlers AS CHARACTER NO-UNDO. + DEFINE VARIABLE handler AS CHARACTER NO-UNDO. + DEFINE VARIABLE i AS INTEGER NO-UNDO. + DEFINE VARIABLE hw AS HANDLE NO-UNDO. + + /* import list of outputhandlers */ + FILE-INFO:FILE-NAME = "prolint/outputhandlers/choices.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + CREATE tt_output. + IMPORT tt_output. + END. + INPUT CLOSE. + END. + + /* forget each outputhandler that isn't supported in this Progress session: */ + FOR EACH tt_output : + IF tt_output.DlcVersion GT {&dlc-version} OR + NOT CAN-DO(tt_output.WindowSystem,SessionWindowSystem) THEN + DELETE tt_output. + END. + + /* get the list of handlers you want to use, as specified in profile settings: */ + handlers = "":U. + FILE-INFO:FILE-NAME = ProfileDirectory + "/handlers.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + IMPORT handler. + /* if handler exists and supported in this Progress session, then add to list */ + IF CAN-FIND(tt_output WHERE tt_output.progname=handler) THEN + handlers = handlers + ",":U + handler. + END. + INPUT CLOSE. + END. + + handlers = TRIM(handlers,',':U). + IF handlers="" THEN + RETURN "no handlers":U. + + DO i=1 TO NUM-ENTRIES(handlers) : + handler = ENTRY(i,handlers). + + CASE handler : + WHEN "logwin.w":U THEN DO: + LogwinRunning = FALSE. + hw = SESSION:FIRST-CHILD. + DO WHILE VALID-HANDLE(hw) : + IF hw:PRIVATE-DATA = "prolint_outputhandler_logwin.w":U THEN + LogwinRunning = TRUE. + hw = hw:NEXT-SIBLING. + END. + IF NOT LogwinRunning THEN + RUN VALUE(DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.resultwindow")) PERSISTENT. + END. + + OTHERWISE RUN VALUE("prolint/outputhandlers/":U + handler) PERSISTENT. + END. + END. + + PUBLISH "Prolint_InitializeResults" (pClearOutput). + +END PROCEDURE. + + +PROCEDURE GetProparseHandle : + /* purpose: run proparse.p persistent set hParser + or find an already running instance of proparse.p and use its handle */ + + DEFINE VARIABLE hpp AS HANDLE NO-UNDO. + DEFINE VARIABLE dllversion AS CHARACTER NO-UNDO. + + hpp = session:FIRST-PROCEDURE. + DO WHILE VALID-HANDLE(hpp) AND (NOT VALID-HANDLE(hparser)) : + IF hpp:FILE-NAME MATCHES "~*~/proparse.*":U THEN /* added tildes because Progress confused it for a comment :-)*/ + hparser = hpp. + ELSE + hpp = hpp:NEXT-SIBLING. + END. + IF (NOT VALID-HANDLE(hParser)) AND (HasProparse) THEN + RUN proparse/api/proparse.p PERSISTENT SET hparser. + + /* check if proparse version matches the prolint version. If not, you must upgrade one or the other */ + IF VALID-HANDLE(hParser) THEN DO: + dllversion = parserGetVersion(). + /* only compare the first four digits: release 1.0d is functionally similar to bugfix 1.0d02 */ + IF SUBSTRING(dllversion,1,4) NE SUBSTRING({&ProparseVersion},1,4) THEN + PUBLISH "Prolint_AddResult":U ("", "","0":U, SUBSTITUTE("Expected proparse version &1, found &2":T, {&proparseversion}, dllversion), "version":U, 0). + END. + + /* Look for the "jpplus" package, which provides + * tree attributes beyond what the basic parser does. + * jpplus/4gl/startup.p is run by proparse.p - we don't do it here. + */ + IF VALID-HANDLE(hParser) AND SEARCH("jpplus/4gl/startup.p":U) <> ? THEN DO: + ASSIGN HasJpplus = true. + END. + + /* enable reading of PROPARSE-DIRECTIVE for Prolint pragma's */ + IF VALID-HANDLE(hParser) THEN + parserConfigSet("show-proparse-directives":U, "true":U). + + /* define database aliases: */ + RUN DefineAliases. + +END PROCEDURE. + +PROCEDURE DefineAliases : + /* purpose: */ + DEFINE VARIABLE vAlias AS CHARACTER NO-UNDO. + DEFINE VARIABLE vDbname AS CHARACTER NO-UNDO. + DEFINE VARIABLE i AS INTEGER NO-UNDO. + + /* first delete all existing aliases */ + parserSchemaAliasDelete(""). + + /* pass all aliases which are defined in the current Progress session */ + REPEAT i=1 TO NUM-ALIASES: + parserSchemaAliasCreate(ALIAS(i),LDBNAME(ALIAS(i))). + END. + + /* now read list of aliasses from the optional file settings/dbaliases */ + FILE-INFO:FILE-NAME = "prolint/settings/dbaliases.d":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + INPUT FROM VALUE(file-info:FULL-PATHNAME). + REPEAT: + IMPORT vAlias vDbname. + parserSchemaAliasCreate(vAlias,vDbname). + END. + INPUT CLOSE. + END. + +END PROCEDURE. + +PROCEDURE AddTemptableSourceFiles : + /* purpose : if parameter hSourcefileList is a temp-table, then assume it is a list of + sourcefiles to lint. The temp-table must have a field SourceFile, other + fields (if any) don't matter */ + + DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO. + DEFINE VARIABLE hField AS HANDLE NO-UNDO. + DEFINE VARIABLE hQuery AS HANDLE NO-UNDO. + + hBuffer = hSourcefileList:DEFAULT-BUFFER-HANDLE. + hField = hBuffer:BUFFER-FIELD("SourceFile":U). + IF VALID-HANDLE(hField) THEN DO: + CREATE QUERY hQuery. + hQuery:SET-BUFFERS(hBuffer). + hQuery:QUERY-PREPARE(SUBSTITUTE("for each &1 no-lock":U, hSourcefileList:NAME)). + hQuery:QUERY-OPEN(). + hQuery:GET-FIRST(). + DO WHILE hBuffer:AVAILABLE : + RUN AddOneSourceItem(hField:BUFFER-VALUE). + hQuery:GET-NEXT(). + END. + hQuery:QUERY-CLOSE(). + DELETE OBJECT hQuery. + END. + +END PROCEDURE. + + +PROCEDURE AddIPProvidedSourceFiles : + /* purpose : if parameter hSourcefileList is a procedure, then this procedure should contain + internal procedures that provides us with names of sourcefiles - one at a time */ + + DEFINE VARIABLE v-SourceFile AS CHARACTER NO-UNDO. + + RUN GetFirstLintSource IN hSourcefileList (OUTPUT v-SourceFile). + DO WHILE v-SourceFile NE ? : + RUN AddOneSourceItem(v-SourceFile). + RUN GetNextLintSource IN hSourcefileList (OUTPUT v-SourceFile). + END. + +END PROCEDURE. + + +PROCEDURE AddOneSourceItem : + /* purpose: SourceItem can be a filename or a directoryname. + if it's a directory then lint all files in it */ + DEFINE INPUT PARAMETER p-SourceItem AS CHARACTER NO-UNDO. + + DEFINE VARIABLE basename AS CHARACTER NO-UNDO. + DEFINE VARIABLE fullpath AS CHARACTER NO-UNDO. + DEFINE VARIABLE attribs AS CHARACTER NO-UNDO. + + FILE-INFO:FILE-NAME = p-SourceItem. + IF FILE-INFO:FULL-PATHNAME = ? THEN + PUBLISH "Prolint_AddResult":U (p-SourceItem, p-SourceItem,"0":U, "file not found":T, "prolint":U, 9). + ELSE + IF FILE-INFO:FILE-TYPE MATCHES "*F*":U THEN + RUN AddOneSourceFile(FILE-INFO:FULL-PATHNAME). + ELSE + IF FILE-INFO:FILE-TYPE MATCHES "*D*":U THEN DO: + /* scan directory contents. recursive! */ + INPUT FROM OS-DIR (FILE-INFO:FULL-PATHNAME). + REPEAT: + IMPORT basename fullpath attribs. + IF attribs MATCHES "*D*":U AND NOT(basename=".":U OR basename="..":U) THEN + RUN AddOneSourceItem(fullpath). + IF attribs MATCHES "*F*":U THEN + IF (basename MATCHES "*~~.w":U) OR (basename MATCHES "*~~.p":U) THEN + RUN AddOneSourceFile(fullpath). + END. + INPUT CLOSE. + END. +END PROCEDURE. + + +PROCEDURE AddOneSourceFile : + /* purpose : add name of sourcefile to tt_files. + That way we can assure the names are unique, + we can count the files and show a percentage done, + and we won't have to run LintOneSourceFile from within + the recursive directory-scan (high stack usage) */ + DEFINE INPUT PARAMETER p-SourceFile AS CHARACTER NO-UNDO. + + p-SourceFile = DYNAMIC-FUNCTION("RelativeFilename":U IN hLintSuper, p-SourceFile). + FIND tt_files WHERE tt_files.sourcefile = p-SourceFile NO-ERROR. + IF NOT AVAILABLE tt_files THEN DO: + CREATE tt_files. + ASSIGN tt_files.sourcefile = p-Sourcefile. + END. + +END PROCEDURE. + + +PROCEDURE LintAllSourcefiles : + /* purpose: actually lint each tt_files.sourcefile. + also try to give an idea how long it's gonna take. */ + + DEFINE VARIABLE maxFiles AS INTEGER NO-UNDO. + DEFINE VARIABLE numFiles AS INTEGER NO-UNDO. + DEFINE VARIABLE done AS CHARACTER NO-UNDO. + + FOR EACH tt_files NO-LOCK : + maxFiles = maxFiles + 1. + END. + + IF maxFiles>1 THEN DO: + done = " 0%":U. + PUBLISH "Prolint_Status_Progress" ("done"). + END. + + FOR EACH tt_files NO-LOCK : + RUN LintOneSourceFile (tt_files.sourcefile). + numFiles = numFiles + 1. + done = STRING((100 * numFiles) / maxFiles, ">>9":U) + "%":U. + PUBLISH "Prolint_Status_Progress" ("done"). + END. + +END PROCEDURE. + +PROCEDURE LintOneSourceFile : + /* purpose : lint one sourcefile. + Just PreAnalyze it (=compile + parserParse) and run value(each rule) */ + + DEFINE INPUT PARAMETER p-SourceFile AS CHARACTER NO-UNDO. + + DEFINE VARIABLE ErrorMessage AS CHAR NO-UNDO. + + PUBLISH "Prolint_Status_FileStart" (p-SourceFile). + + FILE-INFO:FILE-NAME = p-SourceFile. + IF FILE-INFO:FULL-PATHNAME = ? THEN + PUBLISH "Prolint_AddResult":U (p-SourceFile, p-SourceFile,"0":U, "file not found":T, "prolint":U, 9). + ELSE DO: + p-SourceFile = FILE-INFO:FULL-PATHNAME. + + /* PreAnalyze creates compile listing, XREF ... [truncated message content] |
From: <ju...@us...> - 2006-08-05 08:59:31
|
Revision: 272 Author: jurjen Date: 2006-08-05 01:59:22 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=272&view=rev Log Message: ----------- new directory structure Added Paths: ----------- trunk/prolint/core/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-05 08:52:17
|
Revision: 271 Author: jurjen Date: 2006-08-05 01:52:10 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=271&view=rev Log Message: ----------- proparse version 3.0b Modified Paths: -------------- trunk/prolint/prolint.p Modified: trunk/prolint/prolint.p =================================================================== --- trunk/prolint/prolint.p 2006-08-04 23:03:53 UTC (rev 270) +++ trunk/prolint/prolint.p 2006-08-05 08:52:10 UTC (rev 271) @@ -26,7 +26,7 @@ When Joanju releases a new version of proparse, we need to do regression testing */ /* Only the first four digits must match, because for example release 1.0d is functionally similar to bugfix 1.0d04 */ -&SCOPED-DEFINE ProparseVersion "2.2b01":U +&SCOPED-DEFINE ProparseVersion "3.0b":U {prolint/dlc-version.i} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-08-04 23:04:07
|
Revision: 270 Author: jurjen Date: 2006-08-04 16:03:53 -0700 (Fri, 04 Aug 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=270&view=rev Log Message: ----------- New database "prolintest". This one is used during regression testing, instead Sports2000. Because the Sports2000 database did not have the indexes needed to test the "findstate" rule. Modified Paths: -------------- trunk/prolint/desktop.w trunk/prolint/regrtest/findstate.i trunk/prolint/test.p Added Paths: ----------- trunk/prolint/regrtest/db/ trunk/prolint/regrtest/db/prolintest.df Modified: trunk/prolint/desktop.w =================================================================== --- trunk/prolint/desktop.w 2006-07-17 21:54:09 UTC (rev 269) +++ trunk/prolint/desktop.w 2006-08-04 23:03:53 UTC (rev 270) @@ -188,7 +188,7 @@ SIZE 52 BY 1.29 BGCOLOR 8 NO-UNDO. -DEFINE VARIABLE EDITOR-9 AS CHARACTER INITIAL "Run regression-tests for Prolint. Needs a connection to sports.db or sports2000.db." +DEFINE VARIABLE EDITOR-9 AS CHARACTER INITIAL "Run regression-tests for Prolint." VIEW-AS EDITOR LARGE NO-BOX SIZE 52 BY 1.33 BGCOLOR 8 NO-UNDO. Added: trunk/prolint/regrtest/db/prolintest.df =================================================================== --- trunk/prolint/regrtest/db/prolintest.df (rev 0) +++ trunk/prolint/regrtest/db/prolintest.df 2006-08-04 23:03:53 UTC (rev 270) @@ -0,0 +1,520 @@ +UPDATE DATABASE "?" + +ADD TABLE "Customer" + DESCRIPTION "The customer table contains customer information including balance and address." + DUMP-NAME "customer" + +ADD FIELD "CustNum" OF "Customer" AS integer + FORMAT ">>>>9" + INITIAL "0" + LABEL "Cust Num" + SQL-WIDTH 4 + VALEXP "custnum > 0" + VALMSG "Customer number must be greater than zero" + HELP "Please enter a customer number." + ORDER 10 + +ADD FIELD "Name" OF "Customer" AS character + FORMAT "x(30)" + INITIAL "" + LABEL "Name" + SQL-WIDTH 60 + HELP "Please enter a name." + ORDER 30 + +ADD FIELD "Address" OF "Customer" AS character + FORMAT "x(35)" + INITIAL "" + LABEL "Address" + SQL-WIDTH 70 + HELP "Please enter an address." + ORDER 40 + +ADD FIELD "Address2" OF "Customer" AS character + FORMAT "x(35)" + INITIAL "" + LABEL "Address2" + SQL-WIDTH 70 + HELP "Please enter an address." + ORDER 50 + +ADD FIELD "City" OF "Customer" AS character + FORMAT "x(25)" + INITIAL "" + LABEL "City" + SQL-WIDTH 50 + HELP "Please enter a city." + ORDER 60 + +ADD FIELD "State" OF "Customer" AS character + DESCRIPTION "Label/Valexp/Valmsg/Help are set based on value of NON-US field!" + FORMAT "x(20)" + INITIAL "" + LABEL "State" + SQL-WIDTH 40 + HELP "Please enter standard state abbreviation." + ORDER 70 + +ADD FIELD "Country" OF "Customer" AS character + FORMAT "x(20)" + INITIAL "USA" + LABEL "Country" + SQL-WIDTH 40 + HELP "Please enter a country." + ORDER 15 + +ADD FIELD "Phone" OF "Customer" AS character + DESCRIPTION "Format/Label/Help based on status of NON-US field." + FORMAT "x(20)" + INITIAL "" + LABEL "Phone" + SQL-WIDTH 40 + HELP "Please enter a phone number" + ORDER 115 + +ADD FIELD "Contact" OF "Customer" AS character + FORMAT "x(30)" + INITIAL "" + LABEL "Contact" + SQL-WIDTH 60 + HELP "Please enter a contact." + ORDER 110 + +ADD FIELD "SalesRep" OF "Customer" AS character + FORMAT "x(4)" + INITIAL "" + LABEL "Sales Rep" + SQL-WIDTH 8 + VALEXP "CAN-FIND(Salesrep OF Customer)" + VALMSG "The Sales Rep's name you've entered must exist in the Salesrep table." + HELP "Please Enter a Sales Rep." + ORDER 125 + +ADD FIELD "Comments" OF "Customer" AS character + FORMAT "x(80)" + INITIAL "" + LABEL "Comments" + SQL-WIDTH 160 + HELP "Please enter comments." + ORDER 180 + +ADD FIELD "CreditLimit" OF "Customer" AS decimal + DESCRIPTION "Maximum credit" + FORMAT "->,>>>,>>9" + INITIAL "1500" + LABEL "Credit Limit" + SQL-WIDTH 17 + VALEXP "CreditLimit >= 0 AND CreditLimit <= 9999999" + VALMSG "Credit Limit must be >= 0 and <= 9,999,999" + HELP "Please enter a Credit Limit." + DECIMALS 2 + ORDER 130 + +ADD FIELD "Balance" OF "Customer" AS decimal + FORMAT "->,>>>,>>9.99" + INITIAL "0" + LABEL "Balance" + SQL-WIDTH 17 + HELP "Please enter a balance." + DECIMALS 2 + ORDER 140 + +ADD FIELD "Terms" OF "Customer" AS character + FORMAT "x(20)" + INITIAL "Net30" + LABEL "Terms" + SQL-WIDTH 40 + HELP "Please enter terms" + ORDER 150 + +ADD FIELD "Discount" OF "Customer" AS integer + FORMAT ">>9%" + INITIAL "0" + LABEL "Discount" + SQL-WIDTH 4 + VALEXP "Discount >= 0" + VALMSG "Discount must be greater or equal to 0" + HELP "Please enter a percentage from 0 to 100." + ORDER 170 + +ADD FIELD "PostalCode" OF "Customer" AS character + DESCRIPTION "Format/Label/Help Message based on status of NON-US field." + FORMAT "x(10)" + INITIAL "" + LABEL "Postal Code" + SQL-WIDTH 20 + HELP "Please enter the appropriate Postal Code." + ORDER 80 + +ADD FIELD "Fax" OF "Customer" AS character + DESCRIPTION "Format/Label/Help based on status of NON-US field." + FORMAT "x(20)" + INITIAL "" + LABEL "Fax" + SQL-WIDTH 40 + HELP "Please enter a fax number." + ORDER 190 + +ADD FIELD "EmailAddress" OF "Customer" AS character + FORMAT "x(50)" + INITIAL "" + LABEL "Email" + SQL-WIDTH 100 + HELP "Please enter an full Internet Email Address." + LENGTH 0 + ORDER 200 + +ADD INDEX "CustNum" ON "Customer" + UNIQUE + PRIMARY + INDEX-FIELD "CustNum" ASCENDING + +ADD INDEX "Comments" ON "Customer" + WORD + INDEX-FIELD "Comments" ASCENDING + +ADD INDEX "CountryPost" ON "Customer" + INDEX-FIELD "Country" ASCENDING + INDEX-FIELD "PostalCode" ASCENDING + +ADD INDEX "Name" ON "Customer" + INDEX-FIELD "Name" ASCENDING + +ADD INDEX "SalesRep" ON "Customer" + INDEX-FIELD "SalesRep" ASCENDING + +ADD TABLE "testtable1" + DUMP-NAME "a" + +ADD FIELD "field1" OF "testtable1" AS integer + FORMAT "->,>>>,>>9" + INITIAL "0" + SQL-WIDTH 4 + ORDER 10 + +ADD FIELD "field2" OF "testtable1" AS logical + FORMAT "yes/no" + INITIAL "no" + SQL-WIDTH 1 + ORDER 20 + +ADD FIELD "field3" OF "testtable1" AS character + FORMAT "X(8)" + INITIAL "" + SQL-WIDTH 16 + ORDER 30 + +ADD FIELD "field4" OF "testtable1" AS character + FORMAT "X(8)" + INITIAL "" + SQL-WIDTH 16 + ORDER 40 + +ADD INDEX "idx1" ON "testtable1" + UNIQUE + PRIMARY + INDEX-FIELD "field1" ASCENDING + INDEX-FIELD "field2" ASCENDING + INDEX-FIELD "field3" ASCENDING + +ADD TABLE "Salesrep" + DESCRIPTION "The salesrep table contains sales representative information" + VALEXP "NOT CAN-FIND(FIRST Customer Of Salesrep)" + VALMSG "Cannot delete if used in one or more customer records." + DUMP-NAME "salesrep" + +ADD FIELD "RepName" OF "Salesrep" AS character + FORMAT "x(30)" + INITIAL "" + LABEL "Rep Name" + SQL-WIDTH 60 + HELP "Please enter the Name of the Salesperson." + ORDER 20 + +ADD FIELD "Region" OF "Salesrep" AS character + FORMAT "x(8)" + INITIAL "" + LABEL "Region" + SQL-WIDTH 16 + HELP "Please enter the Sales Region covered by this salesman." + ORDER 30 + +ADD FIELD "SalesRep" OF "Salesrep" AS character + FORMAT "x(4)" + INITIAL "" + LABEL "Sales Rep" + SQL-WIDTH 8 + HELP "Please enter the Sales Rep." + ORDER 1 + +ADD FIELD "MonthQuota" OF "Salesrep" AS integer + FORMAT "->,>>>,>>9" + INITIAL "0" + LABEL "Month Quota" + SQL-WIDTH 264 + HELP "Please enter the Month Quota." + EXTENT 12 + ORDER 40 + +ADD INDEX "SalesRep" ON "Salesrep" + UNIQUE + PRIMARY + INDEX-FIELD "SalesRep" ASCENDING + +ADD TABLE "Order" + DESCRIPTION "The order table contains order header information." + VALEXP "1 = 1" + DUMP-NAME "order" + +ADD FIELD "Ordernum" OF "Order" AS integer + FORMAT "zzzzzzzzz9" + INITIAL "0" + LABEL "Order Num" + SQL-WIDTH 4 + VALEXP "ordernum > 0" + VALMSG "Order number must be greater than zero" + HELP "Please enter an order number." + ORDER 10 + +ADD FIELD "CustNum" OF "Order" AS integer + DESCRIPTION " Help:Name" + FORMAT ">>>>9" + INITIAL "0" + LABEL "Cust Num" + SQL-WIDTH 4 + VALEXP "CAN-FIND(customer OF order)" + VALMSG "Customer must already exist." + HELP "Please enter an existing customer number." + ORDER 20 + +ADD FIELD "OrderDate" OF "Order" AS date + FORMAT "99/99/99" + INITIAL "TODAY" + LABEL "Ordered" + SQL-WIDTH 4 + HELP "Please enter the date of order." + ORDER 90 + +ADD FIELD "ShipDate" OF "Order" AS date + FORMAT "99/99/9999" + INITIAL ? + LABEL "Shipped" + SQL-WIDTH 4 + HELP "Please enter the ship date." + ORDER 100 + +ADD FIELD "PromiseDate" OF "Order" AS date + FORMAT "99/99/99" + INITIAL ? + LABEL "Promised" + SQL-WIDTH 4 + HELP "Please enter the Promise Date." + ORDER 110 + +ADD FIELD "Carrier" OF "Order" AS character + DESCRIPTION "Should lookup valid carriers." + FORMAT "x(25)" + INITIAL "" + LABEL "Carrier" + SQL-WIDTH 50 + HELP "Please enter the carrier." + ORDER 120 + +ADD FIELD "Instructions" OF "Order" AS character + FORMAT "x(50)" + INITIAL "" + LABEL "Instructions" + SQL-WIDTH 100 + HELP "Please enter Instructions" + ORDER 130 + +ADD FIELD "PO" OF "Order" AS character + FORMAT "x(20)" + INITIAL "" + LABEL "PO" + SQL-WIDTH 40 + HELP "Please enter the PO." + ORDER 140 + +ADD FIELD "Terms" OF "Order" AS character + DESCRIPTION "This should default to the TERMS specified by the CUSTOMER record." + FORMAT "x(20)" + INITIAL "Net30" + LABEL "Terms" + SQL-WIDTH 40 + HELP "Please enter the terms." + ORDER 150 + +ADD FIELD "SalesRep" OF "Order" AS character + FORMAT "x(4)" + INITIAL "" + LABEL "Sales Rep" + SQL-WIDTH 8 + HELP "Please enter the Sales Rep." + ORDER 160 + +ADD FIELD "BillToID" OF "Order" AS integer + FORMAT "zzzzzzzzz9" + INITIAL "0" + LABEL "Bill To ID" + SQL-WIDTH 4 + HELP "Please enter the BillTo ID." + ORDER 170 + +ADD FIELD "ShipToID" OF "Order" AS integer + FORMAT "zzzzzzzzz9" + INITIAL "0" + LABEL "Ship To ID" + SQL-WIDTH 4 + HELP "Please enter the ShipToID." + ORDER 180 + +ADD FIELD "OrderStatus" OF "Order" AS character + FORMAT "x(20)" + INITIAL "Ordered" + LABEL "Order Status" + SQL-WIDTH 40 + VIEW-AS "VIEW-AS COMBO-BOX + LIST-ITEMS ""Ordered"",""Back Ordered"", ""Partially Shipped"", ""Shipped"" + + + " + HELP "Please enter the Order Status." + ORDER 190 + +ADD FIELD "WarehouseNum" OF "Order" AS integer + FORMAT "zzzzzzzzz9" + INITIAL "0" + LABEL "Warehouse Num" + SQL-WIDTH 4 + VALEXP "(warehousenum = 0) or can-find(warehouse of order)" + VALMSG "Entrer a number greater than zero" + HELP "Please enter the Warehouse Number." + ORDER 200 + +ADD FIELD "Creditcard" OF "Order" AS character + FORMAT "x(20)" + INITIAL "Visa" + LABEL "Credit Card" + SQL-WIDTH 40 + VIEW-AS "VIEW-AS COMBO-BOX + LIST-ITEMS ""Visa"",""American Express"", ""Master Card"" + " + HELP "Please enter the credit card." + ORDER 210 + +ADD INDEX "OrderNum" ON "Order" + UNIQUE + PRIMARY + INDEX-FIELD "Ordernum" ASCENDING + +ADD INDEX "CustOrder" ON "Order" + UNIQUE + INDEX-FIELD "CustNum" ASCENDING + INDEX-FIELD "Ordernum" ASCENDING + +ADD INDEX "OrderDate" ON "Order" + INDEX-FIELD "OrderDate" ASCENDING + +ADD INDEX "OrderStatus" ON "Order" + INDEX-FIELD "OrderStatus" ASCENDING + +ADD INDEX "SalesRep" ON "Order" + INDEX-FIELD "SalesRep" ASCENDING + +ADD TABLE "Invoice" + DESCRIPTION "The invoice table contains transactions for the receivable module." + DUMP-NAME "invoice" + +ADD FIELD "Invoicenum" OF "Invoice" AS integer + FORMAT "zzzzzzzzz9" + INITIAL "0" + LABEL "Invoice Num" + SQL-WIDTH 4 + VALEXP "invoicenum > 0" + VALMSG "Invoice number cannot be zero" + HELP "Please enter an Invoice Number" + ORDER 10 + +ADD FIELD "CustNum" OF "Invoice" AS integer + FORMAT ">>>>9" + INITIAL "0" + LABEL "Cust Num" + SQL-WIDTH 4 + VALEXP "CAN-FIND(customer OF invoice)" + VALMSG "The Customer number entered must be a valid one." + HELP "Please enter a customer number." + ORDER 20 + +ADD FIELD "InvoiceDate" OF "Invoice" AS date + FORMAT "99/99/9999" + INITIAL ? + LABEL "Invoice Date" + SQL-WIDTH 4 + HELP "Please enter an invoice date" + ORDER 30 + +ADD FIELD "Amount" OF "Invoice" AS decimal + FORMAT "->>,>>9.99" + INITIAL "0" + LABEL "Amount" + SQL-WIDTH 17 + HELP "Please enter total invoice amt including shipping and sales." + DECIMALS 2 + ORDER 40 + +ADD FIELD "TotalPaid" OF "Invoice" AS decimal + FORMAT "->>,>>9.99" + INITIAL "0" + LABEL "Total Paid" + SQL-WIDTH 17 + HELP "Please enter Total Paid." + DECIMALS 2 + ORDER 50 + +ADD FIELD "Adjustment" OF "Invoice" AS decimal + FORMAT "->>,>>9.99" + INITIAL "0" + LABEL "Adjustment" + SQL-WIDTH 17 + HELP "Please enter adjustment." + DECIMALS 2 + ORDER 60 + +ADD FIELD "OrderNum" OF "Invoice" AS integer + FORMAT "zzzzzzzzz9" + INITIAL "0" + LABEL "Order Num" + SQL-WIDTH 4 + VALMSG "The Order number entered must be a valid one." + HELP "Please enter an order number." + ORDER 80 + +ADD FIELD "ShipCharge" OF "Invoice" AS decimal + FORMAT "->>,>>9.99" + INITIAL "0" + LABEL "Ship Charge" + SQL-WIDTH 17 + HELP "Please enter a Ship Charge." + DECIMALS 2 + ORDER 120 + +ADD INDEX "InvoiceNum" ON "Invoice" + UNIQUE + PRIMARY + INDEX-FIELD "Invoicenum" ASCENDING + +ADD INDEX "CustNum" ON "Invoice" + INDEX-FIELD "CustNum" ASCENDING + +ADD INDEX "InvoiceDate" ON "Invoice" + INDEX-FIELD "InvoiceDate" ASCENDING + +ADD INDEX "OrderNum" ON "Invoice" + INDEX-FIELD "OrderNum" ASCENDING + +. +PSC +cpstream=ISO8859-1 +. +0000013059 Modified: trunk/prolint/regrtest/findstate.i =================================================================== --- trunk/prolint/regrtest/findstate.i 2006-07-17 21:54:09 UTC (rev 269) +++ trunk/prolint/regrtest/findstate.i 2006-08-04 23:03:53 UTC (rev 270) @@ -3,4 +3,21 @@ FIND FIRST order NO-LOCK. FIND customer OF order NO-LOCK. /* this should NOT raise a warning */ - \ No newline at end of file +/* a couple of variations using NOT : */ + +/* Table testtable1, unique index on field1 field2 field3 */ +DEFINE VARIABLE v AS LOGICAL NO-UNDO. +find testtable1 no-lock + where testtable1.field1 = 0 + and testtable1.field2 = (NOT V) + and testtable1.field3 = "xxx":U + no-error + . + +/* Table testtable1, unique index on field1 field2 field3 */ +find testtable1 no-lock + where testtable1.field1 = 0 + and NOT testtable1.field2 = V + and testtable1.field3 = "xxx":U + no-error + . \ No newline at end of file Modified: trunk/prolint/test.p =================================================================== --- trunk/prolint/test.p 2006-07-17 21:54:09 UTC (rev 269) +++ trunk/prolint/test.p 2006-08-04 23:03:53 UTC (rev 270) @@ -1,15 +1,70 @@ -/* purpose: regression test for prolint itself. - if you changed or added something to prolint, run prolint/test.p - to see if it still finds the same warnings */ +/* ========================================================================================== + file : prolint/test.p + purpose : regression test for prolint itself. + if you changed or added something to prolint, run prolint/test.p + to see if it still finds the same warnings + Copyright (C) 2001-2006 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ========================================================================================== */ + + /* how it works: well pretty simple actually... program "prolint/regrtest/test.p" contains a lot of bad programming. profile "regression test" writes logfile "lint-selftest.log" and when it is done, it compares this new log to the already existing "prolint/regrtest/expect.log". if "no differences encountered", prolint is working as expected */ - -RUN prolint/prolint.p ("prolint/regrtest":U, - ?, - "regression test":U, - TRUE). + +IF CONNECTED("sports":U) OR CONNECTED("sports2000":U) THEN DO: + MESSAGE "Please Disconnect The SPORTS Database":T SKIP(1) + "The Prolint regression test requires its own database,":T SKIP + "which cannot be connected alongside SPORTS":T + VIEW-AS ALERT-BOX. + RETURN. +END. + +IF NOT CONNECTED("prolintest":U) THEN DO: + FILE-INFO:FILE-NAME = "prolint/regrtest/db/prolintest.db":U. + IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: + CONNECT VALUE(FILE-INFO:FULL-PATHNAME) -1 NO-ERROR. + IF NOT CONNECTED("prolintest":U) THEN + MESSAGE "Test Database Could Not Be Connected":T SKIP(1) + ERROR-STATUS:GET-MESSAGE(1) + VIEW-AS ALERT-BOX. + END. + ELSE + MESSAGE "Test Database Not Found":T SKIP(1) + "Please create and connect database prolint/regrtest/db/prolintest.db":T SKIP + "with the DF file found in prolint/regrtest/db":T SKIP + "and then try the regression test again":T + VIEW-AS ALERT-BOX. + +END. + +IF CONNECTED("prolintest":U) THEN + RUN prolint/prolint.p ("prolint/regrtest":U, + ?, + "regression test":U, + TRUE). + + +IF CONNECTED("prolintest":U) THEN + DISCONNECT "prolintest":U. + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-07-17 21:54:16
|
Revision: 269 Author: jurjen Date: 2006-07-17 14:54:09 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=269&view=rev Log Message: ----------- rule findstate.p: removed false positives for using NOT in the where-clause Modified Paths: -------------- trunk/prolint/rules/findstate.p Modified: trunk/prolint/rules/findstate.p =================================================================== --- trunk/prolint/rules/findstate.p 2006-03-16 23:37:43 UTC (rev 268) +++ trunk/prolint/rules/findstate.p 2006-07-17 21:54:09 UTC (rev 269) @@ -293,17 +293,38 @@ END. parserQueryClear ("findstatewhere":U). - /* the WHERE clause must not contain OR or NOT */ + /* the WHERE clause must not contain OR */ numresults = parserQueryCreate(wherenode, "findstategarbage":U, "OR":U). parserQueryClear ("findstategarbage":U). - numresults = numresults + parserQueryCreate(wherenode, "findstategarbage":U, "NOT":U). - parserQueryClear ("findstategarbage":U). IF numresults>0 THEN DO: parserReleaseHandle(childnode). parserReleaseHandle(wherenode). RETURN FALSE. END. + /* the WHERE clause must not contain NOT, but there are exceptions: + where a.logicalfield = (NOT logicalvariable) + so the case is: NOT is fine when it is a (grand)child of EQ */ + + DEFINE VARIABLE validNot AS LOGICAL NO-UNDO. + numresults = parserQueryCreate(wherenode, "findstategarbage":U, "NOT":U). + /* for each "NOT", check if it is a (grand) child of "EQ" */ + DO i=1 TO numresults : + parserQueryGetResult("findstategarbage":U, i, childnode). + /* move up the tree until you find EQ (good) or WHERE (bad) */ + validNot = FALSE. + DO WHILE parserGetNodeType(childnode) <> "WHERE":U : + IF parserNodeParent(childnode,childnode)="EQ":U THEN + validNot = TRUE. + END. + END. + parserQueryClear ("findstategarbage":U). + IF numresults>0 AND validNot=FALSE THEN DO: + parserReleaseHandle(childnode). + parserReleaseHandle(wherenode). + RETURN FALSE. + END. + /* now find all Field_ref nodes in the WHERE clause */ idnode = parserGetHandle(). numresults = parserQueryCreate(wherenode, "findstatefields":U, "Field_ref":U). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-16 23:37:58
|
Revision: 268 Author: jurjen Date: 2006-03-16 15:37:43 -0800 (Thu, 16 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=268&view=rev Log Message: ----------- function RelativeFilename in Turbolint.dll did not behave identical to RelativeFilename in lintsuper.p when a Propath root-element did not start with a drive letter. This affected the regression test. Modified Paths: -------------- trunk/prolint/help/rules/prolint.htxt trunk/prolint/turbolint/lintsuper.pas trunk/prolint/turbolint/turbolint.dll Modified: trunk/prolint/help/rules/prolint.htxt =================================================================== --- trunk/prolint/help/rules/prolint.htxt 2006-03-16 21:48:02 UTC (rev 267) +++ trunk/prolint/help/rules/prolint.htxt 2006-03-16 23:37:43 UTC (rev 268) @@ -3,4 +3,4 @@ Prolint did not find the file you wanted to lint. <h1>Prolint is installed more than once</h1> Prolint found more than one directory where Prolint is installed. The list of directories where Prolint is installed, is in registry -"HKEY_LOCAL_MACHINE/SOFTWARE/prolint" key "found_in" +"HKEY_CURRENT_USER/SOFTWARE/prolint" key "found_in" Modified: trunk/prolint/turbolint/lintsuper.pas =================================================================== --- trunk/prolint/turbolint/lintsuper.pas 2006-03-16 21:48:02 UTC (rev 267) +++ trunk/prolint/turbolint/lintsuper.pas 2006-03-16 23:37:43 UTC (rev 268) @@ -324,11 +324,26 @@ tmp : string; shortpath : string; begin + { if a path in the PROPATH was specified without drive letter, then the fullpath + will also have no driveletter and this function fails. So, add a drive letter now: } + + // if fullpath starts in a root without drive letter + if (fullpath[1]='\') or (fullpath[1]='/') then + begin + tmp := ExpandFilename(fullpath); // adds the drive letter + if tmp<>'' then + fullpath := tmp; + end; + for i:=1 to length(fullpath) do if fullpath[i]='\' then fullpath[i]:='/'; fullpath := lowercase(fullpath); shortpath := fullpath; + if length(shortpath)>2 then + if copy(shortpath,1,2)='./' then + delete(shortpath,1,2); + for i:=1 to num_entries(propath, ';') do begin dir := entry(i, propath, ';'); Modified: trunk/prolint/turbolint/turbolint.dll =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-16 21:48:14
|
Revision: 267 Author: jurjen Date: 2006-03-16 13:48:02 -0800 (Thu, 16 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=267&view=rev Log Message: ----------- Rule "dotcomment" is faster and better with Proparse version 3. Contributed by John. Modified Paths: -------------- trunk/prolint/rules/dotcomment.p Modified: trunk/prolint/rules/dotcomment.p =================================================================== --- trunk/prolint/rules/dotcomment.p 2006-03-15 22:37:01 UTC (rev 266) +++ trunk/prolint/rules/dotcomment.p 2006-03-16 21:48:02 UTC (rev 267) @@ -3,27 +3,12 @@ by : Jurjen Dijkstra purpose : find statements that begin with a PERIOD - How it works: - example source: + These dot comments are usually a typo, and should be replaced with regular + comments. + ----------------------------------------------------------------- - MESSAGE "a". - .MESSAGE "b". + Copyright (C) 2001,2002,2006 Jurjen Dijkstra, John Green - tokenlister: - MESSAGE MESSAGE (statehead) - QSTRING "a" - PERIOD . - PERIOD . - MESSAGE MESSAGE (statehead) - QSTRING "b" - PERIOD . - - so we are looking for a PERIOD with a NextSibling if this NextSibling - is a statehead. - ----------------------------------------------------------------- - - Copyright (C) 2001,2002 Jurjen Dijkstra - This file is part of Prolint. Prolint is free software; you can redistribute it and/or @@ -49,38 +34,97 @@ DEFINE VARIABLE i AS INTEGER NO-UNDO. -/* Make it fast: there are lots of PERIOD nodes in the source. - So, unlike other rules we don't use procedure searchNode. - Just open a query, less overhead. This means we are not - going to check for _proparse_ prolint-nowarn(dotcomment) */ +IF parserGetVersion() > "3" THEN + /* + example source: + .MESSAGE "b". -ASSIGN - TheNode = parserGetHandle() - NextSibling = parserGetHandle() - numResults = parserQueryCreate(hTopnode, "dotcomment":U, "PERIOD":U). + The '.' in front of "MESSAGE" causes the entire statement to be commented. + (The comment extends to the next regular '.') + Proparse recognizes these, and turns the entire comment into a DOT_COMMENT + node. These nodes are only found in the syntax where a statement can be + found. (i.e. You can't have a dot comment in the middle of a statement.) + + */ + RUN searchNode ( + hTopnode /* "Program_root" node */ + , "InspectNode":U /* name of callback procedure */ + , "DOT_COMMENT":U /* list of statements to search, ?=all */ + ). -DO i=1 TO numResults : - IF parserQueryGetResult("dotcomment":U, i, theNode) THEN DO: +ELSE DO: - /* is there a NextSibling? */ - IF ""<>parserNodeNextSibling(theNode, NextSibling) THEN - /* there should be no whitespace following the PERIOD */ - IF NOT parserHiddenGetBefore(NextSibling) THEN - /* is this NextSibling a statement head? */ - IF parserAttrGet(NextSibling, "statehead":U) <> "" THEN - /* check if there is NO _proparse_ directive */ - IF 0=parserAttrGetI(theNode,pragma_number) THEN - RUN PublishResult (compilationunit, - parserGetNodeFilename(theNode), - parserGetNodeLine(theNode), - "PERIOD comments a statement":U, - rule_id). + /* + How it works: + example source: + + MESSAGE "a". + .MESSAGE "b". + + tokenlister: + MESSAGE MESSAGE (statehead) + QSTRING "a" + PERIOD . + PERIOD . + MESSAGE MESSAGE (statehead) + QSTRING "b" + PERIOD . + + so we are looking for a PERIOD with a NextSibling if this NextSibling + is a statehead. + */ + + /* Make it fast: there are lots of PERIOD nodes in the source. + So, unlike other rules we don't use procedure searchNode. + Just open a query, less overhead. This means we are not + going to check for _proparse_ prolint-nowarn(dotcomment) */ + + ASSIGN + TheNode = parserGetHandle() + NextSibling = parserGetHandle() + numResults = parserQueryCreate(hTopnode, "dotcomment":U, "PERIOD":U). + + DO i=1 TO numResults : + IF parserQueryGetResult("dotcomment":U, i, theNode) THEN DO: + + /* is there a NextSibling? */ + IF ""<>parserNodeNextSibling(theNode, NextSibling) THEN + /* there should be no whitespace following the PERIOD */ + IF NOT parserHiddenGetBefore(NextSibling) THEN + /* is this NextSibling a statement head? */ + IF parserAttrGet(NextSibling, "statehead":U) <> "" THEN + /* check if there is NO _proparse_ directive */ + IF 0=parserAttrGetI(theNode,pragma_number) THEN + RUN PublishResult (compilationunit, + parserGetNodeFilename(theNode), + parserGetNodeLine(theNode), + "PERIOD comments a statement":U, + rule_id). - END. + END. + END. + + parserQueryClear("dotcomment":U). + parserReleaseHandle(TheNode). + parserReleaseHandle(NextSibling). + END. -parserQueryClear("dotcomment":U). -parserReleaseHandle(TheNode). -parserReleaseHandle(NextSibling). +PROCEDURE InspectNode: + /* purpose: Simply report all DOT_COMMENT nodes. */ + DEFINE INPUT PARAMETER theNode AS INTEGER NO-UNDO. + DEFINE OUTPUT PARAMETER AbortSearch AS LOGICAL NO-UNDO INITIAL NO. + DEFINE OUTPUT PARAMETER SearchChildren AS LOGICAL NO-UNDO INITIAL NO. + RUN PublishResult ( + compilationunit + , parserGetNodeFilename(theNode) + , parserGetNodeLine(theNode) + , "PERIOD comments a statement":T + , rule_id + ). + +END PROCEDURE. + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-15 22:37:13
|
Revision: 266 Author: jurjen Date: 2006-03-15 14:37:01 -0800 (Wed, 15 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=266&view=rev Log Message: ----------- hardened regression test for rule "runnotfound": files to search for have random names and are very unlikely to be found Modified Paths: -------------- trunk/prolint/regrtest/expect.log trunk/prolint/regrtest/runargs.i trunk/prolint/regrtest/runname.i Modified: trunk/prolint/regrtest/expect.log =================================================================== --- trunk/prolint/regrtest/expect.log 2006-03-15 22:14:45 UTC (rev 265) +++ trunk/prolint/regrtest/expect.log 2006-03-15 22:37:01 UTC (rev 266) @@ -50,13 +50,13 @@ rule=allfinds; source=prolint/regrtest/wholeindex.i; line= 16; descr=FIND NEXT buf_customer statement included. rule=allfinds; source=prolint/regrtest/wholeindex.i; line= 19; descr=FIND NEXT tt_wholeindex statement included. rule=allfinds; source=prolint/regrtest/wholeindex.i; line= 22; descr=FIND NEXT buf_wholeindex statement included. -rule=backslash; source=prolint/regrtest/runname.i; line= 13; descr=backslash in filename 'subdir\test.p' (not Unix-compatible) -rule=backslash; source=prolint/regrtest/runname.i; line= 14; descr=backslash in filename 'SubDir\Test.p' (not Unix-compatible) -rule=backslash; source=prolint/regrtest/runname.i; line= 36; descr=backslash in filename 'SubDir\Test.p' (not Unix-compatible) -rule=backslash; source=prolint/regrtest/runname.i; line= 37; descr=backslash in filename 'SubDir\Test.p' (not Unix-compatible) -rule=backslash; source=prolint/regrtest/runname.i; line= 45; descr=backslash in filename 'SubDir\Test.p' (not Unix-compatible) -rule=backslash; source=prolint/regrtest/runname.i; line= 46; descr=backslash in filename 'Another\Test.p' (not Unix-compatible) -rule=backslash; source=prolint/regrtest/runname.i; line= 63; descr=backslash in string 'test\test.p' (not Unix-compatible) +rule=backslash; source=prolint/regrtest/runname.i; line= 13; descr=backslash in filename 'subdir\ghhtf.p' (not Unix-compatible) +rule=backslash; source=prolint/regrtest/runname.i; line= 14; descr=backslash in filename 'SubDir\Ghhtf.p' (not Unix-compatible) +rule=backslash; source=prolint/regrtest/runname.i; line= 36; descr=backslash in filename 'SubDir\Shgchcg.p' (not Unix-compatible) +rule=backslash; source=prolint/regrtest/runname.i; line= 37; descr=backslash in filename 'SubDir\Shgchcg.p' (not Unix-compatible) +rule=backslash; source=prolint/regrtest/runname.i; line= 45; descr=backslash in filename 'SubDir\Shgchcg.p' (not Unix-compatible) +rule=backslash; source=prolint/regrtest/runname.i; line= 46; descr=backslash in filename 'Another\Shgchcg.p' (not Unix-compatible) +rule=backslash; source=prolint/regrtest/runname.i; line= 63; descr=backslash in string 'test\jhdgjah.p' (not Unix-compatible) rule=blocklabel; source=prolint/regrtest/blocklabel.i; line= 6; descr=LEAVE should specify a blocklabel rule=blocklabel; source=prolint/regrtest/blocklabel.i; line= 18; descr=NEXT should specify a blocklabel rule=colon-t; source=prolint/regrtest/colon-t.i; line= 5; descr=attrib :T will trim "this is a " @@ -485,7 +485,7 @@ rule=runargs; source=prolint/regrtest/runargs.i; line= 12; descr=run-time arguments in RUN statement rule=runargs; source=prolint/regrtest/runargs.i; line= 15; descr=run-time arguments in RUN statement rule=runargs; source=prolint/regrtest/runargs.i; line= 18; descr=run-time arguments in RUN statement -rule=runasnotfound; source=prolint/regrtest/runname.i; line= 51; descr=proc 'Async.p' not found on hRunnameServer +rule=runasnotfound; source=prolint/regrtest/runname.i; line= 51; descr=proc 'Ahjsgf.p' not found on hRunnameServer rule=runasnotfound; source=prolint/regrtest/varusage.i; line= 42; descr=proc 'myproc.p' not found on v_varusage_8 rule=runname; source=prolint/regrtest/runname.i; line= 12; descr=progname in RUN-statement is not Unix-compatible rule=runname; source=prolint/regrtest/runname.i; line= 13; descr=progname in RUN-statement is not Unix-compatible @@ -502,20 +502,25 @@ rule=runname; source=prolint/regrtest/runname.i; line= 63; descr=progname in RUN-statement is not Unix-compatible rule=runname; source=prolint/regrtest/runname.i; line= 64; descr=progname in RUN-statement is not Unix-compatible rule=runname; source=prolint/regrtest/runname.i; line= 65; descr=progname in RUN-statement is not Unix-compatible -rule=runnotfound; source=prolint/regrtest/runargs.i; line= 18; descr=proc 'something.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 11; descr=proc 'subdir/test.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 12; descr=proc 'SubDir/Test.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 13; descr=proc 'subdir\test.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 14; descr=proc 'SubDir\Test.p' not found +rule=runnotfound; source=prolint/regrtest/runargs.i; line= 18; descr=proc 'jhsgfjhg.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 10; descr=proc 'gjhgjhg.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 11; descr=proc 'subdir/ghhtf.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 12; descr=proc 'SubDir/Ghhtf.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 13; descr=proc 'subdir\ghhtf.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 14; descr=proc 'SubDir\Ghhtf.p' not found rule=runnotfound; source=prolint/regrtest/runname.i; line= 20; descr=proc 'Without_dotp' not found rule=runnotfound; source=prolint/regrtest/runname.i; line= 21; descr=proc 'without_dotp' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 36; descr=proc 'SubDir\Test.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 37; descr=proc 'SubDir\Test.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 45; descr=proc 'SubDir\Test.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 46; descr=proc 'Another\Test.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 48; descr=proc 'LastTest.p' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 58; descr=proc 'sys\vorder.w' not found -rule=runnotfound; source=prolint/regrtest/runname.i; line= 59; descr=proc 'sys\vorder.r' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 22; descr=proc 'jkhhgf.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 23; descr=proc 'Jkhhgf.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 32; descr=proc 'kjckjshcr.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 36; descr=proc 'SubDir\Shgchcg.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 37; descr=proc 'SubDir\Shgchcg.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 45; descr=proc 'SubDir\Shgchcg.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 46; descr=proc 'Another\Shgchcg.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 48; descr=proc 'Rjhsghj.p' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 58; descr=proc 'gsd\hwhdhe.w' not found +rule=runnotfound; source=prolint/regrtest/runname.i; line= 59; descr=proc 'gsd\hwhdhe.r' not found +rule=runnotfound; source=prolint/regrtest/test3.p; line= 18; descr=proc 'test2.p' not found rule=runnotfound; source=prolint/regrtest/varusage.i; line= 75; descr=proc 'myproc.p' not found rule=runnotfound; source=prolint/regrtest/varusage.i; line= 82; descr=proc 'myproc.p' not found rule=runnotfound; source=prolint/regrtest/varusage.i; line= 91; descr=proc 'myproc.p' not found @@ -556,9 +561,9 @@ rule=strattrib; source=prolint/regrtest/runname.i; line= 32; descr=no string attributes on 'parameter2' rule=strattrib; source=prolint/regrtest/runname.i; line= 41; descr=no string attributes on "Part1" rule=strattrib; source=prolint/regrtest/runname.i; line= 51; descr=no string attributes on "event_ip" -rule=strattrib; source=prolint/regrtest/runname.i; line= 63; descr=no string attributes on "test\test.p" -rule=strattrib; source=prolint/regrtest/runname.i; line= 64; descr=no string attributes on "test~\test.p" -rule=strattrib; source=prolint/regrtest/runname.i; line= 65; descr=no string attributes on "test\\test.p" +rule=strattrib; source=prolint/regrtest/runname.i; line= 63; descr=no string attributes on "test\jhdgjah.p" +rule=strattrib; source=prolint/regrtest/runname.i; line= 64; descr=no string attributes on "test~\jhdgjah.p" +rule=strattrib; source=prolint/regrtest/runname.i; line= 65; descr=no string attributes on "test\\jhdgjah.p" rule=strattrib; source=prolint/regrtest/sharelock.i; line= 16; descr=no string attributes on "x" rule=strattrib; source=prolint/regrtest/strattrib.i; line= 5; descr=no string attributes on "hello" rule=strattrib; source=prolint/regrtest/strattrib.i; line= 10; descr=no string attributes on 'Hello prolint user' Modified: trunk/prolint/regrtest/runargs.i =================================================================== --- trunk/prolint/regrtest/runargs.i 2006-03-15 22:14:45 UTC (rev 265) +++ trunk/prolint/regrtest/runargs.i 2006-03-15 22:37:01 UTC (rev 266) @@ -15,7 +15,7 @@ run something .p ("a":U). /* forgot the dot at the end of the line: next line is runtime argument! */ -run something.p ("") +run jhsgfjhg.p ("") runargs_1 = runargs_2 + runargs_3. Modified: trunk/prolint/regrtest/runname.i =================================================================== --- trunk/prolint/regrtest/runname.i 2006-03-15 22:14:45 UTC (rev 265) +++ trunk/prolint/regrtest/runname.i 2006-03-15 22:37:01 UTC (rev 266) @@ -7,11 +7,11 @@ DEFINE VARIABLE hRunnameServer AS HANDLE NO-UNDO. /* test for uppercase filespecs and backslashes */ -RUN test.p. -RUN subdir/test.p. -RUN SubDir/Test.p. -RUN subdir\test.p. -RUN SubDir\Test.p. +RUN gjhgjhg.p. +RUN subdir/ghhtf.p. +RUN SubDir/Ghhtf.p. +RUN subdir\ghhtf.p. +RUN SubDir\Ghhtf.p. /* this is an internal procedure because it has no dot in its name */ RUN Without_dot. @@ -19,8 +19,8 @@ /* same name, but now it's external because it runs persistent */ RUN Without_dotp PERSISTENT SET hRunname. RUN without_dotp PERSISTENT SET hRunname. -RUN test.p PERSISTENT SET hRunname. -RUN Test.p PERSISTENT SET hRunname. +RUN jkhhgf.p PERSISTENT SET hRunname. +RUN Jkhhgf.p PERSISTENT SET hRunname. /* look at the string literals in the VALUE expression */ RUN VALUE( "part1":U + vRunname + ".p":T2) PERSISTENT SET hRunname. @@ -29,12 +29,12 @@ /* this is internal, because of the IN keyword, even if there's a dot in the name */ RUN soMethIng.p IN hRunname. -RUN test2.p ('parameter1', 'parameter2', OUTPUT vRunname). +RUN kjckjshcr.p ('parameter1', 'parameter2', OUTPUT vRunname). /* the next are not Unix-compatible, but warning is suppressed for the first one */ /* 35 */ {&_PROPARSE_ prolint-nowarn(runname)} -/* 36 */ RUN SubDir\Test.p. -/* 37 */ RUN SubDir\Test.p. +/* 36 */ RUN SubDir\Shgchcg.p. +/* 37 */ RUN SubDir\Shgchcg.p. /* 38 */ /* 39 */ {&_PROPARSE_ prolint-nowarn(strattrib,runname)} /* 40 */ RUN VALUE( "Part1" + vRunname + ".p":T2) PERSISTENT SET hRunname. @@ -42,27 +42,27 @@ /* 42 */ /* 43 */ {&_PROPARSE_ prolint-nowarn(runname)} /* 44 */ DO: -/* 45 */ RUN SubDir\Test.p. -/* 46 */ RUN Another\Test.p. +/* 45 */ RUN SubDir\Shgchcg.p. +/* 46 */ RUN Another\Shgchcg.p. /* 47 */ END. -/* 48 */ RUN LastTest.p. +/* 48 */ RUN Rjhsghj.p. /* statement containing both ON and IN : */ -RUN Async.p ON SERVER hRunnameServer ASYNCHRONOUS EVENT-PROCEDURE "event_ip" IN hRunname. +RUN Ahjsgf.p ON SERVER hRunnameServer ASYNCHRONOUS EVENT-PROCEDURE "event_ip" IN hRunname. PROCEDURE RTB_xref_generator : /* RUN statements are insterted by Roundtable when you add a smartobject to a smartcontainer: */ - RUN "sys\vorder.w *RTB-SmObj* ". - RUN sys\vorder.r. + RUN "gsd\hwhdhe.w *RTB-SmObj* ". + RUN gsd\hwhdhe.r. END PROCEDURE. -RUN VALUE("test\test.p"). -RUN VALUE("test~\test.p"). -RUN VALUE("test\\test.p"). +RUN VALUE("test\jhdgjah.p"). +RUN VALUE("test~\jhdgjah.p"). +RUN VALUE("test\\jhdgjah.p"). PROCEDURE CtrlFrame.TreeView.NodeClicked : /* progname contains dots, so prolint might think it is an external procedure? */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-15 22:14:53
|
Revision: 265 Author: jurjen Date: 2006-03-15 14:14:45 -0800 (Wed, 15 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=265&view=rev Log Message: ----------- strip leading "./" from filenames Modified Paths: -------------- trunk/prolint/lintsuper.p Modified: trunk/prolint/lintsuper.p =================================================================== --- trunk/prolint/lintsuper.p 2006-03-14 22:19:11 UTC (rev 264) +++ trunk/prolint/lintsuper.p 2006-03-15 22:14:45 UTC (rev 265) @@ -126,7 +126,10 @@ FIND tt_cacheRelativeName WHERE tt_cacheRelativeName.longname = pFileName NO-ERROR. IF AVAILABLE tt_cacheRelativeName THEN RETURN tt_cacheRelativeName.relativename. - + + IF SUBSTRING(pFileName, 1, 2) = './':U THEN + pFileName = SUBSTRING(pFileName, 3). + DO i=1 to num-entries(SearchPath) : subdir = entry(i, SearchPath). if length(subdir)<length(pFileName) then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-14 22:19:25
|
Revision: 264 Author: jurjen Date: 2006-03-14 14:19:11 -0800 (Tue, 14 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=264&view=rev Log Message: ----------- Regression testing fixed. Rule nameconv.p fixed because it was not regression-test-friendly: it wrote fully qualified filenames in the warning. Modified Paths: -------------- trunk/prolint/regrtest/expect.log trunk/prolint/rules/nameconv.p Added Paths: ----------- trunk/prolint/settings/regression test/ trunk/prolint/settings/regression test/exclude.lst trunk/prolint/settings/regression test/handlers.d trunk/prolint/settings/regression test/no-local-settings.lk trunk/prolint/settings/regression test/nowarn.lst trunk/prolint/settings/regression test/severity.d Modified: trunk/prolint/regrtest/expect.log =================================================================== --- trunk/prolint/regrtest/expect.log 2006-03-14 22:16:37 UTC (rev 263) +++ trunk/prolint/regrtest/expect.log 2006-03-14 22:19:11 UTC (rev 264) @@ -10,6 +10,10 @@ rule=abbrevkwd; source=prolint/regrtest/abbrevkwd.i; line= 58; descr=Abbreviated BGCOL for BGCOLOR rule=abbrevkwd; source=prolint/regrtest/abbrevkwd.i; line= 61; descr=Abbreviated exclusive for EXCLUSIVE-LOCK rule=abbrevkwd; source=prolint/regrtest/defaultname.w; line= 267; descr=Abbreviated MOVE-AFTER for MOVE-AFTER-TAB-ITEM +rule=abbrevkwd; source=prolint/regrtest/vardef.p; line= 6; descr=Abbreviated param for PARAMETER +rule=abbrevkwd; source=prolint/regrtest/vardef.p; line= 11; descr=Abbreviated info for INFORMATION +rule=abbrevkwd; source=prolint/regrtest/vardef.p; line= 23; descr=Abbreviated char for CHARACTER +rule=abbrevkwd; source=prolint/regrtest/vardef.p; line= 25; descr=Abbreviated char for CHARACTER rule=abbrevkwd; source=prolint/regrtest/where-udf.i; line= 3; descr=Abbreviated CHAR for CHARACTER rule=abbrevkwd; source=prolint/regrtest/where-udf.i; line= 9; descr=Abbreviated CHAR for CHARACTER rule=abbrevtable; source=prolint/regrtest/abbrevkwd.i; line= 16; descr=Abbreviation of table Customer used (custome) @@ -86,6 +90,7 @@ rule=emptyblock; source=prolint/regrtest/nowhere.i; line= 23; descr=Empty DO block rule=emptyblock; source=prolint/regrtest/oflink.i; line= 7; descr=Empty FOR block rule=emptyblock; source=prolint/regrtest/sortaccess.i; line= 5; descr=Empty FOR block +rule=emptyblock; source=prolint/regrtest/vardef.p; line= 22; descr=Empty FUNCTION block rule=emptyblock; source=prolint/regrtest/where-udf.i; line= 15; descr=Empty FOR block rule=emptyblock; source=prolint/regrtest/where-udf.i; line= 19; descr=Empty FOR block rule=emptyblock; source=prolint/regrtest/where-udf.i; line= 23; descr=Empty FOR block @@ -140,6 +145,7 @@ rule=idiskeyword; source=prolint/regrtest/idiskeyword.p; line= 19; descr=name of fields 'LENGTH' is a keyword rule=idiskeyword; source=prolint/regrtest/idiskeyword.p; line= 22; descr=name of index 'key' is a keyword rule=idiskeyword; source=prolint/regrtest/idiskeyword.p; line= 25; descr=name of buffer 'border-b' is a keyword +rule=idiskeyword; source=prolint/regrtest/vardef.p; line= 8; descr=name of variable 'Name' is a keyword rule=ifindent1; source=prolint/regrtest/dotcomment.i; line= 23; descr=#101: Node blablabla has greater indent than IF on line 22. Expected to be 0, is 1. rule=ifindent1; source=prolint/regrtest/ifindent.i; line= 27; descr=#101: Node IF has greater indent than IF on line 25. Expected to be 0, is 2. rule=ifindent1; source=prolint/regrtest/ifindent.i; line= 28; descr=#102: More indent expected for node ELSE. Node's indent should be at least 2, is 0. @@ -201,6 +207,7 @@ rule=lexcolon; source=prolint/regrtest/nocomment.i; line= 62; descr=FUNCTION block header should terminate with a COLON rule=lexcolon; source=prolint/regrtest/undoretry.p; line= 4; descr=DO block header should terminate with a COLON rule=lexcolon; source=prolint/regrtest/undoretry.p; line= 21; descr=DO block header should terminate with a COLON +rule=lexcolon; source=prolint/regrtest/vardef.p; line= 22; descr=FUNCTION block header should terminate with a COLON rule=maxchar; source=prolint/regrtest/test4.p; line= 6; descr=String constant too long for Tranman (max 188) rule=message; source=prolint/regrtest/dotcomment.i; line= 6; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/dotcomment.i; line= 9; descr=use MESSAGE only in debug-mode @@ -220,6 +227,7 @@ rule=message; source=prolint/regrtest/strattrib.i; line= 51; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/strattrib.i; line= 55; descr=use MESSAGE only in debug-mode rule=message; source=prolint/regrtest/strattrib.i; line= 60; descr=use MESSAGE only in debug-mode +rule=message; source=prolint/regrtest/vardef.p; line= 10; descr=use MESSAGE only in debug-mode rule=messagetype; source=prolint/regrtest/defaultname.w; line= 364; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 6; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 9; descr=ALERT BOX is missing alert type @@ -229,6 +237,172 @@ rule=messagetype; source=prolint/regrtest/dotcomment.i; line= 16; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/message.i; line= 6; descr=ALERT BOX is missing alert type rule=messagetype; source=prolint/regrtest/message.i; line= 11; descr=ALERT BOX is missing alert type +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 4; descr= VARIABLE abbrev1 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 5; descr= VARIABLE abbrev2 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 6; descr= VARIABLE abbrev3 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 9; descr= VARIABLE abbrev4 LOGICAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 19; descr= btn_abbrevkwd scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 20; descr= FRAME-Abbrevkwd scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 41; descr= ttabbrev scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 46; descr= VARIABLE abbrev5 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 55; descr= VARIABLE chAbbrevkwd COMHANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/abbrevkwd.i; line= 56; descr= VARIABLE hbAbbrevkwd HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/blocklabel.i; line= 35; descr= VARIABLE hwBlocklabel WIDGETHANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/colon-t.i; line= 3; descr= VARIABLE colont CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/defaultname.w; line= 348; descr= VARIABLE UIB_S LOGICAL scope LOCAL control_load should start with "l" +rule=nameconv; source=prolint/regrtest/defaultname.w; line= 349; descr= VARIABLE OCXFile CHARACTER scope LOCAL control_load should start with "l" +rule=nameconv; source=prolint/regrtest/do1.i; line= 3; descr= VARIABLE do1_1 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/do1.i; line= 4; descr= VARIABLE do1_2 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/dotcomment.i; line= 4; descr= VARIABLE dotcomment DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/i18nlength.i; line= 5; descr= VARIABLE i18nlength_1 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/i18nlength.i; line= 6; descr= VARIABLE i18nlength_2 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 5; descr= VARIABLE X DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 5; descr=X in is a Progress keyword +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 7; descr= VARIABLE hh COMHANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 8; descr=ERROR in is a Progress keyword +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 8; descr=OUTPUT PARAMETER ERROR LOGICAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 16; descr= OBJECT scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 16; descr=OBJECT in is a Progress keyword +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 24; descr= bcust-b BUFFER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 25; descr= border-b BUFFER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/idiskeyword.p; line= 25; descr=border-b in is a Progress keyword +rule=nameconv; source=prolint/regrtest/ifindentextra.i; line= 8; descr= VARIABLE i INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/ifparens.p; line= 2; descr= VARIABLE a INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/ifparens.p; line= 3; descr= VARIABLE b INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/message.i; line= 18; descr= MESSAGEFRAME scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 54; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_1 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 54; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_1 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 58; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_2 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 58; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_2 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 62; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_3 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 62; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_3 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 67; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_4 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 67; descr=INPUT PARAMETER test1 scope LOCAL udf_nocomment_4 should start with "l" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 74; descr= VARIABLE nocomment_var1 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 74; descr= VARIABLE nocomment_var1 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 76; descr= VARIABLE nocomment_var2 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/nocomment.i; line= 76; descr= VARIABLE nocomment_var2 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noeffect.i; line= 5; descr= VARIABLE i_noeffect INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noeffect.i; line= 6; descr= VARIABLE c_noeffect CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noeffect.i; line= 7; descr= VARIABLE h_noeffect HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 5; descr= VARIABLE noundo_1 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 6; descr= VARIABLE noundo_2 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 8; descr= tt_noundo scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 16; descr=INPUT PARAMETER ip_noundo_1 CHARACTER scope LOCAL ip_noundo should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 18; descr=OUTPUT PARAMETER ip_noundo_2 CHARACTER scope LOCAL ip_noundo should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 19; descr=INPUTOUTPUT PARAMETER ip_noundo_3 LOGICAL scope LOCAL ip_noundo should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 20; descr=INPUTOUTPUT PARAMETER TABLE scope LOCAL ip_noundo should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 22; descr= VARIABLE noundo_1 CHARACTER scope LOCAL ip_noundo should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 23; descr= VARIABLE noundo_2 CHARACTER scope LOCAL ip_noundo should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 33; descr= tt_noundo2 scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 40; descr= tt_noundo3 scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 43; descr= tt_noundo4 scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 44; descr= tt_noundo5 scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 50; descr=INPUT PARAMETER ip_noundo_1 CHARACTER scope LOCAL ip_noundo3 should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 52; descr=INPUT PARAMETER ip_noundo_2 HANDLE scope LOCAL ip_noundo3 should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 54; descr=OUTPUT PARAMETER ip_noundo_3 INTEGER scope LOCAL ip_noundo3 should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 56; descr=INPUTOUTPUT PARAMETER ip_noundo_4 LOGICAL scope LOCAL ip_noundo3 should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 57; descr=OUTPUT PARAMETER ip_noundo_5 HANDLE scope LOCAL ip_noundo3 should start with "l" +rule=nameconv; source=prolint/regrtest/noundo.i; line= 59; descr=INPUT PARAMETER iph_noundo scope LOCAL ip_noundo3 should start with "l" +rule=nameconv; source=prolint/regrtest/nowhere.i; line= 4; descr= tt_nowhere scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/nowhere.i; line= 22; descr= buf-cust BUFFER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/oflink.i; line= 15; descr= qoflink scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/recid.i; line= 3; descr= VARIABLE xyz RECID scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/runargs.i; line= 4; descr= VARIABLE runargs_1 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/runargs.i; line= 6; descr= VARIABLE runargs_2 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/runargs.i; line= 8; descr= VARIABLE runargs_3 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/runname.i; line= 5; descr= VARIABLE hRunname HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/runname.i; line= 6; descr= VARIABLE vRunname CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/runname.i; line= 7; descr= VARIABLE hRunnameServer HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/runname.i; line= 70; descr=INPUT PARAMETER cNothing CHARACTER scope LOCAL CtrlFrame.TreeView.NodeClicked should start with "l" +rule=nameconv; source=prolint/regrtest/sepdbui.i; line= 5; descr= tt_sepdbui scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/shared.i; line= 12; descr= VARIABLE shared_a HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/shared.i; line= 13; descr= VARIABLE shared_c HANDLE scope SHARED should start with "l" +rule=nameconv; source=prolint/regrtest/shared.i; line= 14; descr= VARIABLE shared_d HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/shared.i; line= 16; descr= VARIABLE shared_e INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/shared.i; line= 17; descr= VARIABLE shared_f INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/shared.i; line= 20; descr= tt_shared scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/shared.i; line= 23; descr= tt_shared_b scope SHARED should start with "l" +rule=nameconv; source=prolint/regrtest/shared.i; line= 27; descr= shared_g scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/shared.i; line= 28; descr= shared_h scope SHARED should start with "l" +rule=nameconv; source=prolint/regrtest/shared.i; line= 31; descr= shared_cust BUFFER scope SHARED should start with "l" +rule=nameconv; source=prolint/regrtest/sharelock.i; line= 4; descr= tt_sharelock scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/sharelock.i; line= 7; descr= VARIABLE vSharelock CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/sharelock.i; line= 8; descr= qcust scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/sharelock.i; line= 9; descr= buf_cust BUFFER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/sharelock.i; line= 10; descr= buftt BUFFER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/substitute.i; line= 2; descr= VARIABLE substitute_1 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/substitute.i; line= 3; descr= VARIABLE substitute_2 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/substitute.i; line= 4; descr= VARIABLE substitute_3 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/substitute.i; line= 6; descr= VARIABLE substitute_4 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/test3.p; line= 4; descr= VARIABLE RADIO-SET-2 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/test3.p; line= 9; descr= VARIABLE myfile CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/test4.p; line= 3; descr= VARIABLE longtext CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/use-index.i; line= 4; descr= tt_customer scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/vardef.p; line= 5; descr=INPUT PARAMETER InputHandle HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/vardef.p; line= 6; descr= PARAMETER bCustomer BUFFER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/vardef.p; line= 8; descr= VARIABLE Name scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/vardef.p; line= 8; descr=Name in is a Progress keyword +rule=nameconv; source=prolint/regrtest/vardef.p; line= 17; descr=INPUT PARAMETER MyChar CHARACTER scope LOCAL proc1 should start with "l" +rule=nameconv; source=prolint/regrtest/vardef.p; line= 18; descr= VARIABLE currentFocus WIDGETHANDLE scope LOCAL proc1 should start with "l" +rule=nameconv; source=prolint/regrtest/vardef.p; line= 23; descr=INPUT PARAMETER funcparchar scope LOCAL func1 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 9; descr= VARIABLE v_varusage_1 DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 10; descr= VARIABLE v_varusage_1b DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 11; descr= VARIABLE v_varusage_2 DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 12; descr= VARIABLE v_varusage_3 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 13; descr= VARIABLE v_varusage_4 CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 14; descr= VARIABLE v_varusage_5 LOGICAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 15; descr= VARIABLE v_varusage_8 HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 16; descr= VARIABLE v_varusage_9a INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 17; descr= VARIABLE v_varusage_9b INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 18; descr= VARIABLE v_varusage_10 INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 19; descr= VARIABLE v_varusage_11 HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 20; descr= VARIABLE v_varusage_12 HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 21; descr= VARIABLE v_varusage_14 DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 50; descr= VARIABLE v_varusage_12 INTEGER scope LOCAL CLOSE should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 51; descr= VARIABLE v_varusage_13 INTEGER scope LOCAL CLOSE should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 58; descr= VARIABLE v_varusage_newcity CHARACTER scope LOCAL WRITE should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 59; descr= VARIABLE v_varusage_oldcity CHARACTER scope LOCAL WRITE should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 61; descr= VARIABLE v_varusage_1 LOGICAL scope LOCAL WRITE should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 74; descr= VARIABLE v_varusage_ph1 HANDLE scope LOCAL ip_varusage_pp1 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 81; descr= VARIABLE v_varusage_ph2 HANDLE scope LOCAL ip_varusage_pp2 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 89; descr= VARIABLE v_varusage_ph3 HANDLE scope LOCAL ip_varusage_pp3 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 90; descr= VARIABLE v_varusage_async HANDLE scope LOCAL ip_varusage_pp3 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 101; descr= VARIABLE v_varusage_ph4 HANDLE scope LOCAL ip_varusage_pp4 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 118; descr=INPUT PARAMETER v_varusage_1 INTEGER scope LOCAL ip_varusage_2 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 119; descr=INPUT PARAMETER p_varusage_b LOGICAL scope LOCAL ip_varusage_2 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 120; descr=OUTPUT PARAMETER p_varusage_c DECIMAL scope LOCAL ip_varusage_2 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 121; descr=INPUTOUTPUT PARAMETER p_varusage_d DECIMAL scope LOCAL ip_varusage_2 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 123; descr= VARIABLE v_varusage_ip INTEGER scope LOCAL ip_varusage_2 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 133; descr=INPUT PARAMETER whocares scope LOCAL udf_varusage_1 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 135; descr= VARIABLE v_varusage_6 LOGICAL scope LOCAL udf_varusage_1 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 136; descr= VARIABLE v_varusage_ip INTEGER scope LOCAL udf_varusage_1 should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 146; descr= VARIABLE hColumn HANDLE scope LOCAL ip_varusage_browse should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 147; descr= VARIABLE hbCust HANDLE scope LOCAL ip_varusage_browse should start with "l" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 160; descr= VARIABLE hMenuItem HANDLE scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 170; descr= VARIABLE v_varusage2_1a DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 171; descr= VARIABLE v_varusage2_2a DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 172; descr= VARIABLE v_varusage2_3a DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 173; descr= VARIABLE v_varusage2_4a INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 174; descr= VARIABLE v_varusage2_5a CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 175; descr= VARIABLE v_varusage2_1b DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 176; descr= VARIABLE v_varusage2_2b DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 177; descr= VARIABLE v_varusage2_3b DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 178; descr= VARIABLE v_varusage2_4b INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 179; descr= VARIABLE v_varusage2_5b CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 180; descr= VARIABLE v_varusage2_1c DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 181; descr= VARIABLE v_varusage2_4c INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 182; descr= VARIABLE v_varusage2_5c CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 183; descr= VARIABLE v_varusage2_2d DECIMAL scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 184; descr= VARIABLE v_varusage2_4d INTEGER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 185; descr= VARIABLE v_varusage2_5d CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/varusage.i; line= 187; descr= s_varusage2 scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/weakchar.p; line= 3; descr= VARIABLE a CHARACTER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/where-udf.i; line= 3; descr=INPUT PARAMETER sometext scope LOCAL wu-test1 should start with "l" +rule=nameconv; source=prolint/regrtest/where-udf.i; line= 9; descr=INPUT PARAMETER sometext scope LOCAL wu-test2 should start with "l" +rule=nameconv; source=prolint/regrtest/wholeindex.i; line= 4; descr= tt_wholeindex scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/wholeindex.i; line= 9; descr= buf_wholeindex BUFFER scope MAIN should start with "g" +rule=nameconv; source=prolint/regrtest/wholeindex.i; line= 10; descr= buf_customer BUFFER scope MAIN should start with "g" rule=nobrackets; source=prolint/regrtest/noeffect.i; line= 36; descr=handle:query-open should have brackets rule=nobrackets; source=prolint/regrtest/noeffect.i; line= 37; descr=handle:get-first should have brackets rule=nobrackets; source=prolint/regrtest/noeffect.i; line= 38; descr=handle:get-next should have brackets @@ -242,6 +416,7 @@ rule=nocomment; source=prolint/regrtest/nocomment.i; line= 58; descr=FUNCTION udf_nocomment_2 is not commented rule=nocomment; source=prolint/regrtest/nocomment.i; line= 114; descr=PROCEDURE ip_nocomment_7 is not commented rule=nocomment; source=prolint/regrtest/nocomment.i; line= 114; descr=PROCEDURE ip_nocomment_7 is not commented +rule=nocomment; source=prolint/regrtest/vardef.p; line= 22; descr=function func1 is not commented rule=noeffect; source=prolint/regrtest/dotcomment.i; line= 23; descr=Statement has no effect rule=noeffect; source=prolint/regrtest/ifindentextra.i; line= 6; descr=Statement has no effect rule=noeffect; source=prolint/regrtest/noeffect.i; line= 23; descr=Statement has no effect @@ -346,6 +521,7 @@ rule=runnotfound; source=prolint/regrtest/varusage.i; line= 91; descr=proc 'myproc.p' not found rule=runnotfound; source=prolint/regrtest/varusage.i; line= 102; descr=proc 'myproc.p' not found rule=sepdbui; source=prolint/regrtest/defaultname.w; line= 137; descr=Separate UI from DB-access (UI in line 364 of prolint/regrtest/defaultname.w) +rule=sepdbui; source=prolint/regrtest/vardef.p; line= 6; descr=Separate UI from DB-access (UI in line 10 of prolint/regrtest/vardef.p) rule=sepdbui; source=prolint/regrtest/varusage.i; line= 37; descr=Separate UI from DB-access (UI in line 6 of prolint/regrtest/message.i) rule=shared; source=prolint/regrtest/shared.i; line= 13; descr=avoid SHARED on variable 'shared_c' rule=shared; source=prolint/regrtest/shared.i; line= 14; descr=avoid SHARED on variable 'shared_d' @@ -397,6 +573,7 @@ rule=strattrib; source=prolint/regrtest/strattrib.i; line= 57; descr=no string attributes on "title" rule=strattrib; source=prolint/regrtest/test3.p; line= 6; descr=no string attributes on "w3" rule=strattrib; source=prolint/regrtest/test4.p; line= 6; descr=no string attributes on "this is a test for rule m..." +rule=strattrib; source=prolint/regrtest/vardef.p; line= 10; descr=no string attributes on "Question" rule=strattrib; source=prolint/regrtest/where-udf.i; line= 19; descr=no string attributes on "hello" rule=strattrib; source=prolint/regrtest/where-udf.i; line= 27; descr=no string attributes on "hello" rule=strattrib; source=prolint/regrtest/wholeindex.i; line= 18; descr=no string attributes on "test" @@ -470,6 +647,7 @@ rule=uninproc; source=prolint/regrtest/runname.i; line= 63; descr=UNKNOWN Procedure executed at line 63. rule=uninproc; source=prolint/regrtest/runname.i; line= 64; descr=UNKNOWN Procedure executed at line 64. rule=uninproc; source=prolint/regrtest/runname.i; line= 65; descr=UNKNOWN Procedure executed at line 65. +rule=uninproc; source=prolint/regrtest/vardef.p; line= 13; descr=Internal Procedure proc1 is not used. rule=uninproc; source=prolint/regrtest/varusage.i; line= 72; descr=Internal Procedure ip_varusage_pp1 may not be used. rule=uninproc; source=prolint/regrtest/varusage.i; line= 79; descr=Internal Procedure ip_varusage_pp2 may not be used. rule=uninproc; source=prolint/regrtest/varusage.i; line= 87; descr=Internal Procedure ip_varusage_pp3 may not be used. @@ -508,6 +686,10 @@ rule=varusage; source=prolint/regrtest/shared.i; line= 17; descr=variable shared_f is never used rule=varusage; source=prolint/regrtest/test3.p; line= 4; descr=variable RADIO-SET-2 is never used rule=varusage; source=prolint/regrtest/test4.p; line= 3; descr=variable longtext is assigned but never accessed +rule=varusage; source=prolint/regrtest/vardef.p; line= 5; descr=parameter InputHandle is never used +rule=varusage; source=prolint/regrtest/vardef.p; line= 8; descr=variable Name is never used +rule=varusage; source=prolint/regrtest/vardef.p; line= 17; descr=parameter MyChar is never used +rule=varusage; source=prolint/regrtest/vardef.p; line= 18; descr=variable currentFocus is never used rule=varusage; source=prolint/regrtest/varusage.i; line= 9; descr=variable v_varusage_1 is assigned but never accessed rule=varusage; source=prolint/regrtest/varusage.i; line= 20; descr=variable v_varusage_12 is never used rule=varusage; source=prolint/regrtest/varusage.i; line= 50; descr=variable v_varusage_12 in ON CLOSE hides object in program scope Modified: trunk/prolint/rules/nameconv.p =================================================================== --- trunk/prolint/rules/nameconv.p 2006-03-14 22:16:37 UTC (rev 263) +++ trunk/prolint/rules/nameconv.p 2006-03-14 22:19:11 UTC (rev 264) @@ -306,7 +306,7 @@ tt_object.objDataType = pDatatype tt_object.objScope = pScope tt_object.ProcRowid = if available tt_procedure then rowid(tt_procedure) else ? - tt_object.ProcName = if available tt_procedure then tt_procedure.procName else compilationunit. + tt_object.ProcName = if available tt_procedure then tt_procedure.procName else "". end procedure. Added: trunk/prolint/settings/regression test/exclude.lst =================================================================== --- trunk/prolint/settings/regression test/exclude.lst (rev 0) +++ trunk/prolint/settings/regression test/exclude.lst 2006-03-14 22:19:11 UTC (rev 264) @@ -0,0 +1,21 @@ +# this file specifies which particular warnings should be excluded. The rules will +# still be executed, but warnings are intercepted if they match this file. +# You can also consider using {&_proparse_ prolint-nowarn(ruleid,ruleid)} directives +# +# format: +# sourcefile|rules +# +# sourcefile : spell exactly as it appears in "Prolint result window", wildcards are accepted. CAN-DO rules apply +# rule : comma separated list of identifiers of the rules that gives the warning, +# wildcards are accepted. CAN-DO rules apply +# +# empty lines or lines matching #* are ignored + + +# just for fun: ignore everything from ifindent.i except ifindent1 and ifindent2 +prolint/regrtest/ifindent.i|!ifindent*,* + +# ignore CVS backups of 'work in progress' files: +prolint/*CVS/*|* + + Added: trunk/prolint/settings/regression test/handlers.d =================================================================== --- trunk/prolint/settings/regression test/handlers.d (rev 0) +++ trunk/prolint/settings/regression test/handlers.d 2006-03-14 22:19:11 UTC (rev 264) @@ -0,0 +1,2 @@ +"logwin.w" +"regrlog.p" Added: trunk/prolint/settings/regression test/no-local-settings.lk =================================================================== --- trunk/prolint/settings/regression test/no-local-settings.lk (rev 0) +++ trunk/prolint/settings/regression test/no-local-settings.lk 2006-03-14 22:19:11 UTC (rev 264) @@ -0,0 +1,2 @@ +settings in directory "local-prolint/settings" will be ignored +until you remove this file. Added: trunk/prolint/settings/regression test/nowarn.lst =================================================================== --- trunk/prolint/settings/regression test/nowarn.lst (rev 0) +++ trunk/prolint/settings/regression test/nowarn.lst 2006-03-14 22:19:11 UTC (rev 264) @@ -0,0 +1,21 @@ +# this file specifies which particular warnings should be suppressed. The rules will +# still be executed, but warnings are intercepted if they match this file. +# +# format: +# sourcefile|rule|linenumbers +# sourcefile|_file-size|size +# +# sourcefile : spell exactly as it appears in "Prolint result window" +# rule : identfier of the rule that gives the warning +# linenumbers: comma separated list of linenumbers where the warning should be suppressed +# +# size : the filesize of the sourcefile, in bytes +# if _file-size is not specified, or if size doesn't match the actual size of the sourcefile, +# all lines for sourcefile will be invalid. So after you edit a sourcefile no warnings will be suppressed. +# +# empty lines or lines matching #* are ignored + + +prolint/demo/runname.i|_file-size|1411 +prolint/demo/runname.i|runname|19 + Added: trunk/prolint/settings/regression test/severity.d =================================================================== --- trunk/prolint/settings/regression test/severity.d (rev 0) +++ trunk/prolint/settings/regression test/severity.d 2006-03-14 22:19:11 UTC (rev 264) @@ -0,0 +1 @@ +yes "abbrevkwd" 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-14 22:16:44
|
Revision: 263 Author: jurjen Date: 2006-03-14 14:16:37 -0800 (Tue, 14 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=263&view=rev Log Message: ----------- oops, typo! default window "logwin8.w" should have been "logwin.w" Modified Paths: -------------- trunk/prolint/prolint.properties.p Modified: trunk/prolint/prolint.properties.p =================================================================== --- trunk/prolint/prolint.properties.p 2006-03-14 21:01:26 UTC (rev 262) +++ trunk/prolint/prolint.properties.p 2006-03-14 22:16:37 UTC (rev 263) @@ -49,7 +49,7 @@ /* "outputhandlers.resultwindow" logwin.w is the default resultwindow with the treeview and other ActiveX controls. logwin8.w is the old default that doesn't use any ActiveX controls */ - RUN SetProlintProperty ("outputhandlers.resultwindow", "prolint/outputhandlers/logwin8.w"). + RUN SetProlintProperty ("outputhandlers.resultwindow", "prolint/outputhandlers/logwin.w"). /* "outputhandlers.outputdirectory" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-14 21:02:50
|
Revision: 262 Author: jurjen Date: 2006-03-14 13:01:26 -0800 (Tue, 14 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=262&view=rev Log Message: ----------- Clean-up: removed Progress 8 compatibility. We are now shamelessly using PUBLISH and SUBSCRIBE, super procedures, dynamic queries, flat buttons and so on. And I could also remove almost every GLOBAL-DEFINE. Modified Paths: -------------- trunk/prolint/checkrelease.p trunk/prolint/desktop.w trunk/prolint/dlc-version.i trunk/prolint/filterplugins.p trunk/prolint/filters/filterparams.i trunk/prolint/filters/ignoreab.p trunk/prolint/filters/nowarn.p trunk/prolint/help/newrule.htxt trunk/prolint/help/outputhandler.htxt trunk/prolint/lintsuper.p trunk/prolint/outputhandlers/PRO4mfile.p trunk/prolint/outputhandlers/dlgfilter.w trunk/prolint/outputhandlers/ed4win.p trunk/prolint/outputhandlers/logexcel.p trunk/prolint/outputhandlers/logfile.p trunk/prolint/outputhandlers/logwin.w trunk/prolint/outputhandlers/logwin8.w trunk/prolint/outputhandlers/prolintdb.p trunk/prolint/outputhandlers/regrlog.p trunk/prolint/outputhandlers/showhtml.p trunk/prolint/outputhandlers/tabfile.p trunk/prolint/prolint.p trunk/prolint/prolint.properties.p trunk/prolint/prolintdb/dirstats.w trunk/prolint/prolintdb/incstats.w trunk/prolint/prolintdb/rulestats.w trunk/prolint/prolintdb/runffq.p trunk/prolint/publish.i trunk/prolint/publish_char.i trunk/prolint/publish_log.i trunk/prolint/publish_result.i trunk/prolint/rtb/checkin-handler.p trunk/prolint/ruleparams.i trunk/prolint/rules/_template.p trunk/prolint/rules/abbrevkwd.p trunk/prolint/rules/abbrevtable.p trunk/prolint/rules/alertmessage.p trunk/prolint/rules/allfinds.p trunk/prolint/rules/backslash.p trunk/prolint/rules/blocklabel.p trunk/prolint/rules/colon-t.p trunk/prolint/rules/contains.p trunk/prolint/rules/create.p trunk/prolint/rules/dbtrigger.p trunk/prolint/rules/defaultname.p trunk/prolint/rules/do1.p trunk/prolint/rules/dotcomment.p trunk/prolint/rules/emptyblock.p trunk/prolint/rules/endtype.p trunk/prolint/rules/errortext.p trunk/prolint/rules/findstate-tt.p trunk/prolint/rules/findstate.p trunk/prolint/rules/fnusage.p trunk/prolint/rules/groupassign.p trunk/prolint/rules/i18nlength.p trunk/prolint/rules/idiskeyword.p trunk/prolint/rules/ifindent.p trunk/prolint/rules/ifparens.p trunk/prolint/rules/lexcolon.p trunk/prolint/rules/matches.p trunk/prolint/rules/maxchar.p trunk/prolint/rules/message.p trunk/prolint/rules/messagetype.p trunk/prolint/rules/namecheck.p trunk/prolint/rules/nameconv.p trunk/prolint/rules/nobrackets.p trunk/prolint/rules/nocomment.p trunk/prolint/rules/noeffect.p trunk/prolint/rules/noerror.p trunk/prolint/rules/noundo.p trunk/prolint/rules/nowhere.p trunk/prolint/rules/obsoletenodes.p trunk/prolint/rules/oflink.p trunk/prolint/rules/query.p trunk/prolint/rules/runargs.p trunk/prolint/rules/runasnotfound.p trunk/prolint/rules/runname.p trunk/prolint/rules/runnotfound.p trunk/prolint/rules/sepdbui.p trunk/prolint/rules/sequence.p trunk/prolint/rules/shared.p trunk/prolint/rules/sharelock.p trunk/prolint/rules/sortaccess.p trunk/prolint/rules/strattrib.p trunk/prolint/rules/substitute.p trunk/prolint/rules/tablename.p trunk/prolint/rules/tableusage.p trunk/prolint/rules/ttlock.p trunk/prolint/rules/ttnoindex.p trunk/prolint/rules/undoretry.p trunk/prolint/rules/uninproc.p trunk/prolint/rules/unquoted.p trunk/prolint/rules/use-index.p trunk/prolint/rules/varusage.p trunk/prolint/rules/weakchar.p trunk/prolint/rules/when.p trunk/prolint/rules/where-udf.p trunk/prolint/rules/wholeindex.p trunk/prolint/selectfiles.w trunk/prolint/subscribe.i trunk/prolint/unsubscribe.i trunk/prolint/v8pubsub.i trunk/prolint/v8pubsub.p Modified: trunk/prolint/checkrelease.p =================================================================== --- trunk/prolint/checkrelease.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/checkrelease.p 2006-03-14 21:01:26 UTC (rev 262) @@ -28,12 +28,6 @@ DEFINE VARIABLE LocalRelease AS INTEGER NO-UNDO. DEFINE VARIABLE RemoteAvail AS LOGICAL NO-UNDO INITIAL YES. -IF {&dlc-version} < 9 THEN DO: - MESSAGE "Sorry, need at least Progress 9 for this feature." - VIEW-AS ALERT-BOX. - RETURN. -END. - IF NOT (OPSYS MATCHES "win*") THEN DO: MESSAGE "Sorry, need Windows for this feature." VIEW-AS ALERT-BOX. Modified: trunk/prolint/desktop.w =================================================================== --- trunk/prolint/desktop.w 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/desktop.w 2006-03-14 21:01:26 UTC (rev 262) @@ -548,11 +548,12 @@ &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_results C-Win ON CHOOSE OF Btn_results IN FRAME DEFAULT-FRAME /* Results Window */ DO: - &IF {&dlc-version}=8 &THEN - RUN prolint/outputhandlers/logwin8.w PERSISTENT. - &ELSE - RUN prolint/outputhandlers/logwin.w PERSISTENT. - &ENDIF + DEFINE VARIABLE hpProperties AS HANDLE NO-UNDO. + DEFINE VARIABLE progname AS CHARACTER NO-UNDO. + RUN prolint/propsuper.p PERSISTENT SET hpProperties. + progname = DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.resultwindow"). + DELETE PROCEDURE hpProperties. + RUN VALUE(progname) PERSISTENT. END. /* _UIB-CODE-BLOCK-END */ @@ -646,8 +647,6 @@ ------------------------------------------------------------------------------*/ DEFINE VARIABLE htmlfile AS CHARACTER NO-UNDO. -&IF {&dlc-version}<>8 &THEN - IF SEARCH("adecomm/adestds.i":U)=? OR SEARCH("adecomm/peditor.i":U)=? THEN DO: /* Only give error if not compiled */ IF SEARCH("prolint/desktop.r":U)=? THEN DO: @@ -662,8 +661,6 @@ END. END. -&ENDIF - END PROCEDURE. /* _UIB-CODE-BLOCK-END */ Modified: trunk/prolint/dlc-version.i =================================================================== --- trunk/prolint/dlc-version.i 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/dlc-version.i 2006-03-14 21:01:26 UTC (rev 262) @@ -17,14 +17,4 @@ ELSE SessionWindowSystem=SESSION:DISPLAY-TYPE. -/* Which 4GL features are unsupported, based on dlc-version? */ -&IF {&dlc-version}<9 &THEN - &IF DEFINED(EXCLUDE-superprocedure)=0 &THEN - &GLOBAL-DEFINE EXCLUDE-superprocedure - &ENDIF - &GLOBAL-DEFINE pubsub FALSE -&ELSE - &GLOBAL-DEFINE pubsub TRUE -&ENDIF - \ No newline at end of file Modified: trunk/prolint/filterplugins.p =================================================================== --- trunk/prolint/filterplugins.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/filterplugins.p 2006-03-14 21:01:26 UTC (rev 262) @@ -23,7 +23,6 @@ ------------------------------------------------------------------ */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE INPUT PARAMETER pProfileDirectory AS CHARACTER NO-UNDO. @@ -46,7 +45,6 @@ INDEX idx_1 AS PRIMARY SourceFile RuleID LineNumber. ON "CLOSE":U OF THIS-PROCEDURE DO: - {prolint/unsubscribe.i} FOR EACH tt_filters : APPLY "CLOSE":U TO tt_filters.hpFilter. END. @@ -54,7 +52,7 @@ END. RUN InitializePlugins. -{prolint/subscribe.i "Prolint_Status_FileEnd"} +SUBSCRIBE TO "Prolint_Status_FileEnd" ANYWHERE. RETURN. /* ------------------------ internal procedures ------------------------------ */ Modified: trunk/prolint/filters/filterparams.i =================================================================== --- trunk/prolint/filters/filterparams.i 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/filters/filterparams.i 2006-03-14 21:01:26 UTC (rev 262) @@ -23,7 +23,6 @@ ------------------------------------------------------------------ */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE INPUT PARAMETER ProfileDirectory AS CHARACTER NO-UNDO. Modified: trunk/prolint/filters/ignoreab.p =================================================================== --- trunk/prolint/filters/ignoreab.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/filters/ignoreab.p 2006-03-14 21:01:26 UTC (rev 262) @@ -29,7 +29,6 @@ IgnoreAppbuilderstuff = LOGICAL ( DYNAMIC-FUNCTION ("ProlintProperty", "filters.IgnoreAppbuilderstuff")). ON "CLOSE":U OF THIS-PROCEDURE DO: - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END. @@ -40,7 +39,7 @@ FIELD lastline AS INTEGER INDEX idx AS PRIMARY sourcefile firstline. - {prolint/subscribe.i "Prolint_Status_FileEnd"} + SUBSCRIBE TO "Prolint_Status_FileEnd" ANYWHERE. /* ------------------------------------------------------------------------------------ maintenance procedures for tt_codesection Modified: trunk/prolint/filters/nowarn.p =================================================================== --- trunk/prolint/filters/nowarn.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/filters/nowarn.p 2006-03-14 21:01:26 UTC (rev 262) @@ -118,12 +118,7 @@ ELSE DO: FILE-INFORMATION:FILE-NAME = vname. - &IF {&dlc-version}>8 &THEN size_ok = FILE-INFORMATION:FILE-SIZE = buf_ignore.LineNumber. - &ELSE - /* FILE-INFO:FILE-SIZE is not supported in Progress 8. Let's just trust _file-size */ - size_ok = TRUE. - &ENDIF END. IF NOT size_ok THEN FOR EACH buf_ignore EXCLUSIVE-LOCK WHERE buf_ignore.SourceFile = vname : Modified: trunk/prolint/help/newrule.htxt =================================================================== --- trunk/prolint/help/newrule.htxt 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/help/newrule.htxt 2006-03-14 21:01:26 UTC (rev 262) @@ -56,8 +56,8 @@ <p> When the rule finds a statement or a situation where it wants to raise a warning about, you should run procedure PublishResult. <br> -Procedure PublishResult is implemented in prolint/lintsuper.p which is a super-procedure to every rule, but even though it's a super you should still specify {&insuper} for -Progress 8 support. +Procedure PublishResult is implemented in prolint/lintsuper.p which is +a super-procedure to every rule. <br> You should not "publish" the warning directly to the outputhandlers using PUBLISH "Prolint_AddResult", because if you do you miss the extra functionality that lintsuper.p adds to it. Modified: trunk/prolint/help/outputhandler.htxt =================================================================== --- trunk/prolint/help/outputhandler.htxt 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/help/outputhandler.htxt 2006-03-14 21:01:26 UTC (rev 262) @@ -27,8 +27,6 @@ <p> Each outputhandler is loaded persistently by prolint.p, but prolint will never delete the procedure. The outputhandler has to delete itself when ready, usually from within the event-procedure for event "Prolint_FinalizeResults". -<br> -<b>important:</b> just before the procedure deletes itself it is important to include {prolint/unsubscribe.i}. <p> The outputhandler subscribes to, and responds to (some) of the following published events: <hr size=1> Modified: trunk/prolint/lintsuper.p =================================================================== --- trunk/prolint/lintsuper.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/lintsuper.p 2006-03-14 21:01:26 UTC (rev 262) @@ -23,23 +23,11 @@ ------------------------------------------------------------------ */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE INPUT PARAMETER hparser AS HANDLE NO-UNDO. DEFINE INPUT PARAMETER hpFilterPlugins AS HANDLE NO-UNDO. {proparse/api/proparse.i hparser} - -/* does this DLC version support super-procedures or not? */ -&IF DEFINED(EXCLUDE-superprocedure)>0 &THEN - DEFINE VARIABLE hActiveRule AS HANDLE NO-UNDO. - &GLOBAL-DEFINE targetprocedure hActiveRule - &GLOBAL-DEFINE thisprocedure THIS-PROCEDURE -&ELSE - &GLOBAL-DEFINE targetprocedure TARGET-PROCEDURE - &GLOBAL-DEFINE thisprocedure TARGET-PROCEDURE -&ENDIF - - + DEFINE VARIABLE IgnoreAB AS LOGICAL NO-UNDO INITIAL FALSE. DEFINE VARIABLE ActivePragma AS INTEGER NO-UNDO. DEFINE VARIABLE ActiveSeverity AS INTEGER NO-UNDO. @@ -56,7 +44,6 @@ DEFINE VARIABLE SearchPath AS CHARACTER NO-UNDO. ON "CLOSE":U OF THIS-PROCEDURE DO: - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END. @@ -223,11 +210,7 @@ DEFINE INPUT PARAMETER pActivePragma AS INTEGER NO-UNDO. DEFINE INPUT PARAMETER pActiveSeverity AS INTEGER NO-UNDO. DEFINE INPUT PARAMETER pIgnoreAB AS LOGICAL NO-UNDO. - &IF DEFINED(EXCLUDE-superprocedure)>0 &THEN - DEFINE INPUT PARAMETER pActiveRule AS HANDLE NO-UNDO. - ASSIGN hActiveRule = pActiveRule. - &ENDIF - + ASSIGN AbortSearch = FALSE IgnoreAB = pIgnoreAB @@ -251,9 +234,9 @@ /* searching a tree (recursive) is probably faster than a query if no nodetypes are specified */ /* actually this may not be true anymore with the latest version of proparse, have to test that */ IF NodeTypesToInspect="" OR NodeTypesToInspect=? THEN - RUN SearchNodeTree IN {&THISPROCEDURE} (theNode, ipCallBack, NodeTypesToInspect). + RUN SearchNodeTree IN TARGET-PROCEDURE (theNode, ipCallBack, NodeTypesToInspect). ELSE - RUN searchNodeQueries IN {&THISPROCEDURE} (theNode, ipCallBack, NodeTypesToInspect). + RUN searchNodeQueries IN TARGET-PROCEDURE (theNode, ipCallBack, NodeTypesToInspect). END PROCEDURE. @@ -283,9 +266,9 @@ /* skip node if marked by FindProparseDirectives in prolint.p */ IF parserQueryGetResult(queryname, i, childnode) THEN IF 0=parserAttrGetI(childnode,ActivePragma) THEN - RUN VALUE(ipCallBack) IN {&TARGETPROCEDURE} (childnode, - OUTPUT AbortSearch, - OUTPUT SearchChildren). + RUN VALUE(ipCallBack) IN TARGET-PROCEDURE (childnode, + OUTPUT AbortSearch, + OUTPUT SearchChildren). IF AbortSearch THEN LEAVE loop_results. END. parserQueryClear(queryname). @@ -315,9 +298,9 @@ IF 0=parserAttrGetI(theNode,ActivePragma) THEN IF (NodetypesToInspect=?) OR (LOOKUP(parserGetNodeType(theNode),NodetypesToInspect) GT 0) THEN - RUN VALUE(ipCallBack) IN {&TARGETPROCEDURE} (theNode, - OUTPUT AbortSearch, - OUTPUT SearchChildren). + RUN VALUE(ipCallBack) IN TARGET-PROCEDURE (theNode, + OUTPUT AbortSearch, + OUTPUT SearchChildren). IF SearchChildren AND (NOT AbortSearch) THEN DO: ASSIGN nodetype = parserNodeFirstChild(theNode,child). @@ -325,7 +308,7 @@ /* if child is a new node head, run searchNodeTree with it (recursion) */ IF parserNodeFirstChild(child, grandchild)<>"" THEN - RUN searchNodeTree IN {&THISPROCEDURE} (child, ipCallBack, NodetypesToInspect). + RUN searchNodeTree IN TARGET-PROCEDURE (child, ipCallBack, NodetypesToInspect). nodetype = parserNodeNextSibling(child,child). END. END. @@ -345,9 +328,7 @@ DEFINE INPUT PARAMETER pDescription AS CHAR NO-UNDO. /* human-readable hint */ DEFINE INPUT PARAMETER pRuleID AS CHAR NO-UNDO. /* defines rule-program and maps to help */ - /* note: have to run IN THIS-PROCEDURE, else no way to get it work in Progress 8. - otherwise it should have been IN {&TARGETPROCEDURE} */ - RUN PublishResultSeverity IN THIS-PROCEDURE + RUN PublishResultSeverity IN TARGET-PROCEDURE (pCompilationunit, pSource, pLineNumber, @@ -399,12 +380,12 @@ IF filteredby <> "" THEN RETURN. /* TODO: send filteredby to outputhandlers */ - {prolint/publish_result.i} (pCompilationunit, - RelativeSource, - pLineNumber, - REPLACE(pDescription,"~n":U," ":U), - pRuleID, - severity). + PUBLISH "Prolint_AddResult":U (pCompilationunit, + RelativeSource, + pLineNumber, + REPLACE(pDescription,"~n":U," ":U), + pRuleID, + severity). END PROCEDURE. @@ -438,12 +419,12 @@ IF filteredby <> "" THEN RETURN. /* TODO: send filteredby to outputhandlers */ - {prolint/publish_result.i} (pCompilationunit, - pSource, - pLineNumber, - REPLACE(pDescription,"~n":U," ":U), - pRuleID, - severity). + PUBLISH "Prolint_AddResult":U (pCompilationunit, + pSource, + pLineNumber, + REPLACE(pDescription,"~n":U," ":U), + pRuleID, + severity). END PROCEDURE. Modified: trunk/prolint/outputhandlers/PRO4mfile.p =================================================================== --- trunk/prolint/outputhandlers/PRO4mfile.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/PRO4mfile.p 2006-03-14 21:01:26 UTC (rev 262) @@ -6,15 +6,14 @@ by : Jurjen Dijkstra & Yuriy Setrko (PRO4m adjustment) ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE VARIABLE logfile AS CHARACTER NO-UNDO. DEFINE VARIABLE delim AS CHARACTER NO-UNDO. delim = CHR(9). /* tab */ -{prolint/subscribe.i "Prolint_InitializeResults"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. RETURN. @@ -72,7 +71,6 @@ /* In this case there are no open resources, so we're done. */ /* This procedure will not be invoked again, so it can exit */ - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/outputhandlers/dlgfilter.w =================================================================== --- trunk/prolint/outputhandlers/dlgfilter.w 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/dlgfilter.w 2006-03-14 21:01:26 UTC (rev 262) @@ -276,11 +276,6 @@ tg_Persistent = fltPersistent. RUN enable_UI. - &IF {&dlc-version}=8 &THEN - ASSIGN - tg_Persistent:VISIBLE = FALSE - tg_Persistent:HIDDEN = TRUE. - &ENDIF WAIT-FOR GO OF FRAME {&FRAME-NAME}. END. Modified: trunk/prolint/outputhandlers/ed4win.p =================================================================== --- trunk/prolint/outputhandlers/ed4win.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/ed4win.p 2006-03-14 21:01:26 UTC (rev 262) @@ -25,11 +25,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} -{prolint/subscribe.i "Prolint_InitializeResults"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. define variable numWarnings as integer no-undo initial 0. RETURN. @@ -82,7 +81,6 @@ PUBLISH "EndEd4WindowsConversation":U. - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/outputhandlers/logexcel.p =================================================================== --- trunk/prolint/outputhandlers/logexcel.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/logexcel.p 2006-03-14 21:01:26 UTC (rev 262) @@ -23,14 +23,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ====================================================================== */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE VARIABLE logfile AS CHAR NO-UNDO INITIAL "prolint.xml":U. DEFINE VARIABLE chExcel AS COM-HANDLE. -{prolint/subscribe.i "Prolint_InitializeResults"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. RETURN. @@ -42,7 +41,6 @@ CREATE "Excel.Application.11":U chExcel NO-ERROR. IF chExcel=? THEN DO: MESSAGE "Sorry, 'Prolint output to Excel' only works with Excel version 11":T VIEW-AS ALERT-BOX. - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END. ELSE DO: @@ -196,7 +194,6 @@ END. - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/outputhandlers/logfile.p =================================================================== --- trunk/prolint/outputhandlers/logfile.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/logfile.p 2006-03-14 21:01:26 UTC (rev 262) @@ -23,13 +23,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE VARIABLE logfile AS CHAR NO-UNDO. -{prolint/subscribe.i "Prolint_InitializeResults"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. logfile = SUBSTITUTE("&1prolint.log", DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.outputdirectory")). @@ -77,7 +76,6 @@ /* In this case there are no open resources, so we're done. */ /* This procedure will not be invoked again, so it can exit */ - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/outputhandlers/logwin.w =================================================================== --- trunk/prolint/outputhandlers/logwin.w 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/logwin.w 2006-03-14 21:01:26 UTC (rev 262) @@ -74,7 +74,6 @@ /* Local Variable Definitions --- */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE TEMP-TABLE tt_lint NO-UNDO FIELD ttDescription AS CHAR LABEL "description":T FORMAT "x(150)":U @@ -489,7 +488,6 @@ RUN destroyObject IN ghCodePreview. ghCodePreview = ?. END. - {prolint/unsubscribe.i} APPLY "CLOSE":U TO THIS-PROCEDURE. RETURN NO-APPLY. END. @@ -863,16 +861,16 @@ RUN adecomm/_status.p (c-win:HANDLE, "40,30,10,20":U, FALSE, ?, OUTPUT hStatusbar, OUTPUT iStatusFields). hStatusBar:VISIBLE = YES. - {prolint/subscribe.i "Prolint_InitializeResults"} - {prolint/subscribe.i "Prolint_AddResult"} - {prolint/subscribe.i "Prolint_FinalizeResults"} - {prolint/subscribe.i "Prolint_Status_action"} - {prolint/subscribe.i "Prolint_Status_FileStart"} - {prolint/subscribe.i "Prolint_Status_Profile"} - {prolint/subscribe.i "Prolint_Status_Progress"} + SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. + SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. + SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_action" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_FileStart" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_Profile" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_Progress" ANYWHERE. - {prolint/subscribe.i "Prolint_Status_StartTimer"} - {prolint/subscribe.i "Prolint_Status_StopTimer"} + SUBSCRIBE TO "Prolint_Status_StartTimer" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_StopTimer" ANYWHERE. SUBSCRIBE TO "Prolint_SendLogWin_Ed4Win":U ANYWHERE. Modified: trunk/prolint/outputhandlers/logwin8.w =================================================================== --- trunk/prolint/outputhandlers/logwin8.w 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/logwin8.w 2006-03-14 21:01:26 UTC (rev 262) @@ -46,7 +46,6 @@ /* Local Variable Definitions --- */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE TEMP-TABLE tt_lint NO-UNDO FIELD ttDescription AS CHAR LABEL "description":T FORMAT "x(150)":U @@ -386,7 +385,6 @@ ON WINDOW-CLOSE OF C-Win /* Prolint results */ DO: /* This event will close the window and terminate the procedure. */ - {prolint/unsubscribe.i} APPLY "CLOSE":U TO THIS-PROCEDURE. RETURN NO-APPLY. END. @@ -662,9 +660,7 @@ ON VALUE-CHANGED OF tg_top IN FRAME DEFAULT-FRAME /* TopOnly */ DO: ASSIGN tg_top. - &IF {&dlc-version}>8 &THEN - c-win:TOP-ONLY = tg_top. - &ENDIF + c-win:TOP-ONLY = tg_top. END. /* _UIB-CODE-BLOCK-END */ @@ -690,8 +686,6 @@ /* Best default for GUI applications is... */ PAUSE 0 BEFORE-HIDE. -&IF {&dlc-version}>8 &THEN - /* cool GUI stuff for Progress 9 : */ /* must be done before enable_UI, else buttons are already realized */ ASSIGN btn_more:FLAT-BUTTON = TRUE @@ -711,7 +705,6 @@ ed_sourcefile:READ-ONLY = TRUE ed_rule:READ-ONLY = TRUE ed_severity:READ-ONLY = TRUE. -&ENDIF /* Now enable the interface and wait for the exit condition. */ /* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */ @@ -732,20 +725,18 @@ RUN adecomm/_status.p (c-win:HANDLE, "50,30,10,20,5":U, FALSE, ?, OUTPUT hStatusbar, OUTPUT iStatusFields). hStatusBar:VISIBLE = YES. - {prolint/subscribe.i "Prolint_InitializeResults"} - {prolint/subscribe.i "Prolint_AddResult"} - {prolint/subscribe.i "Prolint_FinalizeResults"} - {prolint/subscribe.i "Prolint_Status_action"} - {prolint/subscribe.i "Prolint_Status_FileStart"} - {prolint/subscribe.i "Prolint_Status_Profile"} - {prolint/subscribe.i "Prolint_Status_Progress"} + SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. + SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. + SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_action" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_FileStart" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_Profile" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_Progress" ANYWHERE. - {prolint/subscribe.i "Prolint_Status_StartTimer"} - {prolint/subscribe.i "Prolint_Status_StopTimer"} + SUBSCRIBE TO "Prolint_Status_StartTimer" ANYWHERE. + SUBSCRIBE TO "Prolint_Status_StopTimer" ANYWHERE. - &IF {&dlc-version}>8 &THEN SUBSCRIBE TO "Prolint_SendLogWin_Ed4Win":U ANYWHERE. - &ENDIF IF NOT THIS-PROCEDURE:PERSISTENT THEN WAIT-FOR CLOSE OF THIS-PROCEDURE. @@ -1140,8 +1131,6 @@ (using the current filter and current sorting) ------------------------------------------------------------------------------*/ - &IF {&dlc-version}>8 &THEN - DEFINE VARIABLE hEd4win AS HANDLE NO-UNDO. RUN prolint/outputhandlers/ed4win.p PERSISTENT SET hEd4win. @@ -1170,8 +1159,6 @@ RUN Prolint_FinalizeResults IN hEd4win. - &ENDIF - END PROCEDURE. /* _UIB-CODE-BLOCK-END */ Modified: trunk/prolint/outputhandlers/prolintdb.p =================================================================== --- trunk/prolint/outputhandlers/prolintdb.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/prolintdb.p 2006-03-14 21:01:26 UTC (rev 262) @@ -24,16 +24,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE VARIABLE cRuleList AS CHARACTER NO-UNDO. DEFINE VARIABLE dToday AS DATE NO-UNDO. dToday = TODAY. -{prolint/subscribe.i "Prolint_List_Rules"} -{prolint/subscribe.i "Prolint_Status_FileStart"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_List_Rules" ANYWHERE. +SUBSCRIBE TO "Prolint_Status_FileStart" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. RETURN. @@ -116,7 +115,6 @@ /* purpose: close what is open. Free resources */ /* This procedure will not be invoked again, so it can exit */ - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/outputhandlers/regrlog.p =================================================================== --- trunk/prolint/outputhandlers/regrlog.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/regrlog.p 2006-03-14 21:01:26 UTC (rev 262) @@ -24,14 +24,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE VARIABLE tempdir AS CHAR NO-UNDO. DEFINE VARIABLE logfile AS CHAR NO-UNDO. -{prolint/subscribe.i "Prolint_InitializeResults"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. RETURN. @@ -106,7 +105,6 @@ RUN proparse/utilities/resultswindow.p (tempdir + "diff.log":U). /* This procedure will not be invoked again, so it can exit */ - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/outputhandlers/showhtml.p =================================================================== --- trunk/prolint/outputhandlers/showhtml.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/showhtml.p 2006-03-14 21:01:26 UTC (rev 262) @@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE VARIABLE logfile AS CHAR NO-UNDO. DEFINE VARIABLE oddrow AS LOGICAL NO-UNDO. @@ -41,11 +40,11 @@ INDEX ixrule AS PRIMARY UNIQUE ruleid. -{prolint/subscribe.i "Prolint_InitializeResults"} -{prolint/subscribe.i "Prolint_Status_FileStart"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_Status_FileEnd"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. +SUBSCRIBE TO "Prolint_Status_FileStart" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_Status_FileEnd" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. RETURN. @@ -159,7 +158,6 @@ RUN prolint/openhtml.p (fullname). /* This procedure will not be invoked again, so it can exit */ - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/outputhandlers/tabfile.p =================================================================== --- trunk/prolint/outputhandlers/tabfile.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/outputhandlers/tabfile.p 2006-03-14 21:01:26 UTC (rev 262) @@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE VARIABLE logfile AS CHARACTER NO-UNDO. DEFINE VARIABLE delim AS CHARACTER NO-UNDO. @@ -34,9 +33,9 @@ logfile = SUBSTITUTE("&1&2prolint.tab", DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.outputdirectory"), DYNAMIC-FUNCTION("ProlintProperty", "logincode")). -{prolint/subscribe.i "Prolint_InitializeResults"} -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_FinalizeResults"} +SUBSCRIBE TO "Prolint_InitializeResults" ANYWHERE. +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_FinalizeResults" ANYWHERE. RETURN. @@ -94,7 +93,6 @@ /* In this case there are no open resources, so we're done. */ /* This procedure will not be invoked again, so it can exit */ - {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END PROCEDURE. Modified: trunk/prolint/prolint.p =================================================================== --- trunk/prolint/prolint.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/prolint.p 2006-03-14 21:01:26 UTC (rev 262) @@ -29,7 +29,6 @@ &SCOPED-DEFINE ProparseVersion "2.2b01":U {prolint/dlc-version.i} -{prolint/v8pubsub.i} DEFINE INPUT PARAMETER pSourcefile AS CHARACTER NO-UNDO. /* a single filename to lint */ DEFINE INPUT PARAMETER hSourcefileList AS HANDLE NO-UNDO. /* handle to a list of filenames to lint */ @@ -106,24 +105,21 @@ /* the place to read your custom settings from */ RUN GetProfileDirectory. - /* quickly subscribe to some event. This prevents v8pubsub.p from terminating itself - in case it does an internal garbage collect and finds out it has no subscribers... */ - /* We actually do need to subscribe to "Prolint_AddResult" because we want to set MaxSeverity */ - {prolint/subscribe.i "Prolint_AddResult"} + /* We need to subscribe to "Prolint_AddResult" because we want to set MaxSeverity */ + SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. /* Initialize a place to store results: a logfile, the 'Prolint result window', whatever */ RUN InitializeOutputhandler. IF RETURN-VALUE="no handlers":U THEN DO: {&_proparse_ prolint-nowarn(message)} MESSAGE "prolint: no valid outputhandlers specified":U VIEW-AS ALERT-BOX. - {prolint/unsubscribe.i} RUN DeleteTempdir. DELETE PROCEDURE hpProperties. RETURN. END. - {prolint/publish_char.i "Prolint_Status_Action" ""initializing..."":U} - {prolint/publish_char.i "Prolint_Status_Profile" "pCustomProfile"} + PUBLISH "Prolint_Status_Action" ("initializing..."). + PUBLISH "Prolint_Status_Profile" (pCustomProfile). /* Initialize the set of rules, eg populate tt_rules. If there are no rules there is no point in continuing */ @@ -131,12 +127,11 @@ /* are there any rules that need proparse but proparse isn't installed? */ IF NeedProparse AND (NOT HasProparse) THEN - {prolint/publish_result.i} ("":U, "":U,"0":U, "proparse required but not found":T, "noproparse":U, 0). + PUBLISH "Prolint_AddResult":U ("":U, "":U,"0":U, "proparse required but not found":T, "noproparse":U, 0). /* are there any rules at all? If not, close logfile and stop. */ IF NOT CAN-FIND(FIRST tt_rules) THEN DO: - {prolint/publish.i "Prolint_FinalizeResults"} - {prolint/unsubscribe.i} + PUBLISH "Prolint_FinalizeResults". RUN DeleteTempdir. DELETE PROCEDURE hpProperties. RETURN STRING(MaxSeverity). @@ -192,7 +187,7 @@ END. /* tell the logfile/result-window we are done with it */ - {prolint/publish.i "Prolint_FinalizeResults"} + PUBLISH "Prolint_FinalizeResults". /* release resources */ RUN ClearProparseResources. @@ -202,7 +197,6 @@ hpFilterPlugins = ?. RUN ReleaseProparseHandle. RUN DeleteTempdir. - {prolint/unsubscribe.i} IF hTurbolint<>0 THEN RUN FreeLibrary (hTurbolint). DELETE PROCEDURE hpProperties. @@ -455,20 +449,15 @@ LogwinRunning = TRUE. hw = hw:NEXT-SIBLING. END. - IF NOT LogwinRunning THEN DO: - &IF {&dlc-version}=8 &THEN - RUN prolint/outputhandlers/logwin8.w PERSISTENT. - &ELSE - RUN prolint/outputhandlers/logwin.w PERSISTENT. - &ENDIF - END. - END. + IF NOT LogwinRunning THEN + RUN VALUE(DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.resultwindow")) PERSISTENT. + END. OTHERWISE RUN VALUE("prolint/outputhandlers/":U + handler) PERSISTENT. END. END. - {prolint/publish_log.i "Prolint_InitializeResults" pClearOutput} + PUBLISH "Prolint_InitializeResults" (pClearOutput). END PROCEDURE. @@ -495,7 +484,7 @@ dllversion = parserGetVersion(). /* only compare the first four digits: release 1.0d is functionally similar to bugfix 1.0d02 */ IF SUBSTRING(dllversion,1,4) NE SUBSTRING({&ProparseVersion},1,4) THEN - {prolint/publish_result.i} ("", "","0":U, SUBSTITUTE("Expected proparse version &1, found &2":T, {&proparseversion}, dllversion), "version":U, 0). + PUBLISH "Prolint_AddResult":U ("", "","0":U, SUBSTITUTE("Expected proparse version &1, found &2":T, {&proparseversion}, dllversion), "version":U, 0). END. /* Look for the "jpplus" package, which provides @@ -542,7 +531,6 @@ END PROCEDURE. -&IF {&dlc-version}>8 &THEN PROCEDURE AddTemptableSourceFiles : /* purpose : if parameter hSourcefileList is a temp-table, then assume it is a list of sourcefiles to lint. The temp-table must have a field SourceFile, other @@ -569,7 +557,6 @@ END. END PROCEDURE. -&ENDIF PROCEDURE AddIPProvidedSourceFiles : @@ -598,7 +585,7 @@ FILE-INFO:FILE-NAME = p-SourceItem. IF FILE-INFO:FULL-PATHNAME = ? THEN - {prolint/publish_result.i} (p-SourceItem, p-SourceItem,"0":U, "file not found":T, "prolint":U, 9). + PUBLISH "Prolint_AddResult":U (p-SourceItem, p-SourceItem,"0":U, "file not found":T, "prolint":U, 9). ELSE IF FILE-INFO:FILE-TYPE MATCHES "*F*":U THEN RUN AddOneSourceFile(FILE-INFO:FULL-PATHNAME). @@ -651,14 +638,14 @@ IF maxFiles>1 THEN DO: done = " 0%":U. - {prolint/publish_char.i "Prolint_Status_Progress" "done"} + PUBLISH "Prolint_Status_Progress" ("done"). END. FOR EACH tt_files NO-LOCK : RUN LintOneSourceFile (tt_files.sourcefile). numFiles = numFiles + 1. done = STRING((100 * numFiles) / maxFiles, ">>9":U) + "%":U. - {prolint/publish_char.i "Prolint_Status_Progress" "done"} + PUBLISH "Prolint_Status_Progress" ("done"). END. END PROCEDURE. @@ -671,28 +658,28 @@ DEFINE VARIABLE ErrorMessage AS CHAR NO-UNDO. - {prolint/publish_char.i "Prolint_Status_FileStart" p-SourceFile} + PUBLISH "Prolint_Status_FileStart" (p-SourceFile). FILE-INFO:FILE-NAME = p-SourceFile. IF FILE-INFO:FULL-PATHNAME = ? THEN - {prolint/publish_result.i} (p-SourceFile, p-SourceFile,"0":U, "file not found":T, "prolint":U, 9). + PUBLISH "Prolint_AddResult":U (p-SourceFile, p-SourceFile,"0":U, "file not found":T, "prolint":U, 9). ELSE DO: p-SourceFile = FILE-INFO:FULL-PATHNAME. /* PreAnalyze creates compile listing, XREF file, token tree in proparse.dll, ... */ - {prolint/publish.i "Prolint_Status_StopTimer"} + PUBLISH "Prolint_Status_StopTimer". RUN PreAnalyze(p-SourceFile, OUTPUT ErrorMessage). - {prolint/publish.i "Prolint_Status_StartTimer"} + PUBLISH "Prolint_Status_StartTimer". IF ErrorMessage="":U THEN DO: IF hTurbolint<>0 THEN DO: - {prolint/publish_char.i "Prolint_Status_Action" "'running Turbolint...':T"} + PUBLISH "Prolint_Status_Action" ("running Turbolint..."). RUN Turbolint_RunRules (topnode, p-SourceFile). RUN PublishWarnings. END. FOR EACH tt_rules WHERE tt_rules.byturbolint=FALSE NO-LOCK : - {prolint/publish_char.i "Prolint_Status_Action" "SUBSTITUTE('testing rule: &1':T,tt_rules.RuleID)"} + PUBLISH "Prolint_Status_Action" (SUBSTITUTE('testing rule: &1':T,tt_rules.RuleID)). IF tt_rules.custom THEN RUN VALUE("prolint/custom/rules/":U + tt_rules.RuleID + ".p":U) (xreffile, @@ -725,7 +712,7 @@ RUN ProcedureListClear IN hLintSuper. END. /* file found */ - {prolint/publish.i "Prolint_Status_FileEnd"} + PUBLISH "Prolint_Status_FileEnd". END PROCEDURE. @@ -750,7 +737,7 @@ /* please do not produce new .r-code: - default location would be wrong if save into ... is required - special parameters might be required, like translation params */ - {prolint/publish_char.i "Prolint_Status_Action" ""compiling..."":U} + PUBLISH "Prolint_Status_Action" ("compiling...":U). IF NeedListing OR NeedXref THEN compiler-loop: DO compilerLoopNum = 1 TO 2: @@ -787,25 +774,23 @@ IF p-ErrorMessage EQ "":U THEN LEAVE compiler-loop. IF compilerLoopNum > 1 THEN DO: - &IF {&pubsub} &THEN - PUBLISH "WriteToEd4Windows":U (cErrorMsg). /* just in case ED is listening */ - &ENDIF + PUBLISH "WriteToEd4Windows":U (cErrorMsg). /* just in case ED is listening */ p-SourceFile = DYNAMIC-FUNCTION("RelativeFilename":U IN hLintSuper, p-SourceFile). - {prolint/publish_result.i} (p-SourceFile, p-SourceFile,"0":U, p-ErrorMessage, "compiler":U, 9). + PUBLISH "Prolint_AddResult":U (p-SourceFile, p-SourceFile,"0":U, p-ErrorMessage, "compiler":U, 9). END. END. /* compiler-loop */ /* parse sourcefile in proparse.dll */ IF NeedProparse AND HasProparse AND p-ErrorMessage="":U THEN DO: - {prolint/publish_char.i "Prolint_Status_Action" "'parsing...':T"} + PUBLISH "Prolint_Status_Action" ('parsing...':T). IF parserParse(p-Sourcefile) = FALSE THEN p-ErrorMessage = parserErrorGetText(). IF p-ErrorMessage<>"":U THEN DO: p-SourceFile = DYNAMIC-FUNCTION("RelativeFilename":U IN hLintSuper, p-SourceFile). - {prolint/publish_result.i} (p-SourceFile, p-SourceFile,"0":U, p-ErrorMessage, "proparse":U, 0). + PUBLISH "Prolint_AddResult":U (p-SourceFile, p-SourceFile,"0":U, p-ErrorMessage, "proparse":U, 0). /* These kinds of warnings should be reported to joanju.com */ END. ELSE DO: @@ -823,7 +808,7 @@ IF RETURN-VALUE <> "":U THEN DO: ASSIGN p-ErrorMessage = RETURN-VALUE. p-SourceFile = DYNAMIC-FUNCTION("RelativeFilename":U IN hLintSuper, p-SourceFile). - {prolint/publish_result.i} (p-SourceFile, p-SourceFile,"0":U, p-ErrorMessage, "proparse":U, 0). + PUBLISH "Prolint_AddResult":U (p-SourceFile, p-SourceFile,"0":U, p-ErrorMessage, "proparse":U, 0). END. END. @@ -1124,11 +1109,11 @@ UNLOAD "SOFTWARE". IF NUM-ENTRIES(NewProlintSetups) > 1 THEN - {prolint/publish_result.i} ("", - "", - "0":U, - "Prolint is installed more than once", - "prolint":U, 0). + PUBLISH "Prolint_AddResult":U ("", + "", + "0":U, + "Prolint is installed more than once", + "prolint":U, 0). END. END PROCEDURE. @@ -1179,7 +1164,7 @@ cList = cList + ",":U + tt_rules.ruleId. END. cList = TRIM(cList,",":U). - {prolint/publish_char.i "Prolint_List_Rules" "cList"} + PUBLISH "Prolint_List_Rules" (cList). END PROCEDURE. Modified: trunk/prolint/prolint.properties.p =================================================================== --- trunk/prolint/prolint.properties.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/prolint.properties.p 2006-03-14 21:01:26 UTC (rev 262) @@ -46,6 +46,12 @@ */ + /* "outputhandlers.resultwindow" + logwin.w is the default resultwindow with the treeview and other ActiveX controls. + logwin8.w is the old default that doesn't use any ActiveX controls */ + RUN SetProlintProperty ("outputhandlers.resultwindow", "prolint/outputhandlers/logwin8.w"). + + /* "outputhandlers.outputdirectory" the directory where outputhandlers save their outputfiles */ RUN SetProlintProperty ("outputhandlers.outputdirectory", SESSION:TEMP-DIR). Modified: trunk/prolint/prolintdb/dirstats.w =================================================================== --- trunk/prolint/prolintdb/dirstats.w 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/prolintdb/dirstats.w 2006-03-14 21:01:26 UTC (rev 262) @@ -45,7 +45,6 @@ /* Local Variable Definitions --- */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME @@ -536,23 +535,23 @@ /* send results to the logwin: simply publish warnings as if you are live linting */ - {prolint/publish_char.i "Prolint_Status_Profile" ""prolintdb""} - {prolint/publish_log.i "Prolint_InitializeResults" TRUE} + PUBLISH "Prolint_Status_Profile" ("prolintdb"). + PUBLISH "Prolint_InitializeResults" (TRUE). IF AVAILABLE prolintdb.lint_stat_ruledir THEN FOR EACH prolintdb.lint_warning NO-LOCK WHERE prolintdb.lint_warning.ruleid = prolintdb.lint_stat_ruledir.ruleid AND prolintdb.lint_warning.subdir = prolintdb.lint_stat_ruledir.subdir : - {prolint/publish_result.i} (prolintdb.lint_warning.compunit, - prolintdb.lint_warning.sourcefile, - prolintdb.lint_warning.linenumber, - prolintdb.lint_warning.comment, - prolintdb.lint_warning.ruleid, - prolintdb.lint_warning.severity). + PUBLISH "Prolint_AddResult":U (prolintdb.lint_warning.compunit, + prolintdb.lint_warning.sourcefile, + prolintdb.lint_warning.linenumber, + prolintdb.lint_warning.comment, + prolintdb.lint_warning.ruleid, + prolintdb.lint_warning.severity). END. - {prolint/publish.i "Prolint_FinalizeResults"} + PUBLISH "Prolint_FinalizeResults". END PROCEDURE. Modified: trunk/prolint/prolintdb/incstats.w =================================================================== --- trunk/prolint/prolintdb/incstats.w 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/prolintdb/incstats.w 2006-03-14 21:01:26 UTC (rev 262) @@ -42,7 +42,6 @@ /* *************************** Definitions ************************** */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} /* Parameters Definitions --- */ @@ -549,8 +548,8 @@ /* send results to the logwin: simply publish warnings as if you are live linting */ - {prolint/publish_char.i "Prolint_Status_Profile" ""prolintdb""} - {prolint/publish_log.i "Prolint_InitializeResults" TRUE} + PUBLISH "Prolint_Status_Profile" ("prolintdb"). + PUBLISH "Prolint_InitializeResults" (TRUE). IF AVAILABLE prolintdb.lint_stat_inc THEN FOR EACH prolintdb.lint_warning NO-LOCK @@ -568,16 +567,16 @@ END. FOR EACH tt_warning : - {prolint/publish_result.i} (tt_warning.compunit, - tt_warning.sourcefile, - tt_warning.linenumber, - tt_warning.comment, - tt_warning.ruleid, - tt_warning.severity). + PUBLISH "Prolint_AddResult":U (tt_warning.compunit, + tt_warning.sourcefile, + tt_warning.linenumber, + tt_warning.comment, + tt_warning.ruleid, + tt_warning.severity). END. - {prolint/publish.i "Prolint_FinalizeResults"} + PUBLISH "Prolint_FinalizeResults". FOR EACH tt_warning: Modified: trunk/prolint/prolintdb/rulestats.w =================================================================== --- trunk/prolint/prolintdb/rulestats.w 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/prolintdb/rulestats.w 2006-03-14 21:01:26 UTC (rev 262) @@ -45,7 +45,6 @@ /* Local Variable Definitions --- */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME @@ -536,23 +535,23 @@ /* send results to the logwin: simply publish warnings as if you are live linting */ - {prolint/publish_char.i "Prolint_Status_Profile" ""prolintdb""} - {prolint/publish_log.i "Prolint_InitializeResults" TRUE} + PUBLISH "Prolint_Status_Profile" ("prolintdb"). + PUBLISH "Prolint_InitializeResults" (TRUE). IF AVAILABLE prolintdb.lint_stat_ruledir THEN FOR EACH prolintdb.lint_warning NO-LOCK WHERE prolintdb.lint_warning.ruleid = prolintdb.lint_stat_ruledir.ruleid AND prolintdb.lint_warning.subdir = prolintdb.lint_stat_ruledir.subdir : - {prolint/publish_result.i} (prolintdb.lint_warning.compunit, - prolintdb.lint_warning.sourcefile, - prolintdb.lint_warning.linenumber, - prolintdb.lint_warning.comment, - prolintdb.lint_warning.ruleid, - prolintdb.lint_warning.severity). + PUBLISH "Prolint_AddResult":U (prolintdb.lint_warning.compunit, + prolintdb.lint_warning.sourcefile, + prolintdb.lint_warning.linenumber, + prolintdb.lint_warning.comment, + prolintdb.lint_warning.ruleid, + prolintdb.lint_warning.severity). END. - {prolint/publish.i "Prolint_FinalizeResults"} + PUBLISH "Prolint_FinalizeResults". END PROCEDURE. Modified: trunk/prolint/prolintdb/runffq.p =================================================================== --- trunk/prolint/prolintdb/runffq.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/prolintdb/runffq.p 2006-03-14 21:01:26 UTC (rev 262) @@ -27,7 +27,6 @@ {prolint/dlc-version.i} - {prolint/v8pubsub.i} DEFINE VARIABLE LogwinRunning AS LOGICAL NO-UNDO. DEFINE VARIABLE hw AS HANDLE NO-UNDO. @@ -46,23 +45,23 @@ /* send results to the logwin: simply publish warnings as if you are live linting */ - {prolint/publish_char.i "Prolint_Status_Profile" ""prolintdb""} - {prolint/publish_log.i "Prolint_InitializeResults" TRUE} + PUBLISH "Prolint_Status_Profile" ("prolintdb"). + PUBLISH "Prolint_InitializeResults" (TRUE). FOR EACH lint_warning NO-LOCK WHERE {prolintffq.tmp.i} : - {prolint/publish_result.i} (prolintdb.lint_warning.compunit, - prolintdb.lint_warning.sourcefile, - prolintdb.lint_warning.linenumber, - prolintdb.lint_warning.comment, - prolintdb.lint_warning.ruleid, - prolintdb.lint_warning.severity). + PUBLISH "Prolint_AddResult":U (prolintdb.lint_warning.compunit, + prolintdb.lint_warning.sourcefile, + prolintdb.lint_warning.linenumber, + prolintdb.lint_warning.comment, + prolintdb.lint_warning.ruleid, + prolintdb.lint_warning.severity). END. -{prolint/publish.i "Prolint_FinalizeResults"} +PUBLISH "Prolint_FinalizeResults". Modified: trunk/prolint/publish.i =================================================================== --- trunk/prolint/publish.i 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/publish.i 2006-03-14 21:01:26 UTC (rev 262) @@ -1,5 +1 @@ -&IF {&pubsub} &THEN - PUBLISH "{1}":U. -&ELSE - RUN Publish_noparams IN hPubsub (INPUT "{1}":U). -&ENDIF +TODO: delete this file Modified: trunk/prolint/publish_char.i =================================================================== --- trunk/prolint/publish_char.i 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/publish_char.i 2006-03-14 21:01:26 UTC (rev 262) @@ -1,5 +1 @@ -&IF {&pubsub} &THEN - PUBLISH "{1}":U (INPUT {2}). -&ELSE - RUN Publish_char IN hPubsub (INPUT "{1}":U, INPUT {2}). -&ENDIF +TODO: delete this file Modified: trunk/prolint/publish_log.i =================================================================== --- trunk/prolint/publish_log.i 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/publish_log.i 2006-03-14 21:01:26 UTC (rev 262) @@ -1,5 +1 @@ -&IF {&pubsub} &THEN - PUBLISH "{1}":U (INPUT {2}). -&ELSE - RUN Publish_log IN hPubsub (INPUT "{1}":U, INPUT {2}). -&ENDIF +TODO: delete this file Modified: trunk/prolint/publish_result.i =================================================================== --- trunk/prolint/publish_result.i 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/publish_result.i 2006-03-14 21:01:26 UTC (rev 262) @@ -1,5 +1 @@ -&IF {&pubsub} &THEN - PUBLISH "Prolint_AddResult":U -&ELSE - RUN Publish_AddResult IN hPubSub -&ENDIF +TODO: delete this file Modified: trunk/prolint/rtb/checkin-handler.p =================================================================== --- trunk/prolint/rtb/checkin-handler.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/rtb/checkin-handler.p 2006-03-14 21:01:26 UTC (rev 262) @@ -26,7 +26,6 @@ ======================================================================================= */ {prolint/dlc-version.i} -{prolint/v8pubsub.i} {rtb/g/rtbglobl.i} @@ -57,8 +56,8 @@ DEFINE VARIABLE ModuleToWatchFor AS CHARACTER NO-UNDO. DEFINE VARIABLE my-inc AS CHARACTER NO-UNDO INITIAL "programmer,manager,compltd-by":U. -{prolint/subscribe.i "Prolint_AddResult"} -{prolint/subscribe.i "Prolint_Status_Profile"} +SUBSCRIBE TO "Prolint_AddResult" ANYWHERE. +SUBSCRIBE TO "Prolint_Status_Profile" ANYWHERE. RETURN. @@ -309,11 +308,7 @@ DEFINE VARIABLE hw AS HANDLE NO-UNDO. DEFINE VARIABLE prevFile AS CHARACTER NO-UNDO. - &IF {&pubsub} &THEN - UNSUBSCRIBE TO ALL. - &ELSE - {prolint/unsubscribe.i} - &ENDIF + UNSUBSCRIBE TO ALL. /* launch logwin if it is not already running */ LogwinRunning = FALSE. @@ -325,33 +320,29 @@ hw = hw:NEXT-SIBLING. END. IF NOT LogwinRunning THEN - &IF {&dlc-version}=8 &THEN - RUN prolint/outputhandlers/logwin8.w PERSISTENT. - &ELSE - RUN prolint/outputhandlers/logwin.w PERSISTENT. - &ENDIF + RUN VALUE(DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.resultwindow")) PERSISTENT. /* show all messages in the logwin */ - {prolint/publish_char.i "Prolint_Status_Profile" "CurrentProfile"} - {prolint/publish_log.i "Prolint_InitializeResults" TRUE} + PUBLISH "Prolint_Status_Profile" ("CurrentProfile"). + PUBLISH "Prolint_InitializeResults" (TRUE). FOR EACH tt_lint : IF prevFile <> tt_lint.ttCompUnit THEN DO: prevFile = tt_lint.ttCompUnit. - {prolint/publish_char.i "Prolint_Status_FileStart" prevFile} + PUBLISH "Prolint_Status_FileStart" (prevFile). END. - {prolint/publish_result.i} (tt_lint.ttCompUnit, - tt_lint.ttSource, - tt_lint.ttLine, - tt_lint.ttDescription, - tt_lint.ttRuleID, - tt_lint.ttSeverity). + PUBLISH "Prolint_AddResult":U (tt_lint.ttCompUnit, + tt_lint.ttSource, + tt_lint.ttLine, + tt_lint.ttDescription, + tt_lint.ttRuleID, + tt_lint.ttSeverity). END. - {prolint/publish.i "Prolint_FinalizeResults"} + PUBLISH "Prolint_FinalizeResults". /* finally determine the return value. Modified: trunk/prolint/ruleparams.i =================================================================== --- trunk/prolint/ruleparams.i 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/ruleparams.i 2006-03-14 21:01:26 UTC (rev 262) @@ -43,15 +43,8 @@ IF LOGICAL(DYNAMIC-FUNCTION("ProlintProperty", "filters.IgnoreAppbuilderstuff"))=FALSE THEN IgnoreAB = FALSE. -/* use hLintSuper as super-procedure or as normal procedure? */ -&IF DEFINED(EXCLUDE-superprocedure)=0 &THEN - &GLOBAL-DEFINE insuper - RUN SetRuleParameters IN hLintSuper(pragma_number, severity, ignoreAB). - THIS-PROCEDURE:ADD-SUPER-PROCEDURE(hLintSuper). -&ELSE - &GLOBAL-DEFINE insuper IN hLintSuper - RUN SetRuleParameters IN hLintSuper(pragma_number, severity, ignoreAB, THIS-PROCEDURE:HANDLE). -&ENDIF +RUN SetRuleParameters IN hLintSuper(pragma_number, severity, ignoreAB). +THIS-PROCEDURE:ADD-SUPER-PROCEDURE(hLintSuper). {proparse/api/proparse.i hparser} Modified: trunk/prolint/rules/_template.p =================================================================== --- trunk/prolint/rules/_template.p 2006-03-14 00:16:02 UTC (rev 261) +++ trunk/prolint/rules/_template.p 2006-03-14 21:01:26 UTC (rev 262) @@ -40,7 +40,7 @@ */ - RUN searchNode {&insuper} (hTopnode, /* "Program_root" node */ + RUN searchNo... [truncated message content] |
From: <ju...@us...> - 2006-03-14 00:16:12
|
Revision: 261 Author: jurjen Date: 2006-03-13 16:16:02 -0800 (Mon, 13 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=261&view=rev Log Message: ----------- all the mods that Carl Verbiest sent us, except his RTB integration. Added Paths: ----------- tags/release_64/ Copied: tags/release_64 (from rev 260, trunk/prolint) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-13 23:17:47
|
Revision: 260 Author: jurjen Date: 2006-03-13 15:17:38 -0800 (Mon, 13 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=260&view=rev Log Message: ----------- Documentation changes Modified Paths: -------------- trunk/prolint/help/customization.menu trunk/prolint/help/history.htxt trunk/prolint/help/outputhandler.htxt trunk/prolint/prolint.properties.p Removed Paths: ------------- trunk/prolint/help/v8pubsub.htxt Modified: trunk/prolint/help/customization.menu =================================================================== --- trunk/prolint/help/customization.menu 2006-03-13 21:29:41 UTC (rev 259) +++ trunk/prolint/help/customization.menu 2006-03-13 23:17:38 UTC (rev 260) @@ -1,6 +1,5 @@ "overview.htm" "source overview" "run_prolint.htm" "wrapper procedures" -"v8pubsub.htm" "Publish/Subscribe in Progress 8" "newrule.htm" "how to create a new rule" "customrule.htm" "how to create a custom rule" "outputhandler.htm" "how to create a new outputhandler" Modified: trunk/prolint/help/history.htxt =================================================================== --- trunk/prolint/help/history.htxt 2006-03-13 21:29:41 UTC (rev 259) +++ trunk/prolint/help/history.htxt 2006-03-13 23:17:38 UTC (rev 260) @@ -9,6 +9,33 @@ - when running TTY, how do you change settings? --> +<h5>prolint release 64, 14 March 2006:</h5> + +<b>Important: Prolint 64 does not run in Progress version 8 anymore. +If you are still running Progress 8, then please use Prolint release 63.</b> +<p> +<ul> + <li>support for HP-UX. By John Green + <li>prolint tries to compile with and without STREAM-IO option so a + sourcefile that was designed for GUI can be processed in a TTY batch + session. By John Green + <li>rule "nobrackets": added some more methods to check for (BUFFER- + CREATE,BUFFER-RELEASE,QUERY-CLOSE). By John Green + <li>desktop.w used to give a warning when adecomm.pl is not extracted. + This is changed: the warning only fires when desktop.w is not + compiled. By Carl Verbiest + <li>added new rule <a href="rules/nameconv.htm">"nameconv"</a>. By Carl Verbiest + <li>improved position of Prolint button in Roundtable desktop. By Carl Verbiest + <li>added Prolint menu-items to <a href="appbuilder.htm">Appbuilder</a>. By Carl Verbiest + <li>added new outputhandler "logexcel.p" for output to Excel (in + Office 11 only). By Carl Verbiest + <li>improved rule "findstate": when a buffer definition is not found + in the current ip/udf, then search for it in the scope of the + compilation unit. By Carl Verbiest + <li>added configuration file "prolint.properties.p" for more flexible + customization. The old file "customize.i" is gone. By Jurjen +</ul> + <h5>prolint release 63, 25 Januari 2005:</h5> <ul> <li>tuned function RelativeFilename in lintsuper.p some more.<br /> Modified: trunk/prolint/help/outputhandler.htxt =================================================================== --- trunk/prolint/help/outputhandler.htxt 2006-03-13 21:29:41 UTC (rev 259) +++ trunk/prolint/help/outputhandler.htxt 2006-03-13 23:17:38 UTC (rev 260) @@ -29,7 +29,6 @@ usually from within the event-procedure for event "Prolint_FinalizeResults". <br> <b>important:</b> just before the procedure deletes itself it is important to include {prolint/unsubscribe.i}. -See <a href="v8pubsub.htm">Publish/Subscribe in Progress 8</a> for explanation. <p> The outputhandler subscribes to, and responds to (some) of the following published events: <hr size=1> Deleted: trunk/prolint/help/v8pubsub.htxt =================================================================== --- trunk/prolint/help/v8pubsub.htxt 2006-03-13 21:29:41 UTC (rev 259) +++ trunk/prolint/help/v8pubsub.htxt 2006-03-13 23:17:38 UTC (rev 260) @@ -1,34 +0,0 @@ -<h1>Publish/Subscribe in Progress 8</h1> - -Prolint is maintained at:<br> -<a href="http://sourceforge.net/projects/prolint"><img src="http://sourceforge.net/sflogo.php?group_id=61115&type=2" width="125" height="37" border="0" alt="SourceForge.net Logo"></a> -<p> - -Prolint relies on PUBLISH and SUBSCRIBE to manage the outputhandlers. -<p> -If Prolint wouldn't have to be Progress 8 compatible, it could just use native PUBLISH/SUBSCRIBE keywords. -But in Progress 8 we must get the same results using RUN statements only. -You will see a bunch of includefiles and preprocessors to make this happen. -<p> -Here's how it works: -<p> -Most sourcefiles include {prolint/dlc-version.i} which defines preprocessor "pubsub" as TRUE or FALSE: -TRUE if you are running in Progress 9 and FALSE if you are running in Progress 8. -<p> -A sourcefile that needs to PUBLISH or SUBSCRIBE also includes {prolint/v8pubsub.i} near the source header. -<br> -This includefile is empty if pubsub=TRUE, else it defines variable hPubsub which is a procedure-handle to -the persistent procedure prolint/v8pubsub.p. -<p> -Instead of simply using the SUBSCRIBE keyword, you have to use the {prolint/subscribe.i} incudefile which -determines if you can just SUBSCRIBE or run an internal proc in v8pubsub.p. -<br> -Likewise, instead of just using PUBLISH you have to use one of the {prolint/publish***.i} incudefiles. -<p> -If your sourcefile contains the {prolint/subscribe.i} includefile, it MUST also include {prolint/unsubscribe.i} -just before the procedure ends. This manages the lifetime of persistent procedure v8pubsub.p: -it has to stay persistent as long as any of the subscribers is still running; -should not be deleted from memory before the last subscriber dies. <br> -Since some outputhandlers are ADE-persistent (like logwin.w) and may be reused by the next prolint run, there is really -no way of knowing when it safe to close v8pubsub.p, unless v8pubsub.p manages its own lifetime which is triggered by {prolint/unsubscribe.i}. - Modified: trunk/prolint/prolint.properties.p =================================================================== --- trunk/prolint/prolint.properties.p 2006-03-13 21:29:41 UTC (rev 259) +++ trunk/prolint/prolint.properties.p 2006-03-13 23:17:38 UTC (rev 260) @@ -77,7 +77,7 @@ RUN SetProlintProperty ("filters.nowarnlist", STRING( TRUE )). - /* "filters.Appbuilderstuff" + /* "filters.IgnoreAppbuilderstuff" if TRUE then try to ignore warnings caused from AB-generated code */ RUN SetProlintProperty ("filters.IgnoreAppbuilderstuff", STRING( TRUE )). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-13 21:30:22
|
Revision: 259 Author: jurjen Date: 2006-03-13 13:29:41 -0800 (Mon, 13 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=259&view=rev Log Message: ----------- customize.i is now empty. All properties are now in prolint.properties.p and are evaluated at run-time Modified Paths: -------------- trunk/prolint/customize.i trunk/prolint/desktop.w trunk/prolint/filters/exclude.p trunk/prolint/filters/filterparams.i trunk/prolint/filters/ignoreab.p trunk/prolint/filters/nowarn.p trunk/prolint/help/customization.menu trunk/prolint/help/integrations.menu trunk/prolint/help/newrule.htxt trunk/prolint/help/opensource.htxt trunk/prolint/help/release.ini trunk/prolint/help/turbolint.htxt trunk/prolint/lintcfg.w trunk/prolint/lintsuper.p trunk/prolint/outputhandlers/PRO4mfile.p trunk/prolint/outputhandlers/dlgfilter.w trunk/prolint/outputhandlers/ed4win.p trunk/prolint/outputhandlers/logexcel.p trunk/prolint/outputhandlers/logfile.p trunk/prolint/outputhandlers/logwin.w trunk/prolint/outputhandlers/logwin8.w trunk/prolint/outputhandlers/prolintdb.p trunk/prolint/outputhandlers/regrlog.p trunk/prolint/outputhandlers/showhtml.p trunk/prolint/outputhandlers/tabfile.p trunk/prolint/prolint.p trunk/prolint/rtb/checkin-handler.p trunk/prolint/ruleparams.i trunk/prolint/rules/ifindent.p trunk/prolint/rules/message.p trunk/prolint/rules/sortaccess.p trunk/prolint/rules/strattrib.p trunk/prolint/rules/varusage.p trunk/prolint/rules/wholeindex.p Added Paths: ----------- trunk/prolint/help/appbuilder.htxt trunk/prolint/help/contact.html trunk/prolint/prolint.properties.p trunk/prolint/propsuper.p Modified: trunk/prolint/customize.i =================================================================== --- trunk/prolint/customize.i 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/customize.i 2006-03-13 21:29:41 UTC (rev 259) @@ -25,79 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ================================================================== */ - -/* - &GLOBAL-DEFINE EXCLUDE-AppbuilderStuff - if defined, don't suppress prolint warnings for statements that are generated by Application Builder. - if not defined, try to suppress warnings for statements that are generated by Application Builder. -*/ + /* this include-file is empty. Prolint does not use it anymore. + Instead, we now use prolint/prolint.properties.p to set props at run-time! */ -/* - &GLOBAL-DEFINE EXCLUDE-SupportPragmas - if defined, ignore {&proparse prolint-nowarn()} directives - if not defined, suppress warnings for statements directly following a matching {&proparse prolint-nowarn(ruleid)} -*/ - - -/* - &GLOBAL-DEFINE EXCLUDE-Nowarn-list - if defined, don't read nowarn.lst - if not defined, read nowarn.lst and suppress warnings for statements listed in nowarn.lst -*/ - - -/* - &GLOBAL-DEFINE EXCLUDE-Status-timer - This defines how logwin.w counts time. - if not defined, logwin.w shows total time for prolint except time for PreAnalyze (in prolint.p) - in defined, logwin.w shows total time for prolint -*/ - &GLOBAL-DEFINE EXCLUDE-Status-timer - - -/* - &GLOBAL-DEFINE EXCLUDE-remove-ldbname - if defined, don't remove the ldbname from tablename (send "sports.customer" to outputhandler) - if not defined, remove the ldbname from tablename (send "customer" to outputhandler) -*/ - - -/* - &GLOBAL-DEFINE EXCLUDE-superprocedure - if defined, procedure lintsuper.p will not be a super procedure (Progress 8 compatible). - if not defined, procedure lintsuper.p will be a super procedure when compiled with Progress 9. -*/ - - -/* - &GLOBAL-DEFINE IndentTabSize 8 - if defined, rule ifindent.p will use this value for the tab size when calculating indents. - if not defined, rule ifindent.p will use a tab size of 8 when calculating indents. -*/ - -/* &GLOBAL-DEFINE varusage_OutputParamsAreUsed YES|NO - customization for rule "varusage": - if YES, output parameters are always considered to be "used" and will not cause a warning. - if NO, output parameters are considered to be "not used" unless they are explicitly assigned */ - -&IF DEFINED(varusage_OutputParamsAreUsed)=0 &THEN -&GLOBAL-DEFINE varusage_OutputParamsAreUsed YES -&ENDIF - - -/* &GLOBAL-DEFINE Turbolint_IgnoreRules [comma-separated list without quotes] - IF turbolint contains a 3GL version of a rule but you prefer to run the 4GL version, - add the name of the rule to this comma-separated list. - For example, to use the 4GL versions of "noundo" and "varusage" : - &GLOBAL-DEFINE Turbolint_IgnoreRules noundo,varusage -*/ - - -/* - &GLOBAL-DEFINE EXCLUDE-Exclude-list FOO - Uncomment this if you do not want to use the file pattern filter, aka Ildefonzo Filter :-) -*/ - - - Modified: trunk/prolint/desktop.w =================================================================== --- trunk/prolint/desktop.w 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/desktop.w 2006-03-13 21:29:41 UTC (rev 259) @@ -41,7 +41,6 @@ /* *************************** Definitions ************************** */ -{prolint/customize.i} {prolint/dlc-version.i} /* Parameters Definitions --- */ Modified: trunk/prolint/filters/exclude.p =================================================================== --- trunk/prolint/filters/exclude.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/filters/exclude.p 2006-03-13 21:29:41 UTC (rev 259) @@ -32,18 +32,14 @@ INDEX idx_1 AS PRIMARY SourceFile RuleID. ON "CLOSE":U OF THIS-PROCEDURE DO: - DELETE PROCEDURE THIS-PROCEDURE. + DELETE PROCEDURE THIS-PROCEDURE. END. - &IF DEFINED( EXCLUDE-Exclude-list )=0 &THEN RUN FillExcludeList. - &ENDIF - RETURN. -&IF DEFINED(EXCLUDE-Exclude-list)=0 &THEN PROCEDURE FillExcludeList : /* purpose: read a list of warnings that you want to exclude. store them in a temp-table for fast retrieval. @@ -58,6 +54,9 @@ DELETE tt_exclude. END. + IF NOT LOGICAL(DYNAMIC-FUNCTION("ProlintProperty", "filters.excludelist")) THEN + RETURN. + /* file format: sourcefile|RuleID1, RuleID2 .... RuleID3 @@ -91,9 +90,7 @@ END. END PROCEDURE. -&ENDIF - PROCEDURE GetFilterResult : /* purpose: this procedure is called from prolint/filterplugins.p just before the Modified: trunk/prolint/filters/filterparams.i =================================================================== --- trunk/prolint/filters/filterparams.i 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/filters/filterparams.i 2006-03-13 21:29:41 UTC (rev 259) @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------ */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} Modified: trunk/prolint/filters/ignoreab.p =================================================================== --- trunk/prolint/filters/ignoreab.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/filters/ignoreab.p 2006-03-13 21:29:41 UTC (rev 259) @@ -24,14 +24,15 @@ {prolint/filters/filterparams.i} +DEFINE VARIABLE IgnoreAppbuilderstuff AS LOGICAL NO-UNDO. +IgnoreAppbuilderstuff = LOGICAL ( DYNAMIC-FUNCTION ("ProlintProperty", "filters.IgnoreAppbuilderstuff")). + ON "CLOSE":U OF THIS-PROCEDURE DO: {prolint/unsubscribe.i} DELETE PROCEDURE THIS-PROCEDURE. END. -&IF DEFINED(EXCLUDE-AppbuilderStuff)=0 &THEN - /* tt_codesection helps suppressing warnings from UIB/AppBuilder-generated code */ DEFINE TEMP-TABLE tt_codesection NO-UNDO FIELD sourcefile AS CHARACTER @@ -62,24 +63,22 @@ RETURN FALSE. /* pLineNumber may be 0 when you are inspecting a synthetic node, FALSE just appears to make a little bit more sense than TRUE */ - &IF DEFINED(EXCLUDE-AppbuilderStuff)>0 &THEN - /* do not ignore AppBuilder stuff.. perhaps because you never use AppBuilder? - don't waste time looking for &ANALYZE_SUSPEND, just assume this line is not AbGenerated.. */ + IF NOT IgnoreAppbuilderstuff THEN RETURN FALSE. - &ELSE + ELSE DO: - /* did we already scan this sourcefile for &ANALYZE_SUSPEND directives? */ - IF NOT CAN-FIND(FIRST tt_codesection WHERE tt_codesection.sourcefile = pSourceFile) THEN - RUN AbFindSections (pSourceFile). + /* did we already scan this sourcefile for &ANALYZE_SUSPEND directives? */ + IF NOT CAN-FIND(FIRST tt_codesection WHERE tt_codesection.sourcefile = pSourceFile) THEN + RUN AbFindSections (pSourceFile). - /* if this line is in a codesection, then it is not AB-generated */ - FIND FIRST tt_codesection WHERE tt_codesection.sourcefile = pSourceFile - AND tt_codesection.firstline <= pLineNumber - AND tt_codesection.lastline >= pLineNumber - NO-ERROR. - RETURN NOT (AVAILABLE tt_codesection). + /* if this line is in a codesection, then it is not AB-generated */ + FIND FIRST tt_codesection WHERE tt_codesection.sourcefile = pSourceFile + AND tt_codesection.firstline <= pLineNumber + AND tt_codesection.lastline >= pLineNumber + NO-ERROR. + RETURN NOT (AVAILABLE tt_codesection). - &ENDIF + END. END FUNCTION. @@ -162,7 +161,6 @@ END. END PROCEDURE. -&ENDIF PROCEDURE GetFilterResult : @@ -183,9 +181,10 @@ IF pIgnoreAB = FALSE THEN RETURN. - &IF DEFINED( EXCLUDE-AppbuilderStuff )=0 &THEN - filtered = IsAbGenerated ( pFullSource, pLineNumber ). - &ENDIF + IF IgnoreAppbuilderstuff THEN + filtered = IsAbGenerated ( pFullSource, pLineNumber ). + ELSE + filtered = FALSE. END PROCEDURE. Modified: trunk/prolint/filters/nowarn.p =================================================================== --- trunk/prolint/filters/nowarn.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/filters/nowarn.p 2006-03-13 21:29:41 UTC (rev 259) @@ -24,7 +24,10 @@ {prolint/filters/filterparams.i} +DEFINE VARIABLE useThisFilter AS LOGICAL NO-UNDO. +useThisFilter = LOGICAL ( DYNAMIC-FUNCTION("ProlintProperty", "filters.nowarnlist")). + DEFINE TEMP-TABLE tt_ignore NO-UNDO FIELD Sourcefile AS CHARACTER FIELD RuleID AS CHARACTER @@ -35,16 +38,13 @@ DELETE PROCEDURE THIS-PROCEDURE. END. -&IF DEFINED(EXCLUDE-Nowarn-list)=0 &THEN -RUN FillIgnoreList (ProfileDirectory). -&ENDIF +IF useThisFilter THEN + RUN FillIgnoreList (ProfileDirectory). RETURN. -&IF DEFINED(EXCLUDE-Nowarn-list)=0 &THEN - PROCEDURE FillIgnoreList : /* purpose: read a list of warnings that you want to ignore. store them in a temp-table for fast retrieval. @@ -134,7 +134,6 @@ END PROCEDURE. -&ENDIF PROCEDURE GetFilterResult : /* purpose: @@ -152,9 +151,13 @@ DEFINE OUTPUT PARAMETER filtered AS LOGICAL NO-UNDO. - filtered = CAN-FIND(tt_ignore WHERE tt_ignore.SourceFile = pRelativeSource - AND tt_ignore.RuleID = pRuleID - AND tt_ignore.LineNumber = pLineNumber). + IF useThisFilter THEN + filtered = CAN-FIND(tt_ignore WHERE tt_ignore.SourceFile = pRelativeSource + AND tt_ignore.RuleID = pRuleID + AND tt_ignore.LineNumber = pLineNumber). + ELSE + filtered = FALSE. + END PROCEDURE. Added: trunk/prolint/help/appbuilder.htxt =================================================================== --- trunk/prolint/help/appbuilder.htxt (rev 0) +++ trunk/prolint/help/appbuilder.htxt 2006-03-13 21:29:41 UTC (rev 259) @@ -0,0 +1,28 @@ + +<h1>Appbuilder integration</h1> + +The Progress Appbuilder already has a menu-item "Check Syntax", +you can also add a menu-item "Prolint" for the extensive code inspection +of Prolint. + +<p> + +To create the new menu-item you will have to install a custom event. +This is how: locate file "gui/adecomm/_adeevnt.p" in +the DLC directory and add this single line to it: +<pre> + {prolint/ab/custom_evnt.i} +</pre> +You may have to compile...save adecomm/_adeevnt.p and restart +the Appbuilder before the change has effect. + +<p> +Now, when you open a file in the Appbuilder and choose the Prolint +menu-item, the currently selected file will be inspected by Prolint. You +can configure a profile with the name "Appbuilder" to specify which +rules and outputhandlers are used. +<br /> +Notice however that only the <b>saved</b> file will be inspected, not +the version in memory that may be different from the saved version! + + Added: trunk/prolint/help/contact.html =================================================================== --- trunk/prolint/help/contact.html (rev 0) +++ trunk/prolint/help/contact.html 2006-03-13 21:29:41 UTC (rev 259) @@ -0,0 +1,24 @@ +<head> +<title>File Not Found</title> +<STYLE> +BODY {font-family: "Arial"; font-size: 10pt; } +P {font-family: "Arial"; font-size: 10pt; } +H1 {font-size: 20pt; color: 800040; text-align: Left; } +A:hover {color: #ff4444;} +</STYLE> +</head> +<body bgcolor=#FFFFFF> +<H1>Contact information</h1> + +You can email me, but unfortunately I can't write my email address in a clear way, because address harvesters are continuously scanning HTML-pages looking for new victims to send spam to. + +<p> +My email address is: <pre>jurjen at prolint.org</pre> +Of course, you must replace " at ", including the whitespace, by the famous symbol also known as Shift-2. +<p> +Sorry for the inconvenience. + + +</BODY> +</head> + Modified: trunk/prolint/help/customization.menu =================================================================== --- trunk/prolint/help/customization.menu 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/help/customization.menu 2006-03-13 21:29:41 UTC (rev 259) @@ -2,7 +2,6 @@ "run_prolint.htm" "wrapper procedures" "v8pubsub.htm" "Publish/Subscribe in Progress 8" "newrule.htm" "how to create a new rule" -"http://twiki.prolint.org/SnippetIndex" "Some code snippets, commonly used in rules" "customrule.htm" "how to create a custom rule" "outputhandler.htm" "how to create a new outputhandler" "regrtest.htm" "regression testing" Modified: trunk/prolint/help/integrations.menu =================================================================== --- trunk/prolint/help/integrations.menu 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/help/integrations.menu 2006-03-13 21:29:41 UTC (rev 259) @@ -1,3 +1,4 @@ +"appbuilder.htm" "Appbuilder integration" "roundtable.htm" "Roundtable integration" "check-in.htm" "Roundtable check-in validation" "config.htm" "configure Roundtable check-in validation" Modified: trunk/prolint/help/newrule.htxt =================================================================== --- trunk/prolint/help/newrule.htxt 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/help/newrule.htxt 2006-03-13 21:29:41 UTC (rev 259) @@ -82,13 +82,7 @@ </ol> <h2>Progress 8-9 compatibility issues</h2> -Do not use PUBLISH or SUBSCRIBE keywords. Rules don't usually PUBLISH anything but if you have to, please consider the -{prolint/v8pubsub.i} and {prolint/publish.i} files, see page <a href="v8pubsub.htm">Publish/Subscribe in Progress 8</a>. -<p> -Even though lintsuper.p is loaded as a super-procedure to every rule in Progress 9, please be aware that Progress 8 -doesn't know the concept of super-procs. So please use "RUN procname {&insuper}". -<br> -{&insuper} is defined as blank in Progress 9 and as "IN hLintSuper" in Progress 8. -<p> -If you are running Progress 9 you can test the behavior of {&insuper} : -just add "&GLOBAL-DEFINE EXCLUDE-superprocedure" to the bottom of file "prolint/customize.i" and run to see if all still works. + +Prolint release 63 runs in Progress 8 and in Progress 9. Prolint release 64 (and up) does not run in Progress 8 anymore. + + Modified: trunk/prolint/help/opensource.htxt =================================================================== --- trunk/prolint/help/opensource.htxt 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/help/opensource.htxt 2006-03-13 21:29:41 UTC (rev 259) @@ -23,9 +23,10 @@ <br /> So there is a bulletin board and there is an e-mail list. Both have their merits; the advantage of a bulletin board is that topics are organized in categories while an e-mail list is usually sorted by DateTime. -<h2>CVS Repository</h2> -The sources for Prolint are maintained in a CVS tree at sourceforge.net. If you have programmed something you would -like to share, you can sign up as developer at sourceforge and commit your sources directly to the CVS repository. +<h2>Sources and Version Control</h2> +The sources for Prolint are maintained in a Subversion repository at sourceforge.net. If you have programmed something you would +like to share, you can sign up as developer at sourceforge and commit +your sources directly to the Subversion repository. Alternatively, you can attach your modifications in an email to <a href="contact.htm">me</a> <br>I will then integrate it in Prolint, post the new sources to http://www.prolint.org and announce it to pro...@pe.... Modified: trunk/prolint/help/release.ini =================================================================== --- trunk/prolint/help/release.ini 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/help/release.ini 2006-03-13 21:29:41 UTC (rev 259) @@ -1,2 +1,2 @@ [current] -prolint=63 +prolint=64 Modified: trunk/prolint/help/turbolint.htxt =================================================================== --- trunk/prolint/help/turbolint.htxt 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/help/turbolint.htxt 2006-03-13 21:29:41 UTC (rev 259) @@ -20,12 +20,16 @@ <a href="customrule.htm">custom rules</a> allways take precendence over standard rules. If you are modifying an existing rule it makes sense to copy it from directory "prolint/rules" to "prolint/custom/rules". Don't forget to also list the custom rule in file "prolint/custom/rules/rules.d". <p> -If you don't want to make a custom rule, but still want to run a 4GL rule instead of a 3GL rule, then you can specify so in file "prolint/customize.i" : <br> +If you don't want to make a custom rule, but still want to run a 4GL +rule instead of a 3GL rule, then you can specify so in file +"prolint/custom/prolint.properties.p" : <br> For example: <pre> -&GLOBAL-DEFINE Turbolint_IgnoreRules noundo,varusage + RUN SetProlintProperty ("Turbolint.RulesToIgnore", "noundo,varusage"). </pre> -will force Turbolint to NOT run its built-in versions of rule "noundo" and "varusage", and Prolint will run the 4GL versions instead. +will force Turbolint to NOT run its built-in versions of rule "noundo" +and "varusage", and Prolint will run the 4GL versions instead. See +file prolint/prolint.properties.p for more details. <p> Finally, you can simply remove or rename file "prolint/turbolint.dll" so Prolint cannot find it. Prolint will then simply fall back to its 4GL rules. <p> Modified: trunk/prolint/lintcfg.w =================================================================== --- trunk/prolint/lintcfg.w 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/lintcfg.w 2006-03-13 21:29:41 UTC (rev 259) @@ -54,7 +54,6 @@ CREATE WIDGET-POOL. /* *************************** Definitions ************************** */ -{prolint/customize.i} {prolint/dlc-version.i} /* Parameters Definitions --- */ Modified: trunk/prolint/lintsuper.p =================================================================== --- trunk/prolint/lintsuper.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/lintsuper.p 2006-03-13 21:29:41 UTC (rev 259) @@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------ */ -/* customize.i allows to switch some features on/off */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} Modified: trunk/prolint/outputhandlers/PRO4mfile.p =================================================================== --- trunk/prolint/outputhandlers/PRO4mfile.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/PRO4mfile.p 2006-03-13 21:29:41 UTC (rev 259) @@ -5,7 +5,6 @@ You can also import easily in Excel by : Jurjen Dijkstra & Yuriy Setrko (PRO4m adjustment) ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} Modified: trunk/prolint/outputhandlers/dlgfilter.w =================================================================== --- trunk/prolint/outputhandlers/dlgfilter.w 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/dlgfilter.w 2006-03-13 21:29:41 UTC (rev 259) @@ -39,7 +39,6 @@ ----------------------------------------------------------------------- */ /* *************************** Definitions ************************** */ -{prolint/customize.i} {prolint/dlc-version.i} Modified: trunk/prolint/outputhandlers/ed4win.p =================================================================== --- trunk/prolint/outputhandlers/ed4win.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/ed4win.p 2006-03-13 21:29:41 UTC (rev 259) @@ -24,7 +24,6 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} Modified: trunk/prolint/outputhandlers/logexcel.p =================================================================== --- trunk/prolint/outputhandlers/logexcel.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/logexcel.p 2006-03-13 21:29:41 UTC (rev 259) @@ -22,7 +22,6 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ====================================================================== */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} @@ -48,7 +47,8 @@ END. ELSE DO: chExcel:VISIBLE = TRUE. - logfile = subst("&1prolint&2.xml", session:temp-directory, replace(string(time, "hh:mm:ss"), ":", "")). + logfile = substitute("&1prolint&2.xml", DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.outputdirectory"), + replace(string(time, "hh:mm:ss"), ":", "")). OUTPUT TO VALUE(logfile). PUT UNFORMATTED Modified: trunk/prolint/outputhandlers/logfile.p =================================================================== --- trunk/prolint/outputhandlers/logfile.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/logfile.p 2006-03-13 21:29:41 UTC (rev 259) @@ -22,16 +22,17 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} -DEFINE VARIABLE logfile AS CHAR NO-UNDO INITIAL "prolint.log":U. +DEFINE VARIABLE logfile AS CHAR NO-UNDO. {prolint/subscribe.i "Prolint_InitializeResults"} {prolint/subscribe.i "Prolint_AddResult"} {prolint/subscribe.i "Prolint_FinalizeResults"} - + +logfile = SUBSTITUTE("&1prolint.log", DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.outputdirectory")). + RETURN. Modified: trunk/prolint/outputhandlers/logwin.w =================================================================== --- trunk/prolint/outputhandlers/logwin.w 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/logwin.w 2006-03-13 21:29:41 UTC (rev 259) @@ -73,7 +73,6 @@ /* Local Variable Definitions --- */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} @@ -872,10 +871,8 @@ {prolint/subscribe.i "Prolint_Status_Profile"} {prolint/subscribe.i "Prolint_Status_Progress"} - &IF DEFINED(EXCLUDE-Status-timer)=0 &THEN - {prolint/subscribe.i "Prolint_Status_StartTimer"} - {prolint/subscribe.i "Prolint_Status_StopTimer"} - &ENDIF + {prolint/subscribe.i "Prolint_Status_StartTimer"} + {prolint/subscribe.i "Prolint_Status_StopTimer"} SUBSCRIBE TO "Prolint_SendLogWin_Ed4Win":U ANYWHERE. @@ -1985,17 +1982,14 @@ END PROCEDURE. -&IF DEFINED(EXCLUDE-Status-timer)=0 &THEN +PROCEDURE Prolint_Status_StartTimer : + starttime = ETIME(NO). +END PROCEDURE. - PROCEDURE Prolint_Status_StartTimer : - starttime = ETIME(NO). - END PROCEDURE. - - PROCEDURE Prolint_Status_StopTimer : - elapsedtime = ETIME(NO) - starttime. - END PROCEDURE. +PROCEDURE Prolint_Status_StopTimer : + elapsedtime = ETIME(NO) - starttime. +END PROCEDURE. -&ENDIF /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME Modified: trunk/prolint/outputhandlers/logwin8.w =================================================================== --- trunk/prolint/outputhandlers/logwin8.w 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/logwin8.w 2006-03-13 21:29:41 UTC (rev 259) @@ -45,7 +45,6 @@ /* Local Variable Definitions --- */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} @@ -741,10 +740,8 @@ {prolint/subscribe.i "Prolint_Status_Profile"} {prolint/subscribe.i "Prolint_Status_Progress"} - &IF DEFINED(EXCLUDE-Status-timer)=0 &THEN - {prolint/subscribe.i "Prolint_Status_StartTimer"} - {prolint/subscribe.i "Prolint_Status_StopTimer"} - &ENDIF + {prolint/subscribe.i "Prolint_Status_StartTimer"} + {prolint/subscribe.i "Prolint_Status_StopTimer"} &IF {&dlc-version}>8 &THEN SUBSCRIBE TO "Prolint_SendLogWin_Ed4Win":U ANYWHERE. @@ -1124,17 +1121,14 @@ END PROCEDURE. -&IF DEFINED(EXCLUDE-Status-timer)=0 &THEN +PROCEDURE Prolint_Status_StartTimer : + starttime = ETIME(NO). +END PROCEDURE. - PROCEDURE Prolint_Status_StartTimer : - starttime = ETIME(NO). - END PROCEDURE. - - PROCEDURE Prolint_Status_StopTimer : - elapsedtime = ETIME(NO) - starttime. - END PROCEDURE. +PROCEDURE Prolint_Status_StopTimer : + elapsedtime = ETIME(NO) - starttime. +END PROCEDURE. -&ENDIF /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME Modified: trunk/prolint/outputhandlers/prolintdb.p =================================================================== --- trunk/prolint/outputhandlers/prolintdb.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/prolintdb.p 2006-03-13 21:29:41 UTC (rev 259) @@ -23,7 +23,6 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} Modified: trunk/prolint/outputhandlers/regrlog.p =================================================================== --- trunk/prolint/outputhandlers/regrlog.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/regrlog.p 2006-03-13 21:29:41 UTC (rev 259) @@ -23,7 +23,6 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} Modified: trunk/prolint/outputhandlers/showhtml.p =================================================================== --- trunk/prolint/outputhandlers/showhtml.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/showhtml.p 2006-03-13 21:29:41 UTC (rev 259) @@ -22,13 +22,18 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} -DEFINE VARIABLE logfile AS CHAR NO-UNDO INITIAL "lint_results.htm":U. +DEFINE VARIABLE logfile AS CHAR NO-UNDO. DEFINE VARIABLE oddrow AS LOGICAL NO-UNDO. +DEFINE VARIABLE prolint_url AS CHAR NO-UNDO. +logfile = SUBSTITUTE("&1&2lint_result.html", DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.outputdirectory"), + DYNAMIC-FUNCTION("ProlintProperty", "logincode")). + +prolint_url = DYNAMIC-FUNCTION("ProlintProperty", "url to help/rules"). + /* cache helpfile locations */ DEFINE TEMP-TABLE tt_help NO-UNDO FIELD ruleid AS CHARACTER @@ -46,22 +51,9 @@ FUNCTION helpfile RETURNS CHARACTER (pRuleid AS CHARACTER) : /* purpose: find url to helpfile of pRuleid. Use a temp-table to cache results for performance */ - FIND tt_help WHERE tt_help.ruleid = pRuleId NO-ERROR. - IF AVAILABLE tt_help THEN - RETURN tt_help.url. - - FILE-INFO:FILE-NAME = "prolint/help/rules/":U + pRuleId + ".htm":U. - IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: - CREATE tt_help. - ASSIGN tt_help.ruleid = pRuleId - tt_help.url = FILE-INFO:FULL-PATHNAME. - END. - - IF AVAILABLE tt_help THEN - RETURN tt_help.url. - ELSE - RETURN "". - + + RETURN prolint_url + "/":U + pRuleId + ".htm":U. + END FUNCTION. PROCEDURE Prolint_InitializeResults : @@ -160,17 +152,11 @@ /* don't use closing tags like </body></html> so you can append to it later. most browsers don't care much about these closing tags */ - /* (try to) show the htm file in your default browser. Wonder what happens in Unix. */ - /* stupid OS-COMMAND doesn't show the fresh page if the browser is already open, - ShellExecute would be better but there is a demand for platform compatibility */ DEFINE VARIABLE fullname AS CHARACTER NO-UNDO. FILE-INFO:FILE-NAME = logfile. fullname = FILE-INFO:FULL-PATHNAME. - IF fullname NE ? THEN - IF OS-GETENV("os":U) = "Windows_NT":U THEN - OS-COMMAND NO-WAIT VALUE(fullname). - ELSE - OS-COMMAND NO-WAIT START VALUE(fullname). + IF fullname NE ? THEN + RUN prolint/openhtml.p (fullname). /* This procedure will not be invoked again, so it can exit */ {prolint/unsubscribe.i} @@ -178,3 +164,4 @@ END PROCEDURE. + Modified: trunk/prolint/outputhandlers/tabfile.p =================================================================== --- trunk/prolint/outputhandlers/tabfile.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/outputhandlers/tabfile.p 2006-03-13 21:29:41 UTC (rev 259) @@ -24,14 +24,16 @@ License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} -DEFINE VARIABLE logfile AS CHARACTER NO-UNDO INITIAL "prolint.tab":U. +DEFINE VARIABLE logfile AS CHARACTER NO-UNDO. DEFINE VARIABLE delim AS CHARACTER NO-UNDO. delim = CHR(9). /* tab */ - + +logfile = SUBSTITUTE("&1&2prolint.tab", DYNAMIC-FUNCTION("ProlintProperty", "outputhandlers.outputdirectory"), + DYNAMIC-FUNCTION("ProlintProperty", "logincode")). + {prolint/subscribe.i "Prolint_InitializeResults"} {prolint/subscribe.i "Prolint_AddResult"} {prolint/subscribe.i "Prolint_FinalizeResults"} Modified: trunk/prolint/prolint.p =================================================================== --- trunk/prolint/prolint.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/prolint.p 2006-03-13 21:29:41 UTC (rev 259) @@ -28,9 +28,7 @@ similar to bugfix 1.0d04 */ &SCOPED-DEFINE ProparseVersion "2.2b01":U -/* customize.i allows to switch some features on/off */ -{prolint/customize.i} -{prolint/dlc-version.i} +{prolint/dlc-version.i} {prolint/v8pubsub.i} DEFINE INPUT PARAMETER pSourcefile AS CHARACTER NO-UNDO. /* a single filename to lint */ @@ -61,6 +59,7 @@ DEFINE VARIABLE tmpTurbolintNowarn AS CHARACTER NO-UNDO. /* tempfile where turbolint.dll writes nowarn-lines to */ DEFINE VARIABLE hTurbolint AS INTEGER NO-UNDO. /* hInstance of turbolint.dll */ DEFINE VARIABLE hpFilterPlugins AS HANDLE NO-UNDO. +DEFINE VARIABLE hpProperties AS HANDLE NO-UNDO. {proparse/api/proparse.i hparser} @@ -88,6 +87,8 @@ FIELD sourcefile AS CHARACTER INDEX idx_sourcefile AS PRIMARY UNIQUE sourcefile. + RUN prolint/propsuper.p PERSISTENT SET hpProperties. + /* make sure hParser is invalid. We will use function VALID-HANDLE() later, in GetProparseHandle */ ASSIGN hParser = ?. @@ -117,6 +118,7 @@ MESSAGE "prolint: no valid outputhandlers specified":U VIEW-AS ALERT-BOX. {prolint/unsubscribe.i} RUN DeleteTempdir. + DELETE PROCEDURE hpProperties. RETURN. END. @@ -136,6 +138,7 @@ {prolint/publish.i "Prolint_FinalizeResults"} {prolint/unsubscribe.i} RUN DeleteTempdir. + DELETE PROCEDURE hpProperties. RETURN STRING(MaxSeverity). END. @@ -202,6 +205,7 @@ {prolint/unsubscribe.i} IF hTurbolint<>0 THEN RUN FreeLibrary (hTurbolint). + DELETE PROCEDURE hpProperties. /* stop hourglass cursor */ RUN set-hourglass(FALSE). @@ -402,7 +406,7 @@ DEFINE VARIABLE handler AS CHARACTER NO-UNDO. DEFINE VARIABLE i AS INTEGER NO-UNDO. DEFINE VARIABLE hw AS HANDLE NO-UNDO. - + /* import list of outputhandlers */ FILE-INFO:FILE-NAME = "prolint/outputhandlers/choices.d":U. IF FILE-INFO:FULL-PATHNAME <> ? THEN DO: @@ -451,16 +455,17 @@ LogwinRunning = TRUE. hw = hw:NEXT-SIBLING. END. - IF NOT LogwinRunning THEN + IF NOT LogwinRunning THEN DO: &IF {&dlc-version}=8 &THEN RUN prolint/outputhandlers/logwin8.w PERSISTENT. &ELSE RUN prolint/outputhandlers/logwin.w PERSISTENT. &ENDIF + END. END. OTHERWISE RUN VALUE("prolint/outputhandlers/":U + handler) PERSISTENT. - END. + END. END. {prolint/publish_log.i "Prolint_InitializeResults" pClearOutput} @@ -503,11 +508,7 @@ /* enable reading of PROPARSE-DIRECTIVE for Prolint pragma's */ IF VALID-HANDLE(hParser) THEN - &IF DEFINED(EXCLUDE-SupportPragmas)=0 &THEN parserConfigSet("show-proparse-directives":U, "true":U). - &ELSE - parserConfigSet("show-proparse-directives":U, "false":U). - &ENDIF /* define database aliases: */ RUN DefineAliases. @@ -679,13 +680,9 @@ p-SourceFile = FILE-INFO:FULL-PATHNAME. /* PreAnalyze creates compile listing, XREF file, token tree in proparse.dll, ... */ - &IF DEFINED(EXCLUDE-Status-timer)=0 &THEN - {prolint/publish.i "Prolint_Status_StopTimer"} - &ENDIF + {prolint/publish.i "Prolint_Status_StopTimer"} RUN PreAnalyze(p-SourceFile, OUTPUT ErrorMessage). - &IF DEFINED(EXCLUDE-Status-timer)=0 &THEN - {prolint/publish.i "Prolint_Status_StartTimer"} - &ENDIF + {prolint/publish.i "Prolint_Status_StartTimer"} IF ErrorMessage="":U THEN DO: IF hTurbolint<>0 THEN DO: @@ -814,12 +811,10 @@ ELSE DO: ASSIGN topnode = parserGetHandle(). /* note: must be assigned after parserParse() */ parserNodeTop(topnode). /* this gets us the "Program_root" node */ - &IF DEFINED(EXCLUDE-SupportPragmas)=0 &THEN IF hTurbolint=0 THEN /* (turbolint.dll has a faster copy of FindProparseDirectives) */ RUN FindProparseDirectives. - &ENDIF - IF NeedProclist THEN + IF NeedProclist THEN RUN BuildProcedureList. /* Run the tree parser for added node attributes */ @@ -837,7 +832,6 @@ END PROCEDURE. -&IF DEFINED(EXCLUDE-SupportPragmas)=0 &THEN FUNCTION ParseProparseDirectives RETURNS CHARACTER (ipNode AS INTEGER, ipPragmaText AS CHARACTER) : /* purpose : when a proparse directive is found, return a list of rules that it is supposed to suppress warnings for. @@ -882,10 +876,8 @@ RETURN TRIM(ReturnValue,',':U). END FUNCTION. -&ENDIF - -&IF DEFINED(EXCLUDE-SupportPragmas)=0 &THEN + PROCEDURE FindProparseDirectives : /* purpose : proparse directives are used for suppressing Prolint warnings. find every directive, mark the statement following the directive with attributes. @@ -917,10 +909,8 @@ parserReleaseHandle(grandchild). END PROCEDURE. -&ENDIF - -&IF DEFINED(EXCLUDE-SupportPragmas)=0 &THEN + PROCEDURE DecorateTree : /* purpose : DecorateTree marks the statement following a proparse-directive. all nodes in the statement have to be marked, because a query might @@ -967,7 +957,6 @@ parserReleaseHandle(child). END PROCEDURE. -&ENDIF PROCEDURE BuildProcedureList : @@ -1241,7 +1230,10 @@ DEFINE VARIABLE keywordlistfile AS CHARACTER NO-UNDO. DEFINE VARIABLE IgnoreABlist AS CHARACTER NO-UNDO. DEFINE VARIABLE noProparseRules AS CHARACTER NO-UNDO. + DEFINE VARIABLE IgnoreTurboRules AS CHARACTER NO-UNDO. + IgnoreTurboRules = DYNAMIC-FUNCTION("ProlintProperty", "Turbolint.RulesToIgnore"). + IF OPSYS <> "WIN32":U THEN RETURN. FILE-INFO:FILE-NAME = "prolint/turbolint/turbolint.dll":U. @@ -1265,7 +1257,7 @@ /* ... Too late, you missed your opportunity to override RulesInDLL :-) Now, mark tt_rules to disable 4GL rules: */ FOR EACH tt_rules WHERE tt_rules.custom=FALSE : - IF LOOKUP(tt_rules.ruleid, RulesInDLL)>0 AND LOOKUP(tt_rules.ruleid, "{&Turbolint_IgnoreRules}":U)=0 THEN + IF LOOKUP(tt_rules.ruleid, RulesInDLL)>0 AND LOOKUP(tt_rules.ruleid, IgnoreTurboRules)=0 THEN tt_rules.byturbolint = TRUE. END. Added: trunk/prolint/prolint.properties.p =================================================================== --- trunk/prolint/prolint.properties.p (rev 0) +++ trunk/prolint/prolint.properties.p 2006-03-13 21:29:41 UTC (rev 259) @@ -0,0 +1,105 @@ +/* ------------------------------------------------------------------ + file : prolint/prolint.properties.p + purpose : set default properties for Prolint, rules, outputhandlers etc + ----------------------------------------------------------------- + + Copyright (C) 2006 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ------------------------------------------------------------------ */ + + + /* + >>>> DO NOT MODIFY THIS FILE! <<<< + + Instead, create a copy of this procedure file + and place it in directory: + prolint/custom + so you get a file named: + prolint/custom/prolint.properties.p + + Then modify the contents of prolint/custom/prolint.properties.p. + You can change existing properties and you can add new ones too. + + It is recommended to delete lines from prolint/custom/prolint.properties.p + for properties that you do NOT want to change. In other words: file + prolint/custom/prolint.properties.p should ONLY contain MODIFIED properties! + + An other way of saying it: + create an empty file named prolint/custom/prolint.properties.p + and then add the properties to it that you want to change. + + */ + + + /* "outputhandlers.outputdirectory" + the directory where outputhandlers save their outputfiles */ + RUN SetProlintProperty ("outputhandlers.outputdirectory", SESSION:TEMP-DIR). + + + /* "logincode" + some outputhandlers prepend logincode to their outputfile, which is convenient when + several users access the same outputdirectory at the same time */ + IF CONNECTED("dictdb") AND USERID("dictdb")>"" THEN + RUN SetProlintProperty ("logincode", USERID("dictdb")). + ELSE + RUN SetProlintProperty ("logincode", ""). + + + /* "url to help/rules" + specifies how to open a helpfile for a rule, using the web browser */ + FILE-INFO:FILE-NAME= "prolint/help/rules". + RUN SetProlintProperty ("url to help/rules", FILE-INFO:FULL-PATHNAME). + + + /* "filters.excludelist" + use filters/exclude.p or not? */ + RUN SetProlintProperty ("filters.excludelist", STRING( TRUE )). + + + /* "filters.nowarnlist" + TRUE: use filters/nowarn.p + FALSE: do not use filter/nowarn.p */ + RUN SetProlintProperty ("filters.nowarnlist", STRING( TRUE )). + + + /* "filters.Appbuilderstuff" + if TRUE then try to ignore warnings caused from AB-generated code */ + RUN SetProlintProperty ("filters.IgnoreAppbuilderstuff", STRING( TRUE )). + + + /* "rules.varusage.OutputParamsAreUsed" + customization for rule "varusage": + if TRUE, output parameters are always considered to be "used" and will not cause a warning. + if FALSE, output parameters are considered to be "not used" unless they are explicitly assigned */ + RUN SetProlintProperty ("rules.varusage.OutputParamsAreUsed", STRING( TRUE )). + + + /* "rules.RemoveLogicalDatabaseName" + if FALSE, don't remove the ldbname from tablename (send "sports.customer" to outputhandler) + if TRUE, remove the ldbname from tablename (send "customer" to outputhandler) */ + RUN SetProlintProperty ("rules.RemoveLogicalDatabaseName", STRING( TRUE )). + + + /* "TurboLint.RulesToIgnore" + IF turbolint contains a 3GL version of a rule but you prefer to run the 4GL version, + add the name of the rule to this comma-separated list. + For example, to use the 4GL versions of "noundo" and "varusage" : + RUN SetProlintProperty ("Turbolint.RulesToIgnore", "noundo,varusage"). */ + RUN SetProlintProperty ("Turbolint.RulesToIgnore", ""). + + Added: trunk/prolint/propsuper.p =================================================================== --- trunk/prolint/propsuper.p (rev 0) +++ trunk/prolint/propsuper.p 2006-03-13 21:29:41 UTC (rev 259) @@ -0,0 +1,76 @@ +/* ======================================================================= + file : prolint/propsuper.p + purpose : manage Prolint properties + by : Jurjen Dijkstra + ----------------------------------------------------------------- + + Copyright (C) 2006 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ====================================================================== */ + + /* this procedure is temporarily session:super so every Prolint program can call it */ + SESSION:ADD-SUPER-PROCEDURE (THIS-PROCEDURE). + + DEFINE TEMP-TABLE tt_prop NO-UNDO + FIELD property AS CHARACTER + FIELD stringvalue AS CHARACTER + INDEX idx_prop AS PRIMARY UNIQUE property. + + /* fetch default properties */ + RUN prolint/prolint.properties.p. + + /* fetch custom properties, if they exist */ + IF SEARCH("prolint/custom/prolint.properties.p")<>? THEN + RUN prolint/custom/prolint.properties.p. + + + /* repair a few properties, if necessary: */ + + /* 1. outputdirectory must end with a slash */ + FIND tt_prop WHERE tt_prop.property = "outputhandlers.outputdirectory" NO-ERROR. + IF AVAILABLE tt_prop THEN + IF tt_prop.stringvalue > "" THEN + IF NOT ((SUBSTRING(tt_prop.stringvalue, LENGTH(tt_prop.stringvalue,"CHARACTER":U)) = '~\':U) OR (SUBSTRING(tt_prop.stringvalue, LENGTH(tt_prop.stringvalue,"CHARACTER":U)) = '/':U)) THEN + tt_prop.stringvalue = tt_prop.stringvalue + '/':U. + + +/* this procedure is called from prolint.properties.p : */ +PROCEDURE SetProlintProperty : + DEFINE INPUT PARAMETER property AS CHARACTER NO-UNDO. + DEFINE INPUT PARAMETER propvalue AS CHARACTER NO-UNDO. + + FIND tt_prop WHERE tt_prop.property = property NO-ERROR. + IF NOT AVAILABLE tt_prop THEN CREATE tt_prop. + ASSIGN tt_prop.property = property + tt_prop.stringvalue = propvalue. + +END PROCEDURE. + + +/* this function is called from wherever you want to read a property: */ +FUNCTION ProlintProperty RETURNS CHARACTER (INPUT property AS CHARACTER) : + + FIND tt_prop WHERE tt_prop.property = property NO-ERROR. + IF AVAILABLE tt_prop THEN + RETURN tt_prop.stringvalue. + ELSE + RETURN "". + +END FUNCTION. + + Modified: trunk/prolint/rtb/checkin-handler.p =================================================================== --- trunk/prolint/rtb/checkin-handler.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/rtb/checkin-handler.p 2006-03-13 21:29:41 UTC (rev 259) @@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ======================================================================================= */ -{prolint/customize.i} {prolint/dlc-version.i} {prolint/v8pubsub.i} {rtb/g/rtbglobl.i} Modified: trunk/prolint/ruleparams.i =================================================================== --- trunk/prolint/ruleparams.i 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/ruleparams.i 2006-03-13 21:29:41 UTC (rev 259) @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------ */ -{prolint/customize.i} {prolint/dlc-version.i} {&_proparse_ prolint-nowarn(varusage)} @@ -41,10 +40,9 @@ {&_proparse_ prolint-nowarn(varusage)} DEFINE INPUT PARAMETER hpRulePersist AS HANDLE NO-UNDO. /* handle to persistent "rules/persist/[rule_id].p" */ -&IF DEFINED(EXCLUDE-AppbuilderStuff)>0 &THEN +IF LOGICAL(DYNAMIC-FUNCTION("ProlintProperty", "filters.IgnoreAppbuilderstuff"))=FALSE THEN IgnoreAB = FALSE. -&ENDIF - + /* use hLintSuper as super-procedure or as normal procedure? */ &IF DEFINED(EXCLUDE-superprocedure)=0 &THEN &GLOBAL-DEFINE insuper Modified: trunk/prolint/rules/ifindent.p =================================================================== --- trunk/prolint/rules/ifindent.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/rules/ifindent.p 2006-03-13 21:29:41 UTC (rev 259) @@ -46,6 +46,8 @@ {prolint/ruleparams.i} +DEFINE VARIABLE IgnoreAppbuilderstuff AS LOGICAL NO-UNDO. +IgnoreAppbuilderstuff = LOGICAL ( DYNAMIC-FUNCTION ("ProlintProperty", "filters.IgnoreAppbuilderstuff")). /* This variable stays the same through all runs of the rule. */ DEFINE VARIABLE warnings AS CHARACTER INITIAL "Both" NO-UNDO. @@ -117,20 +119,14 @@ * check will be done later in PublishResult if we're actually going to give * a warning. */ - &IF DEFINED(EXCLUDE-AppbuilderStuff)=0 &THEN - /* sorry, name of preprocesor is misleading, see prolint/customize.i */ - /* suppress warnings from UIB/AB-generated code, for some rules */ - IF IgnoreAB THEN DO: - ASSIGN nodefilename = RelativeFilename(parserGetNodeFilename(ifNode)). - IF (nodefilename MATCHES "src/adm/*~~.i":U) - OR (nodefilename MATCHES "src/adm2/*~~.i":U) THEN RETURN. - END. - &ENDIF - + IF IgnoreAppbuilderstuff THEN + IF IgnoreAB THEN DO: + ASSIGN nodefilename = RelativeFilename(parserGetNodeFilename(ifNode)). + IF (nodefilename MATCHES "src/adm/*~~.i":U) + OR (nodefilename MATCHES "src/adm2/*~~.i":U) THEN RETURN. + END. - - /* First, calculate IF's indent. If the IF is an ELSE IF, * use the ELSE's indent as the IF's indent. */ Modified: trunk/prolint/rules/message.p =================================================================== --- trunk/prolint/rules/message.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/rules/message.p 2006-03-13 21:29:41 UTC (rev 259) @@ -26,16 +26,20 @@ {prolint/ruleparams.i} +DEFINE VARIABLE IgnoreAppbuilderstuff AS LOGICAL NO-UNDO. + +IgnoreAppbuilderstuff = LOGICAL ( DYNAMIC-FUNCTION ("ProlintProperty", "filters.IgnoreAppbuilderstuff")). + DEFINE TEMP-TABLE tt_abgenerated NO-UNDO FIELD msg AS CHARACTER. -&IF DEFINED(EXCLUDE-AppbuilderStuff)=0 &THEN +IF IgnoreAppbuilderstuff THEN DO: /* create a tt_abgenerated record for each message that is generated by AB/UIB */ CREATE tt_abgenerated. ASSIGN tt_abgenerated.msg = '"*~~.wrx":U':U. CREATE tt_abgenerated. ASSIGN tt_abgenerated.msg = '"* should only be RUN PERSISTENT.":U':U. -&ENDIF +END. RUN searchNode {&insuper} (hTopnode, /* "Program_root" node */ "InspectNode":U, /* name of callback procedure */ @@ -62,14 +66,13 @@ nodefilename = RelativeFilename(parserGetNodeFilename(theNode)). IF (nodefilename MATCHES "src/adm/*~~.i":U) OR (nodefilename MATCHES "src/adm2/*~~.i":U) THEN abgenerated = TRUE. - &IF DEFINED(EXCLUDE-AppbuilderStuff)=0 &THEN ELSE - /* First child is "Form_item", second child might be the "QSTRING" that we are after. */ - IF parserNodeFirstChild(theNode,child)<>"" AND parserNodeFirstChild(child,child)<>"" THEN + IF IgnoreAppbuilderstuff THEN + /* First child is "Form_item", second child might be the "QSTRING" that we are after. */ + IF parserNodeFirstChild(theNode,child)<>"" AND parserNodeFirstChild(child,child)<>"" THEN IF CAN-FIND(FIRST tt_abgenerated WHERE parserGetNodeText(child) MATCHES tt_abgenerated.msg) THEN abgenerated = TRUE. - &ENDIF - + IF (NOT abgenerated) THEN RUN PublishResult {&insuper} (compilationunit, nodefilename, Modified: trunk/prolint/rules/sortaccess.p =================================================================== --- trunk/prolint/rules/sortaccess.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/rules/sortaccess.p 2006-03-13 21:29:41 UTC (rev 259) @@ -31,7 +31,9 @@ DEFINE VARIABLE vOperation AS CHARACTER NO-UNDO. DEFINE VARIABLE vTable AS CHARACTER NO-UNDO. DEFINE VARIABLE vDb AS CHARACTER NO-UNDO. + DEFINE VARIABLE StripLdbName AS LOGICAL NO-UNDO. + StripLdbName = LOGICAL (DYNAMIC-FUNCTION ("ProlintProperty", "rules.RemoveLogicalDatabaseName")). INPUT STREAM xrf FROM VALUE (xreffile). DO WHILE TRUE : @@ -56,10 +58,8 @@ vDb = "". IF NUM-ENTRIES(vTable, '.':U)=2 THEN DO: vDb = ENTRY(1, vTable, '.':U). - &IF DEFINED(EXCLUDE-remove-ldbname)=0 &THEN - /* strip ldbname from tablename. Use prolint/customize.i to suppress this */ - vTable = ENTRY(2, vTable, '.':U). - &ENDIF + IF StripLdbName THEN + vTable = ENTRY(2, vTable, '.':U). END. IF vDB NE "" THEN /* because vDb="" means that vTable is a temp-table */ Modified: trunk/prolint/rules/strattrib.p =================================================================== --- trunk/prolint/rules/strattrib.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/rules/strattrib.p 2006-03-13 21:29:41 UTC (rev 259) @@ -25,6 +25,10 @@ {prolint/ruleparams.i} +DEFINE VARIABLE IgnoreAppbuilderstuff AS LOGICAL NO-UNDO. + +IgnoreAppbuilderstuff = LOGICAL ( DYNAMIC-FUNCTION ("ProlintProperty", "filters.IgnoreAppbuilderstuff")). + RUN IgnoreMenus. RUN searchNode {&insuper} (hTopnode, /* "Program_root" node */ @@ -124,13 +128,12 @@ IF LENGTH(SUBSTRING(theString,2,R-INDEX(theString,quote) - 2),"RAW":U)=0 THEN RETURN. - &IF DEFINED(EXCLUDE-AppbuilderStuff)=0 &THEN + IF IgnoreAppbuilderstuff THEN /* ignore strings in read-only sections created by AppBuilder: */ IF (theString='"The binary control file could not be found. The controls cannot be loaded."':U OR theString='"Controls Not Loaded"':U) THEN RETURN. - &ENDIF /* attribute can be made up of two parts: attJustif - alpha.characters specifying the justification (:L :T :R :C) Modified: trunk/prolint/rules/varusage.p =================================================================== --- trunk/prolint/rules/varusage.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/rules/varusage.p 2006-03-13 21:29:41 UTC (rev 259) @@ -245,13 +245,14 @@ end. /* If not used, then report the object as "never used". */ + DEFINE VARIABLE OutputParamsAreUsed AS LOGICAL NO-UNDO. + OutputParamsAreUsed = LOGICAL(DYNAMIC-FUNCTION("ProlintProperty", "rules.varusage.OutputParamsAreUsed")). for each tt_object where tt_object.IsUsed=FALSE - &IF {&varusage_OutputParamsAreUsed} &THEN - and (not tt_object.ParamType matches "*OUTPUT":U) - &ENDIF : - + and (not (OutputParamsAreUsed AND tt_object.ParamType matches "*OUTPUT":U)) + : + run PublishResult {&insuper} ( input compilationunit, input tt_object.sourcefile, Modified: trunk/prolint/rules/wholeindex.p =================================================================== --- trunk/prolint/rules/wholeindex.p 2006-03-12 21:43:40 UTC (rev 258) +++ trunk/prolint/rules/wholeindex.p 2006-03-13 21:29:41 UTC (rev 259) @@ -36,6 +36,9 @@ DEFINE VARIABLE vOperation AS CHARACTER NO-UNDO. DEFINE VARIABLE vTable AS CHARACTER NO-UNDO. DEFINE VARIABLE vComment AS CHARACTER NO-UNDO. + DEFINE VARIABLE StripLdbName AS LOGICAL NO-UNDO. + + StripLdbName = LOGICAL (DYNAMIC-FUNCTION ("ProlintProperty", "rules.RemoveLogicalDatabaseName")). INPUT STREAM xrf FROM VALUE (xreffile). DO WHILE TRUE : @@ -60,12 +63,10 @@ IF (vOperation EQ "SEARCH":U) AND (vComment EQ "WHOLE-INDEX":U) THEN DO: - &IF DEFINED(EXCLUDE-remove-ldbname)=0 &THEN - /* strip ldbname from tablename. Use prolint/customize.i to suppress this */ - IF NUM-ENTRIES(vTable, '.':U)=2 THEN - vTable = ENTRY(2, vTable, '.':U). - &ENDIF - + IF StripLdbName THEN + IF NUM-ENTRIES(vTable, '.':U)=2 THEN + vTable = ENTRY(2, vTable, '.':U). + RUN PublishResult {&insuper} (compilationunit, vSourcefile, vLinenumber, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-12 21:43:50
|
Revision: 258 Author: jurjen Date: 2006-03-12 13:43:40 -0800 (Sun, 12 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=258&view=rev Log Message: ----------- rule "findstate": when a buffer definition is not found in the procedure/function, then look for it in the Program_root level Modified Paths: -------------- trunk/prolint/rules/findstate.p Modified: trunk/prolint/rules/findstate.p =================================================================== --- trunk/prolint/rules/findstate.p 2006-03-12 17:48:30 UTC (rev 257) +++ trunk/prolint/rules/findstate.p 2006-03-12 21:43:40 UTC (rev 258) @@ -22,6 +22,9 @@ You should have received a copy of the GNU Lesser General Public License along with Prolint; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Feb 22, 2006 : Carl Verbiest + look for buffer definition in Program_root if not found in procedure -------------------------------------------------------------------------- */ @@ -149,14 +152,21 @@ DEFINE VARIABLE childnode AS INTEGER NO-UNDO. DEFINE VARIABLE found AS LOGICAL NO-UNDO. + DEFINE VARIABLE parentblocktypes AS CHARACTER NO-UNDO. + ASSIGN recordname = buffername parentnode = parserGetHandle() blocknode = parserGetHandle() childnode = parserGetHandle() + parentblocktypes = "PROCEDURE,FUNCTION,Program_root". + +ExamineBlock: +DO WHILE not found and blocktype <> "Program_root":U: + blocktype = parserNodeParent(theNode, blocknode). - DO WHILE NOT (blocktype="PROCEDURE":U OR blocktype="FUNCTION":U OR blocktype="Program_root":U) : + DO WHILE LOOKUP (blocktype, parentblocktypes) = 0: blocktype = parserNodeParent(blocknode, blocknode). END. @@ -182,6 +192,9 @@ END. END. parserQueryClear ("findstatebuffer":U). + if blocktype = "Program_root":U then leave ExamineBlock. + parentblocktypes = "Program_root". +END. parserReleaseHandle(blocknode). parserReleaseHandle(childnode). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2006-03-12 17:48:40
|
Revision: 257 Author: jurjen Date: 2006-03-12 09:48:30 -0800 (Sun, 12 Mar 2006) ViewCVS: http://svn.sourceforge.net/prolint/?rev=257&view=rev Log Message: ----------- new outputhandler "logexcel.p" added by Carl Verbiest Modified Paths: -------------- trunk/prolint/outputhandlers/choices.d Added Paths: ----------- trunk/prolint/outputhandlers/logexcel.p Modified: trunk/prolint/outputhandlers/choices.d =================================================================== --- trunk/prolint/outputhandlers/choices.d 2006-03-07 23:14:27 UTC (rev 256) +++ trunk/prolint/outputhandlers/choices.d 2006-03-12 17:48:30 UTC (rev 257) @@ -1,3 +1,4 @@ +"logexcel.p" 9 "*" "export to Microsoft Excel (requires Office 11)" "logwin.w" 9 "GUI" "the Prolint Results window shows results in a browse widget. Requires DLC 9" "logwin8.w" 8 "GUI" "the Prolint Results window shows results in a browse widget. DLC 8 compatible" "logfile.p" 8 "*" "writes to file prolint.log, using some really useless experimental format :-)" Added: trunk/prolint/outputhandlers/logexcel.p =================================================================== --- trunk/prolint/outputhandlers/logexcel.p (rev 0) +++ trunk/prolint/outputhandlers/logexcel.p 2006-03-12 17:48:30 UTC (rev 257) @@ -0,0 +1,203 @@ +/* ======================================================================= + file : prolint/logfile.p + purpose : write results (found by rules) to a Excel xml file and open it. + by : Carl Verbiest + ----------------------------------------------------------------- + + Copyright (C) 2001,2002 Jurjen Dijkstra + + This file is part of Prolint. + + Prolint is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + Prolint 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with Prolint; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + ====================================================================== */ +{prolint/customize.i} +{prolint/dlc-version.i} +{prolint/v8pubsub.i} + +DEFINE VARIABLE logfile AS CHAR NO-UNDO INITIAL "prolint.xml":U. +DEFINE VARIABLE chExcel AS COM-HANDLE. + +{prolint/subscribe.i "Prolint_InitializeResults"} +{prolint/subscribe.i "Prolint_AddResult"} +{prolint/subscribe.i "Prolint_FinalizeResults"} + +RETURN. + + +PROCEDURE Prolint_InitializeResults : + /* purpose : start with an empty logfile. If one exists make it empty */ + DEFINE INPUT PARAMETER pClearOutput AS LOGICAL NO-UNDO. + + CREATE "Excel.Application.11":U chExcel NO-ERROR. + IF chExcel=? THEN DO: + MESSAGE "Sorry, 'Prolint output to Excel' only works with Excel version 11":T VIEW-AS ALERT-BOX. + {prolint/unsubscribe.i} + DELETE PROCEDURE THIS-PROCEDURE. + END. + ELSE DO: + chExcel:VISIBLE = TRUE. + logfile = subst("&1prolint&2.xml", session:temp-directory, replace(string(time, "hh:mm:ss"), ":", "")). + + OUTPUT TO VALUE(logfile). + PUT UNFORMATTED + '<?xml version="1.0"?>' skip + '<?mso-application progid="Excel.Sheet"?>' skip + '<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"' skip + ' xmlns:o="urn:schemas-microsoft-com:office:office"' skip + ' xmlns:x="urn:schemas-microsoft-com:office:excel"' skip + ' xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"' skip + ' xmlns:html="http://www.w3.org/TR/REC-html40">' skip + ' <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">' skip + ' <LastAuthor>prolint</LastAuthor>' skip + ' </DocumentProperties>' skip + ' <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">' skip + ' <RefModeR1C1/>' skip + ' <ProtectStructure>False</ProtectStructure>' skip + ' <ProtectWindows>False</ProtectWindows>' skip + ' </ExcelWorkbook>' skip + ' <Styles>' skip + ' <Style ss:ID="Default" ss:Name="Normal">' skip + ' <Alignment ss:Vertical="Bottom"/>' skip + ' <Borders/>' skip + ' <Font/>' skip + ' <Interior/>' skip + ' <NumberFormat/>' skip + ' <Protection/>' skip + ' </Style>' skip + ' <Style ss:ID="s20">' skip + ' <Font x:Family="Swiss" ss:Bold="1"/>' skip + ' </Style>' skip + ' <Style ss:ID="s21">' skip + ' </Style>' skip + ' <Style ss:ID="s22">' skip + ' </Style>' skip + ' <Style ss:ID="s23">' skip + ' </Style>' skip + ' <Style ss:ID="s24">' skip + ' </Style>' skip + ' <Style ss:ID="s25">' skip + ' </Style>' skip + ' <Style ss:ID="s26">' skip + ' </Style>' skip + ' <Style ss:ID="s27">' skip + ' </Style>' skip + ' <Style ss:ID="s28">' skip + ' <Font ss:Color="#FF6600"/>' skip + ' </Style>' skip + ' <Style ss:ID="s29">' skip + ' <Font ss:Color="#FF0000"/>' skip + ' </Style>' skip + ' </Styles>' skip + ' <Worksheet ss:Name="prolint">' skip + ' <Names>' skip + ' <NamedRange ss:Name="_FilterDatabase" ss:RefersTo="=prolint!R1C1:R1C6"' skip + ' ss:Hidden="1"/>' skip + ' </Names>' skip + ' <Table>' skip + ' <Column ss:Width="87"/>' skip + ' <Column ss:Width="96"/>' skip + ' <Column ss:Width="57"/>' skip + ' <Column ss:Index="5" ss:Width="437.25"/>' skip + ' <Row ss:StyleID="s20">' skip + ' <Cell><Data ss:Type="String">CompilationUnit</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>' skip + ' <Cell><Data ss:Type="String">SourceFile</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>' skip + ' <Cell><Data ss:Type="String">LineNumber</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>' skip + ' <Cell><Data ss:Type="String">Severity</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>' skip + ' <Cell><Data ss:Type="String">Description</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>' skip + ' <Cell><Data ss:Type="String">RuleID</Data><NamedCell ss:Name="_FilterDatabase"/></Cell>' skip + ' </Row>' skip + . + OUTPUT CLOSE. + END. + +END PROCEDURE. + + +PROCEDURE Prolint_AddResult : + /* purpose: add one result from a 'rule' to the logfile, + using the format of your choice. + The format in this example looks pretty useless to me */ + DEFINE INPUT PARAMETER pCompilationUnit AS CHAR NO-UNDO. /* the sourcefile we're parsing */ + DEFINE INPUT PARAMETER pSourcefile AS CHAR NO-UNDO. /* may be an includefile */ + DEFINE INPUT PARAMETER pLineNumber AS INTEGER NO-UNDO. /* line number in pSourceFile */ + DEFINE INPUT PARAMETER pDescription AS CHAR NO-UNDO. /* human-readable hint */ + DEFINE INPUT PARAMETER pRuleID AS CHAR NO-UNDO. /* defines rule-program and maps to help */ + DEFINE INPUT PARAMETER pSeverity AS INTEGER NO-UNDO. /* importance of this rule, scale 0-9 */ + + IF chExcel<>? THEN DO: + OUTPUT TO VALUE (logfile) APPEND. + PUT UNFORMATTED SUBSTITUTE( + ' <Row ss:StyleID="s2&6">~n' + + ' <Cell><Data ss:Type="String">&5</Data></Cell>~n' + + ' <Cell><Data ss:Type="String">&1</Data></Cell>~n' + + ' <Cell><Data ss:Type="Number">&2</Data></Cell>~n' + + ' <Cell><Data ss:Type="Number">&6</Data></Cell>~n' + + ' <Cell><Data ss:Type="String">&3</Data></Cell>~n' + + ' <Cell><Data ss:Type="String">&4</Data></Cell>~n' + + ' </Row>~n', + pSourceFile, + pLineNumber, + replace(replace(pDescription, ">", ">"), "<", ">"), + pRuleID, + pCompilationUnit, + pSeverity) + . + OUTPUT CLOSE. + END. + +END PROCEDURE. + + +PROCEDURE Prolint_FinalizeResults : + /* purpose: close the logfile and/or show it. Free resources */ + + /* In this case there are no open resources, so we're done. */ + /* This procedure will not be invoked again, so it can exit */ + + IF chExcel<>? THEN DO: + OUTPUT TO VALUE (logfile) APPEND. + PUT UNFORMATTED + ' </Table>' skip + ' <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">' skip + ' <Selected/>' skip + ' <ProtectObjects>False</ProtectObjects>' skip + ' <ProtectScenarios>False</ProtectScenarios>' skip + ' </WorksheetOptions>' skip + ' <AutoFilter x:Range="R1C1:R1C6" xmlns="urn:schemas-microsoft-com:office:excel">' skip + ' </AutoFilter>' skip + ' <Sorting xmlns="urn:schemas-microsoft-com:office:excel">' skip + ' <Sort>CompilationUnit</Sort>' skip + ' <Sort>SourceFile</Sort>' skip + ' <Sort>LineNumber</Sort>' skip + ' <Descending/>' skip + ' </Sorting>' skip + ' </Worksheet>' skip + '</Workbook>' skip + . + OUTPUT CLOSE. + + chExcel:Workbooks:OPEN(Logfile). + + /* I would like to release the com-handle, but the Excel application closes when I try :-( + RELEASE OBJECT chExcel. + */ + + END. + + {prolint/unsubscribe.i} + DELETE PROCEDURE THIS-PROCEDURE. + +END PROCEDURE. + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |