*
* 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<string> data_block_7::get_description(){
+ vector<string> 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<string> data_block_7::get_called_symbols(){
+ vector<string> result;
+ string rs=extract_label(3);
+ if (rs!=" ") result.insert(result.end(),rs);
+ return result;
+}
*
* 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 <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <vector>
#include <string>
-
+
#include "config.hh"
#include "tool.hh"
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);
if (fd<0){
fprintf(stderr,"Error: could not open file \"%s\" for writing!\n",
filename);
- exit (1);
+ errors++;
+ errcode=1;
+ return;
}
}
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;
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)
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)
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);
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);
}
return;
}
}
-
-
} // process_tape()
+/******************************************************************************/
+/*!
+ *\brief Everything that has to do with symbol listing.
+ */
void process_called_imports(){
vector<string>exported;
vector<string>called;
/******************************************************************************/
/*!
*\brief The main routine.
+ *
*/
int main(int argc, char ** args){