ftnapps-svn Mailing List for FTN Applications (Page 3)
Brought to you by:
jame
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
(13) |
Mar
(21) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(5) |
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(33) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
From: <ja...@us...> - 2009-10-27 21:39:03
|
Revision: 66 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=66&view=rev Author: jame Date: 2009-10-27 21:38:50 +0000 (Tue, 27 Oct 2009) Log Message: ----------- Updated date and RJC email address in man page. Modified Paths: -------------- tinytic/trunk/doc/tinytic.1 Modified: tinytic/trunk/doc/tinytic.1 =================================================================== --- tinytic/trunk/doc/tinytic.1 2009-10-27 21:35:55 UTC (rev 65) +++ tinytic/trunk/doc/tinytic.1 2009-10-27 21:38:50 UTC (rev 66) @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH TINYTIC 1 "March 8, 2009" +.TH TINYTIC 1 "October 26, 2009" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -50,4 +50,4 @@ .SH AUTHOR TinyTIC was written by Michael Dillon. .PP -This manual page was written by Robert James Clay <ja...@ro...>. +This manual page was written by Robert James Clay <ja...@ro...>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-10-27 21:36:02
|
Revision: 65 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=65&view=rev Author: jame Date: 2009-10-27 21:35:55 +0000 (Tue, 27 Oct 2009) Log Message: ----------- Note about man page added to v0.6.0 entry in doc/tinytic.rev Modified Paths: -------------- tinytic/trunk/doc/tinytic.rev Modified: tinytic/trunk/doc/tinytic.rev =================================================================== --- tinytic/trunk/doc/tinytic.rev 2009-10-27 02:28:08 UTC (rev 64) +++ tinytic/trunk/doc/tinytic.rev 2009-10-27 21:35:55 UTC (rev 65) @@ -5,7 +5,7 @@ v0.6.0 - 8 March 2009 Renamed "pkg" directory to "doc". Moved source code files to a "src" - directory. + directory. Added a man page. Change format of version string from n.n.n.n to n.n.n, dropping the first zero and changing the version itself from 0.5.3-r1 to 0.6.0. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gsv...@us...> - 2009-10-27 02:28:19
|
Revision: 64 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=64&view=rev Author: gsvalore Date: 2009-10-27 02:28:08 +0000 (Tue, 27 Oct 2009) Log Message: ----------- Updated documentation to reflect version and copyright changes. Modified Paths: -------------- tinytic/trunk/doc/SYSOP.DOC tinytic/trunk/doc/license.txt tinytic/trunk/file_id.diz tinytic/trunk/license.txt Modified: tinytic/trunk/doc/SYSOP.DOC =================================================================== --- tinytic/trunk/doc/SYSOP.DOC 2009-09-21 00:57:27 UTC (rev 63) +++ tinytic/trunk/doc/SYSOP.DOC 2009-10-27 02:28:08 UTC (rev 64) @@ -1,7 +1,8 @@ -TinyTic v0.6.0 -Release date: 15 October 2000 +TinyTic v0.6.1 +Release date: 26 October 2009 Written by Mike Dillon and Sean Dennis -Copyright (C) 2000-2002 Mike Dillon and Sean Dennis +Copyright (C) 2000-2002,2009 Mike Dillon and Sean Dennis +Copyright (C) 2009 Robert James Clay (Distribution) All rights reserved. Program developed and written by Mike Dillon @@ -104,7 +105,9 @@ done this without his help! I'd also like to thank Rob Swindell for rekindling his interest in developing Synchronet BBS software for the 21st century. You can see what Sync's all about at http://www.synchro.net. -If you're interested in Telegard, check out http://www.telegard.net. +If you're interested in Telegard, check out http://www.telegard.net. Thanks +to Robert James Clay for providing a Sourceforge site to house the project +after all these years. Thanks for using TinyTIC, Sean Dennis and Mike Dillon Modified: tinytic/trunk/doc/license.txt =================================================================== --- tinytic/trunk/doc/license.txt 2009-09-21 00:57:27 UTC (rev 63) +++ tinytic/trunk/doc/license.txt 2009-10-27 02:28:08 UTC (rev 64) @@ -1,4 +1,5 @@ -Copyright (c) 2000-2002, Michael Dillon +Copyright (c) 2000-2003,2009 Michael Dillon +Copyright (c) 2009 Robert James Clay All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,9 +15,9 @@ with the distribution. Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/file_id.diz =================================================================== --- tinytic/trunk/file_id.diz 2009-09-21 00:57:27 UTC (rev 63) +++ tinytic/trunk/file_id.diz 2009-10-27 02:28:08 UTC (rev 64) @@ -1,8 +1,8 @@ -TinyTIC 0.6.0 source -------------------------- -Source code to TinyTIC. -Written in C++, released -under the BSD license. -Author(s): -Mike Dillon (GSValore) -Sean Dennis (HausMaus) +TinyTIC 0.6.1 source +------------------------- +Source code to TinyTIC. +Written in C++, released +under the BSD license. +Author(s): +Mike Dillon (GSValore) +Sean Dennis (HausMaus) Modified: tinytic/trunk/license.txt =================================================================== --- tinytic/trunk/license.txt 2009-09-21 00:57:27 UTC (rev 63) +++ tinytic/trunk/license.txt 2009-10-27 02:28:08 UTC (rev 64) @@ -1,5 +1,5 @@ -Copyright (c) 2000-2003, Michael Dillon -Copyright (c) 2009, Robert James Clay +Copyright (c) 2000-2003,2009 Michael Dillon +Copyright (c) 2009 Robert James Clay All rights reserved. Redistribution and use in source and binary forms, with or without @@ -15,9 +15,9 @@ with the distribution. Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-09-21 00:57:35
|
Revision: 63 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=63&view=rev Author: jame Date: 2009-09-21 00:57:27 +0000 (Mon, 21 Sep 2009) Log Message: ----------- Migrated website htdocs SVN repository to a GIT reposistory. Removed Paths: ------------- htdocs/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-09-21 00:53:39
|
Revision: 62 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=62&view=rev Author: jame Date: 2009-09-21 00:53:32 +0000 (Mon, 21 Sep 2009) Log Message: ----------- Migrated Crashmail SVN repository to a GIT reposistory. Removed Paths: ------------- crashmail/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-09-21 00:50:17
|
Revision: 61 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=61&view=rev Author: jame Date: 2009-09-21 00:50:09 +0000 (Mon, 21 Sep 2009) Log Message: ----------- Migrated JamNNTPd SVN repository to a GIT reposistory. Removed Paths: ------------- jamnntpd/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gsv...@us...> - 2009-08-22 17:45:51
|
Revision: 60 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=60&view=rev Author: gsvalore Date: 2009-08-22 17:45:39 +0000 (Sat, 22 Aug 2009) Log Message: ----------- Updated the Copyright headers. Changed the handling of the commandline options to more appropriately override the internal options. Also added (that requires testing) a case-insensitive check for POSIX systems to look for *.TIC files of any name. Modified Paths: -------------- tinytic/trunk/src/CDirect.cpp tinytic/trunk/src/CDirect.h tinytic/trunk/src/filecopy.cpp tinytic/trunk/src/filecopy.h tinytic/trunk/src/headers.h tinytic/trunk/src/parse.cpp tinytic/trunk/src/parse.h tinytic/trunk/src/ticlog.cpp tinytic/trunk/src/ticlog.h tinytic/trunk/src/tinytic.cpp tinytic/trunk/src/tinytic.h tinytic/trunk/src/tprocess.cpp tinytic/trunk/src/tprocess.h Modified: tinytic/trunk/src/CDirect.cpp =================================================================== --- tinytic/trunk/src/CDirect.cpp 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/CDirect.cpp 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/src/CDirect.h =================================================================== --- tinytic/trunk/src/CDirect.h 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/CDirect.h 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/src/filecopy.cpp =================================================================== --- tinytic/trunk/src/filecopy.cpp 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/filecopy.cpp 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2003, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/src/filecopy.h =================================================================== --- tinytic/trunk/src/filecopy.h 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/filecopy.h 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2003, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/src/headers.h =================================================================== --- tinytic/trunk/src/headers.h 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/headers.h 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/src/parse.cpp =================================================================== --- tinytic/trunk/src/parse.cpp 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/parse.cpp 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -54,18 +54,7 @@ char szTmpBuffer[ BUFFER_MAXLEN ] = "\x0"; ifstream fConfig; - // Is a command line config file specified ? - if (szCmdConfigFile != "") - { - // Yes, use it (overrides default) - fConfig.open(szCmdConfigFile.c_str(), ios::in); - } - else - { - // No, use defaulted config file. - szTmp = szHomeDir + szConfigFile; - fConfig.open(szTmp.c_str(), ios::in); - } + fConfig.open(szConfigFile.c_str(), ios::in); if (!fConfig) { @@ -110,48 +99,63 @@ { // DataFile directory/file specified fConfig >> ws >> szTmpBuffer; - DataFile = szTmpBuffer; - - if ((DataFile == "") || (VerifyFileUsable(DataFile.c_str()) == false)) - { + + // do not continue if the DataFile has already been defined + // This block of code will ignore any other "DataFile" entries in the config file + // regardless of failure or not + if (DataFile == "") + { + if (VerifyFileUsable(szTmpBuffer) == false) + { + Log = "Unable to use the defined 'DataFile': "; + Log += szTmpBuffer; + PutLog( Log.c_str(), INFO ); + #if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) - DataFile = ".\\tinytic.dat"; + DataFile = ".\\tinytic.dat"; #elif defined(__TINYTIC_POSIX) - DataFile = "./tinytic.dat"; + DataFile = "./tinytic.dat"; #endif + } + else + { + DataFile = szTmpBuffer; + + Log = "Saving new entries to \'"; + Log += szTmpBuffer; + Log += "\'."; + PutLog( Log.c_str(), INFO ); + } } - - - if (szCmdDataFile == "") - { - Log = "Saving new entries to \'"; - Log += szTmpBuffer; - Log += "\'."; - PutLog( Log.c_str(), INFO ); - } } else if (stricmp(szTmpBuffer, "LogFile") == 0) { // DataFile directory/file specified fConfig >> ws >> szTmpBuffer; - szLogFile = szTmpBuffer; - if ((szLogFile == "") || (VerifyFileUsable(szLogFile.c_str()) == false)) - { + if (szLogFile == "") + { + if (VerifyFileUsable(szTmpBuffer) == false) + { + cout << "Unable to use the log file `" + << szTmpBuffer << "'." + << endl; #if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) - szLogFile = ".\\tinytic.log"; + szLogFile = ".\\tinytic.log"; #elif defined(__TINYTIC_POSIX) - szLogFile = "./tinytic.log"; + szLogFile = "./tinytic.log"; #endif - } - - if (szCmdLogFile == "") - { - cout << "Using LogFile \'" - << szLogFile.c_str() - << "\'." - << endl; - } + } + else + { + szLogFile = szTmpBuffer; + + cout << "Using LogFile \'" + << szLogFile.c_str() + << "\'." + << endl; + } + } } else { Modified: tinytic/trunk/src/parse.h =================================================================== --- tinytic/trunk/src/parse.h 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/parse.h 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/src/ticlog.cpp =================================================================== --- tinytic/trunk/src/ticlog.cpp 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/ticlog.cpp 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -88,16 +88,7 @@ } - // If there was a log file specified on the command line - // use it instead. - if (szCmdLogFile != "") - { - fLog.open(szCmdLogFile.c_str(), ios::app); - } - else - { - fLog.open(szLogFile.c_str(), ios::app); - } + fLog.open(szLogFile.c_str(), ios::app); if (!fLog) { Modified: tinytic/trunk/src/ticlog.h =================================================================== --- tinytic/trunk/src/ticlog.h 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/ticlog.h 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT Modified: tinytic/trunk/src/tinytic.cpp =================================================================== --- tinytic/trunk/src/tinytic.cpp 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/tinytic.cpp 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2003, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -45,9 +45,6 @@ string szHomeDir = ""; string szWorkDir = ""; -string szCmdDataFile = ""; -string szCmdConfigFile = ""; -string szCmdLogFile = ""; void IdentifyHomeDirectory(const char *arg); bool ParseCommandLine(int argc, char *argv[]); @@ -63,7 +60,6 @@ cout << PROGNAME << ": Quick TIC File Processor v" << VERSION_STR << endl; cout << COPYR << AUTHOR << ". All Rights Reserved." << endl; cout << "Created on " << __DATE__ << " at " << __TIME__ << endl; - cout << AFFIL << endl; cout << endl; cout << endl; @@ -170,34 +166,34 @@ else if ((stricmp(szCmdLine.c_str(), "--config-file") == 0) || (stricmp(szCmdLine.c_str(), "-c") == 0)) { - z++; - szCmdConfigFile = argv[z]; - if (VerifyFileUsable(szCmdConfigFile.c_str(), 1) == false) + z++; + if (VerifyFileUsable(argv[z], 1) == false) { - cout << "Unable to use the specified config file, defaulting." << endl; - szCmdConfigFile = ""; + cout << "Unable to use the specified config file, ignoring." << endl; } else { - cout << "Using config file \'" - << szCmdConfigFile.c_str() + szConfigFile = argv[z]; + cout << "Using config file \'" + << szConfigFile.c_str() << "\'." << endl; + } } else if ((stricmp( szCmdLine.c_str(), "--data-file") == 0) || (stricmp( szCmdLine.c_str(), "-d") == 0)) { z++; - szCmdDataFile = argv[z]; - if (VerifyFileUsable(szCmdDataFile.c_str()) == false) + if (VerifyFileUsable(argv[z]) == false) { - cout << "Unable to use the specified data file, defaulting." << endl; - szCmdDataFile = ""; + // Default is defined in parse.cpp:ReadConfigFile() + cout << "Unable to use the specified data file, ignoring." << endl; } else { + DataFile = argv[z]; cout << "Using datafile \'" - << szCmdDataFile.c_str() + << DataFile.c_str() << "\'." << endl; } } @@ -205,16 +201,15 @@ (stricmp(szCmdLine.c_str(), "-l") == 0)) { z++; - szCmdLogFile = argv[z]; - if (VerifyFileUsable(szCmdLogFile.c_str()) == false) + if (VerifyFileUsable(argv[z]) == false) { - cout << "Unable to use the specified log file, defaulting." << endl; - szCmdLogFile = ""; + cout << "Unable to use the specified log file, ignoring." << endl; } else { + szLogFile = argv[z]; cout << "Using logfile \'" - << szCmdLogFile.c_str() + << szLogFile.c_str() << "\'." << endl; } } Modified: tinytic/trunk/src/tinytic.h =================================================================== --- tinytic/trunk/src/tinytic.h 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/tinytic.h 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2003, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -84,17 +84,13 @@ # define SYS_TYPE_OTHER #endif -#define VERSION "0.6.0" +#define VERSION "0.6.1" #define PROGNAME "TinyTic" #define VERSION_STR VERSION "-" COMPTYPE #define AUTHOR "Michael Dillon" -#define COPYR "Copyright (C) 2000-2003 " -#define AFFIL "This program was produced in affiliation with Elysium Software." +#define COPYR "Copyright (C) 2000-2003,2009 " extern string szHomeDir; -extern string szCmdConfigFile; -extern string szCmdDataFile; -extern string szCmdLogFile; // Usable outside the primary file bool VerifyFileUsable(const char *src, int io = 0); Modified: tinytic/trunk/src/tprocess.cpp =================================================================== --- tinytic/trunk/src/tprocess.cpp 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/tprocess.cpp 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -84,7 +84,11 @@ void SearchForTIC(void) { +#ifdef __TINYTIC_POSIX + CDirect cd("*.[Tt][Ii][Cc]"); +#elif CDirect cd("*.TIC"); +#endif FileData hFileData; if (cd.Find() != true) @@ -458,17 +462,7 @@ long idx; // Is a datafile specified at the command line ? - if (szCmdDataFile != "") - { - // Use it, overrides any read or placed - // from the config - DFile.open(szCmdDataFile.c_str(), ios::app); - } - else - { - // No, use default or config file specified - DFile.open(DataFile.c_str(), ios::app); - } + DFile.open(DataFile.c_str(), ios::app); if (!DFile) { Modified: tinytic/trunk/src/tprocess.h =================================================================== --- tinytic/trunk/src/tprocess.h 2009-07-26 03:13:45 UTC (rev 59) +++ tinytic/trunk/src/tprocess.h 2009-08-22 17:45:39 UTC (rev 60) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003,2009 Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14,10 +14,10 @@ disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. + Neither the name of Crystalline Realms, Midnight's Hour BBS + nor the names of their contributors may be used to endorse or + promote products derived from this software without specific + prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-07-26 03:14:05
|
Revision: 59 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=59&view=rev Author: jame Date: 2009-07-26 03:13:45 +0000 (Sun, 26 Jul 2009) Log Message: ----------- Move debian directory/development to its own branch. Added Paths: ----------- tinytic/branches/debian/ tinytic/branches/debian/0.6.0/ tinytic/branches/debian/0.6.0/1/ Removed Paths: ------------- tinytic/trunk/debian/ Property changes on: tinytic/branches/debian/0.6.0/1 ___________________________________________________________________ Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-09 01:16:42
|
Revision: 58 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=58&view=rev Author: jame Date: 2009-03-09 01:16:32 +0000 (Mon, 09 Mar 2009) Log Message: ----------- Add a debian directory for TinyTIC. Added Paths: ----------- tinytic/trunk/debian/ tinytic/trunk/debian/README.Debian tinytic/trunk/debian/changelog tinytic/trunk/debian/compat tinytic/trunk/debian/control tinytic/trunk/debian/copyright tinytic/trunk/debian/dirs tinytic/trunk/debian/docs tinytic/trunk/debian/postinst tinytic/trunk/debian/postrm tinytic/trunk/debian/preinst tinytic/trunk/debian/prerm tinytic/trunk/debian/rules tinytic/trunk/debian/tinytic.doc-base tinytic/trunk/debian/watch Added: tinytic/trunk/debian/README.Debian =================================================================== --- tinytic/trunk/debian/README.Debian (rev 0) +++ tinytic/trunk/debian/README.Debian 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,26 @@ +TinyTIC for Debian +------------------ + + TinyTIC is a small, simple TIC processor that can be used with any BBS +software that will allow importation of a text message into its message base. +The binary is installed to /usr/bin, with documentation and examples being +available in /usr/share/doc/tinytic. Discussion and support for it can +be done in Fidonet echos like BBS_CARNIVAL, LINUX_BBS, and others. + + Documentation: +SYSOP.DOC.gz : The sysop documentation. +SYNC.DOC.gz : Describes how to use TinyTIC with Synchronet. +MAILPROC.BAT : Sample batch file to use with Synchronet. +MPOST.DOC : Describes how to use MPost for Squish/*.MSG BBSes. +AUTORULE.BAT : Sample batch file to use with MPost and Squish. +HEADER.TXT : Sample header text file. +FOOTER.TXT : Sample footer text file. + + + The original source archive was downloaded from Sean Dennis' system, +http://nsbbs.darktech.org/files/tt00531s.zip. It was then added to the +FTN Applications project at SourceForge where it is now available from. +Homepage for it is http://ftnapps.sourceforge.net/tinytic.html. + + + -- Robert James Clay <ja...@ro...> Sun, 08 Mar 2009 15:12:05 -0400 Added: tinytic/trunk/debian/changelog =================================================================== --- tinytic/trunk/debian/changelog (rev 0) +++ tinytic/trunk/debian/changelog 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,6 @@ +tinytic (0.6.0-0.1) UNRELEASED; urgency=low + + * Initial release of TinyTIC as a Debian Package + + -- Robert James Clay <ja...@ro...> Sun, 08 Mar 2009 15:12:05 -0400 + Added: tinytic/trunk/debian/compat =================================================================== --- tinytic/trunk/debian/compat (rev 0) +++ tinytic/trunk/debian/compat 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1 @@ +7 Added: tinytic/trunk/debian/control =================================================================== --- tinytic/trunk/debian/control (rev 0) +++ tinytic/trunk/debian/control 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,15 @@ +Source: tinytic +Section: utils +Priority: extra +Maintainer: Robert James Clay <ja...@ro...> +Build-Depends: debhelper (>= 7) +Standards-Version: 3.7.3 +Homepage: http://ftnapps.sourceforge.net/tinytic.html + +Package: tinytic +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Small, simple TIC Processor + TinyTIC can be used as a TIC Processor with any + BBS software that will allow importation of a + text message into its message base. Added: tinytic/trunk/debian/copyright =================================================================== --- tinytic/trunk/debian/copyright (rev 0) +++ tinytic/trunk/debian/copyright 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,39 @@ +This package was debianized by Robert James Clay <ja...@ro...> on +Sun, 08 Mar 2009 15:12:05 -0400. + +It was downloaded from http://ftnapps.sourceforge.net. + +Upstream Author(s): + + Michael Dillon <gsv...@gm...> + +Copyright: + + <Copyright (C) 2000-2003 Michael Dillon> + +License: + + Redistribution and use in source and binary forms, with or without + modification, are permitted under the terms of the BSD License. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +On Debian systems, the complete text of the BSD License can be +found in `/usr/share/common-licenses/BSD'. + + +The Debian packaging is (C) 2009, Robert James Clay <ja...@ro...> and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +The documentation files are Copyright (C) 2000-2002 Sean Dennis and are +under the BSD license, see `/usr/share/common-licenses/BSD' Added: tinytic/trunk/debian/dirs =================================================================== --- tinytic/trunk/debian/dirs (rev 0) +++ tinytic/trunk/debian/dirs 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1 @@ +usr/bin Added: tinytic/trunk/debian/docs =================================================================== --- tinytic/trunk/debian/docs (rev 0) +++ tinytic/trunk/debian/docs 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,10 @@ +doc/AUTORULE.BAT +doc/EXAMPLE.CFG +doc/FOOTER.TXT +doc/HEADER.TXT +doc/MAILPROC.BAT +doc/MPOST.DOC +doc/SYNC.DOC +doc/SYSOP.DOC +doc/TINYTIC.CFG +license.txt Added: tinytic/trunk/debian/postinst =================================================================== --- tinytic/trunk/debian/postinst (rev 0) +++ tinytic/trunk/debian/postinst 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,41 @@ +#!/bin/sh +# postinst script for tinytic +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + Added: tinytic/trunk/debian/postrm =================================================================== --- tinytic/trunk/debian/postrm (rev 0) +++ tinytic/trunk/debian/postrm 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,39 @@ +#!/bin/sh +# postrm script for tinytic +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <overwriter> +# <overwriter-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + Added: tinytic/trunk/debian/preinst =================================================================== --- tinytic/trunk/debian/preinst (rev 0) +++ tinytic/trunk/debian/preinst 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for tinytic +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <new-preinst> `install' +# * <new-preinst> `install' <old-version> +# * <new-preinst> `upgrade' <old-version> +# * <old-preinst> `abort-upgrade' <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + Added: tinytic/trunk/debian/prerm =================================================================== --- tinytic/trunk/debian/prerm (rev 0) +++ tinytic/trunk/debian/prerm 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for tinytic +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <prerm> `remove' +# * <old-prerm> `upgrade' <new-version> +# * <new-prerm> `failed-upgrade' <old-version> +# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> +# * <deconfigured's-prerm> `deconfigure' `in-favour' +# <package-being-installed> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + Added: tinytic/trunk/debian/rules =================================================================== --- tinytic/trunk/debian/rules (rev 0) +++ tinytic/trunk/debian/rules 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,78 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# debian/rules for TinyTIC + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + #$(MAKE) + g++ src/CDirect.cpp -Wall -s -c + g++ src/filecopy.cpp -Wall -s -c + g++ src/tprocess.cpp -Wall -s -c + g++ src/parse.cpp -Wall -s -c + g++ src/ticlog.cpp -Wall -s -c + g++ src/tinytic.cpp -Wall -s -c + g++ *.o -o tinytic + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + rm -f *.o + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tinytic. + dh_install tinytic /usr/bin + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs doc/tinytic.rev + dh_installdocs + dh_installman doc/tinytic.1 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure Property changes on: tinytic/trunk/debian/rules ___________________________________________________________________ Added: svn:executable + * Added: tinytic/trunk/debian/tinytic.doc-base =================================================================== --- tinytic/trunk/debian/tinytic.doc-base (rev 0) +++ tinytic/trunk/debian/tinytic.doc-base 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,11 @@ +Document: tinytic +Title: Debian TinyTIC Manual +Author: Sean Dennis +Abstract: This manual describes what TinyTIC is + and how it can be used to process TIC files + on Debian systems. +Section: utils + +Format: text +Files: /usr/share/doc/tinytic/SYSOP.DOC.gz + Added: tinytic/trunk/debian/watch =================================================================== --- tinytic/trunk/debian/watch (rev 0) +++ tinytic/trunk/debian/watch 2009-03-09 01:16:32 UTC (rev 58) @@ -0,0 +1,11 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +http://sf.net/tinytic/tinytic-(.*)\.tar\.gz + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-09 01:04:09
|
Revision: 57 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=57&view=rev Author: jame Date: 2009-03-09 01:03:56 +0000 (Mon, 09 Mar 2009) Log Message: ----------- Add a man page for TinyTIC. Added Paths: ----------- tinytic/trunk/doc/tinytic.1 Added: tinytic/trunk/doc/tinytic.1 =================================================================== --- tinytic/trunk/doc/tinytic.1 (rev 0) +++ tinytic/trunk/doc/tinytic.1 2009-03-09 01:03:56 UTC (rev 57) @@ -0,0 +1,53 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH TINYTIC 1 "March 8, 2009" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp <n> insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +tinytic \- Small, simple TIC processor. +.SH SYNOPSIS +.B tinytic +.RI [ options ] +.SH DESCRIPTION +.PP +.\" TeX users may be more comfortable with the \fB<whatever>\fP and +.\" \fI<whatever>\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBtinytic\fP is a small, simple TIC processor which can be used with +any BBS software that will allow importation of a text message into +its message base. For further details, see the documentation. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +A summary of options is included below. +.TP +.B \-c, \-\-config-file +Specify a config file to use other than the default. +.TP +.B \-d, \-\-data-file +Location where the datafile will be stored, Overrides +the one specified in the configuration file. +.TP +.B \-l, \-\-log-file +Location where the log file will be stored, Overrides +the one specified in the configuration file. +.TP +.B \-h, \-?, \-\-help +This help screen. +.br +.SH AUTHOR +TinyTIC was written by Michael Dillon. +.PP +This manual page was written by Robert James Clay <ja...@ro...>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 20:07:18
|
Revision: 56 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=56&view=rev Author: jame Date: 2009-03-08 20:07:04 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Add RJC to tinytic lincense.txt file. Modified Paths: -------------- tinytic/trunk/license.txt Modified: tinytic/trunk/license.txt =================================================================== --- tinytic/trunk/license.txt 2009-03-08 20:04:43 UTC (rev 55) +++ tinytic/trunk/license.txt 2009-03-08 20:07:04 UTC (rev 56) @@ -1,4 +1,5 @@ -Copyright (c) 2000-2002, Michael Dillon +Copyright (c) 2000-2003, Michael Dillon +Copyright (c) 2009, Robert James Clay All rights reserved. Redistribution and use in source and binary forms, with or without This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 20:04:52
|
Revision: 55 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=55&view=rev Author: jame Date: 2009-03-08 20:04:43 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Add note about doc & src directories to doc/tinytic.rev. Modified Paths: -------------- tinytic/trunk/doc/tinytic.rev Modified: tinytic/trunk/doc/tinytic.rev =================================================================== --- tinytic/trunk/doc/tinytic.rev 2009-03-08 18:49:35 UTC (rev 54) +++ tinytic/trunk/doc/tinytic.rev 2009-03-08 20:04:43 UTC (rev 55) @@ -3,8 +3,11 @@ Copyright (C) 2009 Robert James Clay. --------------------------------------------------------------------------- -v0.6.0 - 8 November 2009 - Change format of version string from n.n.n.n to n.n.n, dropping the. +v0.6.0 - 8 March 2009 + Renamed "pkg" directory to "doc". Moved source code files to a "src" + directory. + + Change format of version string from n.n.n.n to n.n.n, dropping the first zero and changing the version itself from 0.5.3-r1 to 0.6.0. =========================================================================== v0.0.5.3-r1 - 7 November 2003 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 18:49:48
|
Revision: 54 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=54&view=rev Author: jame Date: 2009-03-08 18:49:35 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Move TinyTIC code files to a src directory. Added Paths: ----------- tinytic/trunk/src/ tinytic/trunk/src/CDirect.cpp tinytic/trunk/src/CDirect.h tinytic/trunk/src/TinyTIC.dsp tinytic/trunk/src/TinyTIC.dsw tinytic/trunk/src/filecopy.cpp tinytic/trunk/src/filecopy.h tinytic/trunk/src/headers.h tinytic/trunk/src/parse.cpp tinytic/trunk/src/parse.h tinytic/trunk/src/ticlog.cpp tinytic/trunk/src/ticlog.h tinytic/trunk/src/tinytic.cpp tinytic/trunk/src/tinytic.h tinytic/trunk/src/tprocess.cpp tinytic/trunk/src/tprocess.h Removed Paths: ------------- tinytic/trunk/CDirect.cpp tinytic/trunk/CDirect.h tinytic/trunk/TinyTIC.dsp tinytic/trunk/TinyTIC.dsw tinytic/trunk/filecopy.cpp tinytic/trunk/filecopy.h tinytic/trunk/headers.h tinytic/trunk/parse.cpp tinytic/trunk/parse.h tinytic/trunk/ticlog.cpp tinytic/trunk/ticlog.h tinytic/trunk/tinytic.cpp tinytic/trunk/tinytic.h tinytic/trunk/tprocess.cpp tinytic/trunk/tprocess.h Deleted: tinytic/trunk/CDirect.cpp =================================================================== --- tinytic/trunk/CDirect.cpp 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/CDirect.cpp 2009-03-08 18:49:35 UTC (rev 54) @@ -1,416 +0,0 @@ -/********************************************************************** - Copyright (c) 2000-2002, Michael Dillon - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ -/********************************************************************* - CDirect.cpp - Cross-platform directory searching class. - *********************************************************************/ -#include "CDirect.h" - -// Default constructor, looks in current directory and searches for all files -CDirect::CDirect() -{ - // Default to searching for all files - _pattern = "*.*"; - // Default to current directory - _directory = "."; - - // Flag the directory as "Not-in-use" - _open = false; - - // Call the FixPath to make sure the directory has a trailing slash - FixPath(); - - // Set the Max count to 0 - _MaxFiles = 0L; - - // Get the max count - GetMaxFiles(); -} - -// Secondary constructor, allows for specified directory and match pattern -CDirect::CDirect( const char *pattern, const char *directory ) -{ - // Use the given pattern - _pattern = pattern; - // Use the given directory - _directory = directory; - - // flag the directory as "Not-In-Use" - _open = false; - - // Call FixPath to make sure the directory has a trailing slash - FixPath(); - - // Set the Max count to 0 - _MaxFiles = 0L; - - // Get the max count - GetMaxFiles(); -} - -// Destructor, closes anything that was opened -CDirect::~CDirect() -{ - // Check to see if the directory was in use or was opened. - if (_open == true) - { -#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) -// ----------------------- -// Windows & OS/2 Specific -// ----------------------- - // Close the find search - _findclose(hFileSearch); -#elif defined(__DIRECT_FILE_SEARCH_POSIX) -// ----------------------- -// POSIX Specific -// ----------------------- - // Close the open directory - closedir(hDir); -#endif - } -} - -// Find: -// Searches for entries of files matching the pattern -// -bool CDirect::Find( void ) -{ - // Return value for this function - bool _FindReturn = false; - - // Has the directory been accessed already ? - if (_open == false) - { - // No, find the first file entry matching the pattern. - _open = FindFirst(); - // Set the return to that of FindFirst(); - _FindReturn = _open; - } - else - { - // Yes, Find the next file entry - _FindReturn = FindNext(); - } - - // Return - return ( _FindReturn ); -} - -// FindFirst: Searches for the first entry matching the pattern -bool CDirect::FindFirst(void) -{ - // Return value for FindFirst() - bool _FindFirstReturn = false; - -#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) -// ------------------------ -// Windows & OS/2 Specific -// ------------------------ - // Create a temporary buffer - string szTmpBuf; - - // Copy the given directory to the temporary buffer - szTmpBuf = _directory.c_str(); - - // Copy the pattern to the buffer - szTmpBuf += _pattern.c_str(); - - // Search for the first entry matching the pattern - if ((hFileSearch = _findfirst(szTmpBuf.c_str(), &hFindData)) > -1L) - { - // Entry found, update the hFileData structure - ValidateData(); - // Set the return to true - _FindFirstReturn = true; - } -#elif defined(__DIRECT__FILE_SEARCH_POSIX) -// ------------------------- -// POSIX Specific -// ------------------------- - // Attempt to open the specified directory - if ((hDir = opendir(_directory.c_str())) != NULL) - { - // Read each entry of the directory until a match was found - // or the directory has no more entries. - while ((hDirent = readdir(hDir)) != NULL) - { - // Check to see if the file's name matches the given - // pattern. -#if defined(DJGPP) - if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) -#else - if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) -#endif - { - // Yes, update the hFileData structure - ValidateData(); - // Set the return to true - _FindFirstReturn = true; - // Get out of the loop - break; - } - } - } -#endif - - // Return - return (_FindFirstReturn); -} - -// FindNext: Searches for the next entry in the directory matching the pattern -bool CDirect::FindNext(void) -{ - // Clear the value of hFileData - DestroyValues(); - // Return value for FindNext - bool _FindNextReturn = false; - -#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) -// ------------------------ -// Windows & OS/2 Specific -// ------------------------ - // Search for the next entry - if (_findnext(hFileSearch, &hFindData) == 0) - { - // Found, Update the hFileData structure - ValidateData(); - // Set the return to true - _FindNextReturn = true; - } -#elif defined(__DIRECT__FILE_SEARCH_POSIX) -// ------------------------- -// POSIX Specific -// ------------------------- - // Attempt to read the directory for more entries or - // until there are no more entries to be found. - while ( ( hDirent = readdir( hDir ) ) != NULL ) - { - // Check to see if the file name matches that of the pattern -#if defined(DJGPP) - if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) -#else - if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) -#endif - { - // Yes, update the hFileData structure - ValidateData(); - // Set the return to true - _FindNextReturn = true; - // Get Out of the loop - break; - } - } -#endif - - // Return - return (_FindNextReturn); -} - -// ValidateData: Updates the values for the hFileData structure -void CDirect::ValidateData(void) -{ - // Temporary string - string szTmpBuffer; - - // Copy the directory to the TempBuffer - szTmpBuffer = _directory.c_str(); - -#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) -// ----------------------- -// Windows & OS/2 Specific -// ----------------------- - // Copy the file name found in the search to the hFileData structure - strcpy(hFileData.Name, hFindData.name); -#elif defined(__DIRECT__FILE_SEARCH_POSIX) -// ----------------------- -// POSIX Specific -// ----------------------- - // Copy the file name found with readdir() to the hFileData structure - strcpy(hFileData.Name, hDirent->d_name); -#endif - - // Copy the file name onto the directory - szTmpBuffer += hFileData.Name; - - // Call stat() to get information about the file. - if (stat(szTmpBuffer.c_str(), &hFStat) == 0) - { - // Set the last access time - hFileData.AccessTime = ( time_t )hFStat.st_atime; - // Set the creation time - hFileData.CreateTime = ( time_t )hFStat.st_ctime; - // Set the last write time - hFileData.WriteTime = ( time_t )hFStat.st_mtime; - // Set the size - hFileData.Size = hFStat.st_size; - // Set the mode - hFileData.Mode = hFStat.st_mode; - } - else - { - // Stat failed, destroy all values except the file's name - hFileData.AccessTime = ( time_t )0; - hFileData.CreateTime = ( time_t )0; - hFileData.WriteTime = ( time_t )0; - hFileData.Size = 0L; - hFileData.Mode = 0; - } -} - -// GetInfo: Return's the current entry for a matching file (if any) -FileData CDirect::GetInfo(void) -{ - // Return the hFileData structure - return (hFileData); -} - -// Clears the values for the hFileData structure -void CDirect::DestroyValues(void) -{ - // Set all values to that equivalent to NULL - hFileData.Mode = 0; - hFileData.AccessTime = ( time_t )0; - hFileData.CreateTime = ( time_t )0; - hFileData.WriteTime = ( time_t )0; - hFileData.Size = 0L; - memset(hFileData.Name, 0, sizeof(hFileData.Name)); -} - -// FixPath: Ensure there's a trailing slash on the directory name -void CDirect::FixPath(void) -{ - // Temporary buffer - string szTmpBuffer; - - // Temporary iterator - string::iterator idx; - - // Copy the directory into the buffer - szTmpBuffer = _directory.c_str(); - - // Set the iterator to the end of the buffer - idx = szTmpBuffer.end(); - -#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) -// ----------------------- -// Windows & OS/2 Specific -// ----------------------- - // Check to see if there's a trailing backslash - if (*idx != '\\') - { - // No, add one. - szTmpBuffer += '\\'; - } -#elif defined(__DIRECT__FILE_SEARCH_POSIX) -// ----------------------- -// POSIX Specific -// ----------------------- - // Check for a trailing slash - if (*idx != '/') - { - // No, add one. - szTmpBuffer += '/'; - } -#endif - - // Save the changes - _directory = szTmpBuffer; -} - -void CDirect::GetMaxFiles(void) -{ -#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT_FILE_SEARCH_OS2) -// ------------------------ -// Windows & OS/2 Specific -// ------------------------ - // Create a search handle - long hSearch = -1L; - // Create a find data structure to hold information - struct _finddata_t hFData; - // Temporary string to hold the full path & pattern - string szTmp; - - // Combine the directory and pattern into a full path - szTmp = _directory.c_str(); - szTmp += _pattern.c_str(); - // Create a search handle and try to find the first instance of - // a file matching the pattern, if none then MaxFiles will remain - // zero - if ((hSearch = _findfirst(szTmp.c_str(), &hFData)) > -1L) - { - // increment the max files value - _MaxFiles++; - // Search for other files after the first one until - // there are no more files to search through. - while (_findnext(hSearch, &hFData) == 0) - { - // increment, file found. - _MaxFiles++; - } - // Close the search, finish. - _findclose(hSearch); - } -#elif defined(__DIRECT__FILE_SEARCH_POSIX) -// ------------------------- -// POSIX Specific -// ------------------------- - // Create a DIRectory structure - DIR *hDirec; - // Create a local instance to hold information obtained - struct dirent *hDirentLocal; - // Attempt to open the specified directory - if ((hDirec = opendir( _directory.c_str())) != NULL) - { - // Read each entry of the directory until a match was found - // or the directory has no more entries. - while ((hDirentLocal = readdir(hDirec)) != NULL) - { - // Check to see if the file's name matches the given - // pattern. -#if defined(DJGPP) - if (fnmatch(_pattern.c_str(), hDirentLocal->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) -#else - if (fnmatch(_pattern.c_str(), hDirentLocal->d_name, 0) == 0) -#endif - { - // increment the file count. - _MaxFiles++; - } - } - // Terminate the search - closedir(hDirec); - } -#endif -} - Deleted: tinytic/trunk/CDirect.h =================================================================== --- tinytic/trunk/CDirect.h 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/CDirect.h 2009-03-08 18:49:35 UTC (rev 54) @@ -1,172 +0,0 @@ -/********************************************************************** - Copyright (c) 2000-2002, Michael Dillon - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ -/********************************************************************* - CDirect.h - class for handling cross-platform directory searching. - *********************************************************************/ -#if !defined (__DIRECT__FILE_SEARCH___H) -#define __DIRECT__FILE_SEARCH___H 1 - -#ifndef __cplusplus -# error "This source REQUIRES C++ to function" -#endif - -//#include <iostream> -//#include <string> // STL String header - -#include "headers.h" -#include "tinytic.h" // This will define the system type we can use - -//#ifndef __NAMESPACE_SET -//# if !defined(STLPORT) || defined(_STL_USE_NAMESPACES) -// using namespace std ; -//# endif /* !STL_PORT || _STL_USE_NAMESPACES */ -//# define __NAMESPACE_SET 1 -//#endif /* __NAMESPACE_SET */ - -#include <sys/types.h> // Required for stat() -#include <sys/stat.h> // Definition for stat() - -// Check to see if the definitions are already set, if they are -// then undefine them. -// __DIRECT__FILE_SEARCH_WINDOWS : Definition set for Windows based systems -// __DIRECT__FILE_SEARCH_POSIX : Definition set for POSIX enabled systems - -#undef __DIRECT__FILE_SEARCH_WINDOWS -#undef __DIRECT__FILE_SEARCH_POSIX -#undef __DIRECT__FILE_SEARCH_OS2 - -#if defined(__TINYTIC_WINDOWS) -# define __DIRECT__FILE_SEARCH_WINDOWS -# include <io.h> -# include <direct.h> -#elif defined(__TINYTIC_POSIX) -# define __DIRECT__FILE_SEARCH_POSIX -# include <dirent.h> -# include <fnmatch.h> -#elif defined(__TINYTIC_OS2) -# define __DIRECT__FILE_SEARCH_OS2 -# include <io.h> -#else -# error "Please define the correct compiler type" -#endif - -// Primary structure used by CDirect -typedef struct { - unsigned short int Mode; // File's Mode settings - time_t AccessTime; // Last Access Time - time_t CreateTime; // File creation date - time_t WriteTime; // Last Write time - unsigned long int Size; // Size of file - char Name[4096]; // File's Name -} FileData; - -class CDirect -{ -public: - CDirect(); - CDirect(const char *pattern, const char *directory = "."); - ~CDirect(); - - // Find: Calls on FindNext or FindFirst depending on if the - // directory has been opened. - bool Find(void); - // GetInfo: Returns the current FileData for any given file - // found. - FileData GetInfo(void); - // GetCount: Returns the number of files that matched the pattern - // in the given directory. - unsigned long int GetCount(void) { return (_MaxFiles); } - -private: - // FindFirst: Searches for the first entry matching the given pattern - bool FindFirst(void); - // FindNext: Searches for the next relevant entry matching the given - // pattern - bool FindNext(void); - // ValidateData: Sets the values for the FileData structure - void ValidateData(void); - // DestroyValues: Clears the values for the FileData structure - // This is done before each call to FindNext and - // FindFirst - void DestroyValues(void); - // FixPath: Makes sure there is a trailing slash for the directory - // given - void FixPath(void); - // GetMaxFiles: Count the number of files matching the pattern in - // the directory. - void GetMaxFiles(void); - - // hFileData: Internal FileData structure, this will be modified - // by ValidateData primarily, and sent to a requesting - // program by GetInfo - FileData hFileData; - // _pattern: Internal storage for the 'pattern' passed at - // construction time. - string _pattern; - // _directory: Internal storage for the 'directory' passed at - // construction time. - string _directory; - - // _open: Internal flag to see if the directory is in access or - // was unable to be opened. - bool _open; - // hFStat: Structure used to gather info from stat() and put it - // in the hFileData structure - struct stat hFStat; - // _MaxFiles: Internal value that indicates how many files were - // found matching the pattern - unsigned long int _MaxFiles; - -#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) -// -------------------------- -// Windows & OS/2 Specific additions -// -------------------------- - // hFileSearch: Find handle passed by findfirst() - long hFileSearch; - // hFindData: Structure used by findfirst() and findnext() - struct _finddata_t hFindData; -#elif defined(__DIRECT__FILE_SEARCH_POSIX) -// -------------------------- -// POSIX Specific additions -// -------------------------- - // hDir: Directory handle passed from opendir() - DIR *hDir; - // hDirent: Passed from readdir(), holds the file that was found. - struct dirent *hDirent; -#endif -}; - - -#endif Deleted: tinytic/trunk/TinyTIC.dsp =================================================================== --- tinytic/trunk/TinyTIC.dsp 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/TinyTIC.dsp 2009-03-08 18:49:35 UTC (rev 54) @@ -1,149 +0,0 @@ -# Microsoft Developer Studio Project File - Name="TinyTIC" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=TinyTIC - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "TinyTIC.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "TinyTIC.mak" CFG="TinyTIC - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "TinyTIC - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "TinyTIC - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "TinyTIC - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "TinyTIC - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "TinyTIC - Win32 Release" -# Name "TinyTIC - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\CDirect.cpp -# End Source File -# Begin Source File - -SOURCE=.\filecopy.cpp -# End Source File -# Begin Source File - -SOURCE=.\parse.cpp -# End Source File -# Begin Source File - -SOURCE=.\ticlog.cpp -# End Source File -# Begin Source File - -SOURCE=.\tinytic.cpp -# End Source File -# Begin Source File - -SOURCE=.\tprocess.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\CDirect.h -# End Source File -# Begin Source File - -SOURCE=.\filecopy.h -# End Source File -# Begin Source File - -SOURCE=.\headers.h -# End Source File -# Begin Source File - -SOURCE=.\parse.h -# End Source File -# Begin Source File - -SOURCE=.\ticlog.h -# End Source File -# Begin Source File - -SOURCE=.\tinytic.h -# End Source File -# Begin Source File - -SOURCE=.\tprocess.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project Deleted: tinytic/trunk/TinyTIC.dsw =================================================================== --- tinytic/trunk/TinyTIC.dsw 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/TinyTIC.dsw 2009-03-08 18:49:35 UTC (rev 54) @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "TinyTIC"=.\TinyTIC.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - Deleted: tinytic/trunk/filecopy.cpp =================================================================== --- tinytic/trunk/filecopy.cpp 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/filecopy.cpp 2009-03-08 18:49:35 UTC (rev 54) @@ -1,130 +0,0 @@ -/********************************************************************** - Copyright (c) 2000-2003, Michael Dillon - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ -/********************************************************************* - filecopy.cpp - File copying functions - *********************************************************************/ -#include "tinytic.h" -#include "filecopy.h" - - -// Function-Program constants -#define COPY_BUFFER_SIZE 4096 -void FileCopyProgress(unsigned long int FileSize, unsigned long int Copied); - -bool FileCopy(const char *Source, const char *Dest) -{ - bool RValue = true; // Return Value - char Buffer[COPY_BUFFER_SIZE]; - ifstream SFile; - ofstream OFile; - unsigned long int SFileSize; - unsigned long int Copied; - - if (Source == NULL || Dest == NULL) - { - // One of the files specified isn't allowed to be used - return (false); - } - - // Attempt to open the file - if (!FOpen( Source, SFile, ios::in|ios::binary)) - RValue = false; - if (!FOpen( Dest, OFile, ios::out|ios::binary|ios::trunc)) - RValue = false; - - // Copy the data - memset(Buffer, '\x0', COPY_BUFFER_SIZE * sizeof(char)); - - if (RValue == true) - { - SFile.seekg(0L, ios::end); - SFileSize = SFile.tellg(); - SFile.seekg(0L, ios::beg); - cout << "Copy Progress: [" << setw(10) - << SFileSize << "/"; - Copied = 0; - do { - SFile.read(Buffer, COPY_BUFFER_SIZE); - OFile.write(Buffer, SFile.gcount()); - Copied += SFile.gcount(); - FileCopyProgress(SFileSize, Copied); - memset(Buffer, '\x0', COPY_BUFFER_SIZE * sizeof(char)); - } while ((SFile.eof() == 0) && (SFile.gcount() == COPY_BUFFER_SIZE)); - FileCopyProgress(SFileSize, SFileSize); - cout << endl; - } - - // Close any open files - if (FIsOpen(SFile) == true) - SFile.close(); - if (FIsOpen(OFile) == true) - OFile.close(); - // Return - return ( RValue ); -} - -// Originally FOpen() was a template, some compilers however did not -// appropriately handle the template. -bool FOpen(const char *FileName, ifstream &File, ios::openmode Flags) -{ - bool RValue = true; - File.open(FileName, Flags); - if (!File) - { - cerr << "Unable to open " << FileName << "." << endl; - RValue = false; - } - return (RValue); -} - -bool FOpen(const char *FileName, ofstream &File, ios::openmode Flags) -{ - bool RValue = true; - File.open(FileName, Flags); - if (!File) - { - cerr << "Unable to open " << FileName << "." << endl; - RValue = false; - } - return (RValue); -} - -void FileCopyProgress(unsigned long int FileSize, unsigned long int Copied) -{ - cout << setw(10) << Copied << "]"; - cout << "\x8\x8\x8\x8\x8\x8\x8\x8\x8\x8\x8"; - cout.flush(); - UNUSED_PARAM(FileSize); -} Deleted: tinytic/trunk/filecopy.h =================================================================== --- tinytic/trunk/filecopy.h 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/filecopy.h 2009-03-08 18:49:35 UTC (rev 54) @@ -1,58 +0,0 @@ -/********************************************************************** - Copyright (c) 2000-2003, Michael Dillon - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ -/********************************************************************* - filecopy.h - Header for the file copy functions. - *********************************************************************/ -#if !defined( FILECOPY_HEADER__H ) -#define FILECOPY_HEADER__H 1 - -bool FOpen(const char *, ifstream &, ios::openmode); -bool FOpen(const char *, ofstream &, ios::openmode); - -// File IS_OPEN Template -template<class FSTREAM_TYPE_OPEN> -bool FIsOpen( FSTREAM_TYPE_OPEN &File ) -{ - filebuf *FileBuf; - - FileBuf = File.rdbuf(); - - return ( FileBuf->is_open() ); -} - -// Other function prototypes -bool FileCopy( const char *Source, const char *Dest ); - -#endif Deleted: tinytic/trunk/headers.h =================================================================== --- tinytic/trunk/headers.h 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/headers.h 2009-03-08 18:49:35 UTC (rev 54) @@ -1,79 +0,0 @@ -/********************************************************************** - Copyright (c) 2000-2002, Michael Dillon - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ -/********************************************************************* - headers.h - Used to include various headers for specific platforms - and standard headers. - *********************************************************************/ -#ifndef TINYTIC_HEADERS__H -#define TINYTIC_HEADERS__H 1 - -#if !defined(__cplusplus) -# error "C++ only!" -#endif /* __cplusplus */ - -#include <iostream> -#include <iomanip> -#include <fstream> -#include <string> -#include <sstream> -#include <cerrno> -#include <cctype> -#include <cstring> -#include <cstdio> -#include <cstdlib> - -#ifndef __NAMESPACE_SET -# if !defined(_STLPORT_VERSION) || defined(_STL_USE_NAMESPACES) - using namespace std; -# endif /* !_STLPORT || _STL_USE_NAMESPACES */ -# define __NAMESPACE_SET 1 -#endif /* __NAMESPACE_SET */ - -#if defined(__WATCOMC__) || defined(_WIN32) -# include <direct.h> -# include <process.h> -#endif /* __WATCOMC__ || _WIN32 */ - -#if defined(_WIN32) -# include <windows.h> -#endif /* _WIN32 */ - -#if defined(unix) || defined(linux) || defined(__GNUC__) -# include <unistd.h> -#endif /* unix || linux || __GNUC__ */ - -#include <time.h> - -#endif /* TINYTIC_HEADERS__H */ Deleted: tinytic/trunk/parse.cpp =================================================================== --- tinytic/trunk/parse.cpp 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/parse.cpp 2009-03-08 18:49:35 UTC (rev 54) @@ -1,167 +0,0 @@ -/********************************************************************** - Copyright (c) 2000-2002, Michael Dillon - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ -/********************************************************************* - parse.cpp - Functions for reading the configuration file. - *********************************************************************/ -#include "tinytic.h" -#include "parse.h" -#include "ticlog.h" -#include "tprocess.h" - -string szConfigFile = "tinytic.cfg"; - -// Define the strings -string Inbound; -string DataFile; -string LogFile; - -bool ReadConfigFile(void) -{ - string Log; - string szTmp; - char szTmpBuffer[ BUFFER_MAXLEN ] = "\x0"; - ifstream fConfig; - - // Is a command line config file specified ? - if (szCmdConfigFile != "") - { - // Yes, use it (overrides default) - fConfig.open(szCmdConfigFile.c_str(), ios::in); - } - else - { - // No, use defaulted config file. - szTmp = szHomeDir + szConfigFile; - fConfig.open(szTmp.c_str(), ios::in); - } - - if (!fConfig) - { - cerr << "Unable to open " << szConfigFile.c_str() << "!" << endl; - cerr << "Make sure this file is in the same directory as this program." << endl; - - return (false); - } - - - while (!fConfig.eof()) - { - fConfig >> ws >> szTmpBuffer; - if (*szTmpBuffer == '#' || *szTmpBuffer == ';') - { - // This is commments, ignore - fConfig.getline(szTmpBuffer, BUFFER_MAXLEN); - } - else - { - if (stricmp(szTmpBuffer, "Inbound") == 0) - { - // Inbound directory specified - fConfig >> ws >> szTmpBuffer; - Inbound = szTmpBuffer; - - if ((Inbound == "") || (VerifyDirectory(Inbound.c_str()) == false)) - { -#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) - Inbound = ".\\"; -#elif defined(__TINYTIC_POSIX) - Inbound = "./"; -#endif - } - - Log = "Checking for .TIC files in \'"; - Log += szTmpBuffer; - Log += "\'."; - PutLog(Log.c_str(), INFO); - } - else if (stricmp(szTmpBuffer, "DataFile") == 0) - { - // DataFile directory/file specified - fConfig >> ws >> szTmpBuffer; - DataFile = szTmpBuffer; - - if ((DataFile == "") || (VerifyFileUsable(DataFile.c_str()) == false)) - { -#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) - DataFile = ".\\tinytic.dat"; -#elif defined(__TINYTIC_POSIX) - DataFile = "./tinytic.dat"; -#endif - } - - - if (szCmdDataFile == "") - { - Log = "Saving new entries to \'"; - Log += szTmpBuffer; - Log += "\'."; - PutLog( Log.c_str(), INFO ); - } - } - else if (stricmp(szTmpBuffer, "LogFile") == 0) - { - // DataFile directory/file specified - fConfig >> ws >> szTmpBuffer; - szLogFile = szTmpBuffer; - - if ((szLogFile == "") || (VerifyFileUsable(szLogFile.c_str()) == false)) - { -#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) - szLogFile = ".\\tinytic.log"; -#elif defined(__TINYTIC_POSIX) - szLogFile = "./tinytic.log"; -#endif - } - - if (szCmdLogFile == "") - { - cout << "Using LogFile \'" - << szLogFile.c_str() - << "\'." - << endl; - } - } - else - { - fConfig.getline(szTmpBuffer, BUFFER_MAXLEN); - } - } - } - - fConfig.close(); - - return (true); -} - Deleted: tinytic/trunk/parse.h =================================================================== --- tinytic/trunk/parse.h 2009-03-08 18:18:20 UTC (rev 53) +++ tinytic/trunk/parse.h 2009-03-08 18:49:35 UTC (rev 54) @@ -1,55 +0,0 @@ -/********************************************************************** - Copyright (c) 2000-2002, Michael Dillon - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of Crystalline Realms, Midnight's Hour BBS, - Elysium Software nor the names of their contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ -/********************************************************************** - parse.h - Header file for the config file parser function - *********************************************************************/ -#if !defined( PARSE_HEADER__H ) -#define PARSE_HEADER__H 1 - -extern string szConfigFile; -#define BUFFER_MAXLEN 1024 - -// Inbound and DataFile directory names -extern string Inbound; -extern string DataFile; -extern string LogFile; - -// Function Prototypes -bool ReadConfigFile(void) ; // Reads the file specified by 'CONF' - -#endif - - - Copied: tinytic/trunk/src/CDirect.cpp (from rev 52, tinytic/trunk/CDirect.cpp) =================================================================== --- tinytic/trunk/src/CDirect.cpp (rev 0) +++ tinytic/trunk/src/CDirect.cpp 2009-03-08 18:49:35 UTC (rev 54) @@ -0,0 +1,416 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + CDirect.cpp - Cross-platform directory searching class. + *********************************************************************/ +#include "CDirect.h" + +// Default constructor, looks in current directory and searches for all files +CDirect::CDirect() +{ + // Default to searching for all files + _pattern = "*.*"; + // Default to current directory + _directory = "."; + + // Flag the directory as "Not-in-use" + _open = false; + + // Call the FixPath to make sure the directory has a trailing slash + FixPath(); + + // Set the Max count to 0 + _MaxFiles = 0L; + + // Get the max count + GetMaxFiles(); +} + +// Secondary constructor, allows for specified directory and match pattern +CDirect::CDirect( const char *pattern, const char *directory ) +{ + // Use the given pattern + _pattern = pattern; + // Use the given directory + _directory = directory; + + // flag the directory as "Not-In-Use" + _open = false; + + // Call FixPath to make sure the directory has a trailing slash + FixPath(); + + // Set the Max count to 0 + _MaxFiles = 0L; + + // Get the max count + GetMaxFiles(); +} + +// Destructor, closes anything that was opened +CDirect::~CDirect() +{ + // Check to see if the directory was in use or was opened. + if (_open == true) + { +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Close the find search + _findclose(hFileSearch); +#elif defined(__DIRECT_FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Close the open directory + closedir(hDir); +#endif + } +} + +// Find: +// Searches for entries of files matching the pattern +// +bool CDirect::Find( void ) +{ + // Return value for this function + bool _FindReturn = false; + + // Has the directory been accessed already ? + if (_open == false) + { + // No, find the first file entry matching the pattern. + _open = FindFirst(); + // Set the return to that of FindFirst(); + _FindReturn = _open; + } + else + { + // Yes, Find the next file entry + _FindReturn = FindNext(); + } + + // Return + return ( _FindReturn ); +} + +// FindFirst: Searches for the first entry matching the pattern +bool CDirect::FindFirst(void) +{ + // Return value for FindFirst() + bool _FindFirstReturn = false; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Create a temporary buffer + string szTmpBuf; + + // Copy the given directory to the temporary buffer + szTmpBuf = _directory.c_str(); + + // Copy the pattern to the buffer + szTmpBuf += _pattern.c_str(); + + // Search for the first entry matching the pattern + if ((hFileSearch = _findfirst(szTmpBuf.c_str(), &hFindData)) > -1L) + { + // Entry found, update the hFileData structure + ValidateData(); + // Set the return to true + _FindFirstReturn = true; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Attempt to open the specified directory + if ((hDir = opendir(_directory.c_str())) != NULL) + { + // Read each entry of the directory until a match was found + // or the directory has no more entries. + while ((hDirent = readdir(hDir)) != NULL) + { + // Check to see if the file's name matches the given + // pattern. +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) +#endif + { + // Yes, update the hFileData structure + ValidateData(); + // Set the return to true + _FindFirstReturn = true; + // Get out of the loop + break; + } + } + } +#endif + + // Return + return (_FindFirstReturn); +} + +// FindNext: Searches for the next entry in the directory matching the pattern +bool CDirect::FindNext(void) +{ + // Clear the value of hFileData + DestroyValues(); + // Return value for FindNext + bool _FindNextReturn = false; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Search for the next entry + if (_findnext(hFileSearch, &hFindData) == 0) + { + // Found, Update the hFileData structure + ValidateData(); + // Set the return to true + _FindNextReturn = true; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Attempt to read the directory for more entries or + // until there are no more entries to be found. + while ( ( hDirent = readdir( hDir ) ) != NULL ) + { + // Check to see if the file name matches that of the pattern +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) +#endif + { + // Yes, update the hFileData structure + ValidateData(); + // Set the return to true + _FindNextReturn = true; + // Get Out of the loop + break; + } + } +#endif + + // Return + return (_FindNextReturn); +} + +// ValidateData: Updates the values for the hFileData structure +void CDirect::ValidateData(void) +{ + // Temporary string + string szTmpBuffer; + + // Copy the directory to the TempBuffer + szTmpBuffer = _directory.c_str(); + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Copy the file name found in the search to the hFileData structure + strcpy(hFileData.Name, hFindData.name); +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Copy the file name found with readdir() to the hFileData structure + strcpy(hFileData.Name, hDirent->d_name); +#endif + + // Copy the file name onto the directory + szTmpBuffer += hFileData.Name; + + // Call stat() to get information about the file. + if (stat(szTmpBuffer.c_str(), &hFStat) == 0) + { + // Set the last access time + hFileData.AccessTime = ( time_t )hFStat.st_atime; + // Set the creation time + hFileData.CreateTime = ( time_t )hFStat.st_ctime; + // Set the last write time + hFileData.WriteTime... [truncated message content] |
From: <ja...@us...> - 2009-03-08 18:18:24
|
Revision: 53 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=53&view=rev Author: jame Date: 2009-03-08 18:18:20 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Rename TinyTIC pkg directory to doc. Added Paths: ----------- tinytic/trunk/doc/ tinytic/trunk/doc/SYSOP.DOC tinytic/trunk/doc/packing.lst tinytic/trunk/doc/tinytic.rev Removed Paths: ------------- tinytic/trunk/doc/SYSOP.DOC tinytic/trunk/doc/packing.lst tinytic/trunk/doc/tinytic.rev tinytic/trunk/pkg/ Deleted: tinytic/trunk/doc/SYSOP.DOC =================================================================== --- tinytic/trunk/pkg/SYSOP.DOC 2009-03-08 17:27:53 UTC (rev 50) +++ tinytic/trunk/doc/SYSOP.DOC 2009-03-08 18:18:20 UTC (rev 53) @@ -1,112 +0,0 @@ -TinyTic v0.0.5.3 -Release date: 15 October 2000 -Written by Mike Dillon and Sean Dennis -Copyright (C) 2000-2002 Mike Dillon and Sean Dennis -All rights reserved. - -Program developed and written by Mike Dillon -Documentation written by Sean Dennis -Documentation updated on 15 October 2000 - -*** EXTREMELY IMPORTANT *** -READ THE README.NOW FILE if there is one included with the archive! -This file contains changes that are NOT covered in this documentation. - -READ THE TINYTIC.REV FILE! It contains last-minute changes that may -have not made it into this documentation. - -*** The Linux binary is a static ELF binary which means it should run -*** on any system that supports Linux binaries... which includes BSD. - -Table of Contents -================= -1. What is TinyTIC? -2. How does TinyTIC work? -3. Contacting the authors -4. Thanks - -Legal Stuff -=========== -TinyTIC is not guaranteed to work on your system... there is no warranty, -expressed or implied, with this program or any of its associated files. -The only thing we can safely say it will do is take up a wee bit of -space on your hard drive. The author, Mike Dillon, nor Sean Dennis -are responsible for any damage done to your system by improper setup, -configuration or use of TinyTIC. - -This program is released as freeware, but remains the property of Mike -Dillon and Sean Dennis. This archive may be freely distributed, as long -as the original archive is unaltered. No charge may be made for the -use or distribution of TinyTIC. Reverse engineering or decompilation -of the source code is illegal. - -All copyrighted names are owned by their respective owners and are used -in this documentation as reference for the particular products only. - - 1. What is TinyTIC? - =================== -TinyTIC was written in response for a need for a small, simple TIC processor -that will work with Synchronet BBS software. This is primarily -designed for the Synchronet sysop in mind, but can be used with any BBS -software that will allow importation of text message into its message base -format, such as Syncrhonet does. Using a third party utility, such as a -freeware utility such as MPost that will import a text message into Squish -and *.MSG message bases, other BBS software will be able to take advantage -of TinyTIC. For information on using MPost with TinyTIC, please see -MPOST.DOC included in the TinyTIC archive. - -The need for this arose out of having to process TIC files without all the -bells and whistles that many TIC processors contain. I didn't need -all the fancy features and stuff-just something that will move the files to -the directory that I tell it to and make new files announcements in text -format... and so TinyTIC was written. - - - 2. How does TinyTIC work? - ========================= -Basically, after setting up TinyTIC's configuration file, TinyTIC will -simply look in your mailer's inbound directory for any TIC files. TinyTIC -will then look in the TIC files and match the magic name to what it has in -its configuration file. If the name exists and has a corresponding -directory, TinyTIC will move the file into the directory and add it to the -new files announcement text message. That's ALL TinyTIC does, nothing else. - -There are three command line options: - --c<configfile> : Allows for an alternate config file --d<configfile> : Allows for alternate datafile location and storage --l<logfile> : Allows for alternate logfile location and storage --h or -? : Commandline help - -To set up TinyTIC with Synchronet, please see the file, SYNC.DOC, included -in the TinyTic archive, for complete and detailed instructions. - -For other BBS software, we recommend the use of the freeware utility, -MPost, which will allow sysops that use the Squish and *.MSG message -base formats to import TinyTIC's output into their message bases. - - 3. Contacting the Authors - ========================= -Mike Dillon is really the author of TinyTIC and he put a lot of time into -developing TinyTIC for me. He did this for free and would probably -appreciate it if you dropped him a line to let him know that you appreciate -his hard work and are enjoying using TinyTIC. His email address is -gs...@ar... and his web site is http://members.darktech.org/gsvalore/. - -Myself... well, I wrote the docs and the batch file for use with the -Synchronet BBS software (http://www.synchro.net) and for use with -Telegard BBS software (http://www.telegard.net). You can reach me -at hau...@so... or see my web site at http://ah2.darktech.org. - - 4. Thanks - ========= -My personal thanks goes out to Mike for helping me do this. I couldn't have -done this without his help! I'd also like to thank Rob Swindell for -rekindling his interest in developing Synchronet BBS software for the -21st century. You can see what Sync's all about at http://www.synchro.net. -If you're interested in Telegard, check out http://www.telegard.net. - -Thanks for using TinyTIC, -Sean Dennis and Mike Dillon - -<EOF> Copied: tinytic/trunk/doc/SYSOP.DOC (from rev 52, tinytic/trunk/pkg/SYSOP.DOC) =================================================================== --- tinytic/trunk/doc/SYSOP.DOC (rev 0) +++ tinytic/trunk/doc/SYSOP.DOC 2009-03-08 18:18:20 UTC (rev 53) @@ -0,0 +1,112 @@ +TinyTic v0.6.0 +Release date: 15 October 2000 +Written by Mike Dillon and Sean Dennis +Copyright (C) 2000-2002 Mike Dillon and Sean Dennis +All rights reserved. + +Program developed and written by Mike Dillon +Documentation written by Sean Dennis +Documentation updated on 15 October 2000 + +*** EXTREMELY IMPORTANT *** +READ THE README.NOW FILE if there is one included with the archive! +This file contains changes that are NOT covered in this documentation. + +READ THE TINYTIC.REV FILE! It contains last-minute changes that may +have not made it into this documentation. + +*** The Linux binary is a static ELF binary which means it should run +*** on any system that supports Linux binaries... which includes BSD. + +Table of Contents +================= +1. What is TinyTIC? +2. How does TinyTIC work? +3. Contacting the authors +4. Thanks + +Legal Stuff +=========== +TinyTIC is not guaranteed to work on your system... there is no warranty, +expressed or implied, with this program or any of its associated files. +The only thing we can safely say it will do is take up a wee bit of +space on your hard drive. The author, Mike Dillon, nor Sean Dennis +are responsible for any damage done to your system by improper setup, +configuration or use of TinyTIC. + +This program is released as freeware, but remains the property of Mike +Dillon and Sean Dennis. This archive may be freely distributed, as long +as the original archive is unaltered. No charge may be made for the +use or distribution of TinyTIC. Reverse engineering or decompilation +of the source code is illegal. + +All copyrighted names are owned by their respective owners and are used +in this documentation as reference for the particular products only. + + 1. What is TinyTIC? + =================== +TinyTIC was written in response for a need for a small, simple TIC processor +that will work with Synchronet BBS software. This is primarily +designed for the Synchronet sysop in mind, but can be used with any BBS +software that will allow importation of text message into its message base +format, such as Syncrhonet does. Using a third party utility, such as a +freeware utility such as MPost that will import a text message into Squish +and *.MSG message bases, other BBS software will be able to take advantage +of TinyTIC. For information on using MPost with TinyTIC, please see +MPOST.DOC included in the TinyTIC archive. + +The need for this arose out of having to process TIC files without all the +bells and whistles that many TIC processors contain. I didn't need +all the fancy features and stuff-just something that will move the files to +the directory that I tell it to and make new files announcements in text +format... and so TinyTIC was written. + + + 2. How does TinyTIC work? + ========================= +Basically, after setting up TinyTIC's configuration file, TinyTIC will +simply look in your mailer's inbound directory for any TIC files. TinyTIC +will then look in the TIC files and match the magic name to what it has in +its configuration file. If the name exists and has a corresponding +directory, TinyTIC will move the file into the directory and add it to the +new files announcement text message. That's ALL TinyTIC does, nothing else. + +There are three command line options: + +-c<configfile> : Allows for an alternate config file +-d<configfile> : Allows for alternate datafile location and storage +-l<logfile> : Allows for alternate logfile location and storage +-h or -? : Commandline help + +To set up TinyTIC with Synchronet, please see the file, SYNC.DOC, included +in the TinyTic archive, for complete and detailed instructions. + +For other BBS software, we recommend the use of the freeware utility, +MPost, which will allow sysops that use the Squish and *.MSG message +base formats to import TinyTIC's output into their message bases. + + 3. Contacting the Authors + ========================= +Mike Dillon is really the author of TinyTIC and he put a lot of time into +developing TinyTIC for me. He did this for free and would probably +appreciate it if you dropped him a line to let him know that you appreciate +his hard work and are enjoying using TinyTIC. His email address is +gs...@ar... and his web site is http://members.darktech.org/gsvalore/. + +Myself... well, I wrote the docs and the batch file for use with the +Synchronet BBS software (http://www.synchro.net) and for use with +Telegard BBS software (http://www.telegard.net). You can reach me +at hau...@so... or see my web site at http://ah2.darktech.org. + + 4. Thanks + ========= +My personal thanks goes out to Mike for helping me do this. I couldn't have +done this without his help! I'd also like to thank Rob Swindell for +rekindling his interest in developing Synchronet BBS software for the +21st century. You can see what Sync's all about at http://www.synchro.net. +If you're interested in Telegard, check out http://www.telegard.net. + +Thanks for using TinyTIC, +Sean Dennis and Mike Dillon + +<EOF> Deleted: tinytic/trunk/doc/packing.lst =================================================================== --- tinytic/trunk/pkg/packing.lst 2009-03-08 17:27:53 UTC (rev 50) +++ tinytic/trunk/doc/packing.lst 2009-03-08 18:18:20 UTC (rev 53) @@ -1,31 +0,0 @@ -TinyTIC packing list -for v0.0.5.3 -==================== - -Here's what should be in the archive: - -DOC directory: -SYSOP.DOC : The sysop documentation. -SYNC.DOC : Describes how to use TinyTIC with Synchronet. -MAILPROC.BAT : Sample batch file to use with Synchronet. -MPOST.DOC : Describes how to use MPost for Squish/*.MSG BBSes. -AUTORULE.BAT : Sample batch file to use with MPost and Squish. -HEADER.TXT : Sample header text file. -FOOTER.TXT : Sample footer text file. -TINYTIC.REV : The revision file. This contains info about the - latest information about the newest revision. - -Main Directory: -PACKING.LST : You're reading it. -FILE_ID.DIZ : BBS Description file - -Non-Linux version (In Main Directory): -TINYTIC.EXE : Actual program -TINYTIC.CFG : Sean's actual working TinyTIC config file. - -Linux version (In Main Directory): -TINYTIC : Actual Program ( Static ELF ) -TINYTIC-NS : Actual Program ( Non-Static ELF ) -LNXDEP : Dependencies for the Non-Static version -EXAMPLE.CFG : Example Linux config file. - Copied: tinytic/trunk/doc/packing.lst (from rev 52, tinytic/trunk/pkg/packing.lst) =================================================================== --- tinytic/trunk/doc/packing.lst (rev 0) +++ tinytic/trunk/doc/packing.lst 2009-03-08 18:18:20 UTC (rev 53) @@ -0,0 +1,31 @@ +TinyTIC packing list +for v0.6.0 +==================== + +Here's what should be in the archive: + +DOC directory: +SYSOP.DOC : The sysop documentation. +SYNC.DOC : Describes how to use TinyTIC with Synchronet. +MAILPROC.BAT : Sample batch file to use with Synchronet. +MPOST.DOC : Describes how to use MPost for Squish/*.MSG BBSes. +AUTORULE.BAT : Sample batch file to use with MPost and Squish. +HEADER.TXT : Sample header text file. +FOOTER.TXT : Sample footer text file. +TINYTIC.REV : The revision file. This contains info about the + latest information about the newest revision. + +Main Directory: +PACKING.LST : You're reading it. +FILE_ID.DIZ : BBS Description file + +Non-Linux version (In Main Directory): +TINYTIC.EXE : Actual program +TINYTIC.CFG : Sean's actual working TinyTIC config file. + +Linux version (In Main Directory): +TINYTIC : Actual Program ( Static ELF ) +TINYTIC-NS : Actual Program ( Non-Static ELF ) +LNXDEP : Dependencies for the Non-Static version +EXAMPLE.CFG : Example Linux config file. + Deleted: tinytic/trunk/doc/tinytic.rev =================================================================== --- tinytic/trunk/pkg/tinytic.rev 2009-03-08 17:27:53 UTC (rev 50) +++ tinytic/trunk/doc/tinytic.rev 2009-03-08 18:18:20 UTC (rev 53) @@ -1,88 +0,0 @@ -TinyTic Revision History -Copyright (C) 2000-2003 Michael Dillon. ---------------------------------------------------------------------------- - -v0.0.5.3-r1 - 7 November 2003 - Cosmetic change to the output being generated. -=========================================================================== -v0.0.5.3 - 7 December 2002 - First open source release. This version also fixed a minor - bug that caused crashes under certain circumstances. - - The OS/2 version is functioning again to the best of my - knowledge. It also no longer requires EMX unless you want - to build with GCC/EMX instead of Watcom C++. Note for Watcom - you will need STLport. -=========================================================================== -v0.0.5.1 - This version is just a simple fix of some bugs. - - Fixed a bug that caused the program to crash when there was more - than 10 description lines in the TIC file. That count has been - expanded to 30 and also will truncate if there's more than 30 lines - - Fixed a bug that would put a \ or / at the end of a path even though - it already had one. - e.g. D:\ would be D:\\ causing it to fail on reading -=========================================================================== -v0.0.5 - Fixed several potential bugs that might have caused program failure - - Added the option 'LogFile' to the configuration file to allow - specification of a new logfile location/name. - - If no 'LogFile', 'DataFile', or 'Inbound' is specified, they will - default to these values: - LogFile - tinytic.log - DataFile - tinytic.dat - Inbound - Current Directory ( .\ or ./ ) - - If any values are given and they can't be used (e.g. invalid file - names, etc) then they will be defaulted to the above mentioned - values. - - Added these command line options: - -c, --config-file : Allows for an alternate config file - -d, --data-file : Allows for alternate datafile location - and storage - -l, --log-file : Allows for alternate logfile location - and storage - -h, -?, --help : Displays a help screen of these - options - - Prevented the use of |, >, >>, <<, or < in the file names. -=========================================================================== -v0.0.4 - Fixed a bug that caused the program to exit because it could not - find it's home directory. Now the program defaults to the current - directory if it cannot find one within the command line. - - Modified the output for the primary screen to look better than - previous versions. - - Created an OS/2 version. The OS/2 version requires EMX v0.9d to - operate correctly. -=========================================================================== -v0.0.3 - Fixed a bug that would put the log file in the inbound directory, - also fixed it so that the config file is looked for in the - program's home directory - - Put in a copy-progress indicator to show how much of a processed - file has been copied. - - Modified the datafile's output to be more "readable" - - Cross-compiled the program for: - Windows-32 - DJGPP-DOS - Linux ( GCC/EGCS-2.91.66 ) -=========================================================================== -v0.0.2 - Removed an un-needed affiliation line on output -=========================================================================== -v0.0.1 - Spacing fixed on the datafile's output -=========================================================================== -v0.0.0 - First Release Copied: tinytic/trunk/doc/tinytic.rev (from rev 52, tinytic/trunk/pkg/tinytic.rev) =================================================================== --- tinytic/trunk/doc/tinytic.rev (rev 0) +++ tinytic/trunk/doc/tinytic.rev 2009-03-08 18:18:20 UTC (rev 53) @@ -0,0 +1,93 @@ +TinyTic Revision History +Copyright (C) 2000-2003 Michael Dillon. +Copyright (C) 2009 Robert James Clay. +--------------------------------------------------------------------------- + +v0.6.0 - 8 November 2009 + Change format of version string from n.n.n.n to n.n.n, dropping the. + first zero and changing the version itself from 0.5.3-r1 to 0.6.0. +=========================================================================== +v0.0.5.3-r1 - 7 November 2003 + Cosmetic change to the output being generated. +=========================================================================== +v0.0.5.3 - 7 December 2002 + First open source release. This version also fixed a minor + bug that caused crashes under certain circumstances. + + The OS/2 version is functioning again to the best of my + knowledge. It also no longer requires EMX unless you want + to build with GCC/EMX instead of Watcom C++. Note for Watcom + you will need STLport. +=========================================================================== +v0.0.5.1 + This version is just a simple fix of some bugs. + + Fixed a bug that caused the program to crash when there was more + than 10 description lines in the TIC file. That count has been + expanded to 30 and also will truncate if there's more than 30 lines + + Fixed a bug that would put a \ or / at the end of a path even though + it already had one. + e.g. D:\ would be D:\\ causing it to fail on reading +=========================================================================== +v0.0.5 + Fixed several potential bugs that might have caused program failure + + Added the option 'LogFile' to the configuration file to allow + specification of a new logfile location/name. + + If no 'LogFile', 'DataFile', or 'Inbound' is specified, they will + default to these values: + LogFile - tinytic.log + DataFile - tinytic.dat + Inbound - Current Directory ( .\ or ./ ) + + If any values are given and they can't be used (e.g. invalid file + names, etc) then they will be defaulted to the above mentioned + values. + + Added these command line options: + -c, --config-file : Allows for an alternate config file + -d, --data-file : Allows for alternate datafile location + and storage + -l, --log-file : Allows for alternate logfile location + and storage + -h, -?, --help : Displays a help screen of these + options + + Prevented the use of |, >, >>, <<, or < in the file names. +=========================================================================== +v0.0.4 + Fixed a bug that caused the program to exit because it could not + find it's home directory. Now the program defaults to the current + directory if it cannot find one within the command line. + + Modified the output for the primary screen to look better than + previous versions. + + Created an OS/2 version. The OS/2 version requires EMX v0.9d to + operate correctly. +=========================================================================== +v0.0.3 + Fixed a bug that would put the log file in the inbound directory, + also fixed it so that the config file is looked for in the + program's home directory + + Put in a copy-progress indicator to show how much of a processed + file has been copied. + + Modified the datafile's output to be more "readable" + + Cross-compiled the program for: + Windows-32 + DJGPP-DOS + Linux ( GCC/EGCS-2.91.66 ) +=========================================================================== +v0.0.2 + Removed an un-needed affiliation line on output +=========================================================================== +v0.0.1 + Spacing fixed on the datafile's output +=========================================================================== +v0.0.0 + First Release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 18:12:55
|
Revision: 52 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=52&view=rev Author: jame Date: 2009-03-08 18:12:48 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Change current TinyTIC version from 0.0.5.3-r1 to 0.6.0. Modified Paths: -------------- tinytic/trunk/file_id.diz tinytic/trunk/pkg/SYSOP.DOC tinytic/trunk/pkg/packing.lst tinytic/trunk/pkg/tinytic.rev tinytic/trunk/tinytic.h Modified: tinytic/trunk/file_id.diz =================================================================== --- tinytic/trunk/file_id.diz 2009-03-08 18:11:00 UTC (rev 51) +++ tinytic/trunk/file_id.diz 2009-03-08 18:12:48 UTC (rev 52) @@ -1,4 +1,4 @@ -TinyTIC 0.0.5.3-r1 source +TinyTIC 0.6.0 source ------------------------- Source code to TinyTIC. Written in C++, released Modified: tinytic/trunk/pkg/SYSOP.DOC =================================================================== --- tinytic/trunk/pkg/SYSOP.DOC 2009-03-08 18:11:00 UTC (rev 51) +++ tinytic/trunk/pkg/SYSOP.DOC 2009-03-08 18:12:48 UTC (rev 52) @@ -1,4 +1,4 @@ -TinyTic v0.0.5.3 +TinyTic v0.6.0 Release date: 15 October 2000 Written by Mike Dillon and Sean Dennis Copyright (C) 2000-2002 Mike Dillon and Sean Dennis Modified: tinytic/trunk/pkg/packing.lst =================================================================== --- tinytic/trunk/pkg/packing.lst 2009-03-08 18:11:00 UTC (rev 51) +++ tinytic/trunk/pkg/packing.lst 2009-03-08 18:12:48 UTC (rev 52) @@ -1,5 +1,5 @@ TinyTIC packing list -for v0.0.5.3 +for v0.6.0 ==================== Here's what should be in the archive: Modified: tinytic/trunk/pkg/tinytic.rev =================================================================== --- tinytic/trunk/pkg/tinytic.rev 2009-03-08 18:11:00 UTC (rev 51) +++ tinytic/trunk/pkg/tinytic.rev 2009-03-08 18:12:48 UTC (rev 52) @@ -1,7 +1,12 @@ TinyTic Revision History Copyright (C) 2000-2003 Michael Dillon. +Copyright (C) 2009 Robert James Clay. --------------------------------------------------------------------------- +v0.6.0 - 8 November 2009 + Change format of version string from n.n.n.n to n.n.n, dropping the. + first zero and changing the version itself from 0.5.3-r1 to 0.6.0. +=========================================================================== v0.0.5.3-r1 - 7 November 2003 Cosmetic change to the output being generated. =========================================================================== Modified: tinytic/trunk/tinytic.h =================================================================== --- tinytic/trunk/tinytic.h 2009-03-08 18:11:00 UTC (rev 51) +++ tinytic/trunk/tinytic.h 2009-03-08 18:12:48 UTC (rev 52) @@ -34,7 +34,8 @@ *********************************************************************/ /********************************************************************* tinytic.h - Master header for TinyTIC. - *********************************************************************/#if !defined(MAIN_HEADER__H) + *********************************************************************/ +#if !defined(MAIN_HEADER__H) #define MAIN_HEADER__H 1 #include "headers.h" @@ -83,7 +84,7 @@ # define SYS_TYPE_OTHER #endif -#define VERSION "0.0.5.3-r1" +#define VERSION "0.6.0" #define PROGNAME "TinyTic" #define VERSION_STR VERSION "-" COMPTYPE #define AUTHOR "Michael Dillon" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 18:11:11
|
Revision: 51 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=51&view=rev Author: jame Date: 2009-03-08 18:11:00 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Tag TinyTIC 0.0.5.3-r1 Added Paths: ----------- tinytic/tags/0.0.5.3-r1/ tinytic/tags/0.0.5.3-r1/CDirect.cpp tinytic/tags/0.0.5.3-r1/CDirect.h tinytic/tags/0.0.5.3-r1/TinyTIC.dsp tinytic/tags/0.0.5.3-r1/TinyTIC.dsw tinytic/tags/0.0.5.3-r1/compile.txt tinytic/tags/0.0.5.3-r1/file_id.diz tinytic/tags/0.0.5.3-r1/filecopy.cpp tinytic/tags/0.0.5.3-r1/filecopy.h tinytic/tags/0.0.5.3-r1/headers.h tinytic/tags/0.0.5.3-r1/license.txt tinytic/tags/0.0.5.3-r1/parse.cpp tinytic/tags/0.0.5.3-r1/parse.h tinytic/tags/0.0.5.3-r1/pkg/ tinytic/tags/0.0.5.3-r1/pkg/tinytic.rev tinytic/tags/0.0.5.3-r1/ticlog.cpp tinytic/tags/0.0.5.3-r1/ticlog.h tinytic/tags/0.0.5.3-r1/tinytic.cpp tinytic/tags/0.0.5.3-r1/tinytic.h tinytic/tags/0.0.5.3-r1/tprocess.cpp tinytic/tags/0.0.5.3-r1/tprocess.h Removed Paths: ------------- tinytic/tags/0.0.5.3-r1/pkg/tinytic.rev Property changes on: tinytic/tags/0.0.5.3-r1 ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/tags/0.0.5.3-r1/CDirect.cpp (from rev 48, tinytic/trunk/CDirect.cpp) =================================================================== --- tinytic/tags/0.0.5.3-r1/CDirect.cpp (rev 0) +++ tinytic/tags/0.0.5.3-r1/CDirect.cpp 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,416 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + CDirect.cpp - Cross-platform directory searching class. + *********************************************************************/ +#include "CDirect.h" + +// Default constructor, looks in current directory and searches for all files +CDirect::CDirect() +{ + // Default to searching for all files + _pattern = "*.*"; + // Default to current directory + _directory = "."; + + // Flag the directory as "Not-in-use" + _open = false; + + // Call the FixPath to make sure the directory has a trailing slash + FixPath(); + + // Set the Max count to 0 + _MaxFiles = 0L; + + // Get the max count + GetMaxFiles(); +} + +// Secondary constructor, allows for specified directory and match pattern +CDirect::CDirect( const char *pattern, const char *directory ) +{ + // Use the given pattern + _pattern = pattern; + // Use the given directory + _directory = directory; + + // flag the directory as "Not-In-Use" + _open = false; + + // Call FixPath to make sure the directory has a trailing slash + FixPath(); + + // Set the Max count to 0 + _MaxFiles = 0L; + + // Get the max count + GetMaxFiles(); +} + +// Destructor, closes anything that was opened +CDirect::~CDirect() +{ + // Check to see if the directory was in use or was opened. + if (_open == true) + { +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Close the find search + _findclose(hFileSearch); +#elif defined(__DIRECT_FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Close the open directory + closedir(hDir); +#endif + } +} + +// Find: +// Searches for entries of files matching the pattern +// +bool CDirect::Find( void ) +{ + // Return value for this function + bool _FindReturn = false; + + // Has the directory been accessed already ? + if (_open == false) + { + // No, find the first file entry matching the pattern. + _open = FindFirst(); + // Set the return to that of FindFirst(); + _FindReturn = _open; + } + else + { + // Yes, Find the next file entry + _FindReturn = FindNext(); + } + + // Return + return ( _FindReturn ); +} + +// FindFirst: Searches for the first entry matching the pattern +bool CDirect::FindFirst(void) +{ + // Return value for FindFirst() + bool _FindFirstReturn = false; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Create a temporary buffer + string szTmpBuf; + + // Copy the given directory to the temporary buffer + szTmpBuf = _directory.c_str(); + + // Copy the pattern to the buffer + szTmpBuf += _pattern.c_str(); + + // Search for the first entry matching the pattern + if ((hFileSearch = _findfirst(szTmpBuf.c_str(), &hFindData)) > -1L) + { + // Entry found, update the hFileData structure + ValidateData(); + // Set the return to true + _FindFirstReturn = true; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Attempt to open the specified directory + if ((hDir = opendir(_directory.c_str())) != NULL) + { + // Read each entry of the directory until a match was found + // or the directory has no more entries. + while ((hDirent = readdir(hDir)) != NULL) + { + // Check to see if the file's name matches the given + // pattern. +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) +#endif + { + // Yes, update the hFileData structure + ValidateData(); + // Set the return to true + _FindFirstReturn = true; + // Get out of the loop + break; + } + } + } +#endif + + // Return + return (_FindFirstReturn); +} + +// FindNext: Searches for the next entry in the directory matching the pattern +bool CDirect::FindNext(void) +{ + // Clear the value of hFileData + DestroyValues(); + // Return value for FindNext + bool _FindNextReturn = false; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Search for the next entry + if (_findnext(hFileSearch, &hFindData) == 0) + { + // Found, Update the hFileData structure + ValidateData(); + // Set the return to true + _FindNextReturn = true; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Attempt to read the directory for more entries or + // until there are no more entries to be found. + while ( ( hDirent = readdir( hDir ) ) != NULL ) + { + // Check to see if the file name matches that of the pattern +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) +#endif + { + // Yes, update the hFileData structure + ValidateData(); + // Set the return to true + _FindNextReturn = true; + // Get Out of the loop + break; + } + } +#endif + + // Return + return (_FindNextReturn); +} + +// ValidateData: Updates the values for the hFileData structure +void CDirect::ValidateData(void) +{ + // Temporary string + string szTmpBuffer; + + // Copy the directory to the TempBuffer + szTmpBuffer = _directory.c_str(); + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Copy the file name found in the search to the hFileData structure + strcpy(hFileData.Name, hFindData.name); +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Copy the file name found with readdir() to the hFileData structure + strcpy(hFileData.Name, hDirent->d_name); +#endif + + // Copy the file name onto the directory + szTmpBuffer += hFileData.Name; + + // Call stat() to get information about the file. + if (stat(szTmpBuffer.c_str(), &hFStat) == 0) + { + // Set the last access time + hFileData.AccessTime = ( time_t )hFStat.st_atime; + // Set the creation time + hFileData.CreateTime = ( time_t )hFStat.st_ctime; + // Set the last write time + hFileData.WriteTime = ( time_t )hFStat.st_mtime; + // Set the size + hFileData.Size = hFStat.st_size; + // Set the mode + hFileData.Mode = hFStat.st_mode; + } + else + { + // Stat failed, destroy all values except the file's name + hFileData.AccessTime = ( time_t )0; + hFileData.CreateTime = ( time_t )0; + hFileData.WriteTime = ( time_t )0; + hFileData.Size = 0L; + hFileData.Mode = 0; + } +} + +// GetInfo: Return's the current entry for a matching file (if any) +FileData CDirect::GetInfo(void) +{ + // Return the hFileData structure + return (hFileData); +} + +// Clears the values for the hFileData structure +void CDirect::DestroyValues(void) +{ + // Set all values to that equivalent to NULL + hFileData.Mode = 0; + hFileData.AccessTime = ( time_t )0; + hFileData.CreateTime = ( time_t )0; + hFileData.WriteTime = ( time_t )0; + hFileData.Size = 0L; + memset(hFileData.Name, 0, sizeof(hFileData.Name)); +} + +// FixPath: Ensure there's a trailing slash on the directory name +void CDirect::FixPath(void) +{ + // Temporary buffer + string szTmpBuffer; + + // Temporary iterator + string::iterator idx; + + // Copy the directory into the buffer + szTmpBuffer = _directory.c_str(); + + // Set the iterator to the end of the buffer + idx = szTmpBuffer.end(); + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Check to see if there's a trailing backslash + if (*idx != '\\') + { + // No, add one. + szTmpBuffer += '\\'; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Check for a trailing slash + if (*idx != '/') + { + // No, add one. + szTmpBuffer += '/'; + } +#endif + + // Save the changes + _directory = szTmpBuffer; +} + +void CDirect::GetMaxFiles(void) +{ +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT_FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Create a search handle + long hSearch = -1L; + // Create a find data structure to hold information + struct _finddata_t hFData; + // Temporary string to hold the full path & pattern + string szTmp; + + // Combine the directory and pattern into a full path + szTmp = _directory.c_str(); + szTmp += _pattern.c_str(); + // Create a search handle and try to find the first instance of + // a file matching the pattern, if none then MaxFiles will remain + // zero + if ((hSearch = _findfirst(szTmp.c_str(), &hFData)) > -1L) + { + // increment the max files value + _MaxFiles++; + // Search for other files after the first one until + // there are no more files to search through. + while (_findnext(hSearch, &hFData) == 0) + { + // increment, file found. + _MaxFiles++; + } + // Close the search, finish. + _findclose(hSearch); + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Create a DIRectory structure + DIR *hDirec; + // Create a local instance to hold information obtained + struct dirent *hDirentLocal; + // Attempt to open the specified directory + if ((hDirec = opendir( _directory.c_str())) != NULL) + { + // Read each entry of the directory until a match was found + // or the directory has no more entries. + while ((hDirentLocal = readdir(hDirec)) != NULL) + { + // Check to see if the file's name matches the given + // pattern. +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirentLocal->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirentLocal->d_name, 0) == 0) +#endif + { + // increment the file count. + _MaxFiles++; + } + } + // Terminate the search + closedir(hDirec); + } +#endif +} + Copied: tinytic/tags/0.0.5.3-r1/CDirect.h (from rev 48, tinytic/trunk/CDirect.h) =================================================================== --- tinytic/tags/0.0.5.3-r1/CDirect.h (rev 0) +++ tinytic/tags/0.0.5.3-r1/CDirect.h 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,172 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + CDirect.h - class for handling cross-platform directory searching. + *********************************************************************/ +#if !defined (__DIRECT__FILE_SEARCH___H) +#define __DIRECT__FILE_SEARCH___H 1 + +#ifndef __cplusplus +# error "This source REQUIRES C++ to function" +#endif + +//#include <iostream> +//#include <string> // STL String header + +#include "headers.h" +#include "tinytic.h" // This will define the system type we can use + +//#ifndef __NAMESPACE_SET +//# if !defined(STLPORT) || defined(_STL_USE_NAMESPACES) +// using namespace std ; +//# endif /* !STL_PORT || _STL_USE_NAMESPACES */ +//# define __NAMESPACE_SET 1 +//#endif /* __NAMESPACE_SET */ + +#include <sys/types.h> // Required for stat() +#include <sys/stat.h> // Definition for stat() + +// Check to see if the definitions are already set, if they are +// then undefine them. +// __DIRECT__FILE_SEARCH_WINDOWS : Definition set for Windows based systems +// __DIRECT__FILE_SEARCH_POSIX : Definition set for POSIX enabled systems + +#undef __DIRECT__FILE_SEARCH_WINDOWS +#undef __DIRECT__FILE_SEARCH_POSIX +#undef __DIRECT__FILE_SEARCH_OS2 + +#if defined(__TINYTIC_WINDOWS) +# define __DIRECT__FILE_SEARCH_WINDOWS +# include <io.h> +# include <direct.h> +#elif defined(__TINYTIC_POSIX) +# define __DIRECT__FILE_SEARCH_POSIX +# include <dirent.h> +# include <fnmatch.h> +#elif defined(__TINYTIC_OS2) +# define __DIRECT__FILE_SEARCH_OS2 +# include <io.h> +#else +# error "Please define the correct compiler type" +#endif + +// Primary structure used by CDirect +typedef struct { + unsigned short int Mode; // File's Mode settings + time_t AccessTime; // Last Access Time + time_t CreateTime; // File creation date + time_t WriteTime; // Last Write time + unsigned long int Size; // Size of file + char Name[4096]; // File's Name +} FileData; + +class CDirect +{ +public: + CDirect(); + CDirect(const char *pattern, const char *directory = "."); + ~CDirect(); + + // Find: Calls on FindNext or FindFirst depending on if the + // directory has been opened. + bool Find(void); + // GetInfo: Returns the current FileData for any given file + // found. + FileData GetInfo(void); + // GetCount: Returns the number of files that matched the pattern + // in the given directory. + unsigned long int GetCount(void) { return (_MaxFiles); } + +private: + // FindFirst: Searches for the first entry matching the given pattern + bool FindFirst(void); + // FindNext: Searches for the next relevant entry matching the given + // pattern + bool FindNext(void); + // ValidateData: Sets the values for the FileData structure + void ValidateData(void); + // DestroyValues: Clears the values for the FileData structure + // This is done before each call to FindNext and + // FindFirst + void DestroyValues(void); + // FixPath: Makes sure there is a trailing slash for the directory + // given + void FixPath(void); + // GetMaxFiles: Count the number of files matching the pattern in + // the directory. + void GetMaxFiles(void); + + // hFileData: Internal FileData structure, this will be modified + // by ValidateData primarily, and sent to a requesting + // program by GetInfo + FileData hFileData; + // _pattern: Internal storage for the 'pattern' passed at + // construction time. + string _pattern; + // _directory: Internal storage for the 'directory' passed at + // construction time. + string _directory; + + // _open: Internal flag to see if the directory is in access or + // was unable to be opened. + bool _open; + // hFStat: Structure used to gather info from stat() and put it + // in the hFileData structure + struct stat hFStat; + // _MaxFiles: Internal value that indicates how many files were + // found matching the pattern + unsigned long int _MaxFiles; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// -------------------------- +// Windows & OS/2 Specific additions +// -------------------------- + // hFileSearch: Find handle passed by findfirst() + long hFileSearch; + // hFindData: Structure used by findfirst() and findnext() + struct _finddata_t hFindData; +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// -------------------------- +// POSIX Specific additions +// -------------------------- + // hDir: Directory handle passed from opendir() + DIR *hDir; + // hDirent: Passed from readdir(), holds the file that was found. + struct dirent *hDirent; +#endif +}; + + +#endif Copied: tinytic/tags/0.0.5.3-r1/TinyTIC.dsp (from rev 48, tinytic/trunk/TinyTIC.dsp) =================================================================== --- tinytic/tags/0.0.5.3-r1/TinyTIC.dsp (rev 0) +++ tinytic/tags/0.0.5.3-r1/TinyTIC.dsp 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,149 @@ +# Microsoft Developer Studio Project File - Name="TinyTIC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=TinyTIC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TinyTIC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TinyTIC.mak" CFG="TinyTIC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TinyTIC - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "TinyTIC - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TinyTIC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "TinyTIC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "TinyTIC - Win32 Release" +# Name "TinyTIC - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CDirect.cpp +# End Source File +# Begin Source File + +SOURCE=.\filecopy.cpp +# End Source File +# Begin Source File + +SOURCE=.\parse.cpp +# End Source File +# Begin Source File + +SOURCE=.\ticlog.cpp +# End Source File +# Begin Source File + +SOURCE=.\tinytic.cpp +# End Source File +# Begin Source File + +SOURCE=.\tprocess.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CDirect.h +# End Source File +# Begin Source File + +SOURCE=.\filecopy.h +# End Source File +# Begin Source File + +SOURCE=.\headers.h +# End Source File +# Begin Source File + +SOURCE=.\parse.h +# End Source File +# Begin Source File + +SOURCE=.\ticlog.h +# End Source File +# Begin Source File + +SOURCE=.\tinytic.h +# End Source File +# Begin Source File + +SOURCE=.\tprocess.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project Copied: tinytic/tags/0.0.5.3-r1/TinyTIC.dsw (from rev 48, tinytic/trunk/TinyTIC.dsw) =================================================================== --- tinytic/tags/0.0.5.3-r1/TinyTIC.dsw (rev 0) +++ tinytic/tags/0.0.5.3-r1/TinyTIC.dsw 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TinyTIC"=.\TinyTIC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + Copied: tinytic/tags/0.0.5.3-r1/compile.txt (from rev 48, tinytic/trunk/compile.txt) =================================================================== --- tinytic/tags/0.0.5.3-r1/compile.txt (rev 0) +++ tinytic/tags/0.0.5.3-r1/compile.txt 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,25 @@ +INFORMATION ON COMPILING TINYTIC: + +Files that have to be compiled: +CDirect.cpp, filecopy.cpp, tprocess.cpp, parse.cpp, ticlog.cpp, and +tinytic.cpp + +Replace <file> with one of those required, listed above. + +I wrote this short document because I am not good at writing +makefiles ;) + +Watcom C++: +[DOS/16]: wpp <file> -bt=dos -l=dos -zq -Ox -d0 -d_NOTHREADS -W3 +[DOS/32]: wpp386 <file> -bt=dos -l=dos32x -zq -Ox -d0 -d_NOTHREADS -W3 +[OS/2]: wpp386 <file> -bt=os2 -l=os2v2 -zq -Ox -d0 -W3 +[Windows]: wpp386 <file> -bt=windows -l=windows -zq -Ox -d0 -W3 + +Do note that I used STLport to compile these under Watcom C++! + +Visual C++ v6: +[Windows]: cl <file> -Ox -nologo -d0 -GX -W3 + +GCC 2.9+: +[ALL]: g++ <file> -Wall -s -c + g++ *.o -o tinytic \ No newline at end of file Copied: tinytic/tags/0.0.5.3-r1/file_id.diz (from rev 48, tinytic/trunk/file_id.diz) =================================================================== --- tinytic/tags/0.0.5.3-r1/file_id.diz (rev 0) +++ tinytic/tags/0.0.5.3-r1/file_id.diz 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,8 @@ +TinyTIC 0.0.5.3-r1 source +------------------------- +Source code to TinyTIC. +Written in C++, released +under the BSD license. +Author(s): +Mike Dillon (GSValore) +Sean Dennis (HausMaus) Copied: tinytic/tags/0.0.5.3-r1/filecopy.cpp (from rev 50, tinytic/trunk/filecopy.cpp) =================================================================== --- tinytic/tags/0.0.5.3-r1/filecopy.cpp (rev 0) +++ tinytic/tags/0.0.5.3-r1/filecopy.cpp 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,130 @@ +/********************************************************************** + Copyright (c) 2000-2003, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + filecopy.cpp - File copying functions + *********************************************************************/ +#include "tinytic.h" +#include "filecopy.h" + + +// Function-Program constants +#define COPY_BUFFER_SIZE 4096 +void FileCopyProgress(unsigned long int FileSize, unsigned long int Copied); + +bool FileCopy(const char *Source, const char *Dest) +{ + bool RValue = true; // Return Value + char Buffer[COPY_BUFFER_SIZE]; + ifstream SFile; + ofstream OFile; + unsigned long int SFileSize; + unsigned long int Copied; + + if (Source == NULL || Dest == NULL) + { + // One of the files specified isn't allowed to be used + return (false); + } + + // Attempt to open the file + if (!FOpen( Source, SFile, ios::in|ios::binary)) + RValue = false; + if (!FOpen( Dest, OFile, ios::out|ios::binary|ios::trunc)) + RValue = false; + + // Copy the data + memset(Buffer, '\x0', COPY_BUFFER_SIZE * sizeof(char)); + + if (RValue == true) + { + SFile.seekg(0L, ios::end); + SFileSize = SFile.tellg(); + SFile.seekg(0L, ios::beg); + cout << "Copy Progress: [" << setw(10) + << SFileSize << "/"; + Copied = 0; + do { + SFile.read(Buffer, COPY_BUFFER_SIZE); + OFile.write(Buffer, SFile.gcount()); + Copied += SFile.gcount(); + FileCopyProgress(SFileSize, Copied); + memset(Buffer, '\x0', COPY_BUFFER_SIZE * sizeof(char)); + } while ((SFile.eof() == 0) && (SFile.gcount() == COPY_BUFFER_SIZE)); + FileCopyProgress(SFileSize, SFileSize); + cout << endl; + } + + // Close any open files + if (FIsOpen(SFile) == true) + SFile.close(); + if (FIsOpen(OFile) == true) + OFile.close(); + // Return + return ( RValue ); +} + +// Originally FOpen() was a template, some compilers however did not +// appropriately handle the template. +bool FOpen(const char *FileName, ifstream &File, ios::openmode Flags) +{ + bool RValue = true; + File.open(FileName, Flags); + if (!File) + { + cerr << "Unable to open " << FileName << "." << endl; + RValue = false; + } + return (RValue); +} + +bool FOpen(const char *FileName, ofstream &File, ios::openmode Flags) +{ + bool RValue = true; + File.open(FileName, Flags); + if (!File) + { + cerr << "Unable to open " << FileName << "." << endl; + RValue = false; + } + return (RValue); +} + +void FileCopyProgress(unsigned long int FileSize, unsigned long int Copied) +{ + cout << setw(10) << Copied << "]"; + cout << "\x8\x8\x8\x8\x8\x8\x8\x8\x8\x8\x8"; + cout.flush(); + UNUSED_PARAM(FileSize); +} Copied: tinytic/tags/0.0.5.3-r1/filecopy.h (from rev 50, tinytic/trunk/filecopy.h) =================================================================== --- tinytic/tags/0.0.5.3-r1/filecopy.h (rev 0) +++ tinytic/tags/0.0.5.3-r1/filecopy.h 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,58 @@ +/********************************************************************** + Copyright (c) 2000-2003, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + filecopy.h - Header for the file copy functions. + *********************************************************************/ +#if !defined( FILECOPY_HEADER__H ) +#define FILECOPY_HEADER__H 1 + +bool FOpen(const char *, ifstream &, ios::openmode); +bool FOpen(const char *, ofstream &, ios::openmode); + +// File IS_OPEN Template +template<class FSTREAM_TYPE_OPEN> +bool FIsOpen( FSTREAM_TYPE_OPEN &File ) +{ + filebuf *FileBuf; + + FileBuf = File.rdbuf(); + + return ( FileBuf->is_open() ); +} + +// Other function prototypes +bool FileCopy( const char *Source, const char *Dest ); + +#endif Copied: tinytic/tags/0.0.5.3-r1/headers.h (from rev 48, tinytic/trunk/headers.h) =================================================================== --- tinytic/tags/0.0.5.3-r1/headers.h (rev 0) +++ tinytic/tags/0.0.5.3-r1/headers.h 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,79 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + headers.h - Used to include various headers for specific platforms + and standard headers. + *********************************************************************/ +#ifndef TINYTIC_HEADERS__H +#define TINYTIC_HEADERS__H 1 + +#if !defined(__cplusplus) +# error "C++ only!" +#endif /* __cplusplus */ + +#include <iostream> +#include <iomanip> +#include <fstream> +#include <string> +#include <sstream> +#include <cerrno> +#include <cctype> +#include <cstring> +#include <cstdio> +#include <cstdlib> + +#ifndef __NAMESPACE_SET +# if !defined(_STLPORT_VERSION) || defined(_STL_USE_NAMESPACES) + using namespace std; +# endif /* !_STLPORT || _STL_USE_NAMESPACES */ +# define __NAMESPACE_SET 1 +#endif /* __NAMESPACE_SET */ + +#if defined(__WATCOMC__) || defined(_WIN32) +# include <direct.h> +# include <process.h> +#endif /* __WATCOMC__ || _WIN32 */ + +#if defined(_WIN32) +# include <windows.h> +#endif /* _WIN32 */ + +#if defined(unix) || defined(linux) || defined(__GNUC__) +# include <unistd.h> +#endif /* unix || linux || __GNUC__ */ + +#include <time.h> + +#endif /* TINYTIC_HEADERS__H */ Copied: tinytic/tags/0.0.5.3-r1/license.txt (from rev 48, tinytic/trunk/license.txt) =================================================================== --- tinytic/tags/0.0.5.3-r1/license.txt (rev 0) +++ tinytic/tags/0.0.5.3-r1/license.txt 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,32 @@ +Copyright (c) 2000-2002, Michael Dillon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file Copied: tinytic/tags/0.0.5.3-r1/parse.cpp (from rev 48, tinytic/trunk/parse.cpp) =================================================================== --- tinytic/tags/0.0.5.3-r1/parse.cpp (rev 0) +++ tinytic/tags/0.0.5.3-r1/parse.cpp 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,167 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + parse.cpp - Functions for reading the configuration file. + *********************************************************************/ +#include "tinytic.h" +#include "parse.h" +#include "ticlog.h" +#include "tprocess.h" + +string szConfigFile = "tinytic.cfg"; + +// Define the strings +string Inbound; +string DataFile; +string LogFile; + +bool ReadConfigFile(void) +{ + string Log; + string szTmp; + char szTmpBuffer[ BUFFER_MAXLEN ] = "\x0"; + ifstream fConfig; + + // Is a command line config file specified ? + if (szCmdConfigFile != "") + { + // Yes, use it (overrides default) + fConfig.open(szCmdConfigFile.c_str(), ios::in); + } + else + { + // No, use defaulted config file. + szTmp = szHomeDir + szConfigFile; + fConfig.open(szTmp.c_str(), ios::in); + } + + if (!fConfig) + { + cerr << "Unable to open " << szConfigFile.c_str() << "!" << endl; + cerr << "Make sure this file is in the same directory as this program." << endl; + + return (false); + } + + + while (!fConfig.eof()) + { + fConfig >> ws >> szTmpBuffer; + if (*szTmpBuffer == '#' || *szTmpBuffer == ';') + { + // This is commments, ignore + fConfig.getline(szTmpBuffer, BUFFER_MAXLEN); + } + else + { + if (stricmp(szTmpBuffer, "Inbound") == 0) + { + // Inbound directory specified + fConfig >> ws >> szTmpBuffer; + Inbound = szTmpBuffer; + + if ((Inbound == "") || (VerifyDirectory(Inbound.c_str()) == false)) + { +#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) + Inbound = ".\\"; +#elif defined(__TINYTIC_POSIX) + Inbound = "./"; +#endif + } + + Log = "Checking for .TIC files in \'"; + Log += szTmpBuffer; + Log += "\'."; + PutLog(Log.c_str(), INFO); + } + else if (stricmp(szTmpBuffer, "DataFile") == 0) + { + // DataFile directory/file specified + fConfig >> ws >> szTmpBuffer; + DataFile = szTmpBuffer; + + if ((DataFile == "") || (VerifyFileUsable(DataFile.c_str()) == false)) + { +#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) + DataFile = ".\\tinytic.dat"; +#elif defined(__TINYTIC_POSIX) + DataFile = "./tinytic.dat"; +#endif + } + + + if (szCmdDataFile == "") + { + Log = "Saving new entries to \'"; + Log += szTmpBuffer; + Log += "\'."; + PutLog( Log.c_str(), INFO ); + } + } + else if (stricmp(szTmpBuffer, "LogFile") == 0) + { + // DataFile directory/file specified + fConfig >> ws >> szTmpBuffer; + szLogFile = szTmpBuffer; + + if ((szLogFile == "") || (VerifyFileUsable(szLogFile.c_str()) == false)) + { +#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) + szLogFile = ".\\tinytic.log"; +#elif defined(__TINYTIC_POSIX) + szLogFile = "./tinytic.log"; +#endif + } + + if (szCmdLogFile == "") + { + cout << "Using LogFile \'" + << szLogFile.c_str() + << "\'." + << endl; + } + } + else + { + fConfig.getline(szTmpBuffer, BUFFER_MAXLEN); + } + } + } + + fConfig.close(); + + return (true); +} + Copied: tinytic/tags/0.0.5.3-r1/parse.h (from rev 48, tinytic/trunk/parse.h) =================================================================== --- tinytic/tags/0.0.5.3-r1/parse.h (rev 0) +++ tinytic/tags/0.0.5.3-r1/parse.h 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,55 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************** + parse.h - Header file for the config file parser function + *********************************************************************/ +#if !defined( PARSE_HEADER__H ) +#define PARSE_HEADER__H 1 + +extern string szConfigFile; +#define BUFFER_MAXLEN 1024 + +// Inbound and DataFile directory names +extern string Inbound; +extern string DataFile; +extern string LogFile; + +// Function Prototypes +bool ReadConfigFile(void) ; // Reads the file specified by 'CONF' + +#endif + + + Deleted: tinytic/tags/0.0.5.3-r1/pkg/tinytic.rev =================================================================== --- tinytic/trunk/pkg/tinytic.rev 2009-03-08 16:56:41 UTC (rev 48) +++ tinytic/tags/0.0.5.3-r1/pkg/tinytic.rev 2009-03-08 18:11:00 UTC (rev 51) @@ -1,85 +0,0 @@ -TinyTic Revision History -Copyright (C) 2000-2002 Michael Dillon. ---------------------------------------------------------------------------- - -v0.0.5.3 - First open source release. This version also fixed a minor - bug that caused crashes under certain circumstances. - - The OS/2 version is functioning again to the best of my - knowledge. It also no longer requires EMX unless you want - to build with GCC/EMX instead of Watcom C++. Note for Watcom - you will need STLport. -=========================================================================== -v0.0.5.1 - This version is just a simple fix of some bugs. - - Fixed a bug that caused the program to crash when there was more - than 10 description lines in the TIC file. That count has been - expanded to 30 and also will truncate if there's more than 30 lines - - Fixed a bug that would put a \ or / at the end of a path even though - it already had one. - e.g. D:\ would be D:\\ causing it to fail on reading -=========================================================================== -v0.0.5 - Fixed several potential bugs that might have caused program failure - - Added the option 'LogFile' to the configuration file to allow - specification of a new logfile location/name. - - If no 'LogFile', 'DataFile', or 'Inbound' is specified, they will - default to these values: - LogFile - tinytic.log - DataFile - tinytic.dat - Inbound - Current Directory ( .\ or ./ ) - - If any values are given and they can't be used (e.g. invalid file - names, etc) then they will be defaulted to the above mentioned - values. - - Added these command line options: - -c, --config-file : Allows for an alternate config file - -d, --data-file : Allows for alternate datafile location - and storage - -l, --log-file : Allows for alternate logfile location - and storage - -h, -?, --help : Displays a help screen of these - options - - Prevented the use of |, >, >>, <<, or < in the file names. -=========================================================================== -v0.0.4 - Fixed a bug that caused the program to exit because it could not - find it's home directory. Now the program defaults to the current - directory if it cannot find one within the command line. - - Modified the output for the primary screen to look better than - previous versions. - - Created an OS/2 version. The OS/2 version requires EMX v0.9d to - operate correctly. -=========================================================================== -v0.0.3 - Fixed a bug that would put the log file in the inbound directory, - also fixed it so that the config file is looked for in the - program's home directory - - Put in a copy-progress indicator to show how much of a processed - file has been copied. - - Modified the datafile's output to be more "readable" - - Cross-compiled the program for: - Windows-32 - DJGPP-DOS - Linux ( GCC/EGCS-2.91.66 ) -=========================================================================== -v0.0.2 - Removed an un-needed affiliation line on output -=========================================================================== -v0.0.1 - Spacing fixed on the datafile's output -=========================================================================== -v0.0.0 - First Release Copied: tinytic/tags/0.0.5.3-r1/pkg/tinytic.rev (from rev 49, tinytic/trunk/pkg/tinytic.rev) =================================================================== --- tinytic/tags/0.0.5.3-r1/pkg/tinytic.rev (rev 0) +++ tinytic/tags/0.0.5.3-r1/pkg/tinytic.rev 2009-03-08 18:11:00 UTC (rev 51) @@ -0,0 +1,88 @@ +TinyTic Revision History +Copyright (C) 2000-2003 Michael Dillon. +--------------------------------------------------------------------------- + +v0.0.5.3-r1 - 7 November 2003 + Cosmetic change to the output being generated. +=========================================================================== +v0.0.5.3 - 7 December 2002 + First open source release. This version also fixed a minor + bug that caused crashes under certain circumstances. + + The OS/2 version is functioning again to the best of my + knowledge. It also no longer requires EMX unless you want + to build with GCC/EMX instead of Watcom C++. Note for Watcom + you will need STLport. +=========================================================================== +v0.0.5.1 + This version is just a simple fix of some bugs. + + Fixed a bug that caused the program to crash when there was more + than 10 description lines in the TIC file. That count has been + expanded to 30 and also will truncate if there's more than 30 lines + + Fixed a bug that would put a \ or / at the end of a path even though + it already had one. + e.g. D:\ would be D:\\ causing it to fail on reading +=========================================================================== +v0.0.5 + Fixed several potential bugs that might have caused program failure + + Added the option 'LogFile' to the configuration file to allow + specification of a new logfile... [truncated message content] |
From: <ja...@us...> - 2009-03-08 17:27:59
|
Revision: 50 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=50&view=rev Author: jame Date: 2009-03-08 17:27:53 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Correct Copyright end year for those files that were changed for v0.0.5.3-r1. Modified Paths: -------------- tinytic/trunk/filecopy.cpp tinytic/trunk/filecopy.h tinytic/trunk/tinytic.cpp tinytic/trunk/tinytic.h Modified: tinytic/trunk/filecopy.cpp =================================================================== --- tinytic/trunk/filecopy.cpp 2009-03-08 17:18:40 UTC (rev 49) +++ tinytic/trunk/filecopy.cpp 2009-03-08 17:27:53 UTC (rev 50) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003, Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: tinytic/trunk/filecopy.h =================================================================== --- tinytic/trunk/filecopy.h 2009-03-08 17:18:40 UTC (rev 49) +++ tinytic/trunk/filecopy.h 2009-03-08 17:27:53 UTC (rev 50) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003, Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: tinytic/trunk/tinytic.cpp =================================================================== --- tinytic/trunk/tinytic.cpp 2009-03-08 17:18:40 UTC (rev 49) +++ tinytic/trunk/tinytic.cpp 2009-03-08 17:27:53 UTC (rev 50) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003, Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: tinytic/trunk/tinytic.h =================================================================== --- tinytic/trunk/tinytic.h 2009-03-08 17:18:40 UTC (rev 49) +++ tinytic/trunk/tinytic.h 2009-03-08 17:27:53 UTC (rev 50) @@ -1,5 +1,5 @@ /********************************************************************** - Copyright (c) 2000-2002, Michael Dillon + Copyright (c) 2000-2003, Michael Dillon All rights reserved. Redistribution and use in source and binary forms, with or without This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 17:18:42
|
Revision: 49 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=49&view=rev Author: jame Date: 2009-03-08 17:18:40 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Add missing v0.0.5.3-r1 information and corrected copyright end year to pkg/tinytic.rev. Modified Paths: -------------- tinytic/trunk/pkg/tinytic.rev Modified: tinytic/trunk/pkg/tinytic.rev =================================================================== --- tinytic/trunk/pkg/tinytic.rev 2009-03-08 16:56:41 UTC (rev 48) +++ tinytic/trunk/pkg/tinytic.rev 2009-03-08 17:18:40 UTC (rev 49) @@ -1,8 +1,11 @@ TinyTic Revision History -Copyright (C) 2000-2002 Michael Dillon. +Copyright (C) 2000-2003 Michael Dillon. --------------------------------------------------------------------------- -v0.0.5.3 +v0.0.5.3-r1 - 7 November 2003 + Cosmetic change to the output being generated. +=========================================================================== +v0.0.5.3 - 7 December 2002 First open source release. This version also fixed a minor bug that caused crashes under certain circumstances. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 16:56:50
|
Revision: 48 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=48&view=rev Author: jame Date: 2009-03-08 16:56:41 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Create tinytic/trunk from tinytic/branches/vendor/0.0.5.3-r1 Added Paths: ----------- tinytic/trunk/CDirect.cpp tinytic/trunk/CDirect.h tinytic/trunk/TinyTIC.dsp tinytic/trunk/TinyTIC.dsw tinytic/trunk/compile.txt tinytic/trunk/file_id.diz tinytic/trunk/filecopy.cpp tinytic/trunk/filecopy.h tinytic/trunk/headers.h tinytic/trunk/license.txt tinytic/trunk/parse.cpp tinytic/trunk/parse.h tinytic/trunk/pkg/ tinytic/trunk/ticlog.cpp tinytic/trunk/ticlog.h tinytic/trunk/tinytic.cpp tinytic/trunk/tinytic.h tinytic/trunk/tprocess.cpp tinytic/trunk/tprocess.h Copied: tinytic/trunk/CDirect.cpp (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/CDirect.cpp) =================================================================== --- tinytic/trunk/CDirect.cpp (rev 0) +++ tinytic/trunk/CDirect.cpp 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,416 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + CDirect.cpp - Cross-platform directory searching class. + *********************************************************************/ +#include "CDirect.h" + +// Default constructor, looks in current directory and searches for all files +CDirect::CDirect() +{ + // Default to searching for all files + _pattern = "*.*"; + // Default to current directory + _directory = "."; + + // Flag the directory as "Not-in-use" + _open = false; + + // Call the FixPath to make sure the directory has a trailing slash + FixPath(); + + // Set the Max count to 0 + _MaxFiles = 0L; + + // Get the max count + GetMaxFiles(); +} + +// Secondary constructor, allows for specified directory and match pattern +CDirect::CDirect( const char *pattern, const char *directory ) +{ + // Use the given pattern + _pattern = pattern; + // Use the given directory + _directory = directory; + + // flag the directory as "Not-In-Use" + _open = false; + + // Call FixPath to make sure the directory has a trailing slash + FixPath(); + + // Set the Max count to 0 + _MaxFiles = 0L; + + // Get the max count + GetMaxFiles(); +} + +// Destructor, closes anything that was opened +CDirect::~CDirect() +{ + // Check to see if the directory was in use or was opened. + if (_open == true) + { +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Close the find search + _findclose(hFileSearch); +#elif defined(__DIRECT_FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Close the open directory + closedir(hDir); +#endif + } +} + +// Find: +// Searches for entries of files matching the pattern +// +bool CDirect::Find( void ) +{ + // Return value for this function + bool _FindReturn = false; + + // Has the directory been accessed already ? + if (_open == false) + { + // No, find the first file entry matching the pattern. + _open = FindFirst(); + // Set the return to that of FindFirst(); + _FindReturn = _open; + } + else + { + // Yes, Find the next file entry + _FindReturn = FindNext(); + } + + // Return + return ( _FindReturn ); +} + +// FindFirst: Searches for the first entry matching the pattern +bool CDirect::FindFirst(void) +{ + // Return value for FindFirst() + bool _FindFirstReturn = false; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Create a temporary buffer + string szTmpBuf; + + // Copy the given directory to the temporary buffer + szTmpBuf = _directory.c_str(); + + // Copy the pattern to the buffer + szTmpBuf += _pattern.c_str(); + + // Search for the first entry matching the pattern + if ((hFileSearch = _findfirst(szTmpBuf.c_str(), &hFindData)) > -1L) + { + // Entry found, update the hFileData structure + ValidateData(); + // Set the return to true + _FindFirstReturn = true; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Attempt to open the specified directory + if ((hDir = opendir(_directory.c_str())) != NULL) + { + // Read each entry of the directory until a match was found + // or the directory has no more entries. + while ((hDirent = readdir(hDir)) != NULL) + { + // Check to see if the file's name matches the given + // pattern. +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) +#endif + { + // Yes, update the hFileData structure + ValidateData(); + // Set the return to true + _FindFirstReturn = true; + // Get out of the loop + break; + } + } + } +#endif + + // Return + return (_FindFirstReturn); +} + +// FindNext: Searches for the next entry in the directory matching the pattern +bool CDirect::FindNext(void) +{ + // Clear the value of hFileData + DestroyValues(); + // Return value for FindNext + bool _FindNextReturn = false; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Search for the next entry + if (_findnext(hFileSearch, &hFindData) == 0) + { + // Found, Update the hFileData structure + ValidateData(); + // Set the return to true + _FindNextReturn = true; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Attempt to read the directory for more entries or + // until there are no more entries to be found. + while ( ( hDirent = readdir( hDir ) ) != NULL ) + { + // Check to see if the file name matches that of the pattern +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirent->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirent->d_name, 0) == 0) +#endif + { + // Yes, update the hFileData structure + ValidateData(); + // Set the return to true + _FindNextReturn = true; + // Get Out of the loop + break; + } + } +#endif + + // Return + return (_FindNextReturn); +} + +// ValidateData: Updates the values for the hFileData structure +void CDirect::ValidateData(void) +{ + // Temporary string + string szTmpBuffer; + + // Copy the directory to the TempBuffer + szTmpBuffer = _directory.c_str(); + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Copy the file name found in the search to the hFileData structure + strcpy(hFileData.Name, hFindData.name); +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Copy the file name found with readdir() to the hFileData structure + strcpy(hFileData.Name, hDirent->d_name); +#endif + + // Copy the file name onto the directory + szTmpBuffer += hFileData.Name; + + // Call stat() to get information about the file. + if (stat(szTmpBuffer.c_str(), &hFStat) == 0) + { + // Set the last access time + hFileData.AccessTime = ( time_t )hFStat.st_atime; + // Set the creation time + hFileData.CreateTime = ( time_t )hFStat.st_ctime; + // Set the last write time + hFileData.WriteTime = ( time_t )hFStat.st_mtime; + // Set the size + hFileData.Size = hFStat.st_size; + // Set the mode + hFileData.Mode = hFStat.st_mode; + } + else + { + // Stat failed, destroy all values except the file's name + hFileData.AccessTime = ( time_t )0; + hFileData.CreateTime = ( time_t )0; + hFileData.WriteTime = ( time_t )0; + hFileData.Size = 0L; + hFileData.Mode = 0; + } +} + +// GetInfo: Return's the current entry for a matching file (if any) +FileData CDirect::GetInfo(void) +{ + // Return the hFileData structure + return (hFileData); +} + +// Clears the values for the hFileData structure +void CDirect::DestroyValues(void) +{ + // Set all values to that equivalent to NULL + hFileData.Mode = 0; + hFileData.AccessTime = ( time_t )0; + hFileData.CreateTime = ( time_t )0; + hFileData.WriteTime = ( time_t )0; + hFileData.Size = 0L; + memset(hFileData.Name, 0, sizeof(hFileData.Name)); +} + +// FixPath: Ensure there's a trailing slash on the directory name +void CDirect::FixPath(void) +{ + // Temporary buffer + string szTmpBuffer; + + // Temporary iterator + string::iterator idx; + + // Copy the directory into the buffer + szTmpBuffer = _directory.c_str(); + + // Set the iterator to the end of the buffer + idx = szTmpBuffer.end(); + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// ----------------------- +// Windows & OS/2 Specific +// ----------------------- + // Check to see if there's a trailing backslash + if (*idx != '\\') + { + // No, add one. + szTmpBuffer += '\\'; + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ----------------------- +// POSIX Specific +// ----------------------- + // Check for a trailing slash + if (*idx != '/') + { + // No, add one. + szTmpBuffer += '/'; + } +#endif + + // Save the changes + _directory = szTmpBuffer; +} + +void CDirect::GetMaxFiles(void) +{ +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT_FILE_SEARCH_OS2) +// ------------------------ +// Windows & OS/2 Specific +// ------------------------ + // Create a search handle + long hSearch = -1L; + // Create a find data structure to hold information + struct _finddata_t hFData; + // Temporary string to hold the full path & pattern + string szTmp; + + // Combine the directory and pattern into a full path + szTmp = _directory.c_str(); + szTmp += _pattern.c_str(); + // Create a search handle and try to find the first instance of + // a file matching the pattern, if none then MaxFiles will remain + // zero + if ((hSearch = _findfirst(szTmp.c_str(), &hFData)) > -1L) + { + // increment the max files value + _MaxFiles++; + // Search for other files after the first one until + // there are no more files to search through. + while (_findnext(hSearch, &hFData) == 0) + { + // increment, file found. + _MaxFiles++; + } + // Close the search, finish. + _findclose(hSearch); + } +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// ------------------------- +// POSIX Specific +// ------------------------- + // Create a DIRectory structure + DIR *hDirec; + // Create a local instance to hold information obtained + struct dirent *hDirentLocal; + // Attempt to open the specified directory + if ((hDirec = opendir( _directory.c_str())) != NULL) + { + // Read each entry of the directory until a match was found + // or the directory has no more entries. + while ((hDirentLocal = readdir(hDirec)) != NULL) + { + // Check to see if the file's name matches the given + // pattern. +#if defined(DJGPP) + if (fnmatch(_pattern.c_str(), hDirentLocal->d_name, FNM_NOESCAPE | FNM_NOCASE) == 0) +#else + if (fnmatch(_pattern.c_str(), hDirentLocal->d_name, 0) == 0) +#endif + { + // increment the file count. + _MaxFiles++; + } + } + // Terminate the search + closedir(hDirec); + } +#endif +} + Property changes on: tinytic/trunk/CDirect.cpp ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/CDirect.h (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/CDirect.h) =================================================================== --- tinytic/trunk/CDirect.h (rev 0) +++ tinytic/trunk/CDirect.h 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,172 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + CDirect.h - class for handling cross-platform directory searching. + *********************************************************************/ +#if !defined (__DIRECT__FILE_SEARCH___H) +#define __DIRECT__FILE_SEARCH___H 1 + +#ifndef __cplusplus +# error "This source REQUIRES C++ to function" +#endif + +//#include <iostream> +//#include <string> // STL String header + +#include "headers.h" +#include "tinytic.h" // This will define the system type we can use + +//#ifndef __NAMESPACE_SET +//# if !defined(STLPORT) || defined(_STL_USE_NAMESPACES) +// using namespace std ; +//# endif /* !STL_PORT || _STL_USE_NAMESPACES */ +//# define __NAMESPACE_SET 1 +//#endif /* __NAMESPACE_SET */ + +#include <sys/types.h> // Required for stat() +#include <sys/stat.h> // Definition for stat() + +// Check to see if the definitions are already set, if they are +// then undefine them. +// __DIRECT__FILE_SEARCH_WINDOWS : Definition set for Windows based systems +// __DIRECT__FILE_SEARCH_POSIX : Definition set for POSIX enabled systems + +#undef __DIRECT__FILE_SEARCH_WINDOWS +#undef __DIRECT__FILE_SEARCH_POSIX +#undef __DIRECT__FILE_SEARCH_OS2 + +#if defined(__TINYTIC_WINDOWS) +# define __DIRECT__FILE_SEARCH_WINDOWS +# include <io.h> +# include <direct.h> +#elif defined(__TINYTIC_POSIX) +# define __DIRECT__FILE_SEARCH_POSIX +# include <dirent.h> +# include <fnmatch.h> +#elif defined(__TINYTIC_OS2) +# define __DIRECT__FILE_SEARCH_OS2 +# include <io.h> +#else +# error "Please define the correct compiler type" +#endif + +// Primary structure used by CDirect +typedef struct { + unsigned short int Mode; // File's Mode settings + time_t AccessTime; // Last Access Time + time_t CreateTime; // File creation date + time_t WriteTime; // Last Write time + unsigned long int Size; // Size of file + char Name[4096]; // File's Name +} FileData; + +class CDirect +{ +public: + CDirect(); + CDirect(const char *pattern, const char *directory = "."); + ~CDirect(); + + // Find: Calls on FindNext or FindFirst depending on if the + // directory has been opened. + bool Find(void); + // GetInfo: Returns the current FileData for any given file + // found. + FileData GetInfo(void); + // GetCount: Returns the number of files that matched the pattern + // in the given directory. + unsigned long int GetCount(void) { return (_MaxFiles); } + +private: + // FindFirst: Searches for the first entry matching the given pattern + bool FindFirst(void); + // FindNext: Searches for the next relevant entry matching the given + // pattern + bool FindNext(void); + // ValidateData: Sets the values for the FileData structure + void ValidateData(void); + // DestroyValues: Clears the values for the FileData structure + // This is done before each call to FindNext and + // FindFirst + void DestroyValues(void); + // FixPath: Makes sure there is a trailing slash for the directory + // given + void FixPath(void); + // GetMaxFiles: Count the number of files matching the pattern in + // the directory. + void GetMaxFiles(void); + + // hFileData: Internal FileData structure, this will be modified + // by ValidateData primarily, and sent to a requesting + // program by GetInfo + FileData hFileData; + // _pattern: Internal storage for the 'pattern' passed at + // construction time. + string _pattern; + // _directory: Internal storage for the 'directory' passed at + // construction time. + string _directory; + + // _open: Internal flag to see if the directory is in access or + // was unable to be opened. + bool _open; + // hFStat: Structure used to gather info from stat() and put it + // in the hFileData structure + struct stat hFStat; + // _MaxFiles: Internal value that indicates how many files were + // found matching the pattern + unsigned long int _MaxFiles; + +#if defined(__DIRECT__FILE_SEARCH_WINDOWS) || defined(__DIRECT__FILE_SEARCH_OS2) +// -------------------------- +// Windows & OS/2 Specific additions +// -------------------------- + // hFileSearch: Find handle passed by findfirst() + long hFileSearch; + // hFindData: Structure used by findfirst() and findnext() + struct _finddata_t hFindData; +#elif defined(__DIRECT__FILE_SEARCH_POSIX) +// -------------------------- +// POSIX Specific additions +// -------------------------- + // hDir: Directory handle passed from opendir() + DIR *hDir; + // hDirent: Passed from readdir(), holds the file that was found. + struct dirent *hDirent; +#endif +}; + + +#endif Property changes on: tinytic/trunk/CDirect.h ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/TinyTIC.dsp (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/TinyTIC.dsp) =================================================================== --- tinytic/trunk/TinyTIC.dsp (rev 0) +++ tinytic/trunk/TinyTIC.dsp 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,149 @@ +# Microsoft Developer Studio Project File - Name="TinyTIC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=TinyTIC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TinyTIC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TinyTIC.mak" CFG="TinyTIC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TinyTIC - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "TinyTIC - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TinyTIC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "TinyTIC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "TinyTIC - Win32 Release" +# Name "TinyTIC - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CDirect.cpp +# End Source File +# Begin Source File + +SOURCE=.\filecopy.cpp +# End Source File +# Begin Source File + +SOURCE=.\parse.cpp +# End Source File +# Begin Source File + +SOURCE=.\ticlog.cpp +# End Source File +# Begin Source File + +SOURCE=.\tinytic.cpp +# End Source File +# Begin Source File + +SOURCE=.\tprocess.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CDirect.h +# End Source File +# Begin Source File + +SOURCE=.\filecopy.h +# End Source File +# Begin Source File + +SOURCE=.\headers.h +# End Source File +# Begin Source File + +SOURCE=.\parse.h +# End Source File +# Begin Source File + +SOURCE=.\ticlog.h +# End Source File +# Begin Source File + +SOURCE=.\tinytic.h +# End Source File +# Begin Source File + +SOURCE=.\tprocess.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project Property changes on: tinytic/trunk/TinyTIC.dsp ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/TinyTIC.dsw (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/TinyTIC.dsw) =================================================================== --- tinytic/trunk/TinyTIC.dsw (rev 0) +++ tinytic/trunk/TinyTIC.dsw 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "TinyTIC"=.\TinyTIC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + Property changes on: tinytic/trunk/TinyTIC.dsw ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/compile.txt (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/compile.txt) =================================================================== --- tinytic/trunk/compile.txt (rev 0) +++ tinytic/trunk/compile.txt 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,25 @@ +INFORMATION ON COMPILING TINYTIC: + +Files that have to be compiled: +CDirect.cpp, filecopy.cpp, tprocess.cpp, parse.cpp, ticlog.cpp, and +tinytic.cpp + +Replace <file> with one of those required, listed above. + +I wrote this short document because I am not good at writing +makefiles ;) + +Watcom C++: +[DOS/16]: wpp <file> -bt=dos -l=dos -zq -Ox -d0 -d_NOTHREADS -W3 +[DOS/32]: wpp386 <file> -bt=dos -l=dos32x -zq -Ox -d0 -d_NOTHREADS -W3 +[OS/2]: wpp386 <file> -bt=os2 -l=os2v2 -zq -Ox -d0 -W3 +[Windows]: wpp386 <file> -bt=windows -l=windows -zq -Ox -d0 -W3 + +Do note that I used STLport to compile these under Watcom C++! + +Visual C++ v6: +[Windows]: cl <file> -Ox -nologo -d0 -GX -W3 + +GCC 2.9+: +[ALL]: g++ <file> -Wall -s -c + g++ *.o -o tinytic \ No newline at end of file Property changes on: tinytic/trunk/compile.txt ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/file_id.diz (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/file_id.diz) =================================================================== --- tinytic/trunk/file_id.diz (rev 0) +++ tinytic/trunk/file_id.diz 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,8 @@ +TinyTIC 0.0.5.3-r1 source +------------------------- +Source code to TinyTIC. +Written in C++, released +under the BSD license. +Author(s): +Mike Dillon (GSValore) +Sean Dennis (HausMaus) Property changes on: tinytic/trunk/file_id.diz ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/filecopy.cpp (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/filecopy.cpp) =================================================================== --- tinytic/trunk/filecopy.cpp (rev 0) +++ tinytic/trunk/filecopy.cpp 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,130 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + filecopy.cpp - File copying functions + *********************************************************************/ +#include "tinytic.h" +#include "filecopy.h" + + +// Function-Program constants +#define COPY_BUFFER_SIZE 4096 +void FileCopyProgress(unsigned long int FileSize, unsigned long int Copied); + +bool FileCopy(const char *Source, const char *Dest) +{ + bool RValue = true; // Return Value + char Buffer[COPY_BUFFER_SIZE]; + ifstream SFile; + ofstream OFile; + unsigned long int SFileSize; + unsigned long int Copied; + + if (Source == NULL || Dest == NULL) + { + // One of the files specified isn't allowed to be used + return (false); + } + + // Attempt to open the file + if (!FOpen( Source, SFile, ios::in|ios::binary)) + RValue = false; + if (!FOpen( Dest, OFile, ios::out|ios::binary|ios::trunc)) + RValue = false; + + // Copy the data + memset(Buffer, '\x0', COPY_BUFFER_SIZE * sizeof(char)); + + if (RValue == true) + { + SFile.seekg(0L, ios::end); + SFileSize = SFile.tellg(); + SFile.seekg(0L, ios::beg); + cout << "Copy Progress: [" << setw(10) + << SFileSize << "/"; + Copied = 0; + do { + SFile.read(Buffer, COPY_BUFFER_SIZE); + OFile.write(Buffer, SFile.gcount()); + Copied += SFile.gcount(); + FileCopyProgress(SFileSize, Copied); + memset(Buffer, '\x0', COPY_BUFFER_SIZE * sizeof(char)); + } while ((SFile.eof() == 0) && (SFile.gcount() == COPY_BUFFER_SIZE)); + FileCopyProgress(SFileSize, SFileSize); + cout << endl; + } + + // Close any open files + if (FIsOpen(SFile) == true) + SFile.close(); + if (FIsOpen(OFile) == true) + OFile.close(); + // Return + return ( RValue ); +} + +// Originally FOpen() was a template, some compilers however did not +// appropriately handle the template. +bool FOpen(const char *FileName, ifstream &File, ios::openmode Flags) +{ + bool RValue = true; + File.open(FileName, Flags); + if (!File) + { + cerr << "Unable to open " << FileName << "." << endl; + RValue = false; + } + return (RValue); +} + +bool FOpen(const char *FileName, ofstream &File, ios::openmode Flags) +{ + bool RValue = true; + File.open(FileName, Flags); + if (!File) + { + cerr << "Unable to open " << FileName << "." << endl; + RValue = false; + } + return (RValue); +} + +void FileCopyProgress(unsigned long int FileSize, unsigned long int Copied) +{ + cout << setw(10) << Copied << "]"; + cout << "\x8\x8\x8\x8\x8\x8\x8\x8\x8\x8\x8"; + cout.flush(); + UNUSED_PARAM(FileSize); +} Property changes on: tinytic/trunk/filecopy.cpp ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/filecopy.h (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/filecopy.h) =================================================================== --- tinytic/trunk/filecopy.h (rev 0) +++ tinytic/trunk/filecopy.h 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,58 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + filecopy.h - Header for the file copy functions. + *********************************************************************/ +#if !defined( FILECOPY_HEADER__H ) +#define FILECOPY_HEADER__H 1 + +bool FOpen(const char *, ifstream &, ios::openmode); +bool FOpen(const char *, ofstream &, ios::openmode); + +// File IS_OPEN Template +template<class FSTREAM_TYPE_OPEN> +bool FIsOpen( FSTREAM_TYPE_OPEN &File ) +{ + filebuf *FileBuf; + + FileBuf = File.rdbuf(); + + return ( FileBuf->is_open() ); +} + +// Other function prototypes +bool FileCopy( const char *Source, const char *Dest ); + +#endif Property changes on: tinytic/trunk/filecopy.h ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/headers.h (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/headers.h) =================================================================== --- tinytic/trunk/headers.h (rev 0) +++ tinytic/trunk/headers.h 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,79 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + headers.h - Used to include various headers for specific platforms + and standard headers. + *********************************************************************/ +#ifndef TINYTIC_HEADERS__H +#define TINYTIC_HEADERS__H 1 + +#if !defined(__cplusplus) +# error "C++ only!" +#endif /* __cplusplus */ + +#include <iostream> +#include <iomanip> +#include <fstream> +#include <string> +#include <sstream> +#include <cerrno> +#include <cctype> +#include <cstring> +#include <cstdio> +#include <cstdlib> + +#ifndef __NAMESPACE_SET +# if !defined(_STLPORT_VERSION) || defined(_STL_USE_NAMESPACES) + using namespace std; +# endif /* !_STLPORT || _STL_USE_NAMESPACES */ +# define __NAMESPACE_SET 1 +#endif /* __NAMESPACE_SET */ + +#if defined(__WATCOMC__) || defined(_WIN32) +# include <direct.h> +# include <process.h> +#endif /* __WATCOMC__ || _WIN32 */ + +#if defined(_WIN32) +# include <windows.h> +#endif /* _WIN32 */ + +#if defined(unix) || defined(linux) || defined(__GNUC__) +# include <unistd.h> +#endif /* unix || linux || __GNUC__ */ + +#include <time.h> + +#endif /* TINYTIC_HEADERS__H */ Property changes on: tinytic/trunk/headers.h ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/license.txt (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/license.txt) =================================================================== --- tinytic/trunk/license.txt (rev 0) +++ tinytic/trunk/license.txt 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,32 @@ +Copyright (c) 2000-2002, Michael Dillon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file Property changes on: tinytic/trunk/license.txt ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/parse.cpp (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/parse.cpp) =================================================================== --- tinytic/trunk/parse.cpp (rev 0) +++ tinytic/trunk/parse.cpp 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,167 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + parse.cpp - Functions for reading the configuration file. + *********************************************************************/ +#include "tinytic.h" +#include "parse.h" +#include "ticlog.h" +#include "tprocess.h" + +string szConfigFile = "tinytic.cfg"; + +// Define the strings +string Inbound; +string DataFile; +string LogFile; + +bool ReadConfigFile(void) +{ + string Log; + string szTmp; + char szTmpBuffer[ BUFFER_MAXLEN ] = "\x0"; + ifstream fConfig; + + // Is a command line config file specified ? + if (szCmdConfigFile != "") + { + // Yes, use it (overrides default) + fConfig.open(szCmdConfigFile.c_str(), ios::in); + } + else + { + // No, use defaulted config file. + szTmp = szHomeDir + szConfigFile; + fConfig.open(szTmp.c_str(), ios::in); + } + + if (!fConfig) + { + cerr << "Unable to open " << szConfigFile.c_str() << "!" << endl; + cerr << "Make sure this file is in the same directory as this program." << endl; + + return (false); + } + + + while (!fConfig.eof()) + { + fConfig >> ws >> szTmpBuffer; + if (*szTmpBuffer == '#' || *szTmpBuffer == ';') + { + // This is commments, ignore + fConfig.getline(szTmpBuffer, BUFFER_MAXLEN); + } + else + { + if (stricmp(szTmpBuffer, "Inbound") == 0) + { + // Inbound directory specified + fConfig >> ws >> szTmpBuffer; + Inbound = szTmpBuffer; + + if ((Inbound == "") || (VerifyDirectory(Inbound.c_str()) == false)) + { +#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) + Inbound = ".\\"; +#elif defined(__TINYTIC_POSIX) + Inbound = "./"; +#endif + } + + Log = "Checking for .TIC files in \'"; + Log += szTmpBuffer; + Log += "\'."; + PutLog(Log.c_str(), INFO); + } + else if (stricmp(szTmpBuffer, "DataFile") == 0) + { + // DataFile directory/file specified + fConfig >> ws >> szTmpBuffer; + DataFile = szTmpBuffer; + + if ((DataFile == "") || (VerifyFileUsable(DataFile.c_str()) == false)) + { +#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) + DataFile = ".\\tinytic.dat"; +#elif defined(__TINYTIC_POSIX) + DataFile = "./tinytic.dat"; +#endif + } + + + if (szCmdDataFile == "") + { + Log = "Saving new entries to \'"; + Log += szTmpBuffer; + Log += "\'."; + PutLog( Log.c_str(), INFO ); + } + } + else if (stricmp(szTmpBuffer, "LogFile") == 0) + { + // DataFile directory/file specified + fConfig >> ws >> szTmpBuffer; + szLogFile = szTmpBuffer; + + if ((szLogFile == "") || (VerifyFileUsable(szLogFile.c_str()) == false)) + { +#if defined(__TINYTIC_WINDOWS) || defined(__TINYTIC_OS2) + szLogFile = ".\\tinytic.log"; +#elif defined(__TINYTIC_POSIX) + szLogFile = "./tinytic.log"; +#endif + } + + if (szCmdLogFile == "") + { + cout << "Using LogFile \'" + << szLogFile.c_str() + << "\'." + << endl; + } + } + else + { + fConfig.getline(szTmpBuffer, BUFFER_MAXLEN); + } + } + } + + fConfig.close(); + + return (true); +} + Property changes on: tinytic/trunk/parse.cpp ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/parse.h (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/parse.h) =================================================================== --- tinytic/trunk/parse.h (rev 0) +++ tinytic/trunk/parse.h 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,55 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************** + parse.h - Header file for the config file parser function + *********************************************************************/ +#if !defined( PARSE_HEADER__H ) +#define PARSE_HEADER__H 1 + +extern string szConfigFile; +#define BUFFER_MAXLEN 1024 + +// Inbound and DataFile directory names +extern string Inbound; +extern string DataFile; +extern string LogFile; + +// Function Prototypes +bool ReadConfigFile(void) ; // Reads the file specified by 'CONF' + +#endif + + + Property changes on: tinytic/trunk/parse.h ___________________________________________________________________ Added: svn:mergeinfo + Property changes on: tinytic/trunk/pkg ___________________________________________________________________ Added: svn:mergeinfo + Copied: tinytic/trunk/ticlog.cpp (from rev 37, tinytic/branches/vendor/0.0.5.3-r1/ticlog.cpp) =================================================================== --- tinytic/trunk/ticlog.cpp (rev 0) +++ tinytic/trunk/ticlog.cpp 2009-03-08 16:56:41 UTC (rev 48) @@ -0,0 +1,128 @@ +/********************************************************************** + Copyright (c) 2000-2002, Michael Dillon + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of Crystalline Realms, Midnight's Hour BBS, + Elysium Software nor the names of their contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + *********************************************************************/ +/********************************************************************* + ticlog.cpp - Logging functions for TinyTIC + *********************************************************************/ +#include "tinytic.h" +#include "ticlog.h" + +const char EFLAGS[] = "!?"; + +int LogError = 0; +string szLogFile; + +bool PutLog(const char *str, int code, int silence) +{ + ofstream fLog; + time_t CurTime; + string Buffer; + bool _PutLogReturn = true; + + if (LogError != 0) + { + // Apparent previous error, abort + return (false); + } + + if (str == NULL) + { + // No string specified, leave. + _PutLogReturn = false; + } + + if (code < 0 || code > 1) + { + // Invalid code + _PutLogReturn = false; + } + + if (_PutLogReturn == true) + { + + // Display the log error + if (silence == 0) + { + cout << str << endl; + } + + if (VerifyFileUsable(szLogFile.c_str()) == false) + { + szLogFile = "tinytic.log"; + } + + if (szLogFile == "") + { + szLogFile = "tinytic.log"; + } + + + // If there was a log file specified on the command line + // use it instead. + if (szCmdLogFile != "") + { + fLog.open(szCmdLogFile.c_str(), ios::app); + } + else + { + fLog.open(szLogFile.c_str(), ios::app); + } + + if (!fLog) + { + // Unable to open the logfile + LogError = 1; + cerr << "Unable to open the log file \'" + << Buffer.c_str() + << "\'... No more log entries will be attempted!" + << endl; + + _PutLogReturn = false; + } + else + { + time(&CurTime); + + // Outputs in this format + // [<time>] <flag> <error> + Buffer = ctime(&Cur... [truncated message content] |
From: <ja...@us...> - 2009-03-08 03:32:54
|
Revision: 47 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=47&view=rev Author: jame Date: 2009-03-08 03:32:51 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Added downloads links to the crashmail, tinytic, vireq, & jamnntpd pages. Modified Paths: -------------- htdocs/online/crashmail.html htdocs/online/jamnntpd.html htdocs/online/tinytic.html htdocs/online/vireq.html Modified: htdocs/online/crashmail.html =================================================================== --- htdocs/online/crashmail.html 2009-03-08 00:53:43 UTC (rev 46) +++ htdocs/online/crashmail.html 2009-03-08 03:32:51 UTC (rev 47) @@ -46,6 +46,7 @@ <ul> <li>Browse <a href="http://ftnapps.svn.sourceforge.net/viewvc/ftnapps/crashmail/">crashmail</a> in the ftnapps SVN repository.</li> + <li>Crashmail <a href="https://sourceforge.net/project/showfiles.php?group_id=246543&package_id=309220">downloads</a></li> <li>Browse the <a href="http://git.debian.org/?p=crashmail/crashmail.git">GIT</a> repository for Crashmail at git.debian.org.</li> <li>Information about Crashmail II in <a href="http://packages.debian.org/search?keywords=crashmail">Debian</a> and <a href="http://packages.ubuntu.com/search?keywords=crashmail">Ubuntu</a>. Modified: htdocs/online/jamnntpd.html =================================================================== --- htdocs/online/jamnntpd.html 2009-03-08 00:53:43 UTC (rev 46) +++ htdocs/online/jamnntpd.html 2009-03-08 03:32:51 UTC (rev 47) @@ -49,6 +49,7 @@ <ul> <li>Browse <a href="http://ftnapps.svn.sourceforge.net/viewvc/ftnapps/jamnntpd/">JamNNTPd</a> in the SVN repository.</li> + <li>JamNNTPd <a href="https://sourceforge.net/project/showfiles.php?group_id=246543&package_id=304201">downloads</a></li> <li>Browse the <a href="http://git.debian.org/?p=crashmail/jamnntpd.git">GIT</a> repository for JamNNTPd at git.debian.org.</li> </ul> Modified: htdocs/online/tinytic.html =================================================================== --- htdocs/online/tinytic.html 2009-03-08 00:53:43 UTC (rev 46) +++ htdocs/online/tinytic.html 2009-03-08 03:32:51 UTC (rev 47) @@ -47,6 +47,7 @@ <ul> <li>Browse <a href="http://ftnapps.svn.sourceforge.net/viewvc/ftnapps/tinytic/">TinyTIC</a> in the SVN repository.</li> + <li>TinyTIC <a href="https://sourceforge.net/project/showfiles.php?group_id=246543&package_id=313133">downloads</a></li> </ul> <p class="filler"><!-- Filler para to extend left vertical line --></p> Modified: htdocs/online/vireq.html =================================================================== --- htdocs/online/vireq.html 2009-03-08 00:53:43 UTC (rev 46) +++ htdocs/online/vireq.html 2009-03-08 03:32:51 UTC (rev 47) @@ -48,6 +48,7 @@ <ul> <li>Browse <a href="http://ftnapps.svn.sourceforge.net/viewvc/ftnapps/vireq/">vireq</a> in the ftnapps SVN repository.</li> + <li>VIReq <a href="https://sourceforge.net/project/showfiles.php?group_id=246543&package_id=304152">downloads</a></li> </ul> <p class="filler"><!-- Filler para to extend left vertical line --></p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-08 00:54:02
|
Revision: 46 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=46&view=rev Author: jame Date: 2009-03-08 00:53:43 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Import jamnntpd-0.6 into the repository at jamnntpd/branches/vendor/0.6. Added Paths: ----------- jamnntpd/branches/vendor/0.6/ jamnntpd/branches/vendor/0.6/HOWTO jamnntpd/branches/vendor/0.6/History.txt jamnntpd/branches/vendor/0.6/ReadMe.txt jamnntpd/branches/vendor/0.6/examples/ jamnntpd/branches/vendor/0.6/examples/jamnntpd.allow jamnntpd/branches/vendor/0.6/examples/jamnntpd.groups jamnntpd/branches/vendor/0.6/examples/jamnntpd.users jamnntpd/branches/vendor/0.6/examples/jamnntpd.xlat jamnntpd/branches/vendor/0.6/src/ jamnntpd/branches/vendor/0.6/src/Makefile jamnntpd/branches/vendor/0.6/src/Makefile.linux jamnntpd/branches/vendor/0.6/src/Makefile.win32 jamnntpd/branches/vendor/0.6/src/allow.c jamnntpd/branches/vendor/0.6/src/allow.h jamnntpd/branches/vendor/0.6/src/groups.c jamnntpd/branches/vendor/0.6/src/groups.h jamnntpd/branches/vendor/0.6/src/jamlib/ jamnntpd/branches/vendor/0.6/src/jamlib/LICENSE jamnntpd/branches/vendor/0.6/src/jamlib/Makefile.linux jamnntpd/branches/vendor/0.6/src/jamlib/Makefile.os2 jamnntpd/branches/vendor/0.6/src/jamlib/Makefile.win32 jamnntpd/branches/vendor/0.6/src/jamlib/crc32.c jamnntpd/branches/vendor/0.6/src/jamlib/jam.h jamnntpd/branches/vendor/0.6/src/jamlib/jamlib.doc jamnntpd/branches/vendor/0.6/src/jamlib/lastread.c jamnntpd/branches/vendor/0.6/src/jamlib/mbase.c jamnntpd/branches/vendor/0.6/src/jamlib/message.c jamnntpd/branches/vendor/0.6/src/jamlib/structrw.c jamnntpd/branches/vendor/0.6/src/jamlib/structrw.h jamnntpd/branches/vendor/0.6/src/jamlib/subpack.c jamnntpd/branches/vendor/0.6/src/login.c jamnntpd/branches/vendor/0.6/src/login.h jamnntpd/branches/vendor/0.6/src/main.c jamnntpd/branches/vendor/0.6/src/makechs.c jamnntpd/branches/vendor/0.6/src/mime.c jamnntpd/branches/vendor/0.6/src/mime.h jamnntpd/branches/vendor/0.6/src/misc.c jamnntpd/branches/vendor/0.6/src/misc.h jamnntpd/branches/vendor/0.6/src/nntpserv.c jamnntpd/branches/vendor/0.6/src/nntpserv.h jamnntpd/branches/vendor/0.6/src/os.h jamnntpd/branches/vendor/0.6/src/os_linux.c jamnntpd/branches/vendor/0.6/src/os_linux.h jamnntpd/branches/vendor/0.6/src/os_win32.c jamnntpd/branches/vendor/0.6/src/os_win32.h jamnntpd/branches/vendor/0.6/src/sockio.c jamnntpd/branches/vendor/0.6/src/sockio.h jamnntpd/branches/vendor/0.6/src/xlat.c jamnntpd/branches/vendor/0.6/src/xlat.h jamnntpd/branches/vendor/0.6/unicode/ jamnntpd/branches/vendor/0.6/unicode/ReadMe.txt jamnntpd/branches/vendor/0.6/unicode/jamnntpd.xlat jamnntpd/branches/vendor/0.6/unicode/xlat/ jamnntpd/branches/vendor/0.6/unicode/xlat/437_utf.chs jamnntpd/branches/vendor/0.6/unicode/xlat/850_utf.chs jamnntpd/branches/vendor/0.6/unicode/xlat/865_utf.chs jamnntpd/branches/vendor/0.6/unicode/xlat/866_utf.chs jamnntpd/branches/vendor/0.6/unicode/xlat/iso_utf.chs jamnntpd/branches/vendor/0.6/xlat/ jamnntpd/branches/vendor/0.6/xlat/437_iso.chs jamnntpd/branches/vendor/0.6/xlat/850_iso.chs jamnntpd/branches/vendor/0.6/xlat/865_iso.chs jamnntpd/branches/vendor/0.6/xlat/866_koi.chs jamnntpd/branches/vendor/0.6/xlat/iso_437.chs jamnntpd/branches/vendor/0.6/xlat/iso_850.chs jamnntpd/branches/vendor/0.6/xlat/iso_865.chs jamnntpd/branches/vendor/0.6/xlat/koi_866.chs Added: jamnntpd/branches/vendor/0.6/HOWTO =================================================================== --- jamnntpd/branches/vendor/0.6/HOWTO (rev 0) +++ jamnntpd/branches/vendor/0.6/HOWTO 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,74 @@ +So you finally decided to take a look at that JamNNTPd package you've heard so much about? And after you've unpacked it, you have absolutely no clue about what to do with it? Well, then you've decided to read the right textfile. I did very much the same, half a year ago. It wasn't until I got a permanent connection to the internet that I realized what I could do with this package. If you *don't* have a permanent connection to the internet, you can stop reading here, and just delete the entire package. + + Well, on second thought maybe not -- a local installation of JamNNTPd and your favourite news reader will probably be a better combination for reading and writing fidonet echoes than most others you will find, so stay with us. + + What is it? + ========== + + JamNNTPd is for 'news://...' what Apache, IIS &al are for 'http://...', i.e. it's a server program that lets any user from internet reach your JAM message base with any news reader they happen to have installed. + + So how do you go about making JamNNTPd work? Well, this is a case study from my setup. I use WinXP as front-end against internet, and have (of course!) the built-in firewall enabled. I have several 'mshome.net' workstations connected to the internet via ICS, and on one of these I decided to setup and run JamNNTPd. + + What do I do first? + ================== + + The first thing you should do, after you've unpacked the zip-file, is to edit the four config files, jamnntpd.groups, *.users, *.allow and *.xlat to suit your setup. The help-texts in those files should be selfexplanatory. + + Then what? + ========= + + Then you have to open up a port in your firewall to allow outside, as well as inside (usually yourself) callers to reach your JamNNTPd newsserver. The default port for a newsserver is 119, so this is a good choice for incoming from internet, and 5000 is usually a good one for outgoing to your local network. Settings for the WinXP firewall can be reached from right-clicking on your internet connection icon in 'Settings'->'Network and Dial-up Connections' and then click your way to 'Properties'->'Advanced'->'Settings'. Add a new porthole, lets call it JamNNTPd, with 119, 5000, TCP and the local name of the workstation where you installed the JamNNTPd server (localhost will do fine if you installed JamNNTPd on the workstation that your firewall is located on). + + Now all you have to do is 'Win-R cmd' and do a 'cd' to the proper directory and give the command 'jamnntpd' and you're up and running! Remember that even if your outside callers must use port 119, you yourself, from inside the firewall, must use port 5000 to connect to your own newsserver. + + So that's it, then? + ================== + + Once you've made sure it's working, you can start finetuning your setup. First of all, Ctrl-C stops the server. :) Then you may remember that the server does not need to be restarted whenever you edit one of the four config files. Thirdly, even if the defaults usually is a good choice, if you want a conservative, fidonettish look&feel from your JamNNTPd newsserver, you might be interested in knowing how I start it: + +jm.bat +------ +@jamnntpd.exe -notearline -smartquote -noreplyaddr -m 10 -echomailjam r:\sem\fdxit6.60 +------ + + As some of you might guess from the above, I still rely on a FrontDoor node to take care of most of the things, such as tossing and scanning echomail. 'fdxit6.60' is a semaphore file that tells my FrontDoor node 6 to exit with errorlevel 60. That is my major toss&scan event. I use CrashMail II (from the JamNNTPd author) to toss&scan my JAM areas, since my old squishmail can't handle JAM. + + Can I let anybody in? + ==================== + + In fidonet, we have a very strict policy about real-names and proper authentication of users, before they are allowed to write anything in any of our echoes. So, if you setup fidonet echoes, you must make sure your users are authenticated before they are allowed to write anything. Reading is, of course, perfectly OK even for anonymous visitors. + + Proper authenticating is also handled by JamNNTPd, based on how you setup your *.users and *.allow files. Normally you probably will have a *.allow that only has one line: + + '* ABCDE A' + + ... meaning you let everybody read in your A, B, C, D and E groups but only write in A (for anonymous). + + In *.users you can add more groups, that only authenticated users may read or write: + +# Syntax: +# +# <username> <password> <readgroups> <postgroups> +# +sysop password ABISTX ABISTX +# +# I=international +# S=Swedish +# T=beta-test +# X=private +# +user1 password1 AIST AIST +user2 password2 ABIST ABIST +user3 password3 ABIST ABIS +user4 password4 AIST ABST +user5 password5 AIST AI +guest guest AIST A + + Well, sysop could just as well have used * for both groups. Poor user 4 is not allowed to read B groups but can write (probably not a very good idea), and user5 is not trusted with writing in Swedish-only echoes. Furthermore, you can add a real-name for any user listed here (more about that in the main doc). + + Then all you have to do, is inform your users to set up their news reader to "always request authentication to this server" and to have configured it with the proper nick, true-name and password. It may interest them to know, that what they enter in the "Organisation:" field ends up in the origin line, unless you use one of the options, described in the main doc, to use a fixed origin line of your choice. + + ----- + + Bj\x94rn Felten, news://felten.dyndns.org + or fidonet 2:203/208 Added: jamnntpd/branches/vendor/0.6/History.txt =================================================================== --- jamnntpd/branches/vendor/0.6/History.txt (rev 0) +++ jamnntpd/branches/vendor/0.6/History.txt 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,80 @@ +Changes in version 0.6 + + - Configurable charset handling based on CHS files in the GoldED+ format. + + - Greatly improved MIME-handling. JamNNTPd now handles both quoted-printable + and base64 in both headers and message body when posting messages. Message + headers containing non-ascii characters are encoded when displayed unless + the -noencode option is used. + + - Now supports "quoting" with backslash as described in RFC-822. + + - JamNNTPd can now create an echomail.jam file that contains a list of all + posted messages. The echomail.jam file can also be used as a semaphore. + + - A new -origin switch can be used to override the Organization line for + the origin. + + - Support for TZUTC/TZUTCINFO kludges. JamNNTPd now creates a TZUTC kludge + unless the -notzutc option is used. Thanks to Peter Karlsson for the patch. + + - Better parsing of configuration files. You can now use quotes for strings + containing space characters. "" means an empty string. + + - It is now possible to override the From name on posts from authenticated + users. It is also possible to specify a suffix that is added to the From + name of all unauthenticated users using the -guestsuffix option. + + - Access groups are now case-insensitive. In addition, "*" now means all + groups and "-" means no groups. + + - The -smartquote option no longer removes initial space characters from + quoted text and inserts incorrect initials. + + - Fixed broken response code of NEWGROUPS command. + + - The LIST ACTIVE and LIST OVERVIEW.FMT commands are now also supported. + + - JamNNTPd now displays an X-Comment-To header line. + + - The signature delimiter "-- " is no longer reflowed when posting with + format=flowed. Fixed display problems with long lines without spaces + and format=flowed. + + - All characters <32 are removed in the output of the XOVER command to + prevent problems. + + - Increased the maximum size for posts from 10 000 bytes to 20 000 bytes. + + - JamNNTPd no longer crashes when an area cannot be opened. + + - JamNNTPd no longer crashes when trying to display messages with blank + JAMSFLD_FTSKLUDGE fields in the XOVER command. + + - The body text of posts that started with a blank line were lost in + previous versions. This has now been fixed. + + - Upgraded JAMLIB to version 1.3.2. + + - Other minor fixes and improvements. + +Changes in version 0.5 + + - Superfluous space characters are now removed when lines are joined when + posting using format=flowed. + + - Implemented quote reformatting (-smartquote switch) + + - Changed % to $ in Message-Id and References line. + + - XOVER didn't work in groups with only one message. Fixed. + + - JAMLIB is now included in the JamNNTPd archive and no longer needs to be + downloaded separately. + + - Simplified the compilation process. Now "make linux" or "make win32" in + the src directory is enough. + +Changes in version 0.4 + + - First public release Added: jamnntpd/branches/vendor/0.6/ReadMe.txt =================================================================== --- jamnntpd/branches/vendor/0.6/ReadMe.txt (rev 0) +++ jamnntpd/branches/vendor/0.6/ReadMe.txt 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,347 @@ + + JamNNTPd 0.6 + + by Johan Billing + + (bi...@df...) + + 2004-07-17 + +1. Introduction +=============== +JamNNTPd is an attempt to merge dying fidonet technology with modern Usenet +newsreaders. Basically, JamNNTPd is NNTP server that allows newsreaders to +access a JAM messagebase. (If you didn't understand a word of this, you +probably don't want to use JamNNTPd anyway). + +JamNNTPd can be used with both Linux and Windows. An executable binary is +only suppplied for Windows, Linux users need to compile JamNNTPd themselves. + +2. Copyright +============ +The copyright of JamNNTPd belongs to Johan Billing. Permission to use, copy +and distribute JamNNTPd is granted provided that this copyright notice is +included. Permission to modify JamNNTPd is granted. Distributing modified +versions of JamNNTPd is allowed provided that the documentation clearly +states that it is a modified version. Parts of JamNNTPd may be freely used +in other projects as long as credit is given. + +JamNNTPd uses JAMLIB for reading and modifying JAM messagebases. JAMLIB is +copyright 1996 Bj\xF6rn Stenberg and is released under the GNU Lesser General +Public License (see included file src/jamlib/LICENSE). + +3. Security +=========== +I cannot guarantee that there are no security leaks in JamNNTPd. If you +decide to use it, you do it on your own risk. If you use JamNNTPd under +Linux, you should avoid running it with root privileges. + +4. Using JamNNTPd +================= + +4.1 Command-line options +------------------------ +Usage: jamnntpd [-debug] [-noecholog] [-nostripre] [-notearline] + [-noreplyaddr] [-smartquote] [-noencode] [-notzutc] [-p <port>] + [-m <maxconn>] [-def_flowed on/off] [-def_showto on/off] + [-origin <origin>] [-guestsuffix <suffix>] + [-echomailjam <echomail.jam> [-g <groupsfile>] [-a <allowfile>] + [-u <usersfile>] [-x <xlatfile>] [-l <logfile>] + + -debug + + If this option is used, JamNNTPd will print all sent and received text + to the console window. Useful for testing. + + -noecholog + + Disables echoing of log messages to the console window. + + -nostripre + + JamNNTPd normally strips "Re:" from subject lines of followups. Use + this option if you want to retain the "Re:". + + -notearline + + JamNNTPd normally puts the information from the X-Newsreader or User-Agent + header field in the tearline of posted messages. This option disables this + behaviour and leaves the tearline blank. + + -noreplyaddr + + JamNNTPd normally adds a REPLYADDR kludge with the e-mail address of the + sender in posted messages. Use this option if you don't want REPLYADDR + kludges. See also see section 6.4 below. + + -smartquote + + The quoting style of most newsreaders is different from traditional fidonet + software. If you enable this option, JamNNTPd will try to change any quoted + lines to fidonet style. This means that it will try to insert the initials + of the person you reply to before the '>' character and also that it will try + to compound multiple generations of quotes, i.e. "AA> BB>" will be changed + into "BB>>". + + Reformatting quotes in this way means that the user who posts a message will + no longer have final say over the final content of the message since it will + be changed after he or she sends it to JamNNTPd. Since this in principle is + a bad thing even if quoted text will look a lot better after reformatting, + this option is turned off by default. + + -noencode + + JamNNTPd by default MIME-encodes headers with non-ascii characters. If you + use this option, JamNNTPd will instead send the headers as plain 8-bit text. + + -notzutc + + JamNNTPd normally writes the timezone into a TZUTC kludge when a message + is posted. You can use this option if you don't want to create TZUTC kludges. + + -p <port> + + Set the port where JamNNTPd listens for connections. The default is 5000. + + -m <maxconn> + + The maximum allowed number of connections at one time. The default is 5. + + -def_flowed on/off + -def_showto on/off + + Sets the default of the flowed and showto settings (if no default is + specified on the commandline, both will be on by default) + + flowed: If flowed is on, JamNNTPd will use format=flowed (section 6.5), + otherwise it will wrap long lines to a fixed width. + + showto: Since there is no receiver for news messages, JamNNTPd can display + the receiver name as a part of the sender name. With this option, + this behaviour can be turned on or off. + + These can be modified by the user by logging in with parameters (section 4.4) + + -origin <origin> + + Normally JamNNTPd uses the text found in the Organization header line as + the Origin line text in posted messages. You can use this switch to + override the Organization line and set your own origin for all posted + messages. + + -guestsuffix <suffix> + + If desired, JamNNTPd can add a suffix to posts from unauthenticated users. + To activate that feature, specify the suffix here. + + Example: -guestsuffix " [GUEST]". + + -echomailjam <echomail.jam> + + If you specify a filename here, JamNNTPd will write a line to this file + with the messagebase and message number of each message that is posted. + The file follows the ECHOMAIL.JAM format supported by some tossers. + + -g <groupsfile> + -a <allowfile> + -u <usersfile> + -x <xlatfile> + + Use these to override the default locations of the config files. + + -l <logfile> + + Use this to override the default location of the log file. + +4.2 Access rights +----------------- +Access rights in JamNNTPd is based on access groups. Every newsgroup in +JamNNTPd belongs to an acess group. Access groups are named using one letter, +typically A to Z (access groups are case-insensitive). In the configuration +files, you can use "*" for "all groups" and "-" for "no groups". + +When a user connects to the server, he/she gets access to two set of access +groups. The first set of groups are for read access and the second set of +groups are for post access. Users are only allowed to read newsgroups that +belong to an access group they have read access to and are only allowed to +post to newsgroups belong to an access group that they have post access to. +The default access groups for users are configured in the "allow" file. + +A user might get access to additional access groups if he/she logs in to the +server using the AUTHINFO command. The groups associated with a user are +defined in the "users" file. + +4.3 Configuration files +----------------------- +JamNNTPd uses four configuration files: + +1) In the "groups" file, the JAM areas that JamNNTPd should provide as + newsgroups are configured. + +2) In the "allow" file, the IP numbers that are allowed to use the server + are listed. Here you also set the default access rights for users before + they log in. + +3) In the "users" file, you can list users that should be given access to + additional groups if they log in. + +4) In the "xlat" file, you can configure translation between the different + character sets used in your JAM messagebase and your newsreader. + +The format of these files can be seen in the example configuration files. +You do not need to restart JamNNTPd if you change them since they are read +every time a new connection to the server is made. + +4.4 Logging in with parameters +------------------------------ +Since it is likely that all users will not prefer the same settings for the +flowed and showto options (see section 4.1), these can be modified by the +user by logging in with parameters. + +If you want to set these options, login using a login name of this format: + + username/option1=on,option2=off + +If you want to set options without logging in, just omit the user name and +enter anything as your password. + +Examples: + + billing/showto=off + billing/flowed=on,showto=on + /flowed=off + +5. Compilation +============== +JamNNTPd should compile with most compilers. I use gcc under Linux and MinGW +under Windows. To compile JamNNTPd, go to the src directory and type either +"make linux" or "make win32" depending on what platform you are compiling +JamNNTPd on. After a successful compilation, you will find a file called +"jamnntpd" or "jamnntpd.exe" in the src directory. + +6. Compatibility +================ + +6.1 The NNTP protocol +--------------------- +JamNNTPd supports most of the basic NNTP protocol as specified in RFC-977. +The commands IHAVE, NEWGROUPS and NEWNEWS are not implemented, but at least +give valid response codes if a newsreader tries to use them. JamNNTPd also +supports the XOVER and AUTHINFO commands as specified in RFC-2980. XOVER +never sends information about the line counts and byte counts of messages. + +6.2 Format of news messages +--------------------------- +JamNNTPd probably breaks the RFC-1036 specification on some minor points, +but seems to work well enough with most newsreaders. + +MIME is supported. Headers with non-ascii characters are encoded using +quoted-printable or base64 unless disabled with -noencode. Message bodies +are always sent as 7bit or 8bit. The charset is always set to "us-ascii" +if a message does not contain non-ascii characters. + +Posted messages can either be in plain text (8bit or 7bit) or encoded +with quoted-printable of base64. Posted messages are only accepted if they +are in the format text/plain (i. e. HTML and multipart messages will be +rejected). Crossposted messages will be rejected. Messages longer than +20 000 bytes will also be rejected. + +6.3 MSGID / Message-ID +---------------------- +JamNNTPd does not present the MSGIDs found in the JAM messagebase as +Message-IDs to the newsreader, but rather uses its own dummy Message-IDs +instead. The references line in followups will be replaced by the proper +REPLY line. + +6.4 REPLYADDR +------------- +When a message is posted to a JAM messagebase, JamNNTPd converts the original +from address to a REPLYADDR kludge. According to FSC-0035, REPLYADDR kludges +should be accompanied by a REPLYTO line. JamNNTPd does not create a REPLYTO +line, but this should not be a major problem. If you want to disable the +REPLYADDR kludge altogether, use the -noreplyaddr option. + +6.5 format=flowed +----------------- +A recent extension to MIME (RFC-2646) specifies a format for "flowed" text, +i. e. text that only has line breaks between paragraphs and not after every +line. This format is more well-suited for fidonet messages than the +traditional format since fidonet has always used "flowed" text. + +JamNNTPd uses format=flowed unless disabled with the -def_flowed switch or +with login parameters, and it is preferable to use a newsreader that also +supports this format. Unfortunately, only few newsreaders support this format +today. JamNNTPd will also work with other newsreaders, but messages will look +slightly worse both on the NNTP and fidonet side. + +6.6 Character set translation +----------------------------- +JamNNTPd has good support for character sets. The character set translation +is configured in the "xlat" file and uses CHS files in the GoldED+ format for +the actual translation. Extended CHS files with 256 character translations +are supported and a character may be translated to up to four characters. + +6.7 Tested newsreaders +---------------------- +JamNNTPd has been found to work with the following newsreaders: + + Mozilla 1.4.1 + Outlook Express 6.00.2800.1106 + KNode 0.7.2 + Xnews 5.04.25 + 40tude Dialog 2.0.7.1 + Forte Free Agent 1.93/32.576 + +Of these, only Mozilla seems to support format=flowed. + +7. How to create additional *.chs files +======================================= +The *.chs files in the "xlat" and "unicode/xlat" directories are character +set translation tables in the GoldED+ format. The files were created from +mappings files found at this URL: + + http://www.unicode.org/Public/MAPPINGS/ + +Fallback sequences for characters that don't exist in the target charset +were taken from Markus Kuhn's transliteration tables found at the URL below: + + http://www.cl.cam.ac.uk/~mgk25/download/transtab.tar.gz + +If you want to create additional translation tables, you can easily do so +with the supplied utility "makechs". + +Syntax for makechs: + + makechs <fromchrs> <destchrs> <frommap> [<destmap>] + +<fromchrs> is the fidonet name of the charset you want to convert from. + +<destchrs> is the fidonet name of the charset you want to convert to. + +<frommap> is the Unicode mappings file for the source charset. + +<destmap> is the Unicode mappings file for the destination charset. If +you don't supply a mappings file, makechs will instead create a chs file +that converts the source charset to utf-8. + +The output of makechs is written to the console and needs to be redirected +to the desired file. + +Examples: + + makechs IBMPC LATIN-1 map/cp437.txt map/8859-1.txt >437_iso.chs + makechs IBMPC UTF-8 map/cp437.txt >437_utf.chs + +Mappings files for all imaginable character sets can be found at the Unicode +site above. + +8. Todo +======= +Here are some improvements that maybe ought to be done: + + * A configuration file instead of lots of commandline switches + * Netmail handling + +But it is pointless for me to spend time on these improvements unless someone +out there needs them, because I don't. + Added: jamnntpd/branches/vendor/0.6/examples/jamnntpd.allow =================================================================== --- jamnntpd/branches/vendor/0.6/examples/jamnntpd.allow (rev 0) +++ jamnntpd/branches/vendor/0.6/examples/jamnntpd.allow 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,18 @@ +# Allowed IP numbers for JamNNTPd +# +# Syntax: +# +# <ip> <default read access groups> <default post access groups> +# +# "*" can be used as a wildcard. Everything after "*" is ignored, i. e. +# 127.0.*.1 is equivalent to 127.0.*. Just write "*" alone on a line to +# allow all IP numbbers. +# +# If no access groups are configured, users connecting from that IP will +# not be able to access any newsgroups unless they log in. +# +# "*" means "all groups" and "-" means "no groups". +# + +127.0.0.1 AX A + Added: jamnntpd/branches/vendor/0.6/examples/jamnntpd.groups =================================================================== --- jamnntpd/branches/vendor/0.6/examples/jamnntpd.groups (rev 0) +++ jamnntpd/branches/vendor/0.6/examples/jamnntpd.groups 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,19 @@ +# Groups configuration for JamNNTPd +# +# Syntax: +# +# <tagname> <access group> <aka> <jampath> [<default chrs>] [-nochrs] +# +# The default charset (optional) is the assumed charset when no CHRS or +# CODEPAGE line is found. If the default chrs begins with a "!" character, +# the "force" mode is activated for that group. In "force" mode, the +# specified charset is used regardless of the contents of the CHRS and +# CODEPAGE lines and messages can only be posted in charsets that can +# be translated to the forced character set. +# +# If -nochrs is specified, no CHRS will be created when messages are +# posted in this area. + +R20_TEKNISKT_RASERI A 2:205/454.77 c:\fido\areas\R20_TEKNISKT_RASERI +R20_AMIGA A 2:205/454.77 c:\fido\areas\R20_AMIGA LATIN-1 +RU.COMP.HUMOR A 2:205/454.77 c:\fido\areas\RU.COMP.HUMOR !CP866 Added: jamnntpd/branches/vendor/0.6/examples/jamnntpd.users =================================================================== --- jamnntpd/branches/vendor/0.6/examples/jamnntpd.users (rev 0) +++ jamnntpd/branches/vendor/0.6/examples/jamnntpd.users 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,13 @@ +# User configuration file for JamNNTd +# +# Syntax: +# +# <username> <password> <readgroups> <postgroups> [<from name>] +# +# "*" means "all groups" and "-" means "no groups". +# +# If desired, JamNNTPd can force the From name of posted messages to be the +# name configured here. + +billing password AX AX +palinuris vulgaris AX AX "Palle Kuling" Added: jamnntpd/branches/vendor/0.6/examples/jamnntpd.xlat =================================================================== --- jamnntpd/branches/vendor/0.6/examples/jamnntpd.xlat (rev 0) +++ jamnntpd/branches/vendor/0.6/examples/jamnntpd.xlat 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,72 @@ +# Charset configuration for JamNNTPd +# +# If you want to disable charset translation, uncomment the following two lines +# and remove the rest of the file. +# +#read * unknown-8bit +#post * "" + +# This is the directory where the *.chs files will be found + +chsdir /home/fido/jamnntpd/xlat + +# Charset translations when reading messages + +# The charset specified with "defaultread" is the charset JamNNTPd will use +# when no charset was specified in the CHRS and CODEPAGE lines. If you enter +# the character "!" before the charset, the "force" mode is activated. In +# "force" mode, the specified charset is used regardless of the contents of +# the CHRS and CODEPAGE lines and messages can only be posted in charsets +# that can be translated to the forced character set. Example: !CP866 +# +# You can enter group-specific default charsets in jamnntpd.groups. + +defaultread IBMPC + +# Syntax: read <CHRS>[,<CODEPAGE>] <tochrs> [<xlat file>] [-keepsoftcr] +# +# Here you can configure the charset translations to be used when reading +# messages. CHRS and CODEPAGE are taken from the respective kludge lines. +# If you omit the xlat file, no actual charset translation will take place. +# +# The "-keepsoftcr" option can be used to prevent JamNNTPd from removing the +# Soft-CR character (0x8d) as it is used in some character sets like CP866. + +read CP437 iso-8859-1 437_iso.chs +read CP850 iso-8859-1 850_iso.chs +read CP865 iso-8859-1 865_iso.chs +read CP866 koi8-r 866_koi.chs -keepsoftcr +read LATIN-1 iso-8859-1 + +# readalias can be used to configure aliases for charsets + +readalias IBMPC,850 CP850 +readalias IBMPC,865 CP865 +readalias IBMPC,866 CP866 +readalias IBMPC CP437 + +# Charset translations when posting messages + +# The charset specified with "defaultpost" is the charset JamNNTPd will use +# when no charset was specified. + +defaultpost iso-8859-1 + +# Syntax: post <charset> <CHRS>[,<CODEPAGE>] <xlat file> +# +# Here you can configure the charset translations to be used when posting +# messages. If you don't want to create CHRS kludges, enter "" as CHRS. +# You should have "read" translations set up for all charsets you accept or +# the receiver name of the posts might not be translated properly. + +post iso-8859-1 IBMPC iso_437.chs +post koi8-r CP866 koi_866.chs + +# postalias can be used to configure aliases for charsets +# +# windows-1252 and iso-8859-15 are not exactly the same as iso-8859-1, but +# close enough for most people. + +postalias windows-1252 iso-8859-1 +postalias iso-8859-15 iso-8859-1 +postalias us-ascii iso-8859-1 Added: jamnntpd/branches/vendor/0.6/src/Makefile =================================================================== --- jamnntpd/branches/vendor/0.6/src/Makefile (rev 0) +++ jamnntpd/branches/vendor/0.6/src/Makefile 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,24 @@ +# type either "make linux" or "make win32" to compile + +help: + @echo You can use this Makefile in the following ways: + @echo make linux ............ Make Linux binaries + @echo make win32 ............ Make Win32 binaries + @echo make cleanlinux ....... Remove object files under Linux + @echo make cleanwin32 ....... Remove object files under Win32 + +linux : + make -C jamlib -f Makefile.linux + make -f Makefile.linux + +win32 : + make -C jamlib -f Makefile.win32 + make -f Makefile.win32 + +cleanlinux : + make -C jamlib -f Makefile.linux clean + make -f Makefile.linux clean + +cleanwin32 : + make -C jamlib -f Makefile.win32 clean + make -f Makefile.win32 clean Added: jamnntpd/branches/vendor/0.6/src/Makefile.linux =================================================================== --- jamnntpd/branches/vendor/0.6/src/Makefile.linux (rev 0) +++ jamnntpd/branches/vendor/0.6/src/Makefile.linux 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,55 @@ +# Makefile for Linux + +# General + +PLATFORMDEF = -DPLATFORM_LINUX +EXESUFFIX = + +CC = gcc $(DEFS) -Wall +RM = rm -f +STRIP = strip + +OBJS = main.o nntpserv.o os_linux.o sockio.o groups.o misc.o xlat.o allow.o login.o mime.o + +targets: jamnntpd$(EXESUFFIX) makechs$(EXESUFFIX) + +makechs$(EXESUFFIX): makechs.c + $(CC) $(PLATFORMDEF) makechs.c -o makechs + $(STRIP) makechs$(EXESUFFIX) + +jamnntpd$(EXESUFFIX): $(OBJS) + $(CC) -o jamnntpd$(EXESUFFIX) $(OBJS) jamlib/jamlib.a -lpthread + $(STRIP) jamnntpd$(EXESUFFIX) + +nntpserv.o : nntpserv.c + $(CC) $(PLATFORMDEF) -c nntpserv.c -o nntpserv.o + +os_linux.o : os_linux.c + $(CC) $(PLATFORMDEF) -c os_linux.c -o os_linux.o + +main.o : main.c + $(CC) $(PLATFORMDEF) -c main.c -o main.o + +sockio.o : sockio.c + $(CC) $(PLATFORMDEF) -c sockio.c -o sockio.o + +groups.o : groups.c + $(CC) $(PLATFORMDEF) -c groups.c -o groups.o + +misc.o : misc.c + $(CC) $(PLATFORMDEF) -c misc.c -o misc.o + +xlat.o : xlat.c + $(CC) $(PLATFORMDEF) -c xlat.c -o xlat.o + +allow.o : allow.c + $(CC) $(PLATFORMDEF) -c allow.c -o allow.o + +login.o : login.c + $(CC) $(PLATFORMDEF) -c login.c -o login.o + +mime.o : mime.c + $(CC) $(PLATFORMDEF) -c mime.c -o mime.o + +clean : + $(RM) *.o Added: jamnntpd/branches/vendor/0.6/src/Makefile.win32 =================================================================== --- jamnntpd/branches/vendor/0.6/src/Makefile.win32 (rev 0) +++ jamnntpd/branches/vendor/0.6/src/Makefile.win32 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,55 @@ +# Makefile for Linux + +# General + +PLATFORMDEF = -DPLATFORM_WIN32 +EXESUFFIX = .exe + +CC = gcc $(DEFS) -Wall +RM = del +STRIP = strip + +OBJS = main.o nntpserv.o os_win32.o sockio.o groups.o misc.o xlat.o allow.o login.o mime.o + +targets: jamnntpd$(EXESUFFIX) makechs$(EXESUFFIX) + +makechs$(EXESUFFIX) : makechs.c + $(CC) $(PLATFORMDEF) makechs.c -o makechs$(EXESUFFIX) + $(STRIP) makechs$(EXESUFFIX) + +jamnntpd$(EXESUFFIX) : $(OBJS) + $(CC) -o jamnntpd$(EXESUFFIX) $(OBJS) jamlib/jamlib.a -lwsock32 + $(STRIP) jamnntpd$(EXESUFFIX) + +nntpserv.o : nntpserv.c + $(CC) $(PLATFORMDEF) -c nntpserv.c -o nntpserv.o + +os_win32.o : os_win32.c + $(CC) $(PLATFORMDEF) -c os_win32.c -o os_win32.o + +main.o : main.c + $(CC) $(PLATFORMDEF) -c main.c -o main.o + +sockio.o : sockio.c + $(CC) $(PLATFORMDEF) -c sockio.c -o sockio.o + +groups.o : groups.c + $(CC) $(PLATFORMDEF) -c groups.c -o groups.o + +misc.o : misc.c + $(CC) $(PLATFORMDEF) -c misc.c -o misc.o + +xlat.o : xlat.c + $(CC) $(PLATFORMDEF) -c xlat.c -o xlat.o + +allow.o : allow.c + $(CC) $(PLATFORMDEF) -c allow.c -o allow.o + +login.o : login.c + $(CC) $(PLATFORMDEF) -c login.c -o login.o + +mime.o : mime.c + $(CC) $(PLATFORMDEF) -c mime.c -o mime.o + +clean : + $(RM) *.o Added: jamnntpd/branches/vendor/0.6/src/allow.c =================================================================== --- jamnntpd/branches/vendor/0.6/src/allow.c (rev 0) +++ jamnntpd/branches/vendor/0.6/src/allow.c 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,50 @@ +#include "nntpserv.h" + +bool checkallow(struct var *var,uchar *ip) +{ + FILE *fp; + uchar s[1000],cfgip[100],cfgreadgroups[50],cfgpostgroups[50]; + int res1,res2,res3; + ulong pos,line; + + if(!(fp=fopen(cfg_allowfile,"r"))) + { + os_logwrite("(%s) Can't read allow file %s",var->clientid,cfg_allowfile); + return(FALSE); + } + + line=0; + + while(fgets(s,999,fp)) + { + line++; + strip(s); + pos=0; + + if(s[0]!=0 && s[0]!='#') + { + res1=getcfgword(s,&pos,cfgip,100); + res2=getcfgword(s,&pos,cfgreadgroups,50); + res3=getcfgword(s,&pos,cfgpostgroups,50); + + if(res1) + { + if(matchpattern(cfgip,ip)) + { + if(res2) strcpy(var->readgroups,cfgreadgroups); + if(res3) strcpy(var->postgroups,cfgpostgroups); + + fclose(fp); + return(TRUE); + } + } + else + { + os_logwrite("(%s) Syntax error on line %lu in %s, skipping line",var->clientid,line,cfg_allowfile); + } + } + } + + fclose(fp); + return(FALSE); +} Added: jamnntpd/branches/vendor/0.6/src/allow.h =================================================================== --- jamnntpd/branches/vendor/0.6/src/allow.h (rev 0) +++ jamnntpd/branches/vendor/0.6/src/allow.h 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1 @@ +bool checkallow(struct var *var,uchar *str); Added: jamnntpd/branches/vendor/0.6/src/groups.c =================================================================== --- jamnntpd/branches/vendor/0.6/src/groups.c (rev 0) +++ jamnntpd/branches/vendor/0.6/src/groups.c 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,95 @@ +#include "nntpserv.h" + +bool readgroups(struct var *var) +{ + FILE *fp; + uchar s[1000],tagname[100],group[2],aka[40],jampath[100],option[100]; + bool res1,res2,res3,res4; + ulong pos,line; + struct group *newgroup,*lastgroup; + + if(!(fp=fopen(cfg_groupsfile,"r"))) + { + os_logwrite("(%s) Failed to read group configuration file %s",var->clientid,cfg_groupsfile); + return(FALSE); + } + + lastgroup=NULL; + var->firstgroup=NULL; + + line=0; + + while(fgets(s,999,fp)) + { + line++; + strip(s); + pos=0; + + if(s[0]!=0 && s[0]!='#') + { + res1=getcfgword(s,&pos,tagname,100); + res2=getcfgword(s,&pos,group,2); + res3=getcfgword(s,&pos,aka,40); + res4=getcfgword(s,&pos,jampath,100); + + if(res1 && res2 && res3 && res4) + { + if(!(newgroup=(struct group *)malloc(sizeof(struct group)))) + { + fclose(fp); + return(FALSE); + } + + newgroup->next=NULL; + if(!var->firstgroup) var->firstgroup=newgroup; + if(lastgroup) lastgroup->next=newgroup; + lastgroup=newgroup; + + strcpy(newgroup->tagname,tagname); + newgroup->group=group[0]; + strcpy(newgroup->aka,aka); + strcpy(newgroup->jampath,jampath); + + newgroup->nochrs=FALSE; + newgroup->defaultchrs[0]=0; + + while(getcfgword(s,&pos,option,100)) + { + if(stricmp(option,"-nochrs")==0) + { + newgroup->nochrs=TRUE; + } + else if(option[0] != '-' && newgroup->defaultchrs[0] == 0) + { + mystrncpy(newgroup->defaultchrs,option,40); + } + else + { + os_logwrite("(%s) Warning: Unknown option %s on line %lu in %s",var->clientid,option,line,cfg_groupsfile); + } + } + } + else + { + os_logwrite("(%s) Syntax error on line %lu in %s, skipping line",var->clientid,line,cfg_groupsfile); + } + } + } + + fclose(fp); + + if(!var->firstgroup) + { + os_logwrite("(%s) No groups configured",var->clientid); + return(FALSE); + } + + return(TRUE); +} + +void freegroups(struct var *var) +{ + freelist(var->firstgroup); + var->firstgroup=NULL; +} + Added: jamnntpd/branches/vendor/0.6/src/groups.h =================================================================== --- jamnntpd/branches/vendor/0.6/src/groups.h (rev 0) +++ jamnntpd/branches/vendor/0.6/src/groups.h 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,14 @@ +struct group +{ + struct group *next; + uchar tagname[100]; + uchar group; + uchar jampath[100]; + uchar aka[40]; + uchar defaultchrs[20]; + bool nochrs; +}; + +bool readgroups(struct var *var); +void freegroups(struct var *var); + Added: jamnntpd/branches/vendor/0.6/src/jamlib/LICENSE =================================================================== --- jamnntpd/branches/vendor/0.6/src/jamlib/LICENSE (rev 0) +++ jamnntpd/branches/vendor/0.6/src/jamlib/LICENSE 2009-03-08 00:53:43 UTC (rev 46) @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided... [truncated message content] |
From: <ja...@us...> - 2009-03-08 00:23:37
|
Revision: 45 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=45&view=rev Author: jame Date: 2009-03-08 00:23:30 +0000 (Sun, 08 Mar 2009) Log Message: ----------- Import jamnntpd-1.0 into the repository at jamnntpd/branches/vendor/1.0. Added Paths: ----------- jamnntpd/branches/vendor/1.0/ jamnntpd/branches/vendor/1.0/History.txt jamnntpd/branches/vendor/1.0/ReadMe.txt jamnntpd/branches/vendor/1.0/ReadMe_hpt.txt jamnntpd/branches/vendor/1.0/examples/ jamnntpd/branches/vendor/1.0/examples/jamnntpd.allow jamnntpd/branches/vendor/1.0/examples/jamnntpd.groups jamnntpd/branches/vendor/1.0/examples/jamnntpd.users jamnntpd/branches/vendor/1.0/examples/jamnntpd.xlat jamnntpd/branches/vendor/1.0/src/ jamnntpd/branches/vendor/1.0/src/Makefile jamnntpd/branches/vendor/1.0/src/Makefile.linux jamnntpd/branches/vendor/1.0/src/Makefile.win32 jamnntpd/branches/vendor/1.0/src/allow.c jamnntpd/branches/vendor/1.0/src/allow.h jamnntpd/branches/vendor/1.0/src/groups.c jamnntpd/branches/vendor/1.0/src/groups.h jamnntpd/branches/vendor/1.0/src/jamlib/ jamnntpd/branches/vendor/1.0/src/jamlib/LICENSE jamnntpd/branches/vendor/1.0/src/jamlib/Makefile.linux jamnntpd/branches/vendor/1.0/src/jamlib/Makefile.os2 jamnntpd/branches/vendor/1.0/src/jamlib/Makefile.win32 jamnntpd/branches/vendor/1.0/src/jamlib/crc32.c jamnntpd/branches/vendor/1.0/src/jamlib/jam.h jamnntpd/branches/vendor/1.0/src/jamlib/jamlib.doc jamnntpd/branches/vendor/1.0/src/jamlib/lastread.c jamnntpd/branches/vendor/1.0/src/jamlib/mbase.c jamnntpd/branches/vendor/1.0/src/jamlib/message.c jamnntpd/branches/vendor/1.0/src/jamlib/structrw.c jamnntpd/branches/vendor/1.0/src/jamlib/structrw.h jamnntpd/branches/vendor/1.0/src/jamlib/subpack.c jamnntpd/branches/vendor/1.0/src/login.c jamnntpd/branches/vendor/1.0/src/login.h jamnntpd/branches/vendor/1.0/src/main.c jamnntpd/branches/vendor/1.0/src/makechs.c jamnntpd/branches/vendor/1.0/src/mime.c jamnntpd/branches/vendor/1.0/src/mime.h jamnntpd/branches/vendor/1.0/src/misc.c jamnntpd/branches/vendor/1.0/src/misc.h jamnntpd/branches/vendor/1.0/src/nntpserv.c jamnntpd/branches/vendor/1.0/src/nntpserv.h jamnntpd/branches/vendor/1.0/src/os.h jamnntpd/branches/vendor/1.0/src/os_linux.c jamnntpd/branches/vendor/1.0/src/os_linux.h jamnntpd/branches/vendor/1.0/src/os_win32.c jamnntpd/branches/vendor/1.0/src/os_win32.h jamnntpd/branches/vendor/1.0/src/sockio.c jamnntpd/branches/vendor/1.0/src/sockio.h jamnntpd/branches/vendor/1.0/src/xlat.c jamnntpd/branches/vendor/1.0/src/xlat.h jamnntpd/branches/vendor/1.0/unicode/ jamnntpd/branches/vendor/1.0/unicode/ReadMe.txt jamnntpd/branches/vendor/1.0/unicode/jamnntpd.xlat jamnntpd/branches/vendor/1.0/unicode/xlat/ jamnntpd/branches/vendor/1.0/unicode/xlat/437_utf.chs jamnntpd/branches/vendor/1.0/unicode/xlat/850_utf.chs jamnntpd/branches/vendor/1.0/unicode/xlat/865_utf.chs jamnntpd/branches/vendor/1.0/unicode/xlat/866_utf.chs jamnntpd/branches/vendor/1.0/unicode/xlat/iso_utf.chs jamnntpd/branches/vendor/1.0/xlat/ jamnntpd/branches/vendor/1.0/xlat/437_iso.chs jamnntpd/branches/vendor/1.0/xlat/850_iso.chs jamnntpd/branches/vendor/1.0/xlat/865_iso.chs jamnntpd/branches/vendor/1.0/xlat/866_koi.chs jamnntpd/branches/vendor/1.0/xlat/iso_437.chs jamnntpd/branches/vendor/1.0/xlat/iso_850.chs jamnntpd/branches/vendor/1.0/xlat/iso_865.chs jamnntpd/branches/vendor/1.0/xlat/koi_866.chs Added: jamnntpd/branches/vendor/1.0/History.txt =================================================================== --- jamnntpd/branches/vendor/1.0/History.txt (rev 0) +++ jamnntpd/branches/vendor/1.0/History.txt 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,127 @@ + +Changes in version 1.0 + + - Added support for netmail and local areas (see examples/jamnntpd.groups) + + - Added support for cancel messages + + - It is now possible to read configuration options from a file using the + new -config option. If JamNNTPd is started without any command-line + arguments at all, it will read configuration options from the file + jamnntpd.config if it is present. A config file with the default + options can be created with the -create option. + + - Introduced the -readorigin switch that makes JamNNTPd read addresses + from the origin line instead of the JAM headers. + + - "To: name" can be used on the first line of posted messages to set an + alternative recipient name. + + - Added partial support for the LIST NEWSGROUPS command so that JamNNTPd + also works with Lynx. + + - JamNNTPd no longer adds an empty REPLY kludge if to MSGID was found. + + - Fixed -smartquote so that incorrect initials are not inserted. + + - Fixed broken backspace quoting on From line. + + - "jamnntpd -h" is more helpful. + + - Error messages were cleaned up a bit. + + - The Windows version now tries to display error messages instead of + Winsock error codes. Only works on newer versions of Windows. + + - Makechs now hopefully compiles without errors on *BSD. + + - Cleaned up the build process a bit. + +Changes in version 0.61 + + - Fixed a bug that would cause JamNNTPd to crash when a JAM messagebase + couldn't be opened. + + - Fixed a bug that would cause JamNNTPd to crash when a default charset + had been specified in jamnntpd.groups. (Thanks Viktor!) + +Changes in version 0.6 + + - Configurable charset handling based on CHS files in the GoldED+ format. + + - Greatly improved MIME-handling. JamNNTPd now handles both quoted-printable + and base64 in both headers and message body when posting messages. Message + headers containing non-ascii characters are encoded when displayed unless + the -noencode option is used. + + - Now supports "quoting" with backslash as described in RFC-822. + + - JamNNTPd can now create an echomail.jam file that contains a list of all + posted messages. The echomail.jam file can also be used as a semaphore. + + - A new -origin switch can be used to override the Organization line for + the origin. + + - Support for TZUTC/TZUTCINFO kludges. JamNNTPd now creates a TZUTC kludge + unless the -notzutc option is used. Thanks to Peter Karlsson for the patch. + + - Better parsing of configuration files. You can now use quotes for strings + containing space characters. "" means an empty string. + + - It is now possible to override the From name on posts from authenticated + users. It is also possible to specify a suffix that is added to the From + name of all unauthenticated users using the -guestsuffix option. + + - Access groups are now case-insensitive. In addition, "*" now means all + groups and "-" means no groups. + + - The -smartquote option no longer removes initial space characters from + quoted text and inserts incorrect initials. + + - Fixed broken response code of NEWGROUPS command. + + - The LIST ACTIVE and LIST OVERVIEW.FMT commands are now also supported. + + - JamNNTPd now displays an X-Comment-To header line. + + - The signature delimiter "-- " is no longer reflowed when posting with + format=flowed. Fixed display problems with long lines without spaces + and format=flowed. + + - All characters <32 are removed in the output of the XOVER command to + prevent problems. + + - Increased the maximum size for posts from 10 000 bytes to 20 000 bytes. + + - JamNNTPd no longer crashes when an area cannot be opened. + + - JamNNTPd no longer crashes when trying to display messages with blank + JAMSFLD_FTSKLUDGE fields in the XOVER command. + + - The body text of posts that started with a blank line were lost in + previous versions. This has now been fixed. + + - Upgraded JAMLIB to version 1.3.2. + + - Other minor fixes and improvements. + +Changes in version 0.5 + + - Superfluous space characters are now removed when lines are joined when + posting using format=flowed. + + - Implemented quote reformatting (-smartquote switch) + + - Changed % to $ in Message-Id and References line. + + - XOVER didn't work in groups with only one message. Fixed. + + - JAMLIB is now included in the JamNNTPd archive and no longer needs to be + downloaded separately. + + - Simplified the compilation process. Now "make linux" or "make win32" in + the src directory is enough. + +Changes in version 0.4 + + - First public release Added: jamnntpd/branches/vendor/1.0/ReadMe.txt =================================================================== --- jamnntpd/branches/vendor/1.0/ReadMe.txt (rev 0) +++ jamnntpd/branches/vendor/1.0/ReadMe.txt 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,411 @@ + + JamNNTPd 1.0 + + by Johan Billing + + (bi...@df...) + + 2004-10-20 + +1. Introduction +=============== +JamNNTPd is an attempt to merge dying fidonet technology with modern Usenet +newsreaders. Basically, JamNNTPd is NNTP server that allows newsreaders to +access a JAM messagebase. (If you didn't understand a word of this, you +probably don't want to use JamNNTPd anyway). + +JamNNTPd can be used with both Linux and Windows. An executable binary is +only suppplied for Windows, Linux users need to compile JamNNTPd themselves. + +2. Copyright +============ +The copyright of JamNNTPd belongs to Johan Billing. Permission to use, copy +and distribute JamNNTPd is granted provided that this copyright notice is +included. Permission to modify JamNNTPd is granted. Distributing modified +versions of JamNNTPd is allowed provided that the documentation clearly +states that it is a modified version. Parts of JamNNTPd may be freely used +in other projects as long as credit is given. + +JamNNTPd uses JAMLIB for reading and modifying JAM messagebases. JAMLIB is +copyright 1996 Bj\xF6rn Stenberg and is released under the GNU Lesser General +Public License (see included file src/jamlib/LICENSE). + +3. Security +=========== +I cannot guarantee that there are no security leaks in JamNNTPd. If you +decide to use it, you do it on your own risk. If you use JamNNTPd under +Linux, you should avoid running it with root privileges. + +4. Using JamNNTPd +================= + +4.1 Configuration options +------------------------- +The behaviour of JamNNTPd can be configured using the configuration options +specified below. These can be given to JamNNTPd in two ways: + +1) As commandline arguments + +2) In a configuration file (see -config command). The preceding dash (-) + is optional when an option is given in a file, it will be added if missing. + A configuration file with the default settings can be created with the + -create option. + +If JamNNTPd is run without any commandline arguments at all, it will attempt +to read options from a file called "jamnntpd.config" if present. Under Linux, +JamNNTPd will look for this file in the "/etc" directory and under Windows +in the current directory. + +It is not necessary to specify any configuration options at all unless when +fine-tuning JamNNTPd, the default have been designed to be sensible. + + +General options: + + -port <port> or -p <port> + + Set the port where JamNNTPd listens for connections. The default is 5000. + + -max <maxconn> or -m <maxconn> + + The maximum allowed number of connections at one time. The default is 5. + + -groups <groupsfile> or -g <groupsfile> + -allow <allowfile> or -a <allowfile> + -users <usersfile> or -u <usersfile> + -xlat <xlatfile> or -x <xlatfile> + + Use these to override the default locations of the config files. + + -logfile <logfile> or -l <logfile> + + Use this to override the default location of the log file. + + -noecholog + + Disables echoing of log messages to the console window. + + -debug + + If this option is used, JamNNTPd will print all sent and received text + to the console window. Useful for testing. + +Options for displaying messages: + + -readorigin + + Get address from the Origin line instead of the OADDRESS field of the JAM + message header. This option makes JamNNTPd slower, but may be useful if + your tosser does not set the OADDRESS field. + + -noencode + + JamNNTPd by default MIME-encodes headers with non-ascii characters. If you + use this option, JamNNTPd will instead send the headers as plain 8-bit text. + + -strictnetmail + + Makes JamNNTPd use strict article counters for netmail messages. Normally + JamNNTPd uses article counters that include all messages, not only those + that the user is allowed to read. That behaviour is much faster, but may + cause your newsreader to indicate the presence of new messages in the + netmail area even when there are only messages for other users. Using this + option will make JamNNTPd slower, but speed seems to be acceptable for + small netmail areas with up to 1000 messages. Users will never be allowed + to actually read netmail messages of other users even when this option is + not used. + + -def_flowed on/off + -def_showto on/off + + Sets the default of the flowed and showto settings (if no default is + specified on the commandline, both will be on by default) + + flowed: If flowed is on, JamNNTPd will use format=flowed (section 6.5), + otherwise it will wrap long lines to a fixed width. + + showto: Since there is no receiver for news messages, JamNNTPd can display + the receiver name as a part of the sender name. With this option, + this behaviour can be turned on or off. + + These can be modified by the user by logging in with parameters (section 4.4) + + +Options for posting messages: + + -nostripre + + JamNNTPd normally strips "Re:" from subject lines of followups. Use + this option if you want to retain the "Re:". + + -notearline + + JamNNTPd normally puts the information from the X-Newsreader or User-Agent + header field in the tearline of posted messages. This option disables this + behaviour and leaves the tearline blank. + + -noreplyaddr + + JamNNTPd normally adds a REPLYADDR kludge with the e-mail address of the + sender in posted messages. Use this option if you don't want REPLYADDR + kludges. See also see section 6.4 below. + + -notzutc + + JamNNTPd normally writes the timezone into a TZUTC kludge when a message + is posted. You can use this option if you don't want to create TZUTC kludges. + + -nocancel + + Disallows the cancelling (deleting) of messages by the users. If allowed, + users can only cancel messages from one of their "realnames" and only if + the message has not yet been sent. + + -smartquote + + The quoting style of most newsreaders is different from traditional fidonet + software. If you enable this option, JamNNTPd will try to change any quoted + lines to fidonet style. This means that it will try to insert the initials + of the person you reply to before the '>' character and also that it will try + to compound multiple generations of quotes, i.e. "AA> BB>" will be changed + into "BB>>". + + Reformatting quotes in this way means that the user who posts a message will + no longer have final say over the final content of the message since it will + be changed after he or she sends it to JamNNTPd. Since this in principle is + a bad thing even if quoted text will look a lot better after reformatting, + this option is turned off by default. + + -origin <origin> + + Normally JamNNTPd uses the text found in the Organization header line as + the Origin line text in posted messages. You can use this switch to + override the Organization line and set your own origin for all posted + messages. + + -guestsuffix <suffix> + + If desired, JamNNTPd can add a suffix to posts from unauthenticated users. + To activate that feature, specify the suffix here. + + Example: -guestsuffix " [GUEST]". + + -echomailjam <echomail.jam> + + If you specify a filename here, JamNNTPd will write a line to this file + with the messagebase and message number for each message that is posted. + The file follows the ECHOMAIL.JAM format supported by some tossers. + + +Options for configuration files: + + -config <configfile> + + Read options from the specified configuration file. + + -create <configfile> + + Create a configuration file with the default settings. + + +4.2 Access rights +----------------- +Access rights in JamNNTPd is based on access groups. Every newsgroup in +JamNNTPd belongs to an acess group. Access groups are named using one letter, +typically A to Z (access groups are case-insensitive). In the configuration +files, you can use "*" for "all groups" and "-" for "no groups". + +When a user connects to the server, he/she gets access to two set of access +groups. The first set of groups are for read access and the second set of +groups are for post access. Users are only allowed to read newsgroups that +belong to an access group they have read access to and are only allowed to +post to newsgroups belong to an access group that they have post access to. +The default access groups for users are configured in the "allow" file. + +A user might get access to additional access groups if he/she logs in to the +server using the AUTHINFO command. The groups associated with a user are +defined in the "users" file. + +4.3 Configuration files +----------------------- +JamNNTPd uses four configuration files: + +1) In the "groups" file, the JAM areas that JamNNTPd should provide as + newsgroups are configured. + +2) In the "allow" file, the IP numbers that are allowed to use the server + are listed. Here you also set the default access rights for users before + they log in. + +3) In the "users" file, you can list users that should be given access to + additional groups if they log in. + +4) In the "xlat" file, you can configure translation between the different + character sets used in your JAM messagebase and your newsreader. + +The format of these files can be seen in the example configuration files. +You do not need to restart JamNNTPd if you change them since they are read +every time a new connection to the server is made. + +4.4 Logging in with parameters +------------------------------ +Since it is likely that all users will not prefer the same settings for the +flowed and showto options (see section 4.1), these can be modified by the +user by logging in with parameters. + +If you want to set these options, login using a login name of this format: + + username/option1=on,option2=off + +If you want to set options without logging in, just omit the user name and +enter anything as your password. + +Examples: + + billing/showto=off + billing/flowed=on,showto=on + /flowed=off + +5. Compilation +============== +JamNNTPd should compile with most compilers. I use gcc under Linux and MinGW +under Windows. To compile JamNNTPd, go to the src directory and type either +"make linux" or "make win32" depending on what platform you are compiling +JamNNTPd on. After a successful compilation, you will find a file called +"jamnntpd" or "jamnntpd.exe" in the src directory. + +6. Compatibility +================ + +6.1 The NNTP protocol +--------------------- +JamNNTPd supports most of the basic NNTP protocol as specified in RFC-977. +The commands IHAVE, NEWGROUPS and NEWNEWS are not implemented, but at least +give valid response codes if a newsreader tries to use them. JamNNTPd also +supports the XOVER and AUTHINFO commands as specified in RFC-2980. XOVER +never sends information about the line counts and byte counts of messages. + +6.2 Format of news messages +--------------------------- +JamNNTPd probably breaks the RFC-1036 specification on some minor points, +but seems to work well enough with most newsreaders. + +MIME is supported. Headers with non-ascii characters are encoded using +quoted-printable or base64 unless disabled with -noencode. Message bodies +are always sent as 7bit or 8bit. The charset is always set to "us-ascii" +if a message does not contain non-ascii characters. + +Posted messages can either be in plain text (8bit or 7bit) or encoded +with quoted-printable of base64. Posted messages are only accepted if they +are in the format text/plain (i. e. HTML and multipart messages will be +rejected). Crossposted messages will be rejected. Messages longer than +20 000 bytes will also be rejected. + +6.3 MSGID / Message-ID +---------------------- +JamNNTPd does not present the MSGIDs found in the JAM messagebase as +Message-IDs to the newsreader, but rather uses its own dummy Message-IDs +instead. The references line in followups will be replaced by the proper +REPLY line. + +6.4 REPLYADDR +------------- +When a message is posted to a JAM messagebase, JamNNTPd converts the original +from address to a REPLYADDR kludge. According to FSC-0035, REPLYADDR kludges +should be accompanied by a REPLYTO line. JamNNTPd does not create a REPLYTO +line, but this should not be a major problem. If you want to disable the +REPLYADDR kludge altogether, use the -noreplyaddr option. + +6.5 format=flowed +----------------- +A recent extension to MIME (RFC-2646) specifies a format for "flowed" text, +i. e. text that only has line breaks between paragraphs and not after every +line. This format is more well-suited for fidonet messages than the +traditional format since fidonet has always used "flowed" text. + +JamNNTPd uses format=flowed unless disabled with the -def_flowed switch or +with login parameters, and it is preferable to use a newsreader that also +supports this format. Unfortunately, only few newsreaders support this format +today. JamNNTPd will also work with other newsreaders, but messages will look +slightly worse both on the NNTP and fidonet side. + +6.6 Character set translation +----------------------------- +JamNNTPd has good support for character sets. The character set translation +is configured in the "xlat" file and uses CHS files in the GoldED+ format for +the actual translation. Extended CHS files with 256 character translations +are supported and a character may be translated to up to four characters. + +6.7 Netmail +----------- +JamNNTPd now also supports netmail. In netmail areas, users can only read +messages to or from one of the names configured in the jamnntpd.users file. +Replies to netmails are handled transparently and the name and address of +the recipient are taken from the original message. When a user wants to write +a new netmail, the name and address of the recipient are specified on the +first line of the new message using this format: + + To: name,address + +Example: + + To: Johan Billing, 2:15/87 + +A To: line can also be used to specify an alternative recipient in both +netmail and echomail areas. + +6.8 Tested newsreaders +---------------------- +JamNNTPd has been found to work with the following newsreaders: + + Mozilla 1.4.1 + Outlook Express 6.00.2800.1106 + KNode 0.7.2 + Xnews 5.04.25 + 40tude Dialog 2.0.7.1 + Forte Free Agent 1.93/32.576 + Lynx 2.8.5 + +Of these, only Mozilla seems to support format=flowed. + +7. How to create additional *.chs files +======================================= +The *.chs files in the "xlat" and "unicode/xlat" directories are character +set translation tables in the GoldED+ format. The files were created from +mappings files found at this URL: + + http://www.unicode.org/Public/MAPPINGS/ + +Fallback sequences for characters that don't exist in the target charset +were taken from Markus Kuhn's transliteration tables found at the URL below: + + http://www.cl.cam.ac.uk/~mgk25/download/transtab.tar.gz + +If you want to create additional translation tables, you can easily do so +with the supplied utility "makechs". + +Syntax for makechs: + + makechs <fromchrs> <destchrs> <frommap> [<destmap>] + +<fromchrs> is the fidonet name of the charset you want to convert from. + +<destchrs> is the fidonet name of the charset you want to convert to. + +<frommap> is the Unicode mappings file for the source charset. + +<destmap> is the Unicode mappings file for the destination charset. If +you don't supply a mappings file, makechs will instead create a chs file +that converts the source charset to utf-8. + +The output of makechs is written to the console and needs to be redirected +to the desired file. + +Examples: + + makechs IBMPC LATIN-1 map/cp437.txt map/8859-1.txt >437_iso.chs + makechs IBMPC UTF-8 map/cp437.txt >437_utf.chs + +Mappings files for all imaginable character sets can be found at the Unicode +site above. + Added: jamnntpd/branches/vendor/1.0/ReadMe_hpt.txt =================================================================== --- jamnntpd/branches/vendor/1.0/ReadMe_hpt.txt (rev 0) +++ jamnntpd/branches/vendor/1.0/ReadMe_hpt.txt 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,23 @@ +Some notes on using JamNNTPd with the hpt tosser from the Husky project: + + * The fidoconfig2jamnntpd.pl script found on the JamNNTPd homepage can be + used to convert your area configuration to a jamnntpd.groups file. + + * If you want JamNNTPd to display the From address correctly, you need to + run it with the -readorigin switch. + + * When hpt creates JAM messagebases, it does not create the lastread (*.jlr) + file. JamNNTPd will not be able to open an area unless all four JAM files + are present. The checkgroups.pl script from the JamNNTPd homepage can be + used to create missing *.jlr files. + + * Do NOT pack your messagebase with "hpt pack". When hpt packs a messagebase, + it will also renumber it. This will cause the article numbers in JamNNTPd + to change which will confuse most newsreaders. + + * JamNNTPd can optionally create an echomail.jam files with the paths to + messagebases with messages to export. This file can not be used to tell + hpt what areas to scan, but it can be converted to an echotoss.log file + for hpt with the echomailjam2hpt.pl script. + + \ No newline at end of file Added: jamnntpd/branches/vendor/1.0/examples/jamnntpd.allow =================================================================== --- jamnntpd/branches/vendor/1.0/examples/jamnntpd.allow (rev 0) +++ jamnntpd/branches/vendor/1.0/examples/jamnntpd.allow 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,18 @@ +# Allowed IP numbers for JamNNTPd +# +# Syntax: +# +# <ip> <default read access groups> <default post access groups> +# +# "*" can be used as a wildcard. Everything after "*" is ignored, i. e. +# 127.0.*.1 is equivalent to 127.0.*. Just write "*" alone on a line to +# allow all IP numbbers. +# +# If no access groups are configured, users connecting from that IP will +# not be able to access any newsgroups unless they log in. +# +# "*" means "all groups" and "-" means "no groups". +# + +127.0.0.1 AX A + Added: jamnntpd/branches/vendor/1.0/examples/jamnntpd.groups =================================================================== --- jamnntpd/branches/vendor/1.0/examples/jamnntpd.groups (rev 0) +++ jamnntpd/branches/vendor/1.0/examples/jamnntpd.groups 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,27 @@ +# Groups configuration for JamNNTPd +# +# Syntax: +# +# <tagname> <access group> <aka> <jampath> [<default chrs>] [-nochrs] +# +# The tagname is the name of the group. If you enter a '!' character in front +# of the tagname, the area will be treated as a netmail area and users can +# only read messages to or from their realname(s). If you enter a '$' in +# front of the tagname, the area will be treated as a local area which means +# that posted messages will have no address, no tearline and no origin line. +# +# The default charset (optional) is the assumed charset when no CHRS or +# CODEPAGE line is found. If the default chrs begins with a "!" character, +# the "force" mode is activated for that group. In "force" mode, the +# specified charset is used regardless of the contents of the CHRS and +# CODEPAGE lines and messages can only be posted in charsets that can +# be translated to the forced character set. +# +# If -nochrs is specified, no CHRS will be created when messages are +# posted in this area. + +!NETMAIL A 2:205/454.77 c:\fido\areas\NETMAIL +R20_TEKNISKT_RASERI A 2:205/454.77 c:\fido\areas\R20_TEKNISKT_RASERI +R20_AMIGA A 2:205/454.77 c:\fido\areas\R20_AMIGA LATIN-1 +RU.COMP.HUMOR A 2:205/454.77 c:\fido\areas\RU.COMP.HUMOR !CP866 +$LOCAL A 2:205/454.77 c:\fido\areas\LOCAL Added: jamnntpd/branches/vendor/1.0/examples/jamnntpd.users =================================================================== --- jamnntpd/branches/vendor/1.0/examples/jamnntpd.users (rev 0) +++ jamnntpd/branches/vendor/1.0/examples/jamnntpd.users 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,27 @@ +# User configuration file for JamNNTd +# +# Syntax: +# +# <username> <password> <readgroups> <postgroups> [<realnames>] +# +# "*" means "all groups" and "-" means "no groups". +# +# Optionally, you can also specify one or more "real" names for the user. +# Multiple names are separated by a comma. It is necessary to supply +# realnames if you want to use JamNNTPd with netmail as users can only read +# netmails to or from one of these names. It is possible to use the "?" +# and "*" wildcards in the realnames. +# +# It it also only possible for a user to cancel messages that were written +# by a name that matches their realnames. +# +# When a user posts a message, the first realname is used as the from name +# unless it contains wildcards. If the first realname contains wildcards or +# if no realnames are supplied, the from name is taken from the From: header +# line of the posted message. +# +# If you use non-ascii characters in the realname, they should be in the +# character set used on the NNTP side, most often iso-8859-1. + +billing password AX AX "Johan Billing,Billing,Johan" +palinuris vulgaris AX AX "Palle Kuling" Added: jamnntpd/branches/vendor/1.0/examples/jamnntpd.xlat =================================================================== --- jamnntpd/branches/vendor/1.0/examples/jamnntpd.xlat (rev 0) +++ jamnntpd/branches/vendor/1.0/examples/jamnntpd.xlat 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,72 @@ +# Charset configuration for JamNNTPd +# +# If you want to disable charset translation, uncomment the following two lines +# and remove the rest of the file. +# +#read * unknown-8bit +#post * "" + +# This is the directory where the *.chs files will be found + +chsdir /home/fido/jamnntpd/xlat + +# Charset translations when reading messages + +# The charset specified with "defaultread" is the charset JamNNTPd will use +# when no charset was specified in the CHRS and CODEPAGE lines. If you enter +# the character "!" before the charset, the "force" mode is activated. In +# "force" mode, the specified charset is used regardless of the contents of +# the CHRS and CODEPAGE lines and messages can only be posted in charsets +# that can be translated to the forced character set. Example: !CP866 +# +# You can enter group-specific default charsets in jamnntpd.groups. + +defaultread IBMPC + +# Syntax: read <CHRS>[,<CODEPAGE>] <tochrs> [<xlat file>] [-keepsoftcr] +# +# Here you can configure the charset translations to be used when reading +# messages. CHRS and CODEPAGE are taken from the respective kludge lines. +# If you omit the xlat file, no actual charset translation will take place. +# +# The "-keepsoftcr" option can be used to prevent JamNNTPd from removing the +# Soft-CR character (0x8d) as it is used in some character sets like CP866. + +read CP437 iso-8859-1 437_iso.chs +read CP850 iso-8859-1 850_iso.chs +read CP865 iso-8859-1 865_iso.chs +read CP866 koi8-r 866_koi.chs -keepsoftcr +read LATIN-1 iso-8859-1 + +# readalias can be used to configure aliases for charsets + +readalias IBMPC,850 CP850 +readalias IBMPC,865 CP865 +readalias IBMPC,866 CP866 +readalias IBMPC CP437 + +# Charset translations when posting messages + +# The charset specified with "defaultpost" is the charset JamNNTPd will use +# when no charset was specified. + +defaultpost iso-8859-1 + +# Syntax: post <charset> <CHRS>[,<CODEPAGE>] <xlat file> +# +# Here you can configure the charset translations to be used when posting +# messages. If you don't want to create CHRS kludges, enter "" as CHRS. +# You should have "read" translations set up for all charsets you accept or +# the receiver name of the posts might not be translated properly. + +post iso-8859-1 IBMPC iso_437.chs +post koi8-r CP866 koi_866.chs + +# postalias can be used to configure aliases for charsets +# +# windows-1252 and iso-8859-15 are not exactly the same as iso-8859-1, but +# close enough for most people. + +postalias windows-1252 iso-8859-1 +postalias iso-8859-15 iso-8859-1 +postalias us-ascii iso-8859-1 Added: jamnntpd/branches/vendor/1.0/src/Makefile =================================================================== --- jamnntpd/branches/vendor/1.0/src/Makefile (rev 0) +++ jamnntpd/branches/vendor/1.0/src/Makefile 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,26 @@ +# type either "make linux" or "make win32" to compile + +MAKE = make + +help: + @echo You can use this Makefile in the following ways: + @echo make linux ............ Make Linux binaries + @echo make win32 ............ Make Win32 binaries + @echo make cleanlinux ....... Remove object files under Linux + @echo make cleanwin32 ....... Remove object files under Win32 + +linux : + $(MAKE) -C jamlib -f Makefile.linux + $(MAKE) -f Makefile.linux + +win32 : + $(MAKE) -C jamlib -f Makefile.win32 + $(MAKE) -f Makefile.win32 + +cleanlinux : + $(MAKE) -C jamlib -f Makefile.linux clean + $(MAKE) -f Makefile.linux clean + +cleanwin32 : + $(MAKE) -C jamlib -f Makefile.win32 clean + $(MAKE) -f Makefile.win32 clean Added: jamnntpd/branches/vendor/1.0/src/Makefile.linux =================================================================== --- jamnntpd/branches/vendor/1.0/src/Makefile.linux (rev 0) +++ jamnntpd/branches/vendor/1.0/src/Makefile.linux 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,55 @@ +# Makefile for Linux + +# General + +PLATFORMDEF = -DPLATFORM_LINUX +EXESUFFIX = + +CC = gcc $(DEFS) -Wall +RM = rm -f +STRIP = strip + +OBJS = main.o nntpserv.o os_linux.o sockio.o groups.o misc.o xlat.o allow.o login.o mime.o + +targets: jamnntpd$(EXESUFFIX) makechs$(EXESUFFIX) + +makechs$(EXESUFFIX): makechs.c + $(CC) $(PLATFORMDEF) makechs.c -o makechs + $(STRIP) makechs$(EXESUFFIX) + +jamnntpd$(EXESUFFIX): $(OBJS) + $(CC) -o jamnntpd$(EXESUFFIX) $(OBJS) jamlib/jamlib.a -lpthread + $(STRIP) jamnntpd$(EXESUFFIX) + +nntpserv.o : nntpserv.c + $(CC) $(PLATFORMDEF) -c nntpserv.c -o nntpserv.o + +os_linux.o : os_linux.c + $(CC) $(PLATFORMDEF) -c os_linux.c -o os_linux.o + +main.o : main.c + $(CC) $(PLATFORMDEF) -c main.c -o main.o + +sockio.o : sockio.c + $(CC) $(PLATFORMDEF) -c sockio.c -o sockio.o + +groups.o : groups.c + $(CC) $(PLATFORMDEF) -c groups.c -o groups.o + +misc.o : misc.c + $(CC) $(PLATFORMDEF) -c misc.c -o misc.o + +xlat.o : xlat.c + $(CC) $(PLATFORMDEF) -c xlat.c -o xlat.o + +allow.o : allow.c + $(CC) $(PLATFORMDEF) -c allow.c -o allow.o + +login.o : login.c + $(CC) $(PLATFORMDEF) -c login.c -o login.o + +mime.o : mime.c + $(CC) $(PLATFORMDEF) -c mime.c -o mime.o + +clean : + $(RM) *.o Added: jamnntpd/branches/vendor/1.0/src/Makefile.win32 =================================================================== --- jamnntpd/branches/vendor/1.0/src/Makefile.win32 (rev 0) +++ jamnntpd/branches/vendor/1.0/src/Makefile.win32 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,55 @@ +# Makefile for Linux + +# General + +PLATFORMDEF = -DPLATFORM_WIN32 +EXESUFFIX = .exe + +CC = gcc $(DEFS) -Wall +RM = del +STRIP = strip + +OBJS = main.o nntpserv.o os_win32.o sockio.o groups.o misc.o xlat.o allow.o login.o mime.o + +targets: jamnntpd$(EXESUFFIX) makechs$(EXESUFFIX) + +makechs$(EXESUFFIX) : makechs.c + $(CC) $(PLATFORMDEF) makechs.c -o makechs$(EXESUFFIX) + $(STRIP) makechs$(EXESUFFIX) + +jamnntpd$(EXESUFFIX) : $(OBJS) + $(CC) -o jamnntpd$(EXESUFFIX) $(OBJS) jamlib/jamlib.a -lwsock32 + $(STRIP) jamnntpd$(EXESUFFIX) + +nntpserv.o : nntpserv.c + $(CC) $(PLATFORMDEF) -c nntpserv.c -o nntpserv.o + +os_win32.o : os_win32.c + $(CC) $(PLATFORMDEF) -c os_win32.c -o os_win32.o + +main.o : main.c + $(CC) $(PLATFORMDEF) -c main.c -o main.o + +sockio.o : sockio.c + $(CC) $(PLATFORMDEF) -c sockio.c -o sockio.o + +groups.o : groups.c + $(CC) $(PLATFORMDEF) -c groups.c -o groups.o + +misc.o : misc.c + $(CC) $(PLATFORMDEF) -c misc.c -o misc.o + +xlat.o : xlat.c + $(CC) $(PLATFORMDEF) -c xlat.c -o xlat.o + +allow.o : allow.c + $(CC) $(PLATFORMDEF) -c allow.c -o allow.o + +login.o : login.c + $(CC) $(PLATFORMDEF) -c login.c -o login.o + +mime.o : mime.c + $(CC) $(PLATFORMDEF) -c mime.c -o mime.o + +clean : + $(RM) *.o Added: jamnntpd/branches/vendor/1.0/src/allow.c =================================================================== --- jamnntpd/branches/vendor/1.0/src/allow.c (rev 0) +++ jamnntpd/branches/vendor/1.0/src/allow.c 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,50 @@ +#include "nntpserv.h" + +bool checkallow(struct var *var,uchar *ip) +{ + FILE *fp; + uchar s[1000],cfgip[100],cfgreadgroups[50],cfgpostgroups[50]; + int res1,res2,res3; + ulong pos,line; + + if(!(fp=fopen(cfg_allowfile,"r"))) + { + os_logwrite("(%s) Can't read allow file %s",var->clientid,cfg_allowfile); + return(FALSE); + } + + line=0; + + while(fgets(s,999,fp)) + { + line++; + strip(s); + pos=0; + + if(s[0]!=0 && s[0]!='#') + { + res1=getcfgword(s,&pos,cfgip,100); + res2=getcfgword(s,&pos,cfgreadgroups,50); + res3=getcfgword(s,&pos,cfgpostgroups,50); + + if(res1) + { + if(matchpattern(cfgip,ip)) + { + if(res2) strcpy(var->readgroups,cfgreadgroups); + if(res3) strcpy(var->postgroups,cfgpostgroups); + + fclose(fp); + return(TRUE); + } + } + else + { + os_logwrite("(%s) Syntax error on line %lu in %s, skipping line",var->clientid,line,cfg_allowfile); + } + } + } + + fclose(fp); + return(FALSE); +} Added: jamnntpd/branches/vendor/1.0/src/allow.h =================================================================== --- jamnntpd/branches/vendor/1.0/src/allow.h (rev 0) +++ jamnntpd/branches/vendor/1.0/src/allow.h 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1 @@ +bool checkallow(struct var *var,uchar *str); Added: jamnntpd/branches/vendor/1.0/src/groups.c =================================================================== --- jamnntpd/branches/vendor/1.0/src/groups.c (rev 0) +++ jamnntpd/branches/vendor/1.0/src/groups.c 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,112 @@ +#include "nntpserv.h" + +bool readgroups(struct var *var) +{ + FILE *fp; + uchar s[1000],tagname[100],group[2],aka[40],jampath[100],option[100]; + bool res1,res2,res3,res4; + ulong pos,line; + struct group *newgroup,*lastgroup; + + if(!(fp=fopen(cfg_groupsfile,"r"))) + { + os_logwrite("(%s) Failed to read group configuration file %s",var->clientid,cfg_groupsfile); + return(FALSE); + } + + lastgroup=NULL; + var->firstgroup=NULL; + + line=0; + + while(fgets(s,999,fp)) + { + line++; + strip(s); + pos=0; + + if(s[0]!=0 && s[0]!='#') + { + res1=getcfgword(s,&pos,tagname,100); + res2=getcfgword(s,&pos,group,2); + res3=getcfgword(s,&pos,aka,40); + res4=getcfgword(s,&pos,jampath,100); + + if(res1 && res2 && res3 && res4) + { + if(!(newgroup=(struct group *)malloc(sizeof(struct group)))) + { + fclose(fp); + return(FALSE); + } + + newgroup->next=NULL; + if(!var->firstgroup) var->firstgroup=newgroup; + if(lastgroup) lastgroup->next=newgroup; + lastgroup=newgroup; + + newgroup->netmail=FALSE; + newgroup->local=FALSE; + + if(tagname[0] == '!') + { + newgroup->netmail=TRUE; + strcpy(newgroup->tagname,&tagname[1]); + } + else if(tagname[0] == '$') + { + newgroup->local=TRUE; + strcpy(newgroup->tagname,&tagname[1]); + } + else + { + strcpy(newgroup->tagname,tagname); + } + + newgroup->group=group[0]; + strcpy(newgroup->aka,aka); + strcpy(newgroup->jampath,jampath); + + newgroup->nochrs=FALSE; + newgroup->defaultchrs[0]=0; + + while(getcfgword(s,&pos,option,100)) + { + if(stricmp(option,"-nochrs")==0) + { + newgroup->nochrs=TRUE; + } + else if(option[0] != '-' && newgroup->defaultchrs[0] == 0) + { + mystrncpy(newgroup->defaultchrs,option,20); + } + else + { + os_logwrite("(%s) Warning: Unknown option %s on line %lu in %s",var->clientid,option,line,cfg_groupsfile); + } + } + } + else + { + os_logwrite("(%s) Syntax error on line %lu in %s, skipping line",var->clientid,line,cfg_groupsfile); + } + } + } + + fclose(fp); + + if(!var->firstgroup) + { + os_logwrite("(%s) No groups configured",var->clientid); + return(FALSE); + } + + return(TRUE); +} + +void freegroups(struct var *var) +{ + freelist(var->firstgroup); + var->firstgroup=NULL; +} + Added: jamnntpd/branches/vendor/1.0/src/groups.h =================================================================== --- jamnntpd/branches/vendor/1.0/src/groups.h (rev 0) +++ jamnntpd/branches/vendor/1.0/src/groups.h 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,16 @@ +struct group +{ + struct group *next; + uchar tagname[100]; + uchar group; + uchar jampath[100]; + uchar aka[40]; + uchar defaultchrs[20]; + bool netmail; + bool local; + bool nochrs; +}; + +bool readgroups(struct var *var); +void freegroups(struct var *var); + Added: jamnntpd/branches/vendor/1.0/src/jamlib/LICENSE =================================================================== --- jamnntpd/branches/vendor/1.0/src/jamlib/LICENSE (rev 0) +++ jamnntpd/branches/vendor/1.0/src/jamlib/LICENSE 2009-03-08 00:23:30 UTC (rev 45) @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating sy... [truncated message content] |
From: <ja...@us...> - 2009-03-07 18:10:55
|
Revision: 44 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=44&view=rev Author: jame Date: 2009-03-07 18:10:38 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Add note adding apps or joining project to index.html. Modified Paths: -------------- htdocs/online/index.html Modified: htdocs/online/index.html =================================================================== --- htdocs/online/index.html 2009-03-07 17:55:33 UTC (rev 43) +++ htdocs/online/index.html 2009-03-07 18:10:38 UTC (rev 44) @@ -46,11 +46,13 @@ <li><a href="vireq.html"><b>VIReq</b></a> - SRIF File request processor</li> </ul> - <dl> - + <p>If you know of an open source Fidonet/FTN application that might find a home here and/or would like to join the project, + please contact one of <a href="http://sourceforge.net/project/memberlist.php?group_id=246543">us</a> about it. + </p> + + <dl> <dt>Information</dt> <dd><a href="information.html#fidonet">Fidonet</a> Information</dd> - </dl> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-07 17:55:47
|
Revision: 43 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=43&view=rev Author: jame Date: 2009-03-07 17:55:33 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Web site ToDo as of 7 March 2009. Modified Paths: -------------- htdocs/ToDo Modified: htdocs/ToDo =================================================================== --- htdocs/ToDo 2009-03-07 17:41:50 UTC (rev 42) +++ htdocs/ToDo 2009-03-07 17:55:33 UTC (rev 43) @@ -3,6 +3,7 @@ general - Add individual pages for apps/programs that are added here. +- And links page or pages? index.html - None @@ -11,8 +12,11 @@ - None jamnntpd.html - - Add reference for Debian ITP reference? + - None +tinytic.html + - None + vireq.html - Add html link for BinkD reference. @@ -28,4 +32,3 @@ robots.txt - None - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ja...@us...> - 2009-03-07 17:42:01
|
Revision: 42 http://ftnapps.svn.sourceforge.net/ftnapps/?rev=42&view=rev Author: jame Date: 2009-03-07 17:41:50 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Correct link to svn repo in tinytic.html. Modified Paths: -------------- htdocs/online/tinytic.html Modified: htdocs/online/tinytic.html =================================================================== --- htdocs/online/tinytic.html 2009-03-07 17:37:45 UTC (rev 41) +++ htdocs/online/tinytic.html 2009-03-07 17:41:50 UTC (rev 42) @@ -46,7 +46,7 @@ <h2>TinyTIC links</h2> <ul> - <li>Browse <a href="http://ftnapps.svn.sourceforge.net/viewvc/ftnapps/TinyTIC/">TinyTIC</a> in the SVN repository.</li> + <li>Browse <a href="http://ftnapps.svn.sourceforge.net/viewvc/ftnapps/tinytic/">TinyTIC</a> in the SVN repository.</li> </ul> <p class="filler"><!-- Filler para to extend left vertical line --></p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |