From: hachti Date: Mon, 26 Mar 2007 01:15:21 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://gitweb.hachti.de/?a=commitdiff_plain;h=09c71e8a036e6034821398f7ef4c7a092804a571;p=h316.git *** empty log message *** --- diff --git a/pc-tools/ldc2/src/data_block_7.cpp b/pc-tools/ldc2/src/data_block_7.cpp index c14b060..38e9d54 100644 --- a/pc-tools/ldc2/src/data_block_7.cpp +++ b/pc-tools/ldc2/src/data_block_7.cpp @@ -2,27 +2,47 @@ * * LDC2 source code * - * $Date: 2007/03/26 01:00:39 $ + * $Date: 2007/03/26 01:15:21 $ * $Author: hachti $ * * $Log: data_block_7.cpp,v $ - * Revision 2.0 2007/03/26 01:00:39 hachti + * Revision 2.1 2007/03/26 01:15:21 hachti * *** empty log message *** * * ******************************************************************************/ - -/****************************************************************************** - * - * LDC2 source code - * - * $Date: 2007/03/26 01:00:39 $ - * $Author: hachti $ - * - * $Log: data_block_7.cpp,v $ - * Revision 2.0 2007/03/26 01:00:39 hachti - * *** empty log message *** - * - * - ******************************************************************************/ - + +#include "data_block_7.hh" + +/*! + *\brief Specialisation constructor. + */ +data_block_7::data_block_7(data_block & org) + :data_block(org) +{ + m_has_known_type=false; +} + +/*! + *\brief Describe the block. + *\return A vector of text lines describing this block. + */ +vector data_block_7::get_description(){ + vector result; + result.insert(result.end(),extract_label(3)+" "+ + get_typestring()+"Reference to Item In Common"); + return result; +} + +/******************************************************************************/ +/*! + *\brief Get called symbols. + *\return A vector containing the symbol names exported by this + * block. + */ +vector data_block_7::get_called_symbols(){ + vector result; + string rs=extract_label(3); + if (rs!=" ") result.insert(result.end(),rs); + return result; +} diff --git a/pc-tools/ldc2/src/main.cpp b/pc-tools/ldc2/src/main.cpp index eabe7fb..dc2d124 100644 --- a/pc-tools/ldc2/src/main.cpp +++ b/pc-tools/ldc2/src/main.cpp @@ -2,25 +2,26 @@ * * LDC2 source code * - * $Date: 2007/03/26 01:00:40 $ + * $Date: 2007/03/26 01:15:21 $ * $Author: hachti $ * * $Log: main.cpp,v $ - * Revision 2.0 2007/03/26 01:00:40 hachti + * Revision 2.1 2007/03/26 01:15:21 hachti + * *** empty log message *** + * + * Revision 2.0 2007-03-26 01:00:40 hachti * *** empty log message *** * * ******************************************************************************/ -/* ldc2 preliminary main program */ - #include #include #include #include #include - + #include "config.hh" #include "tool.hh" @@ -51,7 +52,13 @@ static int errors=0; static int warnings=0; static int errcode=0; //! Variable for error codes. - +/******************************************************************************/ +/*! + *\brief Error exit routine. + * + * This routine tests the global error counter and terminates the program + * if necessary. + */ void exit_on_error(){ if (errors){ fprintf(stderr,"Failed. (%i)\n",errcode); @@ -264,7 +271,9 @@ void process_tape(){ if (fd<0){ fprintf(stderr,"Error: could not open file \"%s\" for writing!\n", filename); - exit (1); + errors++; + errcode=1; + return; } } @@ -276,7 +285,9 @@ void process_tape(){ if (fd_numbered<0){ fprintf(stderr,"Error: could not open file \"%s\" for writing!\n", filename_numbered); - exit (1); + errors++; + errcode=1; + return; } } in_object=true; @@ -291,7 +302,9 @@ void process_tape(){ catch (tape_block::io_error_exception e){ fprintf(stderr,"Error: could write to file \"%s\"!\n", filename); - exit (1); + errors++; + errcode=1; + return; } } // if (cfg_split_objects) @@ -303,7 +316,9 @@ void process_tape(){ catch (tape_block::io_error_exception e){ fprintf(stderr,"Error: could write to file \"%s\"!\n", filename_numbered); - exit (1); + errors++; + errcode=1; + return; } } // if (cfg_split_objects_numbered) @@ -315,7 +330,9 @@ void process_tape(){ if (fd_block<0){ fprintf(stderr,"Error: could not open file \"%s\" for writing!\n", fname); - exit (1); + errors++; + errcode=1; + return; } try{ block->dump_to_fd(fd_block); @@ -323,7 +340,9 @@ void process_tape(){ catch (tape_block::io_error_exception e){ fprintf(stderr,"Error: could write to file \"%s\"!\n", fname); - exit (1); + errors++; + errcode=1; + return; } close(fd_block); } @@ -346,10 +365,12 @@ void process_tape(){ return; } } - - } // process_tape() +/******************************************************************************/ +/*! + *\brief Everything that has to do with symbol listing. + */ void process_called_imports(){ vectorexported; vectorcalled; @@ -399,6 +420,7 @@ void process_called_imports(){ /******************************************************************************/ /*! *\brief The main routine. + * */ int main(int argc, char ** args){