[NeoStats-Devel] [Commits] r2817 - in trunk: include src
[email protected] Wed, 14 Sep 2005 06:36:10 +1000
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Message-ID | <[email protected]> |
Author: Mark
Date: Wed Sep 14 04:36:05 2005
New Revision: 2817
Modified:
trunk/include/neostats.h
trunk/src/commands.c
trunk/src/conf.c
trunk/src/main.c
trunk/src/modules.c
trunk/src/nsevents.c
trunk/src/timer.c
Log:
ifdef comments for clarity
Modified: trunk/include/neostats.h
==============================================================================
--- trunk/include/neostats.h (original)
+++ trunk/include/neostats.h Wed Sep 14 04:36:05 2005
@@ -847,7 +847,7 @@
/** @brief Forward declaration of perl events
*/
struct PerlEvent;
-#endif
+#endif /* USE_PERL */
/** @brief Event function types
*
Modified: trunk/src/commands.c
==============================================================================
--- trunk/src/commands.c (original)
+++ trunk/src/commands.c Wed Sep 14 04:36:05 2005
@@ -294,7 +294,7 @@
/* Mark: depends on how the array is allocated */
ns_free(cmd_ptr->helptext);
}
-#endif
+#endif /* USE_PERL */
return NS_SUCCESS;
}
return NS_FAILURE;
@@ -793,7 +793,7 @@
{
if( cmdparams->bot->moduleptr )
{
- if (IS_STANDARD_MOD(cmdparams->bot->moduleptr))
+ if( IS_STANDARD_MOD( cmdparams->bot->moduleptr ) )
{
irc_prefmsg_list( cmdparams->bot, cmdparams->source, cmdparams->bot->moduleptr->info->about_text );
#if USE_PERL
@@ -801,7 +801,7 @@
else
{
irc_prefmsg(cmdparams->bot, cmdparams->source, "Not Available");
-#endif
+#endif /* USE_PERL */
}
}
return NS_SUCCESS;
@@ -828,7 +828,7 @@
{
if( cmdparams->bot->moduleptr )
{
- if (IS_STANDARD_MOD(cmdparams->bot->moduleptr))
+ if( IS_STANDARD_MOD( cmdparams->bot->moduleptr ) )
{
irc_prefmsg_list( cmdparams->bot, cmdparams->source,
cmdparams->bot->moduleptr->info->copyright );
@@ -837,7 +837,7 @@
else
{
irc_prefmsg(cmdparams->bot, cmdparams->source, "Not Available");
-#endif
+#endif /* USE_PERL */
}
}
return NS_SUCCESS;
Modified: trunk/src/conf.c
==============================================================================
--- trunk/src/conf.c (original)
+++ trunk/src/conf.c Wed Sep 14 04:36:05 2005
@@ -445,12 +445,12 @@
ircsnprintf( buf, MAXPATH, "%s/%s%s", MOD_PATH, file, MOD_PERLEXT );
if( stat( buf, &fileinfo ) == -1 )
{
-#endif
+#endif /* USE_PERL */
cfg_error( cfg, "Unable to find file %s specified in option %s: %s", buf, opt->name, strerror( errno ) );
return CFG_PARSE_ERROR;
#ifdef USE_PERL
}
-#endif
+#endif /* USE_PERL */
}
if( !S_ISREG( fileinfo.st_mode ) )
{
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c (original)
+++ trunk/src/main.c Wed Sep 14 04:36:05 2005
@@ -275,7 +275,7 @@
#ifdef USE_PERL
if( Init_Perl() != NS_SUCCESS )
return NS_FAILURE;
-#endif
+#endif /* USE_PERL */
InitServices();
dlog( DEBUG1, "Core init successful" );
return NS_SUCCESS;
Modified: trunk/src/modules.c
==============================================================================
--- trunk/src/modules.c (original)
+++ trunk/src/modules.c Wed Sep 14 04:36:05 2005
@@ -146,7 +146,7 @@
err = perl_sync_module( module_ptr );
RESET_RUN_LEVEL();
}
-#endif
+#endif /* USE_PERL */
/* sync complete */
SetModuleSynched( module_ptr );
return err;
@@ -408,7 +408,7 @@
strftime( ( char * )mod->info->build_time, 10, "%H:%M", gmtime( &buf.st_mtime ) );
return mod;
}
-#endif
+#endif /* USE_PERL */
/* if we get here, ehhh, doesn't exist */
load_module_error( u, modfilename, __( "Module file not found", u ) );
return NULL;
@@ -556,7 +556,7 @@
#ifdef USE_PERL
/* unload any extensions first */
unload_perlextension(mod_ptr);
-#endif
+#endif /* USE_PERL */
if( mod_ptr->info->flags & MODULE_FLAG_AUTH )
{
@@ -593,7 +593,7 @@
PerlModFini( mod_ptr );
RESET_RUN_LEVEL();
SET_SEGV_LOCATION();
-#endif
+#endif /* USE_PERL */
}
/* Delete any bots used by this module. Done after ModFini, so the bot
* can still send messages during ModFini
@@ -619,13 +619,12 @@
CleanupServerModdata( moduleindex );
CleanupChannelModdata( moduleindex );
- if( IS_STANDARD_MOD( mod_ptr ) ) {
+ if( IS_STANDARD_MOD( mod_ptr ) )
ns_dlclose( mod_ptr->handle );
#ifdef USE_PERL
- } else {
+ else
unload_perlmod( mod_ptr );
-#endif
- }
+#endif /* USE_PERL */
RESET_RUN_LEVEL();
ns_free( mod_ptr );
/* free the module number */
Modified: trunk/src/nsevents.c
==============================================================================
--- trunk/src/nsevents.c (original)
+++ trunk/src/nsevents.c Wed Sep 14 04:36:05 2005
@@ -165,7 +165,7 @@
RESET_RUN_LEVEL();
return;
}
-#endif
+#endif /* USE_PERL */
if( setjmp( sigvbuf ) == 0 )
{
SET_RUN_LEVEL( module_ptr );
@@ -200,7 +200,7 @@
#ifdef USE_PERL
if( ( module_ptr->pm && module_ptr->pm->event_list ) )
SendEvent( module_ptr->pm->event_list[event], event, cmdparams, module_ptr );
-#endif
+#endif /* USE_PERL */
}
/** @brief SendAllModuleEventHandler
@@ -273,7 +273,7 @@
mod_ptr->pm->event_list[eventptr->event] = eventptr;
}
else
-#endif
+#endif /* USE_PERL */
{
if( !eventptr->handler )
{
@@ -384,7 +384,7 @@
ns_free( mod_ptr->pm->event_list );
mod_ptr->pm->event_list = NULL;
}
-#endif
+#endif /* USE_PERL */
}
/** @brief SetAllEventFlags
Modified: trunk/src/timer.c
==============================================================================
--- trunk/src/timer.c (original)
+++ trunk/src/timer.c Wed Sep 14 04:36:05 2005
@@ -283,7 +283,7 @@
#ifdef USE_PERL
if( IS_PERL_MOD( timer->moduleptr ) )
ns_free( timer->userptr );
-#endif
+#endif /* USE_PERL */
ns_free( timer );
return NS_SUCCESS;
}