[libChf] comment unused code
This commit is contained in:
parent
46e1426818
commit
2623dd28e5
3 changed files with 50 additions and 50 deletions
|
@ -150,13 +150,13 @@ int ChfInit( const char* app_name, /* Application's name */
|
|||
);
|
||||
|
||||
/* Initialization with msgcat subsystem */
|
||||
int ChfMsgcatInit( const char* app_name, /* Application's name */
|
||||
const ChfOptions options, /* Options */
|
||||
const char* msgcat_name, /* Name of the message catalog */
|
||||
const int condition_stack_size, /* Size of the condition stack */
|
||||
const int handler_stack_size, /* Size of the handler stack */
|
||||
const int exit_code /* Abnormal exit code */
|
||||
);
|
||||
/* int ChfMsgcatInit( const char* app_name, /\* Application's name *\/ */
|
||||
/* const ChfOptions options, /\* Options *\/ */
|
||||
/* const char* msgcat_name, /\* Name of the message catalog *\/ */
|
||||
/* const int condition_stack_size, /\* Size of the condition stack *\/ */
|
||||
/* const int handler_stack_size, /\* Size of the handler stack *\/ */
|
||||
/* const int exit_code /\* Abnormal exit code *\/ */
|
||||
/* ); */
|
||||
|
||||
/* /\* Pop a handler *\/ */
|
||||
/* void ChfPopHandler( const int module_id ); */
|
||||
|
@ -174,7 +174,7 @@ void ChfAbort( const int abort_code );
|
|||
char* ChfBuildMessage( const ChfDescriptor* descriptor );
|
||||
|
||||
/* Retrieve top condition */
|
||||
const ChfDescriptor* ChfGetTopCondition( const int module_id );
|
||||
/* const ChfDescriptor* ChfGetTopCondition( const int module_id ); */
|
||||
|
||||
/* Retrieve a condition message */
|
||||
const char* ChfGetMessage( const int module_id, const int condition_code, const char* default_message );
|
||||
|
|
|
@ -110,32 +110,32 @@ static void ExitMessage( void* private_context )
|
|||
- added Win32 support
|
||||
|
||||
.- */
|
||||
int ChfMsgcatInit( /* Initialization with msgcat subsystem */
|
||||
const char* app_name, /* Application's name */
|
||||
const ChfOptions options, /* Options */
|
||||
const char* msgcat_name, /* Name of the message catalog */
|
||||
const int condition_stack_size, /* Size of the condition stack */
|
||||
const int handler_stack_size, /* Size of the handler stack */
|
||||
const int exit_code /* Abnormal exit code */
|
||||
)
|
||||
{
|
||||
ChfMsgcatContext* private_context;
|
||||
int cc;
|
||||
/* int ChfMsgcatInit( /\* Initialization with msgcat subsystem *\/ */
|
||||
/* const char* app_name, /\* Application's name *\/ */
|
||||
/* const ChfOptions options, /\* Options *\/ */
|
||||
/* const char* msgcat_name, /\* Name of the message catalog *\/ */
|
||||
/* const int condition_stack_size, /\* Size of the condition stack *\/ */
|
||||
/* const int handler_stack_size, /\* Size of the handler stack *\/ */
|
||||
/* const int exit_code /\* Abnormal exit code *\/ */
|
||||
/* ) */
|
||||
/* { */
|
||||
/* ChfMsgcatContext* private_context; */
|
||||
/* int cc; */
|
||||
|
||||
if ( ( private_context = ( ChfMsgcatContext* )malloc( sizeof( ChfMsgcatContext ) ) ) == ( ChfMsgcatContext* )NULL )
|
||||
cc = CHF_F_MALLOC;
|
||||
else if ( setlocale( LC_ALL, "" ) == ( char* )NULL ) {
|
||||
free( private_context );
|
||||
cc = CHF_F_SETLOCALE;
|
||||
} else if ( ( private_context->catalog = catopen( msgcat_name, 0 ) ) == ( nl_catd )( -1 ) ) {
|
||||
free( private_context );
|
||||
cc = CHF_F_CATOPEN;
|
||||
} else if ( ( cc = ChfInit( app_name, options, ( void* )private_context, GetMessage, ExitMessage, condition_stack_size,
|
||||
handler_stack_size, exit_code ) ) != CHF_S_OK ) {
|
||||
( void )catclose( private_context->catalog );
|
||||
free( private_context );
|
||||
} else
|
||||
cc = CHF_S_OK;
|
||||
/* if ( ( private_context = ( ChfMsgcatContext* )malloc( sizeof( ChfMsgcatContext ) ) ) == ( ChfMsgcatContext* )NULL ) */
|
||||
/* cc = CHF_F_MALLOC; */
|
||||
/* else if ( setlocale( LC_ALL, "" ) == ( char* )NULL ) { */
|
||||
/* free( private_context ); */
|
||||
/* cc = CHF_F_SETLOCALE; */
|
||||
/* } else if ( ( private_context->catalog = catopen( msgcat_name, 0 ) ) == ( nl_catd )( -1 ) ) { */
|
||||
/* free( private_context ); */
|
||||
/* cc = CHF_F_CATOPEN; */
|
||||
/* } else if ( ( cc = ChfInit( app_name, options, ( void* )private_context, GetMessage, ExitMessage, condition_stack_size, */
|
||||
/* handler_stack_size, exit_code ) ) != CHF_S_OK ) { */
|
||||
/* ( void )catclose( private_context->catalog ); */
|
||||
/* free( private_context ); */
|
||||
/* } else */
|
||||
/* cc = CHF_S_OK; */
|
||||
|
||||
return cc;
|
||||
}
|
||||
/* return cc; */
|
||||
/* } */
|
||||
|
|
|
@ -76,21 +76,21 @@
|
|||
|
||||
.- */
|
||||
/* Retrieve top condition */
|
||||
const ChfDescriptor* ChfGetTopCondition( const int module_id )
|
||||
{
|
||||
ChfDescriptor* d;
|
||||
/* const ChfDescriptor* ChfGetTopCondition( const int module_id ) */
|
||||
/* { */
|
||||
/* ChfDescriptor* d; */
|
||||
|
||||
/* Check that CHF has been correctly initialized */
|
||||
if ( chf_context.state == CHF_UNKNOWN )
|
||||
ChfAbort( CHF_ABORT_INIT );
|
||||
/* /\* Check that CHF has been correctly initialized *\/ */
|
||||
/* if ( chf_context.state == CHF_UNKNOWN ) */
|
||||
/* ChfAbort( CHF_ABORT_INIT ); */
|
||||
|
||||
if ( ( d = chf_context.condition_sp ) == chf_context.condition_base ) {
|
||||
ChfGenerate( module_id, __FILE__, __LINE__, CHF_F_BAD_STATE, CHF_FATAL );
|
||||
ChfSignal( module_id );
|
||||
}
|
||||
/* if ( ( d = chf_context.condition_sp ) == chf_context.condition_base ) { */
|
||||
/* ChfGenerate( module_id, __FILE__, __LINE__, CHF_F_BAD_STATE, CHF_FATAL ); */
|
||||
/* ChfSignal( module_id ); */
|
||||
/* } */
|
||||
|
||||
/* The top element of the condition group is the element immediately
|
||||
below the stack pointer.
|
||||
*/
|
||||
return d - 1;
|
||||
}
|
||||
/* /\* The top element of the condition group is the element immediately */
|
||||
/* below the stack pointer. */
|
||||
/* *\/ */
|
||||
/* return d - 1; */
|
||||
/* } */
|
||||
|
|
Loading…
Add table
Reference in a new issue