*** empty log message ***
authorhachti <hachti>
Sun, 19 Nov 2006 10:40:44 +0000 (10:40 +0000)
committerhachti <hachti>
Sun, 19 Nov 2006 10:40:44 +0000 (10:40 +0000)
pc-tools/ldc2/Makefile
pc-tools/ldc2/src/data_block_0.hh
pc-tools/ldc2/src/data_block_0_0.cpp
pc-tools/ldc2/src/data_block_0_0.hh
pc-tools/ldc2/src/data_block_0_label_extractor.cpp
pc-tools/ldc2/src/data_block_0_label_extractor.hh
pc-tools/ldc2/src/main.cpp [new file with mode: 0644]
pc-tools/ldc2/src/test.cpp [deleted file]

index 575f8cce43033a9a82e114475d54738e40dd5d4f..d50c2ee76ed9c324bdfaae6f0064c08560b86d82 100644 (file)
@@ -1,5 +1,14 @@
-APP_NAME=test
-APP_OBJECTS=test.o tape_block.o silent_code.o data_block.o data_block_0.o
+APP_NAME=ldc2
+APP_OBJECTS= main.o  silent_code.o 
+
+APP_OBJECTS+= tape_block.o eot_block.o discard_block.o\
+              data_block.o data_block_0.o data_block_0_0.o\
+              data_block_0_label_extractor.o       
+
+APP_OBJECTS+= data_block_0_10.o data_block_0_14.o data_block_0_1.o data_block_0_24.o\
+              data_block_0_2.o data_block_0_30.o data_block_0_3.o data_block_0_4.o\
+              data_block_0_50.o data_block_0_54.o data_block_0_60.o data_block_0_44.o
+
 SRC_DIR=src
 
 default: $(APP_NAME)
@@ -14,7 +23,7 @@ $(APP_NAME) : $(APP_OBJECTS)
        g++ -o$@ $^
 
 clean: 
-       rm -rf $(APP_NAME) *.o doxy/ $(SRC_DIR)/*~
+       rm -rf $(APP_NAME) *.o doxy/ $(SRC_DIR)/*~ ul_timestamp
        $(MAKE) -C doc clean
 
 doxy/timestamp: $(SRC_DIR)/*
@@ -23,13 +32,17 @@ doxy/timestamp: $(SRC_DIR)/*
        touch $@
 
 doxy: doxy/timestamp
+upload: ul_timestamp
 
-upload: doxy/timestamp
-       scp -r doxy/html ente:h316.web/ldc-doc
+ul_timestamp: doxy/timestamp
+       @cd doxy/html && tar -czf /tmp/doxy.tar.gz *
+       @touch ul_timestamp
+       @scp -q /tmp/doxy.tar.gz ente:/tmp/
+       @ssh ente "rm -rf h316.web/ldc-doc/* && cd h316.web/ldc-doc && tar -xzf /tmp/doxy.tar.gz"
 
 doc:
        $(MAKE) -C doc 
 
 all: $(APP_NAME) doxy doc
 
-.PHONY: all clean doxy upload doc
\ No newline at end of file
+.PHONY: all clean doxy upload docdata_block_0_0.o
index 997102b97bb96e825f0e8ee9afcba0acb81997d3..61b2b7a7d9f49c68641780249ea8dae7ae988352 100644 (file)
@@ -20,7 +20,6 @@ private:
 public:  
   int get_subtype();
   vector<string> get_description();
-
 };
 
 #endif
index 2e1d2226a7b759133388c3b7cea8285aad8b8306..815d33f4c1c828708a2fb473f65d689121e5312b 100644 (file)
@@ -6,7 +6,7 @@
  *\brief Parent class copy constructor.
  */
 data_block_0_0::data_block_0_0(data_block_0 & org)
-  :data_block_0(org)
+  :data_block_0_label_extractor(org),data_block_0(org)
 {}
 
 /*!
@@ -15,7 +15,14 @@ data_block_0_0::data_block_0_0(data_block_0 & org)
  */
 vector<string> data_block_0_0::get_description(){
   vector<string> result;
-  result.insert(result.end(),"Fixme!     "+get_typestring()+"Default 0-* block");
+  vector<string> labels=get_labels();
+  for (int i=0; i<labels.size();i++){
+    if (i==0) result.insert(result.end(),
+                           labels[i]+"     "+get_typestring()+"Subprogram Name");
+    else 
+      result.insert(result.end(),
+                   labels[i]+"     "+get_typestring()        +"    \"        \"");
+  }
   return result;
 }
 
index 2ffaf6e29d7a3dc71e788e335a2fdc2c2a95df71..a74dd5400600300d91cde126cc22bba64092b829 100644 (file)
@@ -4,13 +4,13 @@
 #include <vector>
 #include <string>
 
-#include "data_block_0.hh"
+#include "data_block_0_label_extractor.hh"
 
 /*!
  *\brief Class for block type (0-0).
  */
 class data_block_0_0
-  : public data_block_0
+  : public data_block_0_label_extractor
 {
   friend tape_block * tape_block::gen_from_fd(int,void(*)(void*),
                                              void(*)(void*),void*);
index d52289d9d4adf10bcf80dbfca2b9efdf11b9176f..cd53bb2b7dd54d62b141f1dd6a3468a6653a68bc 100644 (file)
@@ -1,8 +1,10 @@
 #include "data_block_0_label_extractor.hh"
-
 /*!
- *\brief Default constructor.
+ *\brief Constructor.
  */
+data_block_0_label_extractor::data_block_0_label_extractor(data_block_0& org)
+  : data_block_0(org)
+{}
 
 /*!
  *\brief Extract labels from data_block_0_* blocks
index f7c8a987e67153e19a9f0425c7ff60e1c98d8761..bc42bd9e47a20cb854e2a4b8170bb21be3dd1dad 100644 (file)
@@ -4,18 +4,18 @@
 #include <vector>
 #include <string>
 
-#include "data_block.hh"
+#include "data_block_0.hh"
 
 /*!
  *\brief Abstract class providing label extraction for some data_block_0 subtypes.
  * This class cannot be instantiated.\n
  */
 class data_block_0_label_extractor
-  : public virtual data_block
+  : public virtual data_block_0
 {
 
-private:
-  data_block_0_label_extractor();
+protected:
+  data_block_0_label_extractor(data_block_0 &);
 
 protected:  
   vector<string> get_labels();
diff --git a/pc-tools/ldc2/src/main.cpp b/pc-tools/ldc2/src/main.cpp
new file mode 100644 (file)
index 0000000..36cb22e
--- /dev/null
@@ -0,0 +1,39 @@
+
+#include <stdio.h>
+#include <unistd.h>
+
+#include "tape_block.hh"
+#include "data_block.hh"
+
+void tape_start(void* m){
+  printf("tape_start\n");
+}
+
+void tape_stop(void* m){
+  printf("tape_stop\n");
+}
+
+int main(){
+  tape_block * myblock=0;
+  do{
+    if (myblock) delete myblock;
+    myblock=tape_block::gen_from_fd(0);
+
+    vector<string> desc=myblock->get_description();
+    for (vector<string>::iterator iter=desc.begin();
+        iter!=desc.end();iter++)
+      printf("%s\n",(*iter).c_str());
+
+
+//     if ((myblock->get_type()==0)&&(myblock->get_subtype()==050)){
+//       data_block * dp=(data_block *)myblock;
+//       printf ("0-50 symbol name: %s\n",dp->extract_string(4).c_str());
+//       printf ("0-50 symbol name: %s\n",dp->extract_string(11).c_str());
+//       printf ("Block size:%i\n",dp->get_word_size());
+//     }
+  } while (myblock->get_state()==tape_block::TBS_OK);
+  printf("---");
+  printf("State:%i\n",myblock->get_state());
+  printf("raw size:%i\n",myblock->get_raw_size());
+    return 0;
+}
diff --git a/pc-tools/ldc2/src/test.cpp b/pc-tools/ldc2/src/test.cpp
deleted file mode 100644 (file)
index 36cb22e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#include <stdio.h>
-#include <unistd.h>
-
-#include "tape_block.hh"
-#include "data_block.hh"
-
-void tape_start(void* m){
-  printf("tape_start\n");
-}
-
-void tape_stop(void* m){
-  printf("tape_stop\n");
-}
-
-int main(){
-  tape_block * myblock=0;
-  do{
-    if (myblock) delete myblock;
-    myblock=tape_block::gen_from_fd(0);
-
-    vector<string> desc=myblock->get_description();
-    for (vector<string>::iterator iter=desc.begin();
-        iter!=desc.end();iter++)
-      printf("%s\n",(*iter).c_str());
-
-
-//     if ((myblock->get_type()==0)&&(myblock->get_subtype()==050)){
-//       data_block * dp=(data_block *)myblock;
-//       printf ("0-50 symbol name: %s\n",dp->extract_string(4).c_str());
-//       printf ("0-50 symbol name: %s\n",dp->extract_string(11).c_str());
-//       printf ("Block size:%i\n",dp->get_word_size());
-//     }
-  } while (myblock->get_state()==tape_block::TBS_OK);
-  printf("---");
-  printf("State:%i\n",myblock->get_state());
-  printf("raw size:%i\n",myblock->get_raw_size());
-    return 0;
-}