diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
| commit | 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 (patch) | |
| tree | 631c295a4a4a16b57502b847626763a279bf6df7 /ychat-0.5.0/cmnd | |
| parent | 13aaf70af703748fe096e0664c305cd202637ad2 (diff) | |
tagging tags
Diffstat (limited to 'ychat-0.5.0/cmnd')
| -rw-r--r-- | ychat-0.5.0/cmnd/CVS/Entries | 5 | ||||
| -rw-r--r-- | ychat-0.5.0/cmnd/CVS/Repository | 1 | ||||
| -rw-r--r-- | ychat-0.5.0/cmnd/CVS/Root | 1 | ||||
| -rwxr-xr-x | ychat-0.5.0/cmnd/compile.sh | 9 | ||||
| -rw-r--r-- | ychat-0.5.0/cmnd/yc_q.cpp | 21 | ||||
| -rw-r--r-- | ychat-0.5.0/cmnd/yc_test.cpp | 12 | ||||
| -rw-r--r-- | ychat-0.5.0/cmnd/yc_version.cpp | 20 |
7 files changed, 69 insertions, 0 deletions
diff --git a/ychat-0.5.0/cmnd/CVS/Entries b/ychat-0.5.0/cmnd/CVS/Entries new file mode 100644 index 0000000..a44a45c --- /dev/null +++ b/ychat-0.5.0/cmnd/CVS/Entries @@ -0,0 +1,5 @@ +/compile.sh/1.1/Sun Sep 14 14:31:49 2003// +/yc_q.cpp/1.2/Wed Apr 2 21:57:34 2003// +/yc_test.cpp/1.1/Wed Apr 2 10:52:16 2003// +/yc_version.cpp/1.1/Sun Sep 14 14:55:57 2003// +D diff --git a/ychat-0.5.0/cmnd/CVS/Repository b/ychat-0.5.0/cmnd/CVS/Repository new file mode 100644 index 0000000..d7cf3ae --- /dev/null +++ b/ychat-0.5.0/cmnd/CVS/Repository @@ -0,0 +1 @@ +ychat/cmnd diff --git a/ychat-0.5.0/cmnd/CVS/Root b/ychat-0.5.0/cmnd/CVS/Root new file mode 100644 index 0000000..a82e29e --- /dev/null +++ b/ychat-0.5.0/cmnd/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@cvs.ychat.berlios.de:/cvsroot/ychat diff --git a/ychat-0.5.0/cmnd/compile.sh b/ychat-0.5.0/cmnd/compile.sh new file mode 100755 index 0000000..cee438c --- /dev/null +++ b/ychat-0.5.0/cmnd/compile.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +rm *.so 2> /dev/null + +for i in *cpp +do + echo Compiling $i + gcc -shared -o $(echo $i | sed s/cpp$/so/) $i +done diff --git a/ychat-0.5.0/cmnd/yc_q.cpp b/ychat-0.5.0/cmnd/yc_q.cpp new file mode 100644 index 0000000..acc8596 --- /dev/null +++ b/ychat-0.5.0/cmnd/yc_q.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include "../user.h" + +/* + gcc -shared -o yc_name.so yc_name.cpp +*/ + +using namespace std; + + +extern "C" { + export int extern_function(void *v_arg); + + int extern_function(void *v_arg) + { + user *p_user = (user*) v_arg; + p_user->msg_post( new string( "<script language='JavaScript'> window.open( 'index.html', '_top' ); </script>\n " ) ); + p_user->set_online( false ); + } +} + diff --git a/ychat-0.5.0/cmnd/yc_test.cpp b/ychat-0.5.0/cmnd/yc_test.cpp new file mode 100644 index 0000000..deb3e54 --- /dev/null +++ b/ychat-0.5.0/cmnd/yc_test.cpp @@ -0,0 +1,12 @@ +#include <iostream> + +using namespace std; + +extern "C" { + export int function(void *v_arg); + + int function(void *v_arg) + { + cout << "Hallo " << (char*)v_arg << endl; + } +} diff --git a/ychat-0.5.0/cmnd/yc_version.cpp b/ychat-0.5.0/cmnd/yc_version.cpp new file mode 100644 index 0000000..5e686b7 --- /dev/null +++ b/ychat-0.5.0/cmnd/yc_version.cpp @@ -0,0 +1,20 @@ +#include <iostream> +#include "../msgs.h" +#include "../user.h" +/* + gcc -shared -o yc_name.so yc_name.cpp +*/ + +using namespace std; + +extern "C" { + export int extern_function(void *v_arg); + int valid_color( string ); + + int extern_function(void *v_arg) + { + user *p_user = (user*) v_arg; + p_user->msg_post( new string( *new string(VERSION) + "<br>\n") ); + } +} + |
