|
From: <cli...@li...> - 2007-05-21 21:21:59
|
Revision: 60
http://cligg.svn.sourceforge.net/cligg/?rev=60&view=rev
Author: sithhell
Date: 2007-05-21 14:21:57 -0700 (Mon, 21 May 2007)
Log Message:
-----------
some changes
Modified Paths:
--------------
TODO
src/bin/cligg.c
src/bin/cligg_mainloop.c
src/lib/cligg_list.c
src/modules/print/print.c
src/modules/read/read.c
Removed Paths:
-------------
src/modules/print/CMakeFiles/
src/modules/print/Makefile
src/modules/print/cmake_install.cmake
src/modules/print/print.so
src/modules/read/CMakeFiles/
src/modules/read/Makefile
src/modules/read/cmake_install.cmake
src/modules/read/read.so
Modified: TODO
===================================================================
--- TODO 2007-05-21 20:52:04 UTC (rev 59)
+++ TODO 2007-05-21 21:21:57 UTC (rev 60)
@@ -2,6 +2,8 @@
important stuff to do:
* setting up a basic framework
- The Binary search tree needs some balancing
+ - memory leak on exit should get some fixes (seen with valkyrie)
+ - Build a config system
- for further stuff, look at the source code, and contact us: http://cligg.sourceforge.net/de/devel.html
http://cligg.sourceforge.net/en/devel.html
* Modules
Modified: src/bin/cligg.c
===================================================================
--- src/bin/cligg.c 2007-05-21 20:52:04 UTC (rev 59)
+++ src/bin/cligg.c 2007-05-21 21:21:57 UTC (rev 60)
@@ -60,9 +60,11 @@
fprintf(stderr, "Error loading module\n");
cligg_trigger_event("load_module", "test");
- cligg_trigger_event("load_module", "/home/mo/cligg/src/modules/dummy/dummy.so");
- cligg_trigger_event("load_module", "/home/mo/cligg/src/modules/read/read.so");
- cligg_trigger_event("quit_cligg", NULL);
+ cligg_trigger_event("load_module", "/home/heller/projekte/cligg/src/modules/dummy/dummy.so");
+ cligg_trigger_event("load_module", "/home/heller/projekte/cligg/src/modules/print/print.so");
+ cligg_trigger_event("load_module", "/home/heller/projekte/cligg/src/modules/read/read.so");
+ cligg_trigger_event("read", NULL);
+ cligg_trigger_event("quit_cligg", NULL);
/* TODO load the config */
@@ -74,18 +76,17 @@
/* starting the event loop */
cligg_main_begin();
/* MAGIC!! */
- return quit_cligg(NULL);
+ cligg_main_end();
+ return EXIT_SUCCESS;
}
static int quit_cligg(void *data)
{
- int ret;
- ret = cligg_main_end();
/* Clean up */
cligg_delete_handler();
cligg_del_modulehandler();
fprintf(stderr, "Good Bye!\n");
- exit(ret);
+ exit(EXIT_SUCCESS);
}
Modified: src/bin/cligg_mainloop.c
===================================================================
--- src/bin/cligg_mainloop.c 2007-05-21 20:52:04 UTC (rev 59)
+++ src/bin/cligg_mainloop.c 2007-05-21 21:21:57 UTC (rev 60)
@@ -52,7 +52,7 @@
new = cligg_waiton_event();
if(new == NULL)
return (void *)EXIT_FAILURE;
-
+ printf("%s\n", new->name);
cb = cligg_lookup_event(new->name);
free(new->name);
Modified: src/lib/cligg_list.c
===================================================================
--- src/lib/cligg_list.c 2007-05-21 20:52:04 UTC (rev 59)
+++ src/lib/cligg_list.c 2007-05-21 21:21:57 UTC (rev 60)
@@ -39,7 +39,7 @@
cligg_list_element *old;
cligg_list_element *next;
- if(!list) {
+ if(list == NULL) {
return;
}
Deleted: src/modules/print/Makefile
===================================================================
--- src/modules/print/Makefile 2007-05-21 20:52:04 UTC (rev 59)
+++ src/modules/print/Makefile 2007-05-21 21:21:57 UTC (rev 60)
@@ -1,135 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.4
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# A target that is always out of date.
-cmake_force:
-
-#=============================================================================
-# Set environment variables for the build.
-
-# The shell in which to execute make rules.
-SHELL = /bin/sh
-
-# The CMake executable.
-CMAKE_COMMAND = /usr/bin/cmake
-
-# The command to remove a file.
-RM = /usr/bin/cmake -E remove -f
-
-# The program to use to edit the cache.
-CMAKE_EDIT_COMMAND = /usr/bin/ccmake
-
-# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /home/mo/cligg
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/mo/cligg
-
-# Include the progress variables for this target.
-include CMakeFiles/progress.make
-
-#=============================================================================
-# Targets provided globally by CMake.
-
-# Special rule for the target edit_cache
-edit_cache:
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
- cd /home/mo/cligg/src/modules/print && /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule for the target edit_cache
-edit_cache/fast: edit_cache
-
-# Special rule for the target rebuild_cache
-rebuild_cache:
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
- cd /home/mo/cligg/src/modules/print && /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule for the target rebuild_cache
-rebuild_cache/fast: rebuild_cache
-
-# The main all target
-all: cmake_check_build_system
- cd /home/mo/cligg && $(CMAKE_COMMAND) -E cmake_progress_start /home/mo/cligg/CMakeFiles $(CMAKE_ALL_PROGRESS)
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/print/all
- $(CMAKE_COMMAND) -E cmake_progress_start /home/mo/cligg/CMakeFiles 0
-
-# The main clean target
-clean:
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/print/clean
-
-# The main clean target
-clean/fast: clean
-
-# Prepare targets for installation.
-preinstall: all
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/print/preinstall
-
-# Prepare targets for installation.
-preinstall/fast:
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/print/preinstall
-
-# clear depends
-depend:
- $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# Convenience name for target.
-src/modules/print/CMakeFiles/print.dir/rule:
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/print/CMakeFiles/print.dir/rule
-
-# Convenience name for target.
-print: src/modules/print/CMakeFiles/print.dir/rule
-
-# fast build rule for target.
-print/fast:
- cd /home/mo/cligg && $(MAKE) -f src/modules/print/CMakeFiles/print.dir/build.make src/modules/print/CMakeFiles/print.dir/build
-
-# target to build an object file
-print.o:
- cd /home/mo/cligg && $(MAKE) -f src/modules/print/CMakeFiles/print.dir/build.make src/modules/print/CMakeFiles/print.dir/print.o
-
-# target to preprocess a source file
-print.i:
- cd /home/mo/cligg && $(MAKE) -f src/modules/print/CMakeFiles/print.dir/build.make src/modules/print/CMakeFiles/print.dir/print.i
-
-# target to generate assembly for a file
-print.s:
- cd /home/mo/cligg && $(MAKE) -f src/modules/print/CMakeFiles/print.dir/build.make src/modules/print/CMakeFiles/print.dir/print.s
-
-# Help Target
-help::
- @echo "The following are some of the valid targets for this Makefile:"
- @echo "... all (the default if no target is provided)"
- @echo "... clean"
- @echo "... depend"
- @echo "... edit_cache"
- @echo "... print"
- @echo "... rebuild_cache"
- @echo "... print.o"
- @echo "... print.i"
- @echo "... print.s"
-
-
-
-#=============================================================================
-# Special targets to cleanup operation of make.
-
-# Special rule to run CMake to check the build system integrity.
-# No rule that depends on this can have commands that come from listfiles
-# because they might be regenerated.
-cmake_check_build_system:
- cd /home/mo/cligg && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Deleted: src/modules/print/cmake_install.cmake
===================================================================
--- src/modules/print/cmake_install.cmake 2007-05-21 20:52:04 UTC (rev 59)
+++ src/modules/print/cmake_install.cmake 2007-05-21 21:21:57 UTC (rev 60)
@@ -1,29 +0,0 @@
-# Install script for directory: /home/mo/cligg/src/modules/print
-
-# Set the install prefix
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
- SET(CMAKE_INSTALL_PREFIX "/usr/local")
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-IF(NOT CMAKE_INSTALL_CONFIG_NAME)
- IF(BUILD_TYPE)
- STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
- CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
- ELSE(BUILD_TYPE)
- SET(CMAKE_INSTALL_CONFIG_NAME "")
- ENDIF(BUILD_TYPE)
- MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-ENDIF(NOT CMAKE_INSTALL_CONFIG_NAME)
-
-# Set the component getting installed.
-IF(NOT CMAKE_INSTALL_COMPONENT)
- IF(COMPONENT)
- MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
- SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
- ELSE(COMPONENT)
- SET(CMAKE_INSTALL_COMPONENT)
- ENDIF(COMPONENT)
-ENDIF(NOT CMAKE_INSTALL_COMPONENT)
-
Modified: src/modules/print/print.c
===================================================================
--- src/modules/print/print.c 2007-05-21 20:52:04 UTC (rev 59)
+++ src/modules/print/print.c 2007-05-21 21:21:57 UTC (rev 60)
@@ -2,7 +2,7 @@
#include <cligg_module.h>
#include <cligg_eventhandler.h>
-static int print(void *);
+int print(void *);
cligg_module_init print_init(void)
{
@@ -10,9 +10,12 @@
cligg_register_event("print",print);
}
-static int print(void *data)
+int print(void *data)
{
- return printf("out: %s\n",(char *)data);
+ fprintf(stderr,"test\n");
+ printf("out: %s\n",(char *)data);
+ fflush(stdin);
+ return TRUE;
}
cligg_module_finit print_finit(void)
Deleted: src/modules/print/print.so
===================================================================
(Binary files differ)
Deleted: src/modules/read/Makefile
===================================================================
--- src/modules/read/Makefile 2007-05-21 20:52:04 UTC (rev 59)
+++ src/modules/read/Makefile 2007-05-21 21:21:57 UTC (rev 60)
@@ -1,135 +0,0 @@
-# CMAKE generated file: DO NOT EDIT!
-# Generated by "Unix Makefiles" Generator, CMake Version 2.4
-
-# Default target executed when no arguments are given to make.
-default_target: all
-
-#=============================================================================
-# Special targets provided by cmake.
-
-# Disable implicit rules so canoncical targets will work.
-.SUFFIXES:
-
-.SUFFIXES: .hpux_make_needs_suffix_list
-
-# Suppress display of executed commands.
-$(VERBOSE).SILENT:
-
-# A target that is always out of date.
-cmake_force:
-
-#=============================================================================
-# Set environment variables for the build.
-
-# The shell in which to execute make rules.
-SHELL = /bin/sh
-
-# The CMake executable.
-CMAKE_COMMAND = /usr/bin/cmake
-
-# The command to remove a file.
-RM = /usr/bin/cmake -E remove -f
-
-# The program to use to edit the cache.
-CMAKE_EDIT_COMMAND = /usr/bin/ccmake
-
-# The top-level source directory on which CMake was run.
-CMAKE_SOURCE_DIR = /home/mo/cligg
-
-# The top-level build directory on which CMake was run.
-CMAKE_BINARY_DIR = /home/mo/cligg
-
-# Include the progress variables for this target.
-include CMakeFiles/progress.make
-
-#=============================================================================
-# Targets provided globally by CMake.
-
-# Special rule for the target edit_cache
-edit_cache:
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
- cd /home/mo/cligg/src/modules/read && /usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule for the target edit_cache
-edit_cache/fast: edit_cache
-
-# Special rule for the target rebuild_cache
-rebuild_cache:
- @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
- cd /home/mo/cligg/src/modules/read && /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
-
-# Special rule for the target rebuild_cache
-rebuild_cache/fast: rebuild_cache
-
-# The main all target
-all: cmake_check_build_system
- cd /home/mo/cligg && $(CMAKE_COMMAND) -E cmake_progress_start /home/mo/cligg/CMakeFiles $(CMAKE_ALL_PROGRESS)
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/read/all
- $(CMAKE_COMMAND) -E cmake_progress_start /home/mo/cligg/CMakeFiles 0
-
-# The main clean target
-clean:
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/read/clean
-
-# The main clean target
-clean/fast: clean
-
-# Prepare targets for installation.
-preinstall: all
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/read/preinstall
-
-# Prepare targets for installation.
-preinstall/fast:
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/read/preinstall
-
-# clear depends
-depend:
- $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
-
-# Convenience name for target.
-src/modules/read/CMakeFiles/read.dir/rule:
- cd /home/mo/cligg && $(MAKE) -f CMakeFiles/Makefile2 src/modules/read/CMakeFiles/read.dir/rule
-
-# Convenience name for target.
-read: src/modules/read/CMakeFiles/read.dir/rule
-
-# fast build rule for target.
-read/fast:
- cd /home/mo/cligg && $(MAKE) -f src/modules/read/CMakeFiles/read.dir/build.make src/modules/read/CMakeFiles/read.dir/build
-
-# target to build an object file
-read.o:
- cd /home/mo/cligg && $(MAKE) -f src/modules/read/CMakeFiles/read.dir/build.make src/modules/read/CMakeFiles/read.dir/read.o
-
-# target to preprocess a source file
-read.i:
- cd /home/mo/cligg && $(MAKE) -f src/modules/read/CMakeFiles/read.dir/build.make src/modules/read/CMakeFiles/read.dir/read.i
-
-# target to generate assembly for a file
-read.s:
- cd /home/mo/cligg && $(MAKE) -f src/modules/read/CMakeFiles/read.dir/build.make src/modules/read/CMakeFiles/read.dir/read.s
-
-# Help Target
-help::
- @echo "The following are some of the valid targets for this Makefile:"
- @echo "... all (the default if no target is provided)"
- @echo "... clean"
- @echo "... depend"
- @echo "... edit_cache"
- @echo "... read"
- @echo "... rebuild_cache"
- @echo "... read.o"
- @echo "... read.i"
- @echo "... read.s"
-
-
-
-#=============================================================================
-# Special targets to cleanup operation of make.
-
-# Special rule to run CMake to check the build system integrity.
-# No rule that depends on this can have commands that come from listfiles
-# because they might be regenerated.
-cmake_check_build_system:
- cd /home/mo/cligg && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
-
Deleted: src/modules/read/cmake_install.cmake
===================================================================
--- src/modules/read/cmake_install.cmake 2007-05-21 20:52:04 UTC (rev 59)
+++ src/modules/read/cmake_install.cmake 2007-05-21 21:21:57 UTC (rev 60)
@@ -1,29 +0,0 @@
-# Install script for directory: /home/mo/cligg/src/modules/read
-
-# Set the install prefix
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
- SET(CMAKE_INSTALL_PREFIX "/usr/local")
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
-STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-IF(NOT CMAKE_INSTALL_CONFIG_NAME)
- IF(BUILD_TYPE)
- STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
- CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
- ELSE(BUILD_TYPE)
- SET(CMAKE_INSTALL_CONFIG_NAME "")
- ENDIF(BUILD_TYPE)
- MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-ENDIF(NOT CMAKE_INSTALL_CONFIG_NAME)
-
-# Set the component getting installed.
-IF(NOT CMAKE_INSTALL_COMPONENT)
- IF(COMPONENT)
- MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
- SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
- ELSE(COMPONENT)
- SET(CMAKE_INSTALL_COMPONENT)
- ENDIF(COMPONENT)
-ENDIF(NOT CMAKE_INSTALL_COMPONENT)
-
Modified: src/modules/read/read.c
===================================================================
--- src/modules/read/read.c 2007-05-21 20:52:04 UTC (rev 59)
+++ src/modules/read/read.c 2007-05-21 21:21:57 UTC (rev 60)
@@ -3,16 +3,25 @@
#include <cligg_module.h>
#include <cligg_eventhandler.h>
+int read(void *data);
+
cligg_module_init print_init(void)
{
- char *inp = malloc(100*sizeof(char));
- fprintf(stderr, "Read Module is loaded!\n");
- printf("inp: ");
- fgets(inp,100,stdin);
- cligg_trigger_event("print",inp);
+ fprintf(stderr, "Read Module is loaded!\n");
+ cligg_register_event("read", read);
}
+int read(void *data)
+{
+ char inp[101];
+ printf("input: ");
+ fgets(inp, 100, stdin);
+ cligg_trigger_event("print", inp);
+ cligg_trigger_event("read", NULL);
+ return TRUE;
+}
+
cligg_module_finit print_finit(void)
{
- fprintf(stderr, "Print Module is unloaded!\n");
+ fprintf(stderr, "Read Module is unloaded!\n");
}
Deleted: src/modules/read/read.so
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|