Update to the newest upstream version. vlp-3 vlp26-qt3
authorRafał Długołęcki <kontakt@dlugolecki.net.pl>
Mon, 1 Jul 2013 20:39:48 +0000 (22:39 +0200)
committerRafał Długołęcki <kontakt@dlugolecki.net.pl>
Mon, 1 Jul 2013 20:39:48 +0000 (22:39 +0200)
51 files changed:
Dir
INSTALL_VLP.pdf [new file with mode: 0644]
Makefile
configure
doInstalacji/gen [new file with mode: 0755]
doInstalacji/int [new file with mode: 0755]
doInstalacji/loglan [new file with mode: 0755]
edit/Makefile
edit/editor.cpp
edit/editor.h
edit/logedit [new file with mode: 0755]
edit/mfile
edit/moc_editor.cpp [new file with mode: 0644]
graph/Makefile
graph/loggraph [new file with mode: 0755]
graph/loggraph.cpp
graph/loggraph.moc [new file with mode: 0644]
graph/mfile
head/comm.h
help/Makefile
help/help.cpp
help/help.moc [new file with mode: 0644]
help/loghelp [new file with mode: 0755]
help/mfile
inst/genY2000 [new file with mode: 0755]
inst/loglanY2000 [new file with mode: 0755]
int/Makefile
int/cint.c
int/logint [new file with mode: 0755]
int/mfile [new file with mode: 0644]
int/process.c
kernel/Makefile
kernel/kernel.cpp
kernel/kernel.moc [new file with mode: 0644]
kernel/logker [new file with mode: 0755]
kernel/mfile
lgconfig/Makefile
lgconfig/lgconfig [new file with mode: 0755]
lgconfig/lgconfig.cpp
lgconfig/lgconfig.moc [new file with mode: 0644]
lgconfig/mfile
net/Makefile
net/lognet [new file with mode: 0755]
net/lognet.cpp
net/lognet.moc [new file with mode: 0644]
net/mfile
preproc/Makefile
preproc/logcomp [new file with mode: 0755]
preproc/mfile
preproc/prep.cpp
preproc/prep.moc [new file with mode: 0644]

diff --git a/Dir b/Dir
index dd5c850ae47b5d24329616dc5a0cc66e99dc314c..504d4ecf7ec19836ee59cac2ebf60a439c51e67a 100644 (file)
--- a/Dir
+++ b/Dir
@@ -1,11 +1,14 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
diff --git a/INSTALL_VLP.pdf b/INSTALL_VLP.pdf
new file mode 100644 (file)
index 0000000..43c6227
Binary files /dev/null and b/INSTALL_VLP.pdf differ
index c726cd19d609104c4241210d5560e8c689e003e8..6d64a3df749ff50bf70c4f30e3ddebbcfe237c0d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,17 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 
 
 all:
index 4dc55f913d77840a48d473272a51988609b7d8bc..a25231f08fa9367695cbbe2c3d2c3f668fc12f4e 100755 (executable)
--- a/configure
+++ b/configure
@@ -2,10 +2,11 @@
 
 cat Dir graph/mfile > graph/Makefile
 cat Dir net/mfile > net/Makefile
-
 cat Dir kernel/mfile > kernel/Makefile
 cat Dir lgconfig/mfile > lgconfig/Makefile
 cat Dir edit/mfile > edit/Makefile
 cat Dir preproc/mfile > preproc/Makefile
 cat Dir help/mfile > help/Makefile
+cat Dir int/mfile > int/Makefile
 cat Dir ./mfile > ./Makefile
+
diff --git a/doInstalacji/gen b/doInstalacji/gen
new file mode 100755 (executable)
index 0000000..58d1f27
Binary files /dev/null and b/doInstalacji/gen differ
diff --git a/doInstalacji/int b/doInstalacji/int
new file mode 100755 (executable)
index 0000000..b453ce5
Binary files /dev/null and b/doInstalacji/int differ
diff --git a/doInstalacji/loglan b/doInstalacji/loglan
new file mode 100755 (executable)
index 0000000..60fcb36
Binary files /dev/null and b/doInstalacji/loglan differ
index bbc62275d9bb596fac818547049631b981af1a0c..61b9be24bfbca9f99fcb021b18cfb67b3ecaf85a 100644 (file)
@@ -1,14 +1,17 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 ####### 
 #######  Change the INCDIR, LFLAGS and MOC
 
@@ -16,7 +19,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS =  -L$(QLIB) -lqt
+LFLAGS =  -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index f7ef8207f998cab311f277af1ccd77a3d0f610c9..ed71939e4ede9ddab0d62c92198384364bcffedf 100644 (file)
@@ -34,9 +34,13 @@ Editor *e;
 char *UnitTypes[5] = {"CLASS","PROCEDURE","FUNCTION","PROCESS","COROUTINE"};
 
 
-My_Edit::My_Edit(QWidget *parent=0,const char *name=0)
+
+
+My_Edit::My_Edit(QWidget *parent,const char *name)
 : QMultiLineEdit(parent,name)
 {
+ parent = NULL;
+ name = NULL;
 }
 
 void My_Edit::keyPressEvent(QKeyEvent *ev)
@@ -46,10 +50,14 @@ void My_Edit::keyPressEvent(QKeyEvent *ev)
 }
 
 
+void Editor::closeEvent ( QCloseEvent * e ) {
+  e->ignore();
+}
+
 Editor::Editor( char *hdir,QWidget * parent , const char * name)
     : QWidget( parent, name )
 {
-    QFont f1("Helvetica",12,QFont::Bold);
+    QFont f1("Helvetica",10,QFont::Bold);
 
 
     strcpy(HomeDir,hdir);
@@ -96,7 +104,7 @@ Editor::Editor( char *hdir,QWidget * parent , const char * name)
     
     e = new My_Edit( this, "editor" );
     connect(e,SIGNAL(cursorMove()),this,SLOT(updateline()));
-    medit->insertItem("Copy ",e,SLOT(copyText()),CTRL+Key_Insert);
+    medit->insertItem("Copy ",e,SLOT(copy()),CTRL+Key_Insert);
     medit->insertItem("Paste ",e,SLOT(paste()), SHIFT+Key_Insert);
     medit->insertItem("Cut ",e,SLOT(cut()), CTRL+Key_Delete);
     medit->insertItem("Clear All ",e,SLOT(clear()));
@@ -221,7 +229,7 @@ void Editor::save(const char *fileName)
   QFile f(fileName);
   if (!f.open(IO_WriteOnly)) return;
   f.reset();
-  f.writeBlock( e->text().data(),e->text().size() );
+  f.writeBlock( e->text().data(),e->text().length() );
   f.close();
   
    
@@ -381,9 +389,9 @@ void Editor::props()
 
    if (dlg.exec())
    {
-    compiler_path.sprintf("%s",compp->text());
+    compiler_path.sprintf("%s",compp->text().ascii());
 //    gen_path.sprintf("%s",genp->text());
-    file_path.sprintf("%s",files->text());
+    file_path.sprintf("%s",files->text().ascii());
     };
  }
 
@@ -447,7 +455,7 @@ void Editor::log_unit()
   e->getCursorPosition(&cx,&cy);
   
   txt.sprintf("UNIT %s : %s( <params> );\nBEGIN\n\nEND %s;",uname,
-              lst.text(lst.currentItem()), uname);
+              lst.text(lst.currentItem()).ascii(), uname);
   e->insertAt(txt,cx,cy);
  };
 }
@@ -520,7 +528,7 @@ void Editor::findText()
        {
                QFont font( "helvetica", 12, 75, 0 );
                font.setStyleHint( (QFont::StyleHint)0 );
-               font.setCharSet( (QFont::CharSet)0 );
+               //font.setCharSet( (QFont::CharSet)0 );
                tmpQLabel->setFont( font );
        }
        tmpQLabel->setText( "Text:" );
@@ -587,7 +595,7 @@ void Editor::find_next()
 int main( int argc, char **argv )
 {
     QApplication a( argc, argv );
-    a.setStyle(WindowsStyle);
+    //a.setStyle(WindowsStyle);
     e = new Editor(argv[1]);
     e->resize( 600, 400 );
     e->show();
index beb90f873959fdb3917359c8a8a8c1c8d2a75b8b..be56495e0b1af83b6d51b320b2e661f4cf53e8dd 100644 (file)
 
 
 
-typedef struct FuncEntry
+typedef struct 
 {
  char name[255],filename[255];
-};
+} FuncEntry;
 
-typedef struct CategoryEntry
+typedef struct 
 {
  QList<FuncEntry> dictionary;
  QStrList names;
  char name[255];
-};
+} CategoryEntry;
 
 
 
@@ -82,6 +82,7 @@ public slots:
 
 protected:
     void resizeEvent( QResizeEvent * );
+    virtual void closeEvent ( QCloseEvent * e );
 
 private:
     QMenuBar      *m;
diff --git a/edit/logedit b/edit/logedit
new file mode 100755 (executable)
index 0000000..79b9fe4
Binary files /dev/null and b/edit/logedit differ
index 5639ab2f29696095e8d70304a03eb1ccc11bb9e3..4ee86836809055ea5d5b4a026d4eb041d340fe1b 100644 (file)
@@ -5,7 +5,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS =  -L$(QLIB) -lqt
+LFLAGS =  -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
diff --git a/edit/moc_editor.cpp b/edit/moc_editor.cpp
new file mode 100644 (file)
index 0000000..b7866f5
--- /dev/null
@@ -0,0 +1,240 @@
+/****************************************************************************
+** My_Edit meta object code from reading C++ file 'editor.h'
+**
+** Created: Fri Mar 4 12:26:17 2011
+**      by: The Qt MOC ($Id: qt/moc_yacc.cpp   3.3.8   edited Feb 2 14:59 $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#undef QT_NO_COMPAT
+#include "editor.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.8b. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *My_Edit::className() const
+{
+    return "My_Edit";
+}
+
+QMetaObject *My_Edit::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_My_Edit( "My_Edit", &My_Edit::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString My_Edit::tr( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "My_Edit", s, c, QApplication::DefaultCodec );
+    else
+       return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString My_Edit::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "My_Edit", s, c, QApplication::UnicodeUTF8 );
+    else
+       return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* My_Edit::staticMetaObject()
+{
+    if ( metaObj )
+       return metaObj;
+    QMetaObject* parentObject = QMultiLineEdit::staticMetaObject();
+    static const QUMethod signal_0 = {"cursorMove", 0, 0 };
+    static const QMetaData signal_tbl[] = {
+       { "cursorMove()", &signal_0, QMetaData::Public }
+    };
+    metaObj = QMetaObject::new_metaobject(
+       "My_Edit", parentObject,
+       0, 0,
+       signal_tbl, 1,
+#ifndef QT_NO_PROPERTIES
+       0, 0,
+       0, 0,
+#endif // QT_NO_PROPERTIES
+       0, 0 );
+    cleanUp_My_Edit.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* My_Edit::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "My_Edit" ) )
+       return this;
+    return QMultiLineEdit::qt_cast( clname );
+}
+
+// SIGNAL cursorMove
+void My_Edit::cursorMove()
+{
+    activate_signal( staticMetaObject()->signalOffset() + 0 );
+}
+
+bool My_Edit::qt_invoke( int _id, QUObject* _o )
+{
+    return QMultiLineEdit::qt_invoke(_id,_o);
+}
+
+bool My_Edit::qt_emit( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->signalOffset() ) {
+    case 0: cursorMove(); break;
+    default:
+       return QMultiLineEdit::qt_emit(_id,_o);
+    }
+    return TRUE;
+}
+#ifndef QT_NO_PROPERTIES
+
+bool My_Edit::qt_property( int id, int f, QVariant* v)
+{
+    return QMultiLineEdit::qt_property( id, f, v);
+}
+
+bool My_Edit::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
+
+
+const char *Editor::className() const
+{
+    return "Editor";
+}
+
+QMetaObject *Editor::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_Editor( "Editor", &Editor::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString Editor::tr( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "Editor", s, c, QApplication::DefaultCodec );
+    else
+       return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString Editor::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "Editor", s, c, QApplication::UnicodeUTF8 );
+    else
+       return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* Editor::staticMetaObject()
+{
+    if ( metaObj )
+       return metaObj;
+    QMetaObject* parentObject = QWidget::staticMetaObject();
+    static const QUMethod slot_0 = {"load", 0, 0 };
+    static const QUParameter param_slot_1[] = {
+       { "fileName", &static_QUType_charstar, 0, QUParameter::In }
+    };
+    static const QUMethod slot_1 = {"load", 1, param_slot_1 };
+    static const QUMethod slot_2 = {"save", 0, 0 };
+    static const QUParameter param_slot_3[] = {
+       { "fileName", &static_QUType_charstar, 0, QUParameter::In }
+    };
+    static const QUMethod slot_3 = {"save", 1, param_slot_3 };
+    static const QUMethod slot_4 = {"save_as", 0, 0 };
+    static const QUMethod slot_5 = {"create", 0, 0 };
+    static const QUMethod slot_6 = {"props", 0, 0 };
+    static const QUMethod slot_7 = {"print", 0, 0 };
+    static const QUMethod slot_8 = {"cmp", 0, 0 };
+    static const QUMethod slot_9 = {"gen", 0, 0 };
+    static const QUMethod slot_10 = {"comp_all", 0, 0 };
+    static const QUMethod slot_11 = {"log_unit", 0, 0 };
+    static const QUMethod slot_12 = {"log_prog", 0, 0 };
+    static const QUMethod slot_13 = {"findText", 0, 0 };
+    static const QUMethod slot_14 = {"find_next", 0, 0 };
+    static const QUMethod slot_15 = {"updateline", 0, 0 };
+    static const QMetaData slot_tbl[] = {
+       { "load()", &slot_0, QMetaData::Public },
+       { "load(const char*)", &slot_1, QMetaData::Public },
+       { "save()", &slot_2, QMetaData::Public },
+       { "save(const char*)", &slot_3, QMetaData::Public },
+       { "save_as()", &slot_4, QMetaData::Public },
+       { "create()", &slot_5, QMetaData::Public },
+       { "props()", &slot_6, QMetaData::Public },
+       { "print()", &slot_7, QMetaData::Public },
+       { "cmp()", &slot_8, QMetaData::Public },
+       { "gen()", &slot_9, QMetaData::Public },
+       { "comp_all()", &slot_10, QMetaData::Public },
+       { "log_unit()", &slot_11, QMetaData::Public },
+       { "log_prog()", &slot_12, QMetaData::Public },
+       { "findText()", &slot_13, QMetaData::Public },
+       { "find_next()", &slot_14, QMetaData::Public },
+       { "updateline()", &slot_15, QMetaData::Public }
+    };
+    metaObj = QMetaObject::new_metaobject(
+       "Editor", parentObject,
+       slot_tbl, 16,
+       0, 0,
+#ifndef QT_NO_PROPERTIES
+       0, 0,
+       0, 0,
+#endif // QT_NO_PROPERTIES
+       0, 0 );
+    cleanUp_Editor.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* Editor::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "Editor" ) )
+       return this;
+    return QWidget::qt_cast( clname );
+}
+
+bool Editor::qt_invoke( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->slotOffset() ) {
+    case 0: load(); break;
+    case 1: load((const char*)static_QUType_charstar.get(_o+1)); break;
+    case 2: save(); break;
+    case 3: save((const char*)static_QUType_charstar.get(_o+1)); break;
+    case 4: save_as(); break;
+    case 5: create(); break;
+    case 6: props(); break;
+    case 7: print(); break;
+    case 8: cmp(); break;
+    case 9: gen(); break;
+    case 10: comp_all(); break;
+    case 11: log_unit(); break;
+    case 12: log_prog(); break;
+    case 13: findText(); break;
+    case 14: find_next(); break;
+    case 15: updateline(); break;
+    default:
+       return QWidget::qt_invoke( _id, _o );
+    }
+    return TRUE;
+}
+
+bool Editor::qt_emit( int _id, QUObject* _o )
+{
+    return QWidget::qt_emit(_id,_o);
+}
+#ifndef QT_NO_PROPERTIES
+
+bool Editor::qt_property( int id, int f, QVariant* v)
+{
+    return QWidget::qt_property( id, f, v);
+}
+
+bool Editor::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
index 1d8b04401561e4fb3b22960cc414e0f7eeb478f9..7263fd4a1149fdccf8886ff01acddd1dcf096378 100644 (file)
@@ -1,20 +1,23 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 
 INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include 
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt 
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
diff --git a/graph/loggraph b/graph/loggraph
new file mode 100755 (executable)
index 0000000..f3504a9
Binary files /dev/null and b/graph/loggraph differ
index 438a369f3b1c72575a8ef83d6ff10907a7d22b1e..680f5052846e384702b3e7acd33f0aed5772336a 100644 (file)
@@ -4,7 +4,7 @@
 // Demonstrates the painter and the printer.
 //
 
-#include <qwindow.h>
+//#include <qwindow.h>
 #include <qpainter.h>
 #include <qprinter.h>
 #include <qpushbt.h>
@@ -171,11 +171,11 @@ VGR::VGR(char *sockname)
 
 
 
-    normal_font = new QFont("lucidatypewriter",12,QFont::Normal);
+    normal_font = new QFont("lucidatypewriter",10,QFont::Normal);
     normal_font->setFixedPitch(TRUE);
-    bold_font = new QFont("lucidatypewriter",12,QFont::Bold);
+    bold_font = new QFont("lucidatypewriter",10,QFont::Bold);
     bold_font->setFixedPitch(TRUE);
-    italic_font = new QFont("lucidatypewriter",12,QFont::Normal,TRUE);
+    italic_font = new QFont("lucidatypewriter",10,QFont::Normal,TRUE);
     italic_font->setFixedPitch(TRUE);
 
     prv_font = normal_font;    
diff --git a/graph/loggraph.moc b/graph/loggraph.moc
new file mode 100644 (file)
index 0000000..dcbd0c9
--- /dev/null
@@ -0,0 +1,114 @@
+/****************************************************************************
+** VGR meta object code from reading C++ file 'loggraph.cpp'
+**
+** Created: Fri Mar 4 12:25:17 2011
+**      by: The Qt MOC ($Id: qt/moc_yacc.cpp   3.3.8   edited Feb 2 14:59 $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.8b. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *VGR::className() const
+{
+    return "VGR";
+}
+
+QMetaObject *VGR::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_VGR( "VGR", &VGR::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString VGR::tr( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "VGR", s, c, QApplication::DefaultCodec );
+    else
+       return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString VGR::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "VGR", s, c, QApplication::UnicodeUTF8 );
+    else
+       return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* VGR::staticMetaObject()
+{
+    if ( metaObj )
+       return metaObj;
+    QMetaObject* parentObject = QFrame::staticMetaObject();
+    static const QUParameter param_slot_0[] = {
+       { 0, &static_QUType_int, 0, QUParameter::In }
+    };
+    static const QUMethod slot_0 = {"vscrolled", 1, param_slot_0 };
+    static const QUParameter param_slot_1[] = {
+       { 0, &static_QUType_int, 0, QUParameter::In }
+    };
+    static const QUMethod slot_1 = {"hscrolled", 1, param_slot_1 };
+    static const QUMethod slot_2 = {"CloseMe", 0, 0 };
+    static const QUMethod slot_3 = {"RequestMessage", 0, 0 };
+    static const QMetaData slot_tbl[] = {
+       { "vscrolled(int)", &slot_0, QMetaData::Public },
+       { "hscrolled(int)", &slot_1, QMetaData::Public },
+       { "CloseMe()", &slot_2, QMetaData::Public },
+       { "RequestMessage()", &slot_3, QMetaData::Public }
+    };
+    metaObj = QMetaObject::new_metaobject(
+       "VGR", parentObject,
+       slot_tbl, 4,
+       0, 0,
+#ifndef QT_NO_PROPERTIES
+       0, 0,
+       0, 0,
+#endif // QT_NO_PROPERTIES
+       0, 0 );
+    cleanUp_VGR.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* VGR::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "VGR" ) )
+       return this;
+    return QFrame::qt_cast( clname );
+}
+
+bool VGR::qt_invoke( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->slotOffset() ) {
+    case 0: vscrolled((int)static_QUType_int.get(_o+1)); break;
+    case 1: hscrolled((int)static_QUType_int.get(_o+1)); break;
+    case 2: CloseMe(); break;
+    case 3: RequestMessage(); break;
+    default:
+       return QFrame::qt_invoke( _id, _o );
+    }
+    return TRUE;
+}
+
+bool VGR::qt_emit( int _id, QUObject* _o )
+{
+    return QFrame::qt_emit(_id,_o);
+}
+#ifndef QT_NO_PROPERTIES
+
+bool VGR::qt_property( int id, int f, QVariant* v)
+{
+    return QFrame::qt_property( id, f, v);
+}
+
+bool VGR::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
index 4eb710d750b49ea9a05303b540b555609cf5a90a..8025c1526b3932e7f8a999e660255d3cdfc22bc2 100644 (file)
@@ -3,7 +3,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include 
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt 
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index 44cb6be3ff8613b1d78956bf0c43a83d33bb3254..4ebc08b850be8f1a23119e971741f791b1ea023b 100644 (file)
@@ -12,20 +12,20 @@ typedef struct {
     int mark;
 } paddr;
 
-struct ctrl_msg
+typedef struct 
 {
     paddr sender;       /* address of the sender and */
     paddr receiver;   /* receiver of the message */
     int type;      /* message type */
     int par;         /* prototype or error signal number */
-};
+} ctrl_msg;
 
 
 
 typedef struct
 {
-    struct ctrl_msg control;
-    char params[ 256-sizeof(struct ctrl_msg) ];
+    ctrl_msg control;
+    char params[ 256-sizeof(ctrl_msg) ];
 } messg;
 
 
index fa6c8ea47b6d3fd890b9c4c846a9cfd1432b6ae0..b4e10e23e88a6cbafbc6bf0f87f6320f67cd5519 100644 (file)
@@ -1,20 +1,23 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 
 INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index 1b3cb3cc49dcd22c16de195cced40be340c9a8f3..180e54832f344824d1e01df499cf02c6c3f1512b 100644 (file)
@@ -341,7 +341,7 @@ QHTML::QHTML(char *d)
   pp->insertItem("User Guide",this,SLOT(user_guide()));
   pp->insertItem("Language reference",this,SLOT(lang_guide()));
   pp->setFont(f);
-  pp->setStyle(WindowsStyle);
+  //pp->setStyle(WindowsStyle);
   bar->insertItem("File",this,SLOT(load()));
   bar->insertItem("Contents",pp);
   bar->insertItem("Quit",app,SLOT(quit()));
@@ -379,7 +379,7 @@ void QHTML::load()
  if ( !s.isNull())
  {
   vscroll->setValue(0); 
-  analyzer->LoadFile(s.data());
+  analyzer->LoadFile((char*)s.ascii());
   analyzer->PackLinks();
   DrawList();
  }
@@ -439,7 +439,7 @@ void QHTML::mousePressEvent(QMouseEvent *ev)
   if (poms.data()[0]=='#') 
    {
      poms=poms.right(poms.length()-1);
-     pom1=analyzer->FindAnchor(poms.data());
+     pom1=analyzer->FindAnchor((char*)poms.ascii());
      if (pom1!=NULL)
      {
        vscroll->setValue(pom1->y);
@@ -559,8 +559,8 @@ int main( int argc, char **argv )
     app = new QApplication(argc,argv);
     if (argc==2) ps.sprintf(argv[1]);
      else ps.sprintf(".");
-    QHTML cfg(ps.data());
-    app->setStyle(WindowsStyle);
+    QHTML cfg((char*)ps.ascii());
+    //app->setStyle(WindowsStyle);
     app->setMainWidget(&cfg);
     cfg.show();
     return app->exec();
diff --git a/help/help.moc b/help/help.moc
new file mode 100644 (file)
index 0000000..e8bb4fe
--- /dev/null
@@ -0,0 +1,117 @@
+/****************************************************************************
+** QHTML meta object code from reading C++ file 'help.cpp'
+**
+** Created: Fri Mar 4 12:26:20 2011
+**      by: The Qt MOC ($Id: qt/moc_yacc.cpp   3.3.8   edited Feb 2 14:59 $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.8b. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *QHTML::className() const
+{
+    return "QHTML";
+}
+
+QMetaObject *QHTML::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_QHTML( "QHTML", &QHTML::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString QHTML::tr( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "QHTML", s, c, QApplication::DefaultCodec );
+    else
+       return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString QHTML::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "QHTML", s, c, QApplication::UnicodeUTF8 );
+    else
+       return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* QHTML::staticMetaObject()
+{
+    if ( metaObj )
+       return metaObj;
+    QMetaObject* parentObject = QFrame::staticMetaObject();
+    static const QUMethod slot_0 = {"load", 0, 0 };
+    static const QUMethod slot_1 = {"back", 0, 0 };
+    static const QUParameter param_slot_2[] = {
+       { 0, &static_QUType_int, 0, QUParameter::In }
+    };
+    static const QUMethod slot_2 = {"vscrolled", 1, param_slot_2 };
+    static const QUMethod slot_3 = {"contents", 0, 0 };
+    static const QUMethod slot_4 = {"user_guide", 0, 0 };
+    static const QUMethod slot_5 = {"lang_guide", 0, 0 };
+    static const QMetaData slot_tbl[] = {
+       { "load()", &slot_0, QMetaData::Public },
+       { "back()", &slot_1, QMetaData::Public },
+       { "vscrolled(int)", &slot_2, QMetaData::Public },
+       { "contents()", &slot_3, QMetaData::Public },
+       { "user_guide()", &slot_4, QMetaData::Public },
+       { "lang_guide()", &slot_5, QMetaData::Public }
+    };
+    metaObj = QMetaObject::new_metaobject(
+       "QHTML", parentObject,
+       slot_tbl, 6,
+       0, 0,
+#ifndef QT_NO_PROPERTIES
+       0, 0,
+       0, 0,
+#endif // QT_NO_PROPERTIES
+       0, 0 );
+    cleanUp_QHTML.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* QHTML::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "QHTML" ) )
+       return this;
+    return QFrame::qt_cast( clname );
+}
+
+bool QHTML::qt_invoke( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->slotOffset() ) {
+    case 0: load(); break;
+    case 1: back(); break;
+    case 2: vscrolled((int)static_QUType_int.get(_o+1)); break;
+    case 3: contents(); break;
+    case 4: user_guide(); break;
+    case 5: lang_guide(); break;
+    default:
+       return QFrame::qt_invoke( _id, _o );
+    }
+    return TRUE;
+}
+
+bool QHTML::qt_emit( int _id, QUObject* _o )
+{
+    return QFrame::qt_emit(_id,_o);
+}
+#ifndef QT_NO_PROPERTIES
+
+bool QHTML::qt_property( int id, int f, QVariant* v)
+{
+    return QFrame::qt_property( id, f, v);
+}
+
+bool QHTML::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
diff --git a/help/loghelp b/help/loghelp
new file mode 100755 (executable)
index 0000000..5fc8e70
Binary files /dev/null and b/help/loghelp differ
index afe9e726a035452c9ee588375eb97bc3a941fd74..098bc482835c9489d1725c66ad015d703e411b50 100644 (file)
@@ -3,7 +3,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
diff --git a/inst/genY2000 b/inst/genY2000
new file mode 100755 (executable)
index 0000000..c732501
Binary files /dev/null and b/inst/genY2000 differ
diff --git a/inst/loglanY2000 b/inst/loglanY2000
new file mode 100755 (executable)
index 0000000..c8c63ba
Binary files /dev/null and b/inst/loglanY2000 differ
index 703d0e3e758a3a133964d6eca45aafd51568083b..2871c389ecf879bdd41110b4bb0bf8197bd357bd 100644 (file)
@@ -1,3 +1,17 @@
+###   Includes for QT library
+QINC=/usr/include/qt3
+
+###   QT library directory
+QLIB=/usr/lib3/
+
+###   moc compiler directory
+MOCDIR=/usr/bin
+
+###  Install directory
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 SHELL=/bin/bash
 #.SUFFIXES: .o .c
 
@@ -24,7 +38,7 @@ SHELL=/bin/bash
 #
 
         
-UNIXPARS=-DUNIX -DWORD_32BIT -DUSE_ALARM -Dpascal=
+UNIXPARS=-DUNIX -DWORD_32BIT -DUSE_CLOCK -Dpascal=
 UNIXPARSNG=$(UNIXPARS)
 
 #CC=cc $(UNIXPARSNG) -DNO_PROTOTYPES            # SUN,HP
@@ -32,7 +46,7 @@ UNIXPARSNG=$(UNIXPARS)
 #CC=cc -W1 $(UNIXPARSNG)                        # SCO
 #CC=cc -W1 $(UNIXPARSNG) -DOBJECTADDR           # SCO
 #CC=cc -W1 $(UNIXPARSNG) -DOBJECTADDR -DTCPIP   # SCO TCPIP
-CC=gcc $(UNIXPARSNG) -DOBJECTADDR -DSYSV     # GNU C++ TCPIP
+CC=gcc $(UNIXPARSNG) -DOBJECTADDR -DSYSV -I$(QINC)    # GNU C++ TCPIP
 #CC=cc -W1 $(UNIXPARS) -DSYSV -DXSIGHT          # SCO with X11 graphics
 #CC=gcc -g $(UNIXPARS) -DSYSV -DXSIGHT          # SCO GCC with X11 graphics
 
@@ -43,7 +57,7 @@ target : int
 
 #############################################################################
 #ADDOPT = -lsocket # sun
-ADDOPT =   # Linux
+ADDOPT =  $(QLINK) # Linux
 
 
 OBJ= cint.o compact.o control.o util.o handler.o intdt.o        \
index b81996c051f7b2e519f02042daeeb5e89fe80685..547a77087b7c0801606b3dcfc8aa36642e5d26c2 100644 (file)
@@ -13,7 +13,7 @@
 #include <arpa/inet.h>
 #include <errno.h>
 #include <netdb.h>
-
+#include <qthread.h>
 
 #ifndef NO_PROTOTYPES
 static void load(char *);
@@ -26,6 +26,7 @@ int main();
 #endif
 
 
+
 int internal_sock,graph_sock,net_sock,connected=0;
 struct sockaddr_un svr;
 int GraphRes=-1;
@@ -427,14 +428,29 @@ void send_to_kernel(MESSAGE *msg)
 }
 
 /* send message to net */
-void send_to_net(MESSAGE *msg)
+/* 2010 returns 1 if ok and 0 if node desn't exists */
+int send_to_net(MESSAGE *msg)
 {
  int k,len;
  MESSAGE m;
  struct sockaddr_in svr;
+ char addr[256];
 
-
  k = msg->int_msg.control.receiver.node; 
+
+ /* 2010 check if node exists */
+ m.msg_type = MSG_NET;
+ m.param.pword[0] = NET_NODE_EXIST;
+ m.param.pword[1] = k;
+ m.param.pword[2] = my_ctx.program_id;
+ write(net_sock,&m,sizeof(MESSAGE));
+ bzero(&m,sizeof(MESSAGE));
+ while( (m.msg_type!=MSG_NET) && (m.param.pword[0]!=NET_NODE_EXIST) )
+  read(net_sock,&m,sizeof(MESSAGE));
+ if (m.param.pword[1]!=1) return 0;
+ strcpy(addr,m.param.pstr);
+
  if (RInstance[k]==-1)
   { 
    bzero(&m,sizeof(MESSAGE));
@@ -444,34 +460,38 @@ void send_to_net(MESSAGE *msg)
    m.param.pword[2] = k;
    send_to_kernel(&m);
    bzero(&m,sizeof(MESSAGE));
+   
    while(1)
      {
        read(internal_sock,&m,sizeof(MESSAGE));
        if ( (m.msg_type == MSG_VLP) && (m.param.pword[0]==VLP_REMOTE_INSTANCE_HERE)) break;
       }
-     
+      
+   /*printf("DEBUG: remote instance made with id: %d addr %s port %d\n",m.param.pword[1],addr, htons(m.param.pword[8]));*/
    RInstance[k] = m.param.pword[1];
    /* Make direct connection */
    DirConn[k] = socket(AF_INET,SOCK_STREAM,0);
    svr.sin_family = AF_INET;
-   svr.sin_addr.s_addr = inet_addr(m.param.pstr);
+   svr.sin_addr.s_addr = inet_addr(addr);
    svr.sin_port = htons(m.param.pword[8]);
    len = connect(DirConn[k],(struct sockaddr*)&svr,sizeof(svr));
    if (len!=0) 
     {
      RInstance[k]=-1;
+     
      writeln_str("Cannot connect remote instance!");
     }
    else
      {
       fcntl(DirConn[k], F_SETFL,O_NONBLOCK | fcntl(DirConn[k], F_GETFL,0));
-
-      } 
+     } 
    }
-if (RInstance[k]!=-1)
-{
- write(DirConn[k],&(msg->int_msg),sizeof(message)); 
-} 
+   if (RInstance[k]!=-1)
+   {
+      
+      write(DirConn[k],&(msg->int_msg),sizeof(message)); 
+   } 
+   return 1;
 }
 
 
@@ -486,12 +506,13 @@ void get_internal()
  
  int r,max,i;
  char s[80];
- fd_set rset,wset;
+ fd_set rset;
  struct timeval tout={0,0};
  
  
- /* ----------- Direct connection messages -----*/
+
+ /* 2010 */
+ /* ----------- Direct connection messages -----
  FD_ZERO(&DirSet);
  maxDirSet=0;
  for(i=0;i<255;i++)
@@ -517,18 +538,44 @@ void get_internal()
     }
    }
    }
/*-----------------------------------------*/
+ -----------------------------------------*/
  
  
- FD_ZERO(&rset);FD_ZERO(&wset);
+ FD_ZERO(&rset);
  FD_SET(net_sock,&rset);
- FD_SET(internal_sock,&rset);
+ FD_SET(internal_sock,&rset); 
  if (net_sock>internal_sock) max = net_sock; else max = internal_sock;
+ /* 2010 */
+ for(i=0;i<255;i++) {
+  if (DirConn[i]!=-1) 
+   {
+    FD_SET(DirConn[i],&rset);
+    if (max<DirConn[i]) max=DirConn[i];
+   }
+ } /* for */
   
- if (select(max+1,&rset,&wset,0,(struct timeval *)&tout)>0)
+ if (select(max+1,&rset,0,0,(struct timeval *)&tout)>0)
  {
  
+  /* 2010 */
+  for(i=0;i<255;i++)
+   {
+    if ( (DirConn[i]!=-1) && (FD_ISSET(DirConn[i],&rset)) )
+    {
+     /*printf("DEBUG: Interp has message on direct connection: type %d par %d\n",mx.control.type,mx.control.par);  */
+     r=read(DirConn[i],&mx,sizeof(mx));
+     if (r>0 && r==sizeof(mx))
+     {      
+      memcpy(globmsgqueue+msgtail,&mx,sizeof(message));
+      msgtail = (msgtail+1) % MAXMSGQUEUE;
+      msgready++;
+     } 
+    }
+   }
+
+
+
+
  if (FD_ISSET(net_sock,&rset))
  {
  r = read(net_sock, &m, sizeof(MESSAGE));
@@ -540,6 +587,7 @@ void get_internal()
                   switch(m.param.pword[0])
                   {
                    case NET_PROPAGATE:
+                    /*printf("DEBUG: cint net_sock MSG_NET NET_PROPAGATE cmd %d\n",m.param.pword[6]);*/
                     memcpy(globmsgqueue+msgtail,&m.int_msg,sizeof(message));
                     msgtail = (msgtail+1) % MAXMSGQUEUE;
                     msgready++;
@@ -567,6 +615,7 @@ void get_internal()
     case MSG_NET: 
             if (m.param.pword[0] == NET_PROPAGATE)
             {
+             /*printf("DEBUG: cint internal_sock MSG_NET NET_PROPAGATE cmd %d\n",m.param.pword[6]);*/
              memcpy(globmsgqueue+msgtail,&m.int_msg,sizeof(message));
              msgtail = (msgtail+1) % MAXMSGQUEUE;
              msgready++;
@@ -578,6 +627,7 @@ void get_internal()
  }
  } /* FD_ISSET */
  } /* select */
+
 }
 
 
@@ -654,8 +704,7 @@ void send_ready()
  
  bzero(&svr,sizeof(svr));
  DirConn[parent_ctx.node] = accept(sock,(struct sockaddr*)&svr,&len);
- fcntl(DirConn[parent_ctx.node], F_SETFL,O_NONBLOCK | 
- fcntl(DirConn[parent_ctx.node], F_GETFL,0));
+ fcntl(DirConn[parent_ctx.node], F_SETFL,O_NONBLOCK | fcntl(DirConn[parent_ctx.node], F_GETFL,0));
 }
 
 int main(argc, argv)
@@ -675,13 +724,13 @@ char **argv;
     setjmp(contenv);         /* set label for continue long jump */
     while (TRUE)                     /* repeat until exit() is called */
     {
-        get_internal();
+        get_internal();        
         schedule();         /* reschedule current process */
-    if (ready != 0)
-    {
+   if (ready != 0)
+    {   
         decode();               /* fetch instruction */
         execute();            /* and execute it */
-    }
+    } 
        
     }
     return 0;
diff --git a/int/logint b/int/logint
new file mode 100755 (executable)
index 0000000..c8be922
Binary files /dev/null and b/int/logint differ
diff --git a/int/mfile b/int/mfile
new file mode 100644 (file)
index 0000000..6113147
--- /dev/null
+++ b/int/mfile
@@ -0,0 +1,69 @@
+SHELL=/bin/bash
+#.SUFFIXES: .o .c
+
+#############################################################################
+# switches :
+# OBJECTADDR - switch on special process addressing - object simulates
+#              process pointer
+# CDBG - turn on debugging of compactifier, compactifier appends to file
+#        'trace' state of memory before & after the compactification,
+#        also a history of compactification & process number is dumped
+# RPCDBG - debugging of alien call, all actions : alien call, acknowledges,
+#          passivations and returns are written to stderr
+# NO_GRAPH -    nonstand.c defines only INKEY grom IIUWGRAPH
+# DLINK    -    DLINK network version
+# TCPIP    -    TCPIP network version - needs also OBJECTADDR
+#
+# switches depending on environment :
+# TURBOC - if using BORLAND TURBO-C compiler
+# MSDOS/OS2/UNIX - choose operating system
+# USE_CLOCK - scheduler should use clock() function to measure time
+# USE_ALARM - scheduler should use alarm() function to measure time
+# WORD_16BIT/DWORD_16BIT/WORD_32BIT - choose memory model :
+#        small 16-bit / large 16-bit / small 32-bit
+#
+
+        
+UNIXPARS=-DUNIX -DWORD_32BIT -DUSE_CLOCK -Dpascal=
+UNIXPARSNG=$(UNIXPARS)
+
+#CC=cc $(UNIXPARSNG) -DNO_PROTOTYPES            # SUN,HP
+#CC=rcc $(UNIXPARSNG) -O                        # SCO - AT&T C compiler
+#CC=cc -W1 $(UNIXPARSNG)                        # SCO
+#CC=cc -W1 $(UNIXPARSNG) -DOBJECTADDR           # SCO
+#CC=cc -W1 $(UNIXPARSNG) -DOBJECTADDR -DTCPIP   # SCO TCPIP
+CC=gcc $(UNIXPARSNG) -DOBJECTADDR -DSYSV -I$(QINC)    # GNU C++ TCPIP
+#CC=cc -W1 $(UNIXPARS) -DSYSV -DXSIGHT          # SCO with X11 graphics
+#CC=gcc -g $(UNIXPARS) -DSYSV -DXSIGHT          # SCO GCC with X11 graphics
+
+CCc=$(CC)                                       # common version
+#CCc=$(CC) -Fo$*.o                              # MSDOS MSC version
+
+target : int
+
+#############################################################################
+#ADDOPT = -lsocket # sun
+ADDOPT =  $(QLINK) # Linux
+
+
+OBJ= cint.o compact.o control.o util.o handler.o intdt.o        \
+     memory.o object.o runsys.o standard.o                      \
+     execute.o fileio.o nonstand.o process.o procaddr.o queue.o \
+     rpcall.o typchk.o  
+
+.c.o :
+       $(CCc) -c  $*.c
+.s.o:
+       as -o $*.o $*.s
+
+
+int: $(OBJ) 
+#      $(CC) $(OBJ) inkeyux.o -lm -lX11 -lmalloc -lsocket -ggdb -o int
+       $(CC) $(OBJ) -lm $(ADDOPT) -o logint
+#      strip logint
+#      mv int $(HOME)/LOGLAN.PAU/bin
+
+nonstand.o : nonstand.c
+
+clean :
+       rm -f *.o *.bak logint
index 2ff8706eacbecd76817010a001d9e45754a5509e..310e73bbd947f11fcebe47a25a38bac899073324 100644 (file)
@@ -498,6 +498,7 @@ void sendmsg1(msg)                  /* Send message via net */
 message *msg;
 {
  MESSAGE m;
+ int result=1;
 
     msg->control.sender.node = ournode;
     msg->control.sender.pix  = thispix;
@@ -521,8 +522,12 @@ message *msg;
      m.param.pword[2] = my_ctx.node;
      m.param.pword[3] = my_ctx.program_id;     
      memcpy(&m.int_msg,msg,sizeof(message));
-     send_to_net(&m);
-
+     result = send_to_net(&m);
+     if (result == 0) {
+        /* 2010 local allocation */
+        msg->control.receiver.node == ournode;
+        msginterrupt(msg);         /* call directly interrupt handler */
+     }
     }
 }
 
index fddca6195d25b497c8402ab57d73e7193c328a7e..0449dd42e5fdc1f1cd3ff4fa2a39f00577334c91 100644 (file)
@@ -1,20 +1,23 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 
 INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include 
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt 
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index a1ebed789f155169b91e04a6f655cce3f9043709..08ee51b75331fd786bb83fb379f7d1b021883a71 100644 (file)
@@ -31,7 +31,7 @@
 
 
 #include <qpixmap.h>
-#include <qwindow.h>
+//#include <qwindow.h>
 #include <qapp.h>
 #include <qframe.h>
 #include <qmlined.h>
@@ -59,6 +59,7 @@
 #include <qcombo.h>
 #include <qsocknot.h>
 #include <qdir.h>
+#include <qwindowsstyle.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -160,7 +161,8 @@ public slots:
   void Connect();
   void Info();
 
-
+protected:
+  virtual void closeEvent ( QCloseEvent * e );
 
 private:
   QList<InterpEntry> Interpreters;         
@@ -192,11 +194,15 @@ private:
 };
 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
 
+void QKernel::closeEvent ( QCloseEvent * e ) {
+  e->ignore();
+}
+
 QKernel::QKernel()
 {
- QFont f("Helvetica",12,QFont::Bold);
- QFont f1("Helvetica",12,QFont::Normal);
- QFont f2("Times Roman",12,QFont::Normal);
+ QFont f("Helvetica",10,QFont::Bold);
+ QFont f1("Helvetica",10,QFont::Normal);
+ QFont f2("Times Roman",10,QFont::Normal);
  QDir q(REMOTE_PATH);
  char ss[255];
 
@@ -277,8 +283,7 @@ void QKernel::resizeEvent( QResizeEvent *ev )
 
 void QKernel::n_impl()
 {
- QMessageBox::information(this,"Function info","This function is not implemented
- yet...","Ok");
+ QMessageBox::information(this,"Function info","This function is not implemented yet...","Ok");
 }
 
 
@@ -286,27 +291,32 @@ void QKernel::n_impl()
 
 void QKernel::LoadConfig()
 {
- QFile f("vlp.cfg");
- char line[256],val[255];
+QFile f("vlp.cfg");
+ QString line;
+ QString val;
+ int br=0;
 
  if (!f.exists())
  {
   WriteMessage("Cannot load configuration file!");sleep(2);exit(3);
   }
  f.open(IO_ReadOnly);
- f.readLine(line,256);
- while (!f.atEnd())
br = f.readLine(line,256);
+ while (br>0)
  {
-  if (line[strlen(line)-1]=='\n') line[strlen(line)-1]='\0';
-  strcpy(line,strtok(line,"="));
-  strcpy(val, strtok(NULL,"="));
-  if (strcmp(line,"node_number")==0) {NodeNumber = atoi(val);};
-  if (strcmp(line,"type")==0) {if (strcmp(val,"explicit")==0) ConType=1; else
+  QStringList l = QStringList::split("=",line,FALSE);
+  QStringList::Iterator it = l.begin();
+  line = *it;
+  ++it;
+  val = *it;
+  val = val.stripWhiteSpace();
+  if (line == "node_number") {NodeNumber = val.toInt();};
+  if (line == "type") {if (val=="explicit") ConType=1; else
                                ConType = 2; };
-  if (strcmp(line,"host")==0) {ConnectList.append(new ConnectEntry(val));};
-  if (strcmp(line,"progdir")==0) {strcpy(progdir,val);};
-  if (strcmp(line,"homedir")==0) {strcpy(HomeDir,val);};
-  f.readLine(line,256);
+  if (line == "host" ) {ConnectList.append(new ConnectEntry((char*)val.ascii()));};
+  if (line == "progdir") { strcpy(progdir,val.ascii());};
+  if (line == "homedir") { strcpy(HomeDir,val.ascii());};
+  br = f.readLine(line,256);
  }
  f.close();
 }
@@ -321,7 +331,7 @@ void QKernel::Run_Prog()
  {
     i = s.find(".log");
     if (i>0)  s.remove(i,4);
-    RunIntModule(s.data(),0);
+    RunIntModule((char*)s.ascii(),0);
  }
 }
 
@@ -456,6 +466,7 @@ void QKernel::QuitProc()
 {
  MESSAGE msg;
 
+if ( QMessageBox::question(this,"Close VLP","Terminate VLP ?",QMessageBox::Yes,QMessageBox::No,0) == QMessageBox::No ) return;
 if (!LOCKED)
 {
   /* 
@@ -993,7 +1004,7 @@ void QKernel::LockConsole()
              {
                 QMessageBox msg(this);
                 msg.setText("Not matching!");
-                msg.setButtonText("Close");
+                msg.setButtonText(0,"Close");
                 msg.show();
 
              }   
@@ -1041,7 +1052,7 @@ void QKernel::UnlockConsole()
           {
                 QMessageBox msg(this);
                 msg.setText("Wrong password!");
-                msg.setButtonText("Close");
+                msg.setButtonText(0,"Close");
                 msg.show();
 
              }      
@@ -1297,7 +1308,7 @@ int main( int argc, char **argv )
     for(i=1;i<argc;i++) strcpy(myargs[i-1],argv[i]);
     
     app = new QApplication(argc,argv);
-    app->setStyle(WindowsStyle);
+    app->setStyle(new QWindowsStyle());
     QKernel   draw;
     app->setMainWidget( &draw);
     draw.show();
diff --git a/kernel/kernel.moc b/kernel/kernel.moc
new file mode 100644 (file)
index 0000000..e8c36c1
--- /dev/null
@@ -0,0 +1,153 @@
+/****************************************************************************
+** QKernel meta object code from reading C++ file 'kernel.cpp'
+**
+** Created: Fri Mar 4 12:26:12 2011
+**      by: The Qt MOC ($Id: qt/moc_yacc.cpp   3.3.8   edited Feb 2 14:59 $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.8b. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *QKernel::className() const
+{
+    return "QKernel";
+}
+
+QMetaObject *QKernel::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_QKernel( "QKernel", &QKernel::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString QKernel::tr( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "QKernel", s, c, QApplication::DefaultCodec );
+    else
+       return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString QKernel::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "QKernel", s, c, QApplication::UnicodeUTF8 );
+    else
+       return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* QKernel::staticMetaObject()
+{
+    if ( metaObj )
+       return metaObj;
+    QMetaObject* parentObject = QFrame::staticMetaObject();
+    static const QUMethod slot_0 = {"n_impl", 0, 0 };
+    static const QUMethod slot_1 = {"Run_Prog", 0, 0 };
+    static const QUMethod slot_2 = {"Edit", 0, 0 };
+    static const QUMethod slot_3 = {"Help", 0, 0 };
+    static const QUMethod slot_4 = {"SetOptions", 0, 0 };
+    static const QUMethod slot_5 = {"AddAddress", 0, 0 };
+    static const QUMethod slot_6 = {"DelAddress", 0, 0 };
+    static const QUMethod slot_7 = {"LockConsole", 0, 0 };
+    static const QUMethod slot_8 = {"UnlockConsole", 0, 0 };
+    static const QUMethod slot_9 = {"MessageToNode", 0, 0 };
+    static const QUMethod slot_10 = {"QuitProc", 0, 0 };
+    static const QUMethod slot_11 = {"NetMessage", 0, 0 };
+    static const QUParameter param_slot_12[] = {
+       { 0, &static_QUType_int, 0, QUParameter::In }
+    };
+    static const QUMethod slot_12 = {"IntMessage", 1, param_slot_12 };
+    static const QUMethod slot_13 = {"KillInterpreter", 0, 0 };
+    static const QUMethod slot_14 = {"Disconnect", 0, 0 };
+    static const QUMethod slot_15 = {"SetMessages", 0, 0 };
+    static const QUMethod slot_16 = {"Connect", 0, 0 };
+    static const QUMethod slot_17 = {"Info", 0, 0 };
+    static const QMetaData slot_tbl[] = {
+       { "n_impl()", &slot_0, QMetaData::Public },
+       { "Run_Prog()", &slot_1, QMetaData::Public },
+       { "Edit()", &slot_2, QMetaData::Public },
+       { "Help()", &slot_3, QMetaData::Public },
+       { "SetOptions()", &slot_4, QMetaData::Public },
+       { "AddAddress()", &slot_5, QMetaData::Public },
+       { "DelAddress()", &slot_6, QMetaData::Public },
+       { "LockConsole()", &slot_7, QMetaData::Public },
+       { "UnlockConsole()", &slot_8, QMetaData::Public },
+       { "MessageToNode()", &slot_9, QMetaData::Public },
+       { "QuitProc()", &slot_10, QMetaData::Public },
+       { "NetMessage()", &slot_11, QMetaData::Public },
+       { "IntMessage(int)", &slot_12, QMetaData::Public },
+       { "KillInterpreter()", &slot_13, QMetaData::Public },
+       { "Disconnect()", &slot_14, QMetaData::Public },
+       { "SetMessages()", &slot_15, QMetaData::Public },
+       { "Connect()", &slot_16, QMetaData::Public },
+       { "Info()", &slot_17, QMetaData::Public }
+    };
+    metaObj = QMetaObject::new_metaobject(
+       "QKernel", parentObject,
+       slot_tbl, 18,
+       0, 0,
+#ifndef QT_NO_PROPERTIES
+       0, 0,
+       0, 0,
+#endif // QT_NO_PROPERTIES
+       0, 0 );
+    cleanUp_QKernel.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* QKernel::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "QKernel" ) )
+       return this;
+    return QFrame::qt_cast( clname );
+}
+
+bool QKernel::qt_invoke( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->slotOffset() ) {
+    case 0: n_impl(); break;
+    case 1: Run_Prog(); break;
+    case 2: Edit(); break;
+    case 3: Help(); break;
+    case 4: SetOptions(); break;
+    case 5: AddAddress(); break;
+    case 6: DelAddress(); break;
+    case 7: LockConsole(); break;
+    case 8: UnlockConsole(); break;
+    case 9: MessageToNode(); break;
+    case 10: QuitProc(); break;
+    case 11: NetMessage(); break;
+    case 12: IntMessage((int)static_QUType_int.get(_o+1)); break;
+    case 13: KillInterpreter(); break;
+    case 14: Disconnect(); break;
+    case 15: SetMessages(); break;
+    case 16: Connect(); break;
+    case 17: Info(); break;
+    default:
+       return QFrame::qt_invoke( _id, _o );
+    }
+    return TRUE;
+}
+
+bool QKernel::qt_emit( int _id, QUObject* _o )
+{
+    return QFrame::qt_emit(_id,_o);
+}
+#ifndef QT_NO_PROPERTIES
+
+bool QKernel::qt_property( int id, int f, QVariant* v)
+{
+    return QFrame::qt_property( id, f, v);
+}
+
+bool QKernel::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
diff --git a/kernel/logker b/kernel/logker
new file mode 100755 (executable)
index 0000000..3111de1
Binary files /dev/null and b/kernel/logker differ
index 8ad1f7f26545dad35c60ce6520d7669044f11541..ca28c36ec00cf2224e9a59daed40a0fa5942ba92 100644 (file)
@@ -3,7 +3,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include 
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt 
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index 7e43db5acbdd562dfa149fab20aff4e72bb13d29..63512948e260d462019ecd25a57c442b9214c4ea 100644 (file)
@@ -1,21 +1,24 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 ##### Change INCDIR, LFLAGS and MOC
 
 INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
diff --git a/lgconfig/lgconfig b/lgconfig/lgconfig
new file mode 100755 (executable)
index 0000000..7dea810
Binary files /dev/null and b/lgconfig/lgconfig differ
index 5f75fa7a79cc1ecc2e32a0d9be2c6ba0eae085b2..4d599dc22f7e2bcc51cd7d4fa4ca912e0744b974 100644 (file)
@@ -243,7 +243,7 @@ void QInstall::SetOptions()
   int i,j;
   char pomstr[255],line[255];
        
-        dlg.setStyle(WindowsStyle);
+        //dlg.setStyle(WindowsStyle);
        nodelist = new QListBox( &dlg, "ListBox_1" );
        nodelist->setGeometry( 20, 40, 480, 160 );
 
@@ -316,7 +316,7 @@ int main( int argc, char **argv )
 
     app = new QApplication(argc,argv);
     QInstall cfg;
-    app->setStyle(WindowsStyle);
+    //app->setStyle(WindowsStyle);
     app->setMainWidget(&cfg);
     cfg.show();
     return app->exec();
diff --git a/lgconfig/lgconfig.moc b/lgconfig/lgconfig.moc
new file mode 100644 (file)
index 0000000..7aedd72
--- /dev/null
@@ -0,0 +1,108 @@
+/****************************************************************************
+** QInstall meta object code from reading C++ file 'lgconfig.cpp'
+**
+** Created: Fri Mar 4 12:26:18 2011
+**      by: The Qt MOC ($Id: qt/moc_yacc.cpp   3.3.8   edited Feb 2 14:59 $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.8b. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *QInstall::className() const
+{
+    return "QInstall";
+}
+
+QMetaObject *QInstall::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_QInstall( "QInstall", &QInstall::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString QInstall::tr( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "QInstall", s, c, QApplication::DefaultCodec );
+    else
+       return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString QInstall::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "QInstall", s, c, QApplication::UnicodeUTF8 );
+    else
+       return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* QInstall::staticMetaObject()
+{
+    if ( metaObj )
+       return metaObj;
+    QMetaObject* parentObject = QFrame::staticMetaObject();
+    static const QUMethod slot_0 = {"SetOptions", 0, 0 };
+    static const QUMethod slot_1 = {"AddNode", 0, 0 };
+    static const QUMethod slot_2 = {"DelNode", 0, 0 };
+    static const QUMethod slot_3 = {"Info", 0, 0 };
+    static const QMetaData slot_tbl[] = {
+       { "SetOptions()", &slot_0, QMetaData::Public },
+       { "AddNode()", &slot_1, QMetaData::Public },
+       { "DelNode()", &slot_2, QMetaData::Public },
+       { "Info()", &slot_3, QMetaData::Public }
+    };
+    metaObj = QMetaObject::new_metaobject(
+       "QInstall", parentObject,
+       slot_tbl, 4,
+       0, 0,
+#ifndef QT_NO_PROPERTIES
+       0, 0,
+       0, 0,
+#endif // QT_NO_PROPERTIES
+       0, 0 );
+    cleanUp_QInstall.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* QInstall::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "QInstall" ) )
+       return this;
+    return QFrame::qt_cast( clname );
+}
+
+bool QInstall::qt_invoke( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->slotOffset() ) {
+    case 0: SetOptions(); break;
+    case 1: AddNode(); break;
+    case 2: DelNode(); break;
+    case 3: Info(); break;
+    default:
+       return QFrame::qt_invoke( _id, _o );
+    }
+    return TRUE;
+}
+
+bool QInstall::qt_emit( int _id, QUObject* _o )
+{
+    return QFrame::qt_emit(_id,_o);
+}
+#ifndef QT_NO_PROPERTIES
+
+bool QInstall::qt_property( int id, int f, QVariant* v)
+{
+    return QFrame::qt_property( id, f, v);
+}
+
+bool QInstall::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
index d6289a9554660446dca672061c0a5c604e5765f4..4fe3660bb942aea90d50d2b76b4409d3786bb69a 100644 (file)
@@ -4,7 +4,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index 5c27ece61c7f7a47e5414ef37f91665a38582f75..1e5f14089108dff7f0f943309c6327b34124b7d9 100644 (file)
@@ -1,20 +1,23 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 
 INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt 
+LFLAGS = -L$(QLIB) $(QLINK) 
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
diff --git a/net/lognet b/net/lognet
new file mode 100755 (executable)
index 0000000..fc6104e
Binary files /dev/null and b/net/lognet differ
index 2fd8348c350a65c88c051fad1288484ae5fea9f9..decd822abfb2ddcb652ccafe82a6509035e35f06 100644 (file)
@@ -17,6 +17,9 @@
 #include <sys/stat.h>
 #include <string.h>
 #include <qlist.h>
+#include <qfile.h>
+#include <qstring.h>
+#include <qstringlist.h>
 #include <unistd.h>
 
 #define REMOTE_PATH "REMOTE"
@@ -120,6 +123,8 @@ public:
  void check_links();
  void get_message(NETlink*);
  void conn_info(int);
+
+ void doitall(); // 2010
 };
 
 
@@ -178,53 +183,44 @@ NETMOD::NETMOD(char *kernel_name)
 
 void NETMOD::load_config(char *fname)
 {
- FILE *f;
- char line1[80],*line2;
- int k=0,on;
+ QFile f(fname);
+ QString line;
+ QString val;
+ int br=0,on,k=0;
  NETlink *pomlink;
 
- f = fopen(fname,"r");
- if (f!=NULL)
+ if (!f.exists())
  {
- while (!feof(f))
-{
-   fscanf(f,"%s\n",line1);
-   line2 = strtok(line1,"=");
-   if (line2==NULL) { write_at_console("Bad config file\n");exit(1);}
-   
-   if (strcmp(line2,"node_number")==0)
-    {
-      line2 = strtok(NULL,"=");
-      MyNode = atoi(line2);
-    }
-   else
-   if (strcmp(line2,"host")==0)
-   {
-     line2 = strtok(NULL,"=");if (line2==NULL) {exit(1);}
-     k++;  
+  write_at_console("Cannot load configuration file!");sleep(2);exit(3);
+ }
+ f.open(IO_ReadOnly);
+ br = f.readLine(line,256);
+ while (br>0)
+ {
+  QStringList l = QStringList::split("=",line,FALSE);
+  QStringList::Iterator it = l.begin();
+  line = *it;
+  ++it;
+  val = *it;
+  val = val.stripWhiteSpace();
+  if (line == "node_number") {MyNode = val.toInt();};
+  if (line == "host" ) {
+     k++;
      pomlink = new NETlink;
-     strcpy(pomlink->addr,line2);
+     strcpy(pomlink->addr,val.ascii());
      pomlink->connected = FALSE;
      pomlink->sock = socket(AF_INET, SOCK_STREAM, 0); 
-     fcntl(pomlink->sock, F_SETFL,O_NONBLOCK | fcntl(pomlink->sock, 
-           F_GETFL,0));
+     fcntl(pomlink->sock, F_SETFL,O_NONBLOCK | fcntl(pomlink->sock,F_GETFL,0));
      on=1; 
      setsockopt(pomlink->sock,IPPROTO_TCP,TCP_NODELAY,(char*)&on,sizeof(on)); 
      Links.append(pomlink); 
-     to_connect++;      
-   
-   }
-    else
-   if (strcmp(line2,"type")==0)
-    {
-     } 
-     
- } /* feof */
-
-  fclose(f);
-  if (k==0) all_connected=TRUE;
+     to_connect++;     
+  };
+  br = f.readLine(line,256);
  }
-  if (MyNode==-1) {write_at_console("Node number must be specified");exit(1);};
+ f.close();
+ if (k==0) all_connected=TRUE;
+ if (MyNode==-1) {write_at_console("Node number must be specified");exit(1);};
 }
 
 
@@ -316,7 +312,9 @@ void NETMOD::check_node(int n, int sc)
  {
   if ( pomlink->node_number==n )
    {
-     m.param.pword[1] = 1;break;
+     m.param.pword[1] = 1;
+     strcpy(m.param.pstr,pomlink->addr);
+     break;
    }
   pomlink = Links.next();
  }
@@ -465,6 +463,7 @@ if (lnk->connected)
         switch(msg.param.pword[0])
         {
          case NET_CCD_START:
+                    
                      lnk->code_transmit = TRUE;
                      sprintf(pomstr,"%s/%s",REMOTE_PATH,msg.param.pstr);
                      strcat(pomstr,".ccd");
@@ -491,9 +490,11 @@ if (lnk->connected)
                        close(psock);
                        fclose(lnk->CodeFile);
                       }
+                     
                      break;
 
          case NET_PCD_START:
+                     
                      lnk->code_transmit = TRUE;
                      sprintf(pomstr,"%s/%s",REMOTE_PATH,msg.param.pstr);
                      strcat(pomstr,".pcd");
@@ -520,9 +521,11 @@ if (lnk->connected)
                        close(psock);
                        fclose(lnk->CodeFile);
                       }
+                     
                      break;
 
          case NET_CONNECT:
+                     
                      sprintf(pomstr,"Node: %d Addr: %s",msg.param.pword[1],
                      lnk->addr);
                      lnk->node_number = msg.param.pword[1];
@@ -530,12 +533,14 @@ if (lnk->connected)
                      send_accept_info(lnk);
                      break;
          case NET_ACCEPT:
+                    
                     sprintf(pomstr,"Node: %d Addr: %s",msg.param.pword[1],
                     lnk->addr);
                     lnk->node_number = msg.param.pword[1];
                     write_at_console(pomstr);
                     break;
          case NET_DISCONNECT:
+                   
                     sprintf(pomstr,"Node: %d disconnected",msg.param.pword[1]);
                     write_at_console(pomstr);
                     ::close(lnk->sock);
@@ -543,6 +548,7 @@ if (lnk->connected)
                     delete(lnk);
                     break; 
          case NET_PROPAGATE:
+              
                if (msg.param.pword[1] == MSG_VLP) send_to_kernel(&msg);
                else if (msg.param.pword[1] == MSG_INT) send_to_int(&msg);
                break;            
@@ -590,6 +596,166 @@ void NETMOD::remote_messages()
 
 }
 
+
+/******************************    2010 ********************************************/
+void NETMOD::doitall() {
+ unsigned int sz;
+ int nsock,max=0,on, nr, si, sj;
+ struct sockaddr_in svr;
+ fd_set rset;
+ NETlink *pomlink;
+ INTlink *pomlink2;
+ struct sockaddr_un svr2;
+ MESSAGE msg;
+
+
+ FD_ZERO(&rset);
+ FD_SET(listen_sock,&rset);
+ max = listen_sock;
+ FD_SET(kernel_sock,&rset);
+ if (max<kernel_sock) { max=kernel_sock;}
+ pomlink2 = Interpreters.first();
+ while (pomlink2!=NULL)
+ {
+  FD_SET(pomlink2->sock,&rset);
+  if (max<pomlink2->sock) max=pomlink2->sock;
+  pomlink2=Interpreters.next();
+ }
+ pomlink = Links.first();
+ while (pomlink!=NULL)
+ {
+  if (pomlink->connected)
+  {
+    FD_SET(pomlink->sock,&rset);
+    if  (max<pomlink->sock) max=pomlink->sock;
+  }
+  pomlink=Links.next();
+ }
+  
+ // odczyt
+ if (select(max+1,&rset,0,0,NULL) > 0) {
+    // accept connection
+       if (FD_ISSET(listen_sock,&rset))
+        {
+          /* accept connection on listen socket */
+          sz = sizeof(svr);
+          bzero(&svr, sizeof(svr));
+          nsock = accept(listen_sock, (struct sockaddr*)&svr, &sz);   
+          if (nsock>0)
+          {   
+            pomlink = new NETlink;
+            strcpy(pomlink->addr,inet_ntoa(svr.sin_addr));
+            pomlink->sock = nsock;
+            pomlink->connected = TRUE;
+            fcntl(pomlink->sock, F_SETFL,O_NONBLOCK | fcntl(pomlink->sock,F_GETFL,0));
+            on=1;
+            setsockopt(pomlink->sock,IPPROTO_TCP,TCP_NODELAY,(char*)&on,sizeof(on));
+            Links.append(pomlink);
+           } /* nsock > 0 */
+        } /* ISSET */ 
+
+    // get internal message
+       /* Check request sockets */
+       pomlink2 = Interpreters.first();
+       while (pomlink2!=NULL)
+       {
+         if (FD_ISSET(pomlink2->sock,&rset))
+         {
+           nr = read(pomlink2->sock,&msg,sizeof(MESSAGE));
+           if (nr>0)
+           {
+             if (msg.msg_type == MSG_NET)
+               switch(msg.param.pword[0])
+               {
+                 case NET_PROPAGATE:propagate_msg(&msg); break;
+                 case NET_NODE_EXIST:check_node(msg.param.pword[1],pomlink2->sock);break;
+                 case NET_GET_INFO: conn_info(pomlink2->sock);break;
+                 case NET_NODES_NUM: msg.param.pword[0]=NET_NODES_NUM_RESPONSE;
+                                     msg.param.pword[1]=Links.count();
+                                     write(pomlink2->sock,&msg,sizeof(MESSAGE));
+                                     break; 
+               }/* switch */
+           }
+         } /* ISSET */
+         pomlink2=Interpreters.next();
+       } // while
+       /* Check internal socket */
+       if (FD_ISSET(kernel_sock,&rset))
+       {
+          nr = read(kernel_sock, &msg, sizeof(MESSAGE));
+          if (nr>0)
+          {
+            if (msg.msg_type == MSG_NET)
+            {
+              switch(msg.param.pword[0])
+              { 
+                 case NET_TRANSMIT_CODE:
+                 
+                 transmit_file(msg.param.pword[2],msg.param.pstr,msg.param.pword[1]);  
+                 
+                 break;
+                 case NET_EXIT: {  disconnect_seq();exit_sequence();}
+                 break;
+                 case NET_GET_INFO: conn_info(kernel_sock);break;                          
+                 case NET_PROPAGATE:propagate_msg(&msg);break;
+                 case NET_DISCONNECT:disconnect_seq();
+                   break;            
+                 case NET_NODE_EXIST: check_node(msg.param.pword[1],kernel_sock);break;
+                 case NET_CONNECT_TO: connect_seq(msg.param.pstr);
+              } /* end switch */
+            } /* MSG_NET */
+            if (msg.msg_type == MSG_VLP)
+              switch(msg.param.pword[0])
+              {
+                 case VLP_REGINT:
+                 {
+                    
+                    pomlink2 = new INTlink;
+                    pomlink2->sock = socket(AF_UNIX,SOCK_STREAM,0);
+                    bzero(&svr2,sizeof(svr2));
+                    svr2.sun_family = AF_UNIX;
+                    strcpy(svr2.sun_path,msg.param.pstr);
+                    si = strlen(svr2.sun_path)+sizeof(svr2.sun_family);
+                    sj = connect(pomlink2->sock,(struct sockaddr*)&svr2,si);
+                    if (sj==0)
+                      fcntl(pomlink2->sock,F_SETFL, O_NONBLOCK|fcntl(pomlink2->sock,F_GETFL,0));
+                    int on=1;
+                    setsockopt(pomlink2->sock,IPPROTO_TCP,TCP_NODELAY,(char*)&on,sizeof(on));
+                    pomlink2->ID = msg.param.pword[1];
+                    pomlink2->connected=TRUE;
+                    Interpreters.append(pomlink2);
+                    
+                 };break;
+                 case VLP_INTERPRETER_DOWN:
+                 { 
+                   
+                   pomlink2 = findINTlink(msg.param.pword[1]);
+                   if (pomlink2!=NULL)
+                   {
+                     close(pomlink2->sock);
+                     Interpreters.remove(pomlink2);
+                   } 
+                 };break;                       
+              } /* MSg_VLP */
+           } // nr > 0
+       }/* ISSET */
+
+    // get remote message
+
+    pomlink=Links.first();
+    while (pomlink!=NULL)
+    {
+      if (FD_ISSET(pomlink->sock,&rset)) get_message(pomlink);
+      pomlink=Links.next();
+    }
+ } // select 
+
+
+}
+/******************************    END 2010 ********************************************/
+
+
+
 void NETMOD::propagate_msg(MESSAGE *msg)
 {
  char ss[255];
@@ -760,9 +926,11 @@ void NETMOD::run()
 {
   while(1)
  {
-  accept_connection();
+  /*accept_connection();
   get_internal();
-  remote_messages(); 
+  remote_messages(); */
+  // 2010
+  doitall();
  }
 }
 
diff --git a/net/lognet.moc b/net/lognet.moc
new file mode 100644 (file)
index 0000000..e69de29
index 715aa6d19894b318d237e6e50c3ba55d48fe6144..9bd4af015856c9c20d75fde4b3d7fb3da40d2566 100644 (file)
--- a/net/mfile
+++ b/net/mfile
@@ -3,7 +3,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt 
+LFLAGS = -L$(QLIB) $(QLINK) 
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index bd5621b36f27621bb37987d52c062a769f6d6c66..5e580c988e545b867c07730269af0a411106703a 100644 (file)
@@ -1,20 +1,23 @@
 ###   Includes for QT library
-QINC=/usr/lib/qt-1.45/include
+QINC=/usr/include/qt3
 
 ###   QT library directory
-QLIB=/usr/lib/qt-1.45/lib
+QLIB=/usr/lib3/
 
 ###   moc compiler directory
-MOCDIR=/usr/lib/qt-1.45/bin
+MOCDIR=/usr/bin
 
 ###  Install directory
-INSTALLDIR=/usr/local/vlp
+INSTALLDIR=/home/andrzej/vlp3binD
+
+###  QT Library linking phrase
+QLINK=-lqt-mt
 
 INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
diff --git a/preproc/logcomp b/preproc/logcomp
new file mode 100755 (executable)
index 0000000..f56b62e
Binary files /dev/null and b/preproc/logcomp differ
index c8bc68c2540f9a5311ec1c2d146c400112226ee1..bfeac091a2d8ea204247df44febbe4d16f6e1655 100644 (file)
@@ -3,7 +3,7 @@ INCDIR = $(QINC)
 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
 LIBCFLAGS = -fPIC
 YACCCFLAGS = -Wno-unused -Wno-parentheses
-LFLAGS = -L$(QLIB) -lqt
+LFLAGS = -L$(QLIB) $(QLINK)
 CC = g++
 MOC = $(MOCDIR)/moc
 SHELL =        /bin/sh
index c362103312668754e25d3a7a90bb87bbd1d32748..440576841782f67938db12fc31ddf31898070bc2 100644 (file)
@@ -124,7 +124,7 @@ int main(int argc,char **argv)
         {
          IncFile *p;
          poms1=poms.mid(i+1,j-i-1);
-         p=new IncFile(poms1.data(),currentline);
+         p=new IncFile((char*)poms1.ascii(),currentline);
          poms2.sprintf("%s%s",homedir,poms1.data());
          QFile pomf(poms2.data());
          if (!pomf.open(IO_ReadOnly))
diff --git a/preproc/prep.moc b/preproc/prep.moc
new file mode 100644 (file)
index 0000000..e69de29