From hartmut at tyndur.org Fri Sep 2 14:36:47 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Fri, 2 Sep 2011 14:36:47 +0200 Subject: [tyndur-devel] [PATCH] [LBUILDS] binutils auf neueste Version geupdated + build_crosstools gefixt + Patch gefixt Message-ID: <1314967007-30456-1-git-send-email-hartmut@tyndur.org> * build_crosstools: BINUTILS_VERSION auf 2.21.1 geändert und bei Downloadpfaden a angehangen + binutils-2.21.1.patch: Patch umbenannt und gefixt Signed-off-by: Alexander Kluth --- patches/binutils/2.21.1/binutils-2.21.1.patch | 337 +++++++++++++++++++++++++ scripts/build_crosstools | 8 +- 2 files changed, 341 insertions(+), 4 deletions(-) create mode 100644 patches/binutils/2.21.1/binutils-2.21.1.patch diff --git a/patches/binutils/2.21.1/binutils-2.21.1.patch b/patches/binutils/2.21.1/binutils-2.21.1.patch new file mode 100644 index 0000000..1278268 --- /dev/null +++ b/patches/binutils/2.21.1/binutils-2.21.1.patch @@ -0,0 +1,337 @@ +diff -uNr ../binutils-2.21/bfd/config.bfd ./bfd/config.bfd +--- ../binutils-2.21/bfd/config.bfd 2007-08-28 19:19:33.000000000 +0200 ++++ ./bfd/config.bfd 2008-01-21 15:22:03.000000000 +0100 +@@ -600,6 +600,11 @@ + targ_selvecs="i386linux_vec i386pei_vec" + targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec" + ;; ++ i[3-7]86-*-tyndur) ++ targ_defvec=bfd_elf32_i386_vec ++ targ_selvecs=bfd_elf32_i386_vec ++ targ64_selvecs=bfd_elf64_x86_64_vec ++ ;; + #ifdef BFD64 + x86_64-*-darwin*) + targ_defvec=mach_o_x86_64_vec +diff -uNr ../binutils-2.21/config.sub ./config.sub +--- ../binutils-2.21/config.sub 2007-08-06 22:00:30.000000000 +0200 ++++ ./config.sub 2008-01-21 15:22:03.000000000 +0100 +@@ -127,8 +127,8 @@ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ +- kopensolaris*-gnu* | \ +- storm-chaos* | os2-emx* | rtmk-nova*) ++ tyndur | kopensolaris*-gnu* | \ ++ netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -1347,6 +1347,9 @@ + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; ++ -tyndur*) ++ os=-tyndur ++ ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; +diff -uNr ../binutils-2.21/gas/configure.tgt ./gas/configure.tgt +--- ../binutils-2.21/gas/configure.tgt 2007-08-28 19:19:36.000000000 +0200 ++++ ./gas/configure.tgt 2008-01-21 15:22:03.000000000 +0100 +@@ -199,6 +199,7 @@ + i386-*-linux*oldld) fmt=aout em=linux ;; + i386-*-linux*coff*) fmt=coff em=linux ;; + i386-*-linux-*) fmt=elf em=linux ;; ++ i386-*-tyndur) fmt=elf ;; + i386-*-lynxos*) fmt=elf em=lynx ;; + i386-*-sysv[45]*) fmt=elf ;; + i386-*-solaris*) fmt=elf em=solaris ;; +diff -uNr ../binutils-2.21/ld/configure.tgt ./ld/configure.tgt +--- ../binutils-2.21/ld/configure.tgt 2007-08-28 19:19:42.000000000 +0200 ++++ ./ld/configure.tgt 2008-02-08 17:55:11.000000000 +0100 +@@ -207,6 +207,10 @@ + targ_extra_libpath=elf_i386 + tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;; ++i[3-7]86-*-tyndur*) ++ targ_emul=elf_i386_tyndur ++ targ_extra_emuls="elf_i386" ++ ;; + i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 ;; + i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2 + targ_extra_emuls="elf_i386_ldso elf_i386 elf_x86_64_sol2 elf_x86_64 elf_l1om" +@@ -718,6 +718,10 @@ + *-*-linux*) + ;; + ++*-*-tyndur*) ++ NATIVE_LIB_DIRS='/system/links/lib' ++ ;; ++ + *-*-netbsd*) + ;; + +diff -uNr ../binutils-2.21/ld/emulparams/elf_i386_tyndur.sh ./ld/emulparams/elf_i386_tyndur.sh +--- ../binutils-2.21/ld/emulparams/elf_i386_tyndur.sh 1970-01-01 01:00:00.000000000 +0100 ++++ ./ld/emulparams/elf_i386_tyndur.sh 2008-02-04 08:05:57.000000000 +0100 +@@ -0,0 +1,17 @@ ++SCRIPT_NAME=elf ++OUTPUT_FORMAT="elf32-i386" ++TEXT_START_ADDR=0x40000000 ++MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ++COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ++ARCH=i386 ++MACHINE= ++NOP=0x90909090 ++TEMPLATE_NAME=elf32 ++GENERATE_SHLIB_SCRIPT=yes ++GENERATE_PIE_SCRIPT=yes ++NO_SMALL_DATA=yes ++SEPARATE_GOTPLT=12 ++CTOR_START="__ctor_start__ = .;" ++CTOR_END="__ctor_end__ = .;" ++DTOR_START="__dtor_start__ = .;" ++DTOR_END="__dtor_end__ = .;" +diff -uNr ../binutils-2.21/ld/Makefile.am ./ld/Makefile.am +--- ../binutils-2.21/ld/Makefile.am 2007-08-06 22:00:17.000000000 +0200 ++++ ./ld/Makefile.am 2008-02-04 08:17:43.000000000 +0100 +@@ -1196,6 +1196,9 @@ + eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)" ++eelf_i386_tyndur.c: $(srcdir)/emulparams/elf_i386_tyndur.sh \ ++ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} elf_i386_tyndur "$(tdir_elf_i386_tyndur)" + eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \ + $(srcdir)/emulparams/solaris2.sh \ + $(srcdir)/emultempl/solaris2.em \ +diff -uNr ../binutils-2.21/ld/Makefile.in ./ld/Makefile.in +--- ../binutils-2.21/ld/Makefile.in 2007-08-06 22:29:54.000000000 +0200 ++++ ./ld/Makefile.in 2008-02-04 08:17:13.000000000 +0100 +@@ -538,6 +538,7 @@ + eelf_i386_chaos.c \ + eelf_i386_fbsd.c \ + eelf_i386_ldso.c \ ++ eelf_i386_tyndur.o \ + eelf_i386_sol2.c \ + eelf_i386_vxworks.c \ + eelf_s390.c \ +@@ -2619,6 +2619,10 @@ + eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)" ++eelf_i386_tyndur.c: $(srcdir)/emulparams/elf_i386_tyndur.sh \ ++ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ++ ${GENSCRIPTS} elf_i386_tyndur "$(tdir_elf_i386_tyndur)" ++ + eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \ + $(srcdir)/emulparams/solaris2.sh \ + $(srcdir)/emultempl/solaris2.em \ +diff -uNr ../binutils-2.21/libiberty/configure ./libiberty/configure +--- ../binutils-2.21/libiberty/configure 2007-08-06 21:59:45.000000000 +0200 ++++ ./libiberty/configure 2008-01-21 15:22:03.000000000 +0100 +@@ -6579,6 +6579,7 @@ + *-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;; + *-*-msdosdjgpp*) pexecute=pex-djgpp ;; + *-*-msdos*) pexecute=pex-msdos ;; ++ *-*-tyndur*) pexecute=./pex-tyndur.o ;; + *) pexecute=pex-unix ;; + esac + +diff -uNr ../binutils-2.21/libiberty/configure.ac ./libiberty/configure.ac +--- ../binutils-2.21/libiberty/configure.ac 2007-08-06 21:59:45.000000000 +0200 ++++ ./libiberty/configure.ac 2008-01-21 15:22:03.000000000 +0100 +@@ -689,6 +689,7 @@ + *-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;; + *-*-msdosdjgpp*) pexecute=pex-djgpp ;; + *-*-msdos*) pexecute=pex-msdos ;; ++ *-*-tyndur*) pexecute=./pex-tyndur.o ;; + *) pexecute=pex-unix ;; + esac + AC_SUBST(pexecute) +diff -uNr ../binutils-2.21/libiberty/Makefile.in ./libiberty/Makefile.in +--- ../binutils-2.21/libiberty/Makefile.in 2007-08-06 21:59:45.000000000 +0200 ++++ ./libiberty/Makefile.in 2008-01-21 15:22:03.000000000 +0100 +@@ -141,7 +141,7 @@ + objalloc.c obstack.c \ + partition.c pexecute.c \ + pex-common.c pex-djgpp.c pex-msdos.c pex-one.c \ +- pex-unix.c pex-win32.c \ ++ pex-unix.c pex-win32.c pex-tyndur.c \ + physmem.c putenv.c \ + random.c regex.c rename.c rindex.c \ + safe-ctype.c setenv.c setproctitle.c sha1.c sigsetmask.c \ +@@ -866,6 +866,13 @@ + else true; fi + $(COMPILE.c) $(srcdir)/pex-djgpp.c $(OUTPUT_OPTION) + ++./pex-tyndur.o: $(srcdir)/pex-tyndur.c stamp-h $(INCDIR)/ansidecl.h \ ++ $(INCDIR)/libiberty.h $(srcdir)/pex-common.h ++ if [ x"$(PICFLAG)" != x ]; then \ ++ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-tyndur.c -o pic/$@; \ ++ else true; fi ++ $(COMPILE.c) $(srcdir)/pex-tyndur.c $(OUTPUT_OPTION) ++ + ./pex-msdos.$(objext): $(srcdir)/pex-msdos.c config.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/libiberty.h $(srcdir)/pex-common.h \ + $(INCDIR)/safe-ctype.h +diff -uNr ../binutils-2.21/libiberty/pex-tyndur.c ./libiberty/pex-tyndur.c +--- ../binutils-2.21/libiberty/pex-tyndur.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./libiberty/pex-tyndur.c 2008-01-21 15:22:03.000000000 +0100 +@@ -0,0 +1,154 @@ ++/* Utilities to execute a program in a subprocess (possibly linked by pipes ++ with other subprocesses), and wait for it. Generic Unix version ++ (also used for UWIN and VMS). ++ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 ++ Free Software Foundation, Inc. ++ ++This file is part of the libiberty library. ++Libiberty is free software; you can redistribute it and/or ++modify it under the terms of the GNU Library General Public ++License as published by the Free Software Foundation; either ++version 2 of the License, or (at your option) any later version. ++ ++Libiberty is distributed in the hope that it will be useful, ++but WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++Library General Public License for more details. ++ ++You should have received a copy of the GNU Library General Public ++License along with libiberty; see the file COPYING.LIB. If not, ++write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, ++Boston, MA 02110-1301, USA. */ ++ ++#include "config.h" ++#include "libiberty.h" ++#include "pex-common.h" ++ ++#include ++#include ++#include ++#include ++#ifdef NEED_DECLARATION_ERRNO ++extern int errno; ++#endif ++#ifdef HAVE_STDLIB_H ++#include ++#endif ++#ifdef HAVE_STRING_H ++#include ++#endif ++#ifdef HAVE_UNISTD_H ++#include ++#endif ++ ++#include ++ ++#ifdef HAVE_FCNTL_H ++#include ++#endif ++#ifdef HAVE_SYS_WAIT_H ++#include ++#endif ++#ifdef HAVE_GETRUSAGE ++#include ++#include ++#endif ++#ifdef HAVE_SYS_STAT_H ++#include ++#endif ++ ++ ++static int pex_tyndur_open_read (struct pex_obj *, const char *, int); ++static int pex_tyndur_open_write (struct pex_obj *, const char *, int); ++static long pex_tyndur_exec_child (struct pex_obj *, int, const char *, ++ char * const *, char * const *, ++ int, int, int, int, ++ const char **, int *); ++static int pex_tyndur_close (struct pex_obj *, int); ++static int pex_tyndur_wait (struct pex_obj *, long, int *, struct pex_time *, ++ int, const char **, int *); ++static int pex_tyndur_pipe (struct pex_obj *, int *, int); ++static FILE *pex_tyndur_fdopenr (struct pex_obj *, int, int); ++static FILE *pex_tyndur_fdopenw (struct pex_obj *, int, int); ++static void pex_tyndur_cleanup (struct pex_obj *); ++ ++/* The list of functions we pass to the common routines. */ ++ ++const struct pex_funcs funcs = ++{ ++ pex_tyndur_open_read, ++ pex_tyndur_open_write, ++ pex_tyndur_exec_child, ++ pex_tyndur_close, ++ pex_tyndur_wait, ++ NULL, ++ NULL, ++ NULL, ++ NULL ++}; ++ ++/* Return a newly initialized pex_obj structure. */ ++ ++struct pex_obj * ++pex_init (int flags, const char *pname, const char *tempbase) ++{ ++ return pex_init_common (flags, pname, tempbase, &funcs); ++} ++ ++/* Open a file for reading. */ ++ ++static int ++pex_tyndur_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name, ++ int binary ATTRIBUTE_UNUSED) ++{ ++ return open (name, O_RDONLY); ++} ++ ++/* Open a file for writing. */ ++ ++static int ++pex_tyndur_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name, ++ int binary ATTRIBUTE_UNUSED) ++{ ++ /* Note that we can't use O_EXCL here because gcc may have already ++ created the temporary file via make_temp_file. */ ++ return open (name, O_WRONLY | O_CREAT | O_TRUNC); ++} ++ ++/* Close a file. */ ++ ++static int ++pex_tyndur_close (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd) ++{ ++ return close (fd); ++} ++ ++/* Execute a child. */ ++static long ++pex_tyndur_exec_child (struct pex_obj *obj, int flags, const char *executable, ++ char * const * argv, char * const * env, ++ int in, int out, int errdes, ++ int toclose, const char **errmsg, int *err) ++{ ++ // FIXME ++ return -1; ++} ++ ++/* Wait for a child process to complete. */ ++ ++static int ++pex_tyndur_wait (struct pex_obj *obj, long pid, int *status, ++ struct pex_time *time, int done, const char **errmsg, ++ int *err) ++{ ++ /* If we are cleaning up when the caller didn't retrieve process ++ status for some reason, encourage the process to go away. */ ++ if (done) ++ kill (pid, SIGTERM); ++ ++ // FIXME ++ while (get_parent_pid(pid) != 0); ++ *status = 0; ++ return 0; ++} ++ diff --git a/scripts/build_crosstools b/scripts/build_crosstools index b3589fd..20e288a 100755 --- a/scripts/build_crosstools +++ b/scripts/build_crosstools @@ -1,7 +1,7 @@ #!/bin/bash # Versionen der Tools -BINUTILS_VERSION=2.21 +BINUTILS_VERSION=2.21.1 GCC_VERSION=4.5.2 NEEDS_GMP_MAJOR=4 NEEDS_GMP_MINOR=3 @@ -128,11 +128,11 @@ rm -rf ${TMP}/cross-binutils/binutils-${BINUTILS_VERSION}/ cd ${TMP}/cross-binutils echo "[binutils] Version " ${BINUTILS_VERSION} echo "[binutils] Herunterladen..." -[ -f binutils-${BINUTILS_VERSION}.tar.bz2 ] || wget -q http://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.bz2 || die "Fehler beim Herunterladen." +[ -f binutils-${BINUTILS_VERSION}.tar.bz2 ] || wget -q http://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}a.tar.bz2 || die "Fehler beim Herunterladen." echo "[binutils] Entpacken..." -tar -xjf binutils-${BINUTILS_VERSION}.tar.bz2 || die "Fehler beim Entpacken." +tar -xjf binutils-${BINUTILS_VERSION}a.tar.bz2 || die "Fehler beim Entpacken." echo "[binutils] Patch anwenden..." -patch -p0 -d binutils-${BINUTILS_VERSION}/ < ${PATCHES}/binutils/${BINUTILS_VERSION}/binutils-${BINUTILS_VERSION}.patch >${LOGS}/binutils.log || die "Fehler beim Anwenden des Patches.\nSiehe tmp/binutils.log für Details." +patch -p0 -d binutils-2.21.1/ < ${PATCHES}/binutils/${BINUTILS_VERSION}/binutils-${BINUTILS_VERSION}.patch >${LOGS}/binutils.log || die "Fehler beim Anwenden des Patches.\nSiehe tmp/binutils.log für Details." cd build echo "[binutils] Konfigurieren..." ../binutils-${BINUTILS_VERSION}/configure --prefix="${PREFIX}" --with-sysroot=${PREFIX} --target=${TARGET} --disable-nls --disable-werror >>${LOGS}/binutils.log || die "Fehler beim Konfigurieren.\nSiehe tmp/binutils.log für Details." -- 1.7.2.5 From kevin at tyndur.org Fri Sep 2 21:02:04 2011 From: kevin at tyndur.org (Kevin Wolf) Date: Fri, 2 Sep 2011 21:02:04 +0200 Subject: [tyndur-devel] [PATCH] [LBUILDS] binutils auf neueste Version geupdated + build_crosstools gefixt + Patch gefixt In-Reply-To: <1314967007-30456-1-git-send-email-hartmut@tyndur.org> References: <1314967007-30456-1-git-send-email-hartmut@tyndur.org> Message-ID: <20110902190204.GA6061@silvanus> On Fri, Sep 02, 2011 at 02:36:47PM +0200, Alexander Kluth wrote: > * build_crosstools: BINUTILS_VERSION auf 2.21.1 geändert und bei Downloadpfaden a angehangen > + binutils-2.21.1.patch: Patch umbenannt und gefixt > > Signed-off-by: Alexander Kluth > --- > patches/binutils/2.21.1/binutils-2.21.1.patch | 337 +++++++++++++++++++++++++ > scripts/build_crosstools | 8 +- > 2 files changed, 341 insertions(+), 4 deletions(-) > create mode 100644 patches/binutils/2.21.1/binutils-2.21.1.patch Danke, ist drin. From kevin at tyndur.org Fri Sep 2 21:06:30 2011 From: kevin at tyndur.org (Kevin Wolf) Date: Fri, 2 Sep 2011 21:06:30 +0200 Subject: [tyndur-devel] [lbuilds] GMP, Mpfr und Mpc + GMP-5.0.2 + Mpfr-3.0.1 + Mpc-0.9 In-Reply-To: <20110813200746.183140@gmx.net> References: <20110813200746.183140@gmx.net> Message-ID: <20110902190630.GB6061@silvanus> On Sat, Aug 13, 2011 at 10:07:46PM +0200, Dominik Bittner wrote: > From 0974532e696d10e019ac0fe8eab588f31ba36875 Mon Sep 17 00:00:00 2001 > From: Dominik Bittner > Date: Sun, 14 Aug 2011 00:01:31 +0200 > Subject: [PATCH] [lbuilds] GMP, Mpfr und Mpc + GMP-5.0.2 + Mpfr-3.0.1 + > Mpc-0.9 Signed-off-by: Dominik Bittner > Danke, ist drin. Aber nächstes Mal bitte nicht die ganze Commit-Nachricht in den Betreff packen. ;-) From kevin at tyndur.org Fri Sep 2 23:19:16 2011 From: kevin at tyndur.org (Kevin Wolf) Date: Fri, 2 Sep 2011 23:19:16 +0200 Subject: [tyndur-devel] =?utf-8?q?=5BPATCH=5D_kedit=3A_Lizenzheader_eingef?= =?utf-8?q?=C3=BCgt?= Message-ID: <1314998356-1068-1-git-send-email-kevin@tyndur.org> ! kedit: Lizenzheader in Quellcode eingefügt Signed-off-by: Kevin Wolf --- Das hier braucht noch ein SoB von Hartmut. src/modules/pas/kedit/kedit.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/kedit_buf.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/kedit_input.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/kedit_main.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/kedit_tui.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/syntax.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/syntax_atandt.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/syntax_c.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/syntax_intel.pas | 28 ++++++++++++++++++++++++++++ src/modules/pas/kedit/syntax_pas.pas | 28 ++++++++++++++++++++++++++++ 10 files changed, 280 insertions(+), 0 deletions(-) diff --git a/src/modules/pas/kedit/kedit.pas b/src/modules/pas/kedit/kedit.pas index 992bd0e..31c5591 100644 --- a/src/modules/pas/kedit/kedit.pas +++ b/src/modules/pas/kedit/kedit.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Kevin Wolf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + program KEdit; {$H+} diff --git a/src/modules/pas/kedit/kedit_buf.pas b/src/modules/pas/kedit/kedit_buf.pas index e9965a2..1491d48 100644 --- a/src/modules/pas/kedit/kedit_buf.pas +++ b/src/modules/pas/kedit/kedit_buf.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Kevin Wolf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit kedit_buf; interface diff --git a/src/modules/pas/kedit/kedit_input.pas b/src/modules/pas/kedit/kedit_input.pas index 2d4f33a..284db9d 100644 --- a/src/modules/pas/kedit/kedit_input.pas +++ b/src/modules/pas/kedit/kedit_input.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Kevin Wolf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit kedit_input; interface diff --git a/src/modules/pas/kedit/kedit_main.pas b/src/modules/pas/kedit/kedit_main.pas index a2714e0..d583e31 100644 --- a/src/modules/pas/kedit/kedit_main.pas +++ b/src/modules/pas/kedit/kedit_main.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Kevin Wolf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit kedit_main; interface diff --git a/src/modules/pas/kedit/kedit_tui.pas b/src/modules/pas/kedit/kedit_tui.pas index 14a56b4..d0706bc 100644 --- a/src/modules/pas/kedit/kedit_tui.pas +++ b/src/modules/pas/kedit/kedit_tui.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Kevin Wolf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit kedit_tui; {$MODE ObjFPC} {$H+} diff --git a/src/modules/pas/kedit/syntax.pas b/src/modules/pas/kedit/syntax.pas index 59dee21..61553ee 100644 --- a/src/modules/pas/kedit/syntax.pas +++ b/src/modules/pas/kedit/syntax.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Kevin Wolf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit syntax; {$MODE ObjFPC} diff --git a/src/modules/pas/kedit/syntax_atandt.pas b/src/modules/pas/kedit/syntax_atandt.pas index 38eb91a..d38282e 100644 --- a/src/modules/pas/kedit/syntax_atandt.pas +++ b/src/modules/pas/kedit/syntax_atandt.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2009-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Alexander Hartmut Kluth. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit syntax_atandt; {$mode ObjFPC} diff --git a/src/modules/pas/kedit/syntax_c.pas b/src/modules/pas/kedit/syntax_c.pas index f7662cc..05631a2 100644 --- a/src/modules/pas/kedit/syntax_c.pas +++ b/src/modules/pas/kedit/syntax_c.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Kevin Wolf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit syntax_c; {$mode ObjFPC} diff --git a/src/modules/pas/kedit/syntax_intel.pas b/src/modules/pas/kedit/syntax_intel.pas index 691cd4a..6afebd5 100644 --- a/src/modules/pas/kedit/syntax_intel.pas +++ b/src/modules/pas/kedit/syntax_intel.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2009-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Alexander Hartmut Kluth. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit syntax_intel; {$mode ObjFpc} diff --git a/src/modules/pas/kedit/syntax_pas.pas b/src/modules/pas/kedit/syntax_pas.pas index 696c84f..da122f0 100644 --- a/src/modules/pas/kedit/syntax_pas.pas +++ b/src/modules/pas/kedit/syntax_pas.pas @@ -1,3 +1,31 @@ +(* + * Copyright (c) 2009-2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Alexander Hartmut Kluth. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + unit syntax_pas; {$mode ObjFPC} -- 1.6.0.2 From hartmut at tyndur.org Fri Sep 2 23:23:53 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Fri, 02 Sep 2011 23:23:53 +0200 Subject: [tyndur-devel] =?iso-8859-1?q?=5BPATCH=5D_kedit=3A_Lizenzheader_e?= =?iso-8859-1?q?ingef=FCgt?= In-Reply-To: <1314998356-1068-1-git-send-email-kevin@tyndur.org> References: <1314998356-1068-1-git-send-email-kevin@tyndur.org> Message-ID: <20110902232353.20631q0zid5h6yjt@mail.famkaufmann.info> Signed-off-by: Alexander Kluth Quoting Kevin Wolf : > ! kedit: Lizenzheader in Quellcode eingefügt > > Signed-off-by: Kevin Wolf > --- > > Das hier braucht noch ein SoB von Hartmut. > > src/modules/pas/kedit/kedit.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/kedit_buf.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/kedit_input.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/kedit_main.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/kedit_tui.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/syntax.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/syntax_atandt.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/syntax_c.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/syntax_intel.pas | 28 ++++++++++++++++++++++++++++ > src/modules/pas/kedit/syntax_pas.pas | 28 ++++++++++++++++++++++++++++ > 10 files changed, 280 insertions(+), 0 deletions(-) > > diff --git a/src/modules/pas/kedit/kedit.pas > b/src/modules/pas/kedit/kedit.pas > index 992bd0e..31c5591 100644 > --- a/src/modules/pas/kedit/kedit.pas > +++ b/src/modules/pas/kedit/kedit.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Kevin Wolf. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > program KEdit; > {$H+} > > diff --git a/src/modules/pas/kedit/kedit_buf.pas > b/src/modules/pas/kedit/kedit_buf.pas > index e9965a2..1491d48 100644 > --- a/src/modules/pas/kedit/kedit_buf.pas > +++ b/src/modules/pas/kedit/kedit_buf.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Kevin Wolf. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit kedit_buf; > > interface > diff --git a/src/modules/pas/kedit/kedit_input.pas > b/src/modules/pas/kedit/kedit_input.pas > index 2d4f33a..284db9d 100644 > --- a/src/modules/pas/kedit/kedit_input.pas > +++ b/src/modules/pas/kedit/kedit_input.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Kevin Wolf. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit kedit_input; > > interface > diff --git a/src/modules/pas/kedit/kedit_main.pas > b/src/modules/pas/kedit/kedit_main.pas > index a2714e0..d583e31 100644 > --- a/src/modules/pas/kedit/kedit_main.pas > +++ b/src/modules/pas/kedit/kedit_main.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Kevin Wolf. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit kedit_main; > > interface > diff --git a/src/modules/pas/kedit/kedit_tui.pas > b/src/modules/pas/kedit/kedit_tui.pas > index 14a56b4..d0706bc 100644 > --- a/src/modules/pas/kedit/kedit_tui.pas > +++ b/src/modules/pas/kedit/kedit_tui.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Kevin Wolf. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit kedit_tui; > {$MODE ObjFPC} > {$H+} > diff --git a/src/modules/pas/kedit/syntax.pas > b/src/modules/pas/kedit/syntax.pas > index 59dee21..61553ee 100644 > --- a/src/modules/pas/kedit/syntax.pas > +++ b/src/modules/pas/kedit/syntax.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Kevin Wolf. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit syntax; > {$MODE ObjFPC} > > diff --git a/src/modules/pas/kedit/syntax_atandt.pas > b/src/modules/pas/kedit/syntax_atandt.pas > index 38eb91a..d38282e 100644 > --- a/src/modules/pas/kedit/syntax_atandt.pas > +++ b/src/modules/pas/kedit/syntax_atandt.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2009-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Alexander Hartmut Kluth. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit syntax_atandt; > {$mode ObjFPC} > > diff --git a/src/modules/pas/kedit/syntax_c.pas > b/src/modules/pas/kedit/syntax_c.pas > index f7662cc..05631a2 100644 > --- a/src/modules/pas/kedit/syntax_c.pas > +++ b/src/modules/pas/kedit/syntax_c.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2008-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Kevin Wolf. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit syntax_c; > {$mode ObjFPC} > > diff --git a/src/modules/pas/kedit/syntax_intel.pas > b/src/modules/pas/kedit/syntax_intel.pas > index 691cd4a..6afebd5 100644 > --- a/src/modules/pas/kedit/syntax_intel.pas > +++ b/src/modules/pas/kedit/syntax_intel.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2009-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Alexander Hartmut Kluth. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit syntax_intel; > > {$mode ObjFpc} > diff --git a/src/modules/pas/kedit/syntax_pas.pas > b/src/modules/pas/kedit/syntax_pas.pas > index 696c84f..da122f0 100644 > --- a/src/modules/pas/kedit/syntax_pas.pas > +++ b/src/modules/pas/kedit/syntax_pas.pas > @@ -1,3 +1,31 @@ > +(* > + * Copyright (c) 2009-2011 The tyndur Project. All rights reserved. > + * > + * This code is derived from software contributed to the tyndur Project > + * by Alexander Hartmut Kluth. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR > + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR > + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, > + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, > + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, > OR PROFITS; > + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, > + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR > + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + *) > + > unit syntax_pas; > {$mode ObjFPC} > > -- > 1.6.0.2 > > _______________________________________________ > tyndur-devel mailing list > tyndur-devel at tyndur.org > http://list.tyndur.org/mailman/listinfo/tyndur-devel > From hartmut at tyndur.org Sat Sep 3 18:47:51 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Sat, 3 Sep 2011 18:47:51 +0200 Subject: [tyndur-devel] [PATCH] kirc: Parsen von /-Kommandos umgebaut, Kommandos implementiert Message-ID: <1315068471-24039-1-git-send-email-hartmut@tyndur.org> * kirc: EvaluateIRCCommand umgebaut, nun werden solche Kommandos genau geparst und entsprechend formatiert an den Server geschickt. Implementiert sind folgende Befehle: /join, /cs, /ns, /kick, /quit, /away, /back, /invite, /part, /mode. /nick, /msg Restliche Befehle folgen bei MultiChan-Support. Signed-off-by: Alexander Kluth --- src/modules/pas/kirc/kirc.pas | 128 ++++++++++++++++++++++++++++++----------- 1 files changed, 95 insertions(+), 33 deletions(-) diff --git a/src/modules/pas/kirc/kirc.pas b/src/modules/pas/kirc/kirc.pas index 5ece99c..b8feed0 100644 --- a/src/modules/pas/kirc/kirc.pas +++ b/src/modules/pas/kirc/kirc.pas @@ -37,11 +37,12 @@ var conn: longint; nick: string; channel: string; + away: boolean; procedure WriteConn(conn: longint; s: ShortString); begin FileWrite(conn, s[1], length(s)); - + // TODO Entfernen, sobald tpcip auch ohne auskommt Delay(100); end; @@ -65,7 +66,7 @@ begin end; function NickIsValid(nick: string): boolean; -var +var i: integer; begin if nick = '' then begin @@ -96,7 +97,7 @@ begin if port = '' then begin port := '6667'; end; - + repeat Write('Nickname: '); ReadLn(nick); @@ -111,6 +112,7 @@ begin WriteConn(conn, 'USER kirc 0 0 :kirc/tyndur'#10); WriteConn(conn, 'NICK '+nick+#10); + away := false; end; function GetNickFromPrefix(prefix: String): String; @@ -188,46 +190,46 @@ begin theIRCWindow.Incoming(line, 8); theIRCWindow.Incoming('PONG :'+parameter+#10, 8); WriteConn(conn, 'PONG :'+parameter+#10); - end + end else if command = 'JOIN' then begin theIRCWindow.Incoming(prefix + ' hat den Kanal betreten', 2); - end + end else if command = 'PART' then begin - theIRCWindow.Incoming(GetNickFromPrefix(prefix) - + ' hat den Kanal verlassen (' + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + + ' hat den Kanal verlassen (' + parameter +')', 2); - end + end else if command = 'QUIT' then begin - theIRCWindow.Incoming(GetNickFromPrefix(prefix) + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + ' hat den Server verlassen (' + parameter +')', 2); - end + end else if command = 'NICK' then begin - theIRCWindow.Incoming(GetNickFromPrefix(prefix) - + ' nennt sich jetzt ' + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + + ' nennt sich jetzt ' + ShiftParameter(parameter), 2); - end + end else if command = 'KICK' then begin ShiftParameter(parameter); msg := ShiftParameter(parameter); theIRCWindow.Incoming(prefix + ' hat ' + msg + ' aus dem Kanal geworfen (' + ShiftParameter(parameter) + ')', 2); - + if msg = nick then begin channel := ''; theIRCWindow.title := nick; end; - end + end else if command = 'MODE' then begin ShiftParameter(parameter); - theIRCWindow.Incoming(prefix + ' setzt den Modus: ' + theIRCWindow.Incoming(prefix + ' setzt den Modus: ' + parameter, 9); - end + end else if command = 'TOPIC' then begin ShiftParameter(parameter); - theIRCWindow.Incoming(GetNickFromPrefix(prefix) + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + ' setzt das Kanalthema auf: ' + ShiftParameter(parameter), 9); - end + end else if command = 'PRIVMSG' then begin ShiftParameter(parameter); msg := ShiftParameter(parameter); @@ -237,19 +239,23 @@ begin theIRCWindow.Incoming(GetNickFromPrefix(prefix) + ' ' + Copy(msg, 1, length(msg) - 1) + #10, 14); end else begin - theIRCWindow.Incoming('<' + GetNickFromPrefix(prefix) + '> ' + theIRCWindow.Incoming('<' + GetNickFromPrefix(prefix) + '> ' + msg, 7); end; - end + end else if command = 'ERROR' then begin theIRCWindow.Incoming(line, 12); - end + end else begin theIRCWindow.Incoming(line, 8); end; end; procedure EvaluateIRCCommand(const line: String); +var + rststr: String; + tmpnick: String; + tmpmsg: String; begin // Bei Leerzeilen machen wir gleich mal gar nichts // Vor allem keinen Zugriff auf line[1], sonst ist kirc weg @@ -257,25 +263,81 @@ begin exit; end; - if channel = '' then begin + // Ein Slash bedeutet meist der Beginn eines Kommandos, also parsen wir das ganze mal + if line[1] = '/' then begin if Copy(line, 1, 6) = '/join ' then begin channel := Copy(line, 7, length(line)); theIRCWindow.title := nick + ' in ' + channel; - WriteConn(conn, 'JOIN '+ channel + #10); + WriteConn(conn, 'JOIN ' + channel + #10); + end else if Copy(line, 1, 8) = '/connect' then begin + //TODO + end else if Copy(line, 1, 3) = '/cs' then begin + WriteConn(Conn, 'PRIVMSG ChanServ :' + Copy(line, 5, length(line)) + #10); + end else if Copy(line, 1, 3) = '/ns' then begin + WriteConn(conn, 'PRIVMSG NickServ :' + Copy(line, 5, length(line)) + #10); + end else if Copy(line, 1, 5) = '/kick' then begin + WriteConn(conn, 'KICK ' + channel + ' ' + Copy(line, 7, length(line)) + #10); + end else if Copy(line, 1, 5) = '/quit' then begin + if length(line) > 6 then begin // User hat eine quit-message angegeben + WriteConn(conn, 'QUIT :' + Copy(line, 7, length(line))+#10); + end else begin + WriteConn(conn, 'QUIT :Verlassend'+#10); + end; + end else if Copy(line, 1, 5) = '/exit' then begin + //TODO + end else if Copy(line, 1, 5) = '/away' then begin + if away = true then begin + WriteConn(conn, ':' + nick + ' AWAY' + #10); + away := false; + end else begin + if length(line) > 5 then begin + WriteConn(conn, 'AWAY :' + Copy(line, 7, length(line)) + #10); + end else begin + WriteConn(conn, 'AWAY :Abwesend' + #10); + end; + away := true; + end; + end else if Copy(line, 1, 5) = '/back' then begin + if away = true then begin + WriteConn(conn, ':' + nick + ' AWAY' + #10); + end; + end else if Copy(line, 1, 7) = '/invite' then begin + WriteConn(conn, 'INVITE ' + Copy(line, 9, length(line)) + #10); + end else if Copy(line, 1, 5) = '/part' then begin + if length(line) > 5 then begin + WriteConn(conn, 'PART ' + channel + #10); + end else begin + WriteConn(conn, 'PART ' + Copy(line, 6, length(line)) + #10); + end; + theIRCWindow.Incoming('Sie haben ' + channel + ' verlassen.', 12); + channel := ' '; + end else if Copy(line, 1, 5) = '/mode' then begin + if Copy(line, 7, 7) = '-' then begin + WriteConn(conn, 'MODE ' + channel + ' ' + Copy(line, 7, length(line)) + #10); + end else begin + WriteConn(conn, 'MODE ' + Copy(line, 7, length(line)) + #10); + end; + end else if Copy(line, 1, 5) = '/nick' then begin + WriteConn(conn, ':' + nick + ' NICK ' + Copy(line, 7, length(line)) + #10); + nick := Copy(line, 7, length(line)); + end else if Copy(line, 1, 4) = '/msg' then begin + rststr := Copy(line, 6, length(line)); + tmpnick := Copy(rststr, 1, Pos(' ', rststr)); + tmpmsg := Copy(rststr, length(tmpnick)+1, length(rststr)); + WriteConn(conn, 'PRIVMSG ' + tmpnick + ': ' + tmpmsg + #10); + end else if line[2] = '/' then begin // Doppelter Slash = Kein Kommando, einfach weitergeben + theIRCWindow.Incoming('<' + nick + '> ' + line+#10, 7); + WriteConn(conn, 'PRIVMSG ' + channel + ' :' + Copy(line, 2, length(line))+#10); end else begin - theIRCWindow.Incoming('Ungueltiger Befehl: ' + line, 12); + theIRCWindow.Incoming('Ungueltiges BefehL; ' + line, 12); end; end else begin - if line[1] = '/' then begin - WriteConn(conn, Copy(line, 2, length(line)) + #10); - end else begin - theIRCWindow.Incoming('<' + nick + '> ' + line+#10, 7); - WriteConn(conn, 'PRIVMSG '+channel+' :'+line+#10); - end; + theIRCWindow.Incoming('<' + nick + '> ' + line+#10, 7); + WriteConn(conn, 'PRIVMSG ' + channel + ' :' + line+#10); end; end; -var +var inBuffer, outBuffer: String; s: ShortString; lineEnd: integer; @@ -295,7 +357,7 @@ begin while not FileEof(conn) do begin ReadConn(conn, s); inBuffer := inBuffer + s; - + lineEnd := Pos(#10, inBuffer); if lineEnd > 0 then begin EvaluateIRCInput(conn, Copy(inBuffer, 1, lineEnd-1)); -- 1.7.2.5 From hartmut at tyndur.org Sat Sep 3 23:30:14 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Sat, 3 Sep 2011 23:30:14 +0200 Subject: [tyndur-devel] [PATCH] * kirc: Parsen von /-Kommandos umgebaut, Kommandos implementiert Message-ID: <1315085414-26395-1-git-send-email-hartmut@tyndur.org> * kirc: EvaluateIRCCommand umgebaut, nun werden solche Kommandos genau geparst und entsprechend formatiert an den Server geschickt. Implementiert sind folgende Befehle: /join, /cs, /ns, /kick, /quit, /away, /back, /invite, /part, /mode. /nick, /msg Restliche Befehle folgen bei MultiChan-Support. Signed-off-by: Alexander Kluth --- src/modules/pas/kirc/kirc.pas | 140 +++++++++++++++++++++++++++++++---------- 1 files changed, 107 insertions(+), 33 deletions(-) diff --git a/src/modules/pas/kirc/kirc.pas b/src/modules/pas/kirc/kirc.pas index 5ece99c..4b27efb 100644 --- a/src/modules/pas/kirc/kirc.pas +++ b/src/modules/pas/kirc/kirc.pas @@ -37,11 +37,12 @@ var conn: longint; nick: string; channel: string; + away: boolean; procedure WriteConn(conn: longint; s: ShortString); begin FileWrite(conn, s[1], length(s)); - + // TODO Entfernen, sobald tpcip auch ohne auskommt Delay(100); end; @@ -65,7 +66,7 @@ begin end; function NickIsValid(nick: string): boolean; -var +var i: integer; begin if nick = '' then begin @@ -96,7 +97,7 @@ begin if port = '' then begin port := '6667'; end; - + repeat Write('Nickname: '); ReadLn(nick); @@ -111,6 +112,7 @@ begin WriteConn(conn, 'USER kirc 0 0 :kirc/tyndur'#10); WriteConn(conn, 'NICK '+nick+#10); + away := false; end; function GetNickFromPrefix(prefix: String): String; @@ -188,46 +190,46 @@ begin theIRCWindow.Incoming(line, 8); theIRCWindow.Incoming('PONG :'+parameter+#10, 8); WriteConn(conn, 'PONG :'+parameter+#10); - end + end else if command = 'JOIN' then begin theIRCWindow.Incoming(prefix + ' hat den Kanal betreten', 2); - end + end else if command = 'PART' then begin - theIRCWindow.Incoming(GetNickFromPrefix(prefix) - + ' hat den Kanal verlassen (' + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + + ' hat den Kanal verlassen (' + parameter +')', 2); - end + end else if command = 'QUIT' then begin - theIRCWindow.Incoming(GetNickFromPrefix(prefix) + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + ' hat den Server verlassen (' + parameter +')', 2); - end + end else if command = 'NICK' then begin - theIRCWindow.Incoming(GetNickFromPrefix(prefix) - + ' nennt sich jetzt ' + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + + ' nennt sich jetzt ' + ShiftParameter(parameter), 2); - end + end else if command = 'KICK' then begin ShiftParameter(parameter); msg := ShiftParameter(parameter); theIRCWindow.Incoming(prefix + ' hat ' + msg + ' aus dem Kanal geworfen (' + ShiftParameter(parameter) + ')', 2); - + if msg = nick then begin channel := ''; theIRCWindow.title := nick; end; - end + end else if command = 'MODE' then begin ShiftParameter(parameter); - theIRCWindow.Incoming(prefix + ' setzt den Modus: ' + theIRCWindow.Incoming(prefix + ' setzt den Modus: ' + parameter, 9); - end + end else if command = 'TOPIC' then begin ShiftParameter(parameter); - theIRCWindow.Incoming(GetNickFromPrefix(prefix) + theIRCWindow.Incoming(GetNickFromPrefix(prefix) + ' setzt das Kanalthema auf: ' + ShiftParameter(parameter), 9); - end + end else if command = 'PRIVMSG' then begin ShiftParameter(parameter); msg := ShiftParameter(parameter); @@ -237,19 +239,24 @@ begin theIRCWindow.Incoming(GetNickFromPrefix(prefix) + ' ' + Copy(msg, 1, length(msg) - 1) + #10, 14); end else begin - theIRCWindow.Incoming('<' + GetNickFromPrefix(prefix) + '> ' + theIRCWindow.Incoming('<' + GetNickFromPrefix(prefix) + '> ' + msg, 7); end; - end + end else if command = 'ERROR' then begin theIRCWindow.Incoming(line, 12); - end + end else begin theIRCWindow.Incoming(line, 8); end; end; procedure EvaluateIRCCommand(const line: String); +var + rststr: String; + tmpnick: String; + tmpmsg: String; + command: String; begin // Bei Leerzeilen machen wir gleich mal gar nichts // Vor allem keinen Zugriff auf line[1], sonst ist kirc weg @@ -257,25 +264,92 @@ begin exit; end; - if channel = '' then begin - if Copy(line, 1, 6) = '/join ' then begin + // Ein Slash bedeutet meist der Beginn eines Kommandos, also parsen wir das ganze mal + if line[1] = '/' then begin + // Eigentliches Kommando extrahieren + // Wichtig: Darauf achten, ob ein Leerzeichen da ist oder nicht + if Pos(' ', line) = 0 then begin + command := Copy(line, 1, length(line)); + end else begin + command := Copy(line, 1, Pos(' ', line)-1); + end; + + // Nun den eigentlichen Befehl parsen + if command = '/join' then begin channel := Copy(line, 7, length(line)); theIRCWindow.title := nick + ' in ' + channel; - WriteConn(conn, 'JOIN '+ channel + #10); + WriteConn(conn, 'JOIN ' + channel + #10); + end else if command = '/connect' then begin + //TODO + end else if command = '/cs' then begin + WriteConn(Conn, 'PRIVMSG ChanServ :' + Copy(line, 5, length(line)) + #10); + end else if command = '/ns' then begin + WriteConn(conn, 'PRIVMSG NickServ :' + Copy(line, 5, length(line)) + #10); + end else if command = '/kick' then begin + WriteConn(conn, 'KICK ' + channel + ' ' + Copy(line, 7, length(line)) + #10); + end else if command = '/quit' then begin + if length(line) > 6 then begin // User hat eine quit-message angegeben + WriteConn(conn, 'QUIT :' + Copy(line, 7, length(line))+#10); + end else begin + WriteConn(conn, 'QUIT :Verlassend'+#10); + end; + end else if command = '/exit' then begin + //TODO + end else if command = '/away' then begin + if away = true then begin + WriteConn(conn, ':' + nick + ' AWAY' + #10); + away := false; + end else begin + if length(line) > 6 then begin + WriteConn(conn, 'AWAY :' + Copy(line, 7, length(line)) + #10); + end else begin + WriteConn(conn, 'AWAY :Abwesend' + #10); + end; + away := true; + end; + end else if command = '/back' then begin + if away = true then begin + WriteConn(conn, ':' + nick + ' AWAY' + #10); + end; + end else if command = '/invite' then begin + WriteConn(conn, 'INVITE ' + Copy(line, 9, length(line)) + #10); + end else if command = '/part' then begin + if length(line) > 6 then begin + WriteConn(conn, 'PART ' + channel + #10); + end else begin + WriteConn(conn, 'PART ' + Copy(line, 7, length(line)) + #10); + end; + theIRCWindow.Incoming('Sie haben ' + channel + ' verlassen.', 12); + channel := ' '; + end else if command = '/mode' then begin + if Copy(line, 7, 7) = '-' then begin + WriteConn(conn, 'MODE ' + channel + ' ' + Copy(line, 7, length(line)) + #10); + end else if Copy(line, 7, 7) = '+' then begin + WriteConn(conn, 'MODE ' + channel + ' ' + Copy(line, 7, length(line)) + #10); + end else begin + WriteConn(conn, 'MODE ' + Copy(line, 7, length(line)) + #10); + end; + end else if command = '/nick' then begin + WriteConn(conn, ':' + nick + ' NICK ' + Copy(line, 7, length(line)) + #10); + nick := Copy(line, 7, length(line)); + end else if command = '/msg' then begin + rststr := Copy(line, 6, length(line)); + tmpnick := Copy(rststr, 1, Pos(' ', rststr)); + tmpmsg := Copy(rststr, length(tmpnick)+1, length(rststr)); + WriteConn(conn, 'PRIVMSG ' + tmpnick + ': ' + tmpmsg + #10); + end else if line[2] = '/' then begin // Doppelter Slash = Kein Kommando, einfach weitergeben + theIRCWindow.Incoming('<' + nick + '> ' + line+#10, 7); + WriteConn(conn, 'PRIVMSG ' + channel + ' :' + Copy(line, 2, length(line))+#10); end else begin theIRCWindow.Incoming('Ungueltiger Befehl: ' + line, 12); end; end else begin - if line[1] = '/' then begin - WriteConn(conn, Copy(line, 2, length(line)) + #10); - end else begin - theIRCWindow.Incoming('<' + nick + '> ' + line+#10, 7); - WriteConn(conn, 'PRIVMSG '+channel+' :'+line+#10); - end; + theIRCWindow.Incoming('<' + nick + '> ' + line+#10, 7); + WriteConn(conn, 'PRIVMSG ' + channel + ' :' + line+#10); end; end; -var +var inBuffer, outBuffer: String; s: ShortString; lineEnd: integer; @@ -295,7 +369,7 @@ begin while not FileEof(conn) do begin ReadConn(conn, s); inBuffer := inBuffer + s; - + lineEnd := Pos(#10, inBuffer); if lineEnd > 0 then begin EvaluateIRCInput(conn, Copy(inBuffer, 1, lineEnd-1)); -- 1.7.2.5 From hartmut at tyndur.org Sun Sep 4 13:43:09 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Sun, 4 Sep 2011 13:43:09 +0200 Subject: [tyndur-devel] =?utf-8?q?=5BPATCH=5D_+_kedit=3A_Neues_Syntax-Hoch?= =?utf-8?q?lichten_f=C3=BCr_Perl_und_Python_hinzugef=C3=BCgt?= Message-ID: <1315136589-4426-1-git-send-email-hartmut@tyndur.org> + syntax_perl.pas: Perl-Syntax + syntax_python.pas: Python-Syntax * kedit_main.pas, kedit_tui.pas: Erkennung für die Extension .pl, .pm und .py Signed-off-by: Alexander Kluth --- src/modules/pas/kedit/kedit_main.pas | 6 + src/modules/pas/kedit/kedit_tui.pas | 8 +- src/modules/pas/kedit/syntax_perl.pas | 229 +++++++++++++++++++++++++++++++ src/modules/pas/kedit/syntax_python.pas | 227 ++++++++++++++++++++++++++++++ 4 files changed, 469 insertions(+), 1 deletions(-) create mode 100644 src/modules/pas/kedit/syntax_perl.pas create mode 100644 src/modules/pas/kedit/syntax_python.pas diff --git a/src/modules/pas/kedit/kedit_main.pas b/src/modules/pas/kedit/kedit_main.pas index d583e31..69732ad 100644 --- a/src/modules/pas/kedit/kedit_main.pas +++ b/src/modules/pas/kedit/kedit_main.pas @@ -110,6 +110,12 @@ begin state^.extension := 's'; end else if RightStr(filename, 2) = '.s' then begin state^.extension := 's'; + end else if RightStr(filename, 3) = '.pl' then begin + state^.extension := 'pl'; + end else if RightStr(filename, 3) = '.pm' then begin + state^.extension := 'pm'; + end else if RightStr(filename, 3) = '.py' then begin + state^.extension := 'py'; end; SetSyntaxHighlighting(state); diff --git a/src/modules/pas/kedit/kedit_tui.pas b/src/modules/pas/kedit/kedit_tui.pas index d0706bc..7e6cd40 100644 --- a/src/modules/pas/kedit/kedit_tui.pas +++ b/src/modules/pas/kedit/kedit_tui.pas @@ -61,7 +61,7 @@ implementation uses crt, strutils, sysutils, - syntax, syntax_c, syntax_pas, syntax_intel, syntax_atandt; + syntax, syntax_c, syntax_pas, syntax_intel, syntax_atandt, syntax_perl, syntax_python; resourcestring rsMenuBar = 'F2: Speichern, F3: Laden, F8: Syntax, F10: Beenden, EINFG: Einfügen/Ersetzen'; @@ -320,6 +320,12 @@ begin highlighter := TSyntax_INTEL.create; end else if state^.extension = 's' then begin highlighter := TSyntax_ATANDT.create; + end else if state^.extension = 'pl' then begin + highlighter := TSyntax_Perl.create; + end else if state^.extension = 'pm' then begin + highlighter := TSyntax_Perl.create; + end else if state^.extension = 'py' then begin + highlighter := TSyntax_Python.create; end; end; diff --git a/src/modules/pas/kedit/syntax_perl.pas b/src/modules/pas/kedit/syntax_perl.pas new file mode 100644 index 0000000..9abf845 --- /dev/null +++ b/src/modules/pas/kedit/syntax_perl.pas @@ -0,0 +1,229 @@ +(* + * Copyright (c) 2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Alexander Kluth. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + +unit syntax_perl; +{$mode ObjFPC} + +interface + +uses syntax; + +type + TSyntax_Perl = class(TSyntax) + public + procedure StartLine(s: String; state: integer); override; + function Next: TSyntaxChange; override; + end; + + +implementation +const + Keywords_Perl: Array [1..61] of String = ( + 'not', 'exp', 'log', 'srand', 'xor', 's', 'qq', 'qx', 'xor', + 'length', 'uc', 'ord', 'and', 'print', 'chr', + 'ord', 'for', 'qw', 'q', 'join', 'use', 'sub', 'tied', 'qx', + 'eval', 'int', 'for', 'abs', 'ne', 'open', 'hex', 'exp', + 'ref', 'scalar', 'srand', 'sqrt', 'cos', 'printf', + 'each', 'return', 'local', 'undef', 'or', 'oct', 'time', + 'foreach', 'chdir', 'kill', 'exec', 'gt', 'sort', 'split', + 'if', 'else', 'elsif', 'while', 'do', 'switch', 'case', 'my', + 'require' + ); + + Vars_Perl: Array [1..25] of String = ( + '$_', '$!', '$|', '$%', '$=', '$-', '$~', '$^', '$&', '$''', '$`', '$+', + '$/', '$\', '$,', '$"', '$$', '$#', '$?', '$*', '$0', '$[', '$]', '$;', '$@' + ); + +procedure TSyntax_Perl.StartLine(s: String; state: integer); +begin + line := s; + f_state := state; + pos := 1; + + case f_state of + 1: color := syn_comment; + 2: color := syn_comment; + 3: color := syn_number; + 4: color := syn_string; + 5: color := syn_string_special; + 6: color := syn_keyword; + 7: color := syn_type; + 8: color := syn_label; + else color := syn_other; + end; +end; + + +function TSyntax_Perl.Next: TSyntaxChange; +var + c: char; + tmp: integer; +begin + Next.posY := 0; + Next.color := color; + + while pos <= length(line) do begin + c := line[pos]; + + case f_state of + + 0: { Normaler Text } + case c of + '/': + begin + f_state := 2; + exit(Highlight(syn_string_special)); + end; + + '0' .. '9', '-', '+': + begin + tmp := MatchesNumber(line, pos); + if tmp <> 0 then begin + Next := Highlight(syn_number); + Inc(pos, tmp); + f_state := 3; + exit; + end; + end; + + '#': + begin + if Copy(line, 1, pos - 1) = Space(pos - 1) then begin + f_state := 1; + exit(Highlight(syn_comment)); + end; + end; + + '"': + begin + Next := Highlight(syn_string); + Inc(pos); + f_state := 4; + exit; + end; + ' ': + begin + if MatchesTrailingSpace(line, pos) then begin + Next := Highlight(syn_trailing_space); + pos := length(line) + 1; + exit; + end; + end; + + else + begin + tmp := MatchesKeyword(line, pos, Keywords_Perl); + if tmp <> 0 then begin + Next := Highlight(syn_keyword); + Inc(pos, tmp); + f_state := 6; + exit; + end; + + tmp := MatchesKeyword(line, pos, Vars_Perl); + if tmp <> 0 then begin + Next := Highlight(syn_type); + Inc(pos, tmp); + f_state := 7; + exit; + end; + + tmp := MatchesType(line, pos); + if tmp <> 0 then begin + Next := Highlight(syn_type); + Inc(pos, tmp); + f_state := 7; + exit; + end; + + tmp := MatchesLabel(line, pos); + if tmp <> 0 then begin + Next := Highlight(syn_label); + Inc(pos, tmp); + f_state := 8; + exit; + end; + end; + end; + + 1: { Kommentar bis Zeilenende } + begin + pos := length(line); + break; + end; + + 2: { Regulärer Ausdruck } + if Matches(line, pos, '/') then begin + f_state := 0; + Inc(pos, 2); + exit(Highlight(syn_other)); + end; + + 3, 6, 7, 8: { Ende eines gefaerbten Worts } + begin + f_state := 0; + exit(Highlight(syn_other)); + end; + + 4: { String } + case c of + '\': + begin + f_state := 5; + Next := Highlight(syn_string_special); + Inc(pos); + exit; + end; + + '"': + begin + f_state := 0; + Inc(pos); + exit(Highlight(syn_other)); + end; + end; + + 5: { Escaptes Zeichen in einem String } + begin + f_state := 4; + Inc(pos); + exit(Highlight(syn_string)); + end; + + end; + + Inc(pos); + end; + + if f_state in [1, 3, 4, 5] then begin + f_state := 0; + end; +end; + +end. diff --git a/src/modules/pas/kedit/syntax_python.pas b/src/modules/pas/kedit/syntax_python.pas new file mode 100644 index 0000000..5aa4602 --- /dev/null +++ b/src/modules/pas/kedit/syntax_python.pas @@ -0,0 +1,227 @@ +(* + * Copyright (c) 2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Alexander Kluth. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + +unit syntax_python; +{$mode ObjFPC} + +interface + +uses syntax; + +type + TSyntax_Python = class(TSyntax) + public + procedure StartLine(s: String; state: integer); override; + function Next: TSyntaxChange; override; + end; + + +implementation +const + Keywords_Python: Array [1..37] of String = ( + 'and', 'del', 'for', 'is', 'raise', 'asser', 'elif', 'from', + 'lambda', 'return', 'break', 'else', 'global', 'not', 'try', + 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', + 'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', + '__MAIN__', 'del', 'with', 'finally', 'from', 'as', 'assert', + 'nonlocal' + ); + + +procedure TSyntax_Python.StartLine(s: String; state: integer); +begin + line := s; + f_state := state; + pos := 1; + + case f_state of + 1: color := syn_comment; + 2: color := syn_comment; + 3: color := syn_number; + 4: color := syn_string; + 5: color := syn_string_special; + 6: color := syn_keyword; + 7: color := syn_type; + 8: color := syn_label; + else color := syn_other; + end; +end; + + +function TSyntax_Python.Next: TSyntaxChange; +var + c: char; + tmp: integer; +begin + Next.posY := 0; + Next.color := color; + + while pos <= length(line) do begin + c := line[pos]; + + case f_state of + + 0: { Normaler Text } + case c of + '/': + begin + f_state := 2; + exit(Highlight(syn_string_special)); + end; + + '0' .. '9', '-', '+': + begin + tmp := MatchesNumber(line, pos); + if tmp <> 0 then begin + Next := Highlight(syn_number); + Inc(pos, tmp); + f_state := 3; + exit; + end; + end; + + '#': + begin + if Copy(line, 1, pos - 1) = Space(pos - 1) then begin + f_state := 1; + exit(Highlight(syn_comment)); + end; + end; + + '"': + begin + if Matches(line, pos, '"""') then begin + f_state := 2; + exit(Highlight(syn_comment)); + end; + + Next := Highlight(syn_string); + Inc(pos); + f_state := 4; + exit; + end; + ' ': + begin + if MatchesTrailingSpace(line, pos) then begin + Next := Highlight(syn_trailing_space); + pos := length(line) + 1; + exit; + end; + end; + + else + begin + tmp := MatchesKeyword(line, pos, Keywords_Python); + if tmp <> 0 then begin + Next := Highlight(syn_keyword); + Inc(pos, tmp); + f_state := 6; + exit; + end; + + {tmp := MatchesKeyword(line, pos, Vars_Perl); + if tmp <> 0 then begin + Next := Highlight(syn_type); + Inc(pos, tmp); + f_state := 7; + exit; + end; +} + tmp := MatchesType(line, pos); + if tmp <> 0 then begin + Next := Highlight(syn_type); + Inc(pos, tmp); + f_state := 7; + exit; + end; + + tmp := MatchesLabel(line, pos); + if tmp <> 0 then begin + Next := Highlight(syn_label); + Inc(pos, tmp); + f_state := 8; + exit; + end; + end; + end; + + 1: { Kommentar bis Zeilenende } + begin + pos := length(line); + break; + end; + + 2: { Mehrzeiliger Kommentar } + if Matches(line, pos, '"""') then begin + f_state := 0; + Inc(pos, 2); + exit(Highlight(syn_other)); + end; + + 3, 6, 7, 8: { Ende eines gefaerbten Worts } + begin + f_state := 0; + exit(Highlight(syn_other)); + end; + + 4: { String } + case c of + '\': + begin + f_state := 5; + Next := Highlight(syn_string_special); + Inc(pos); + exit; + end; + + '"': + begin + f_state := 0; + Inc(pos); + exit(Highlight(syn_other)); + end; + end; + + 5: { Escaptes Zeichen in einem String } + begin + f_state := 4; + Inc(pos); + exit(Highlight(syn_string)); + end; + + end; + + Inc(pos); + end; + + if f_state in [1, 3, 4, 5] then begin + f_state := 0; + end; +end; + +end. -- 1.7.2.5 From hartmut at tyndur.org Mon Sep 5 12:15:07 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Mon, 5 Sep 2011 12:15:07 +0200 Subject: [tyndur-devel] =?utf-8?q?=5BPATCH=5D_+_kernel2=3A_Debugging_f?= =?utf-8?q?=C3=BCr_kernel2_=22aktiviert=22?= Message-ID: <1315217707-16790-1-git-send-email-hartmut@tyndur.org> + debug.c: debug_parse_cmdline aus kernel1 kopiert * init.c: #if 0 entfernt, damit es mitkompilliert wird * multiboot.h: mi_cmdline zu char* geändert Signed-off-by: Alexander Kluth --- src/kernel2/include/multiboot.h | 2 +- src/kernel2/src/debug.c | 36 +++++++++++++++++++++++++++++++++++- src/kernel2/src/init.c | 30 +++++++++++++++--------------- 3 files changed, 51 insertions(+), 17 deletions(-) diff --git a/src/kernel2/include/multiboot.h b/src/kernel2/include/multiboot.h index 687fee9..046df51 100644 --- a/src/kernel2/include/multiboot.h +++ b/src/kernel2/include/multiboot.h @@ -103,7 +103,7 @@ struct multiboot_info { uint8_t mi_boot_device_drive; /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_CMDLINE. */ - uint32_t mi_cmdline; + char* mi_cmdline; /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_MODS. */ uint32_t mi_mods_count; diff --git a/src/kernel2/src/debug.c b/src/kernel2/src/debug.c index 45c8a11..46ec926 100644 --- a/src/kernel2/src/debug.c +++ b/src/kernel2/src/debug.c @@ -59,7 +59,7 @@ bool debug_test_flag(uint32_t flag) /** * Gibt die Debug-Meldung aus, wenn das Flag gesetzt ist. - * + * * @param flag Flag-Nummer */ void debug_print(uint32_t flag, const char* message) @@ -69,3 +69,37 @@ void debug_print(uint32_t flag, const char* message) } } +///Setzt die richtigen Debug-Flags anhand der Commandline vom Bootloader +void debug_parse_cmdline(char* cmdline) +{ + char* pos = strstr(cmdline, "debug="); + debug_flags = 0; + + if(pos == NULL) return; + + //Debug= ueberspringen + pos += 6; + while((*pos != 0) && (*pos != ' ')) + { + switch(*pos) + { + case 'i': + debug_flags |= DEBUG_FLAG_INIT; + break; + + case 'p': + debug_flags |= DEBUG_FLAG_PEDANTIC; + break; + + case 's': + debug_flags |= DEBUG_FLAG_STACK_BACKTRACE; + break; + + case 'c': + debug_flags |= DEBUG_FLAG_SYSCALL; + break; + } + pos++; + } +} + diff --git a/src/kernel2/src/init.c b/src/kernel2/src/init.c index f754122..e025564 100644 --- a/src/kernel2/src/init.c +++ b/src/kernel2/src/init.c @@ -66,8 +66,10 @@ lock_t init_lock = 0; void smp_init(void); void gdt_init(void); void vm86_init(void); +void panic(char* message, ...); -/** + +/** * Kernel-Initialisierung erfolgt hier, * die Funktion init wird von header.asm aufgerufen (BSP = true) oder aus * smp_trampoline.asm @@ -93,13 +95,11 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) init_thread.process = &init_process; cpu_get(0)->thread = &init_thread; - #if 0 // Debugparameter verarbeiten, das ist aber nur moeglich, wenn eine // Kernelkommandozeile existiert. if ((multiboot_info.mi_flags & MULTIBOOT_INFO_HAS_CMDLINE) != 0) { debug_parse_cmdline(multiboot_info.mi_cmdline); } - #endif #if CONFIG_ARCH == ARCH_I386 // IVT fuer den VM86 sichern @@ -109,17 +109,17 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) debug_print(DEBUG_FLAG_INIT, "Initialisiere physikalische" "Speicherverwaltung"); pmm_init(&multiboot_info); - + // APIC initialisieren (Wird bei der SMP-Initialisierung genutzt apic_init(); - + // SMP muss _direkt nach_ der physikalischen Speicherverwaltung // initialisiert werden, da sonst notwendige Strukturen im Speicher // dazu ueberschrieben werden koennten. debug_print(DEBUG_FLAG_INIT, "Initialisiere Mehrprozessor-" "Unterstuetzung"); smp_init(); - + // GDT und IDT vorbereiten gdt_init(); im_init(); @@ -152,8 +152,8 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) unlock(&mm_prepare_lock); } else { // Warten, bis wir das Signal vom BSP haben, zum fortfahren - lock_wait(&mm_prepare_lock); - + lock_wait(&mm_prepare_lock); + // TODO: Was tun, wenn dieses identity-Mapping schief geht? // Dies ist naehmlich sher warscheinlich. uintptr_t sp; @@ -165,7 +165,7 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) mmc_map(init_context, (vaddr_t) PAGE_ALIGN_ROUND_DOWN(sp), (paddr_t) PAGE_ALIGN_ROUND_DOWN(sp), MM_FLAGS_KERNEL_DATA, 1); } - + // Warten, bis alle CPUs hier angekommen sind. // TODO: Timeout? @@ -197,7 +197,7 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) ); #endif - static volatile lock_t vmm_lock = LOCK_LOCKED; + static volatile lock_t vmm_lock = LOCK_LOCKED; // ACHTUNG: Hier besteht ein kleines Problem: Da in vmm_init der APIC // gemappt wird, kann nicht mehr darauf zugegriffen werden, bis Paging // aktiviert ist. Das geht sonst schief! Genau das geschieht aber, wenn @@ -247,7 +247,7 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) // Warten, bis wir das Signal vom BSP haben, zum fortfahren lock_wait(&final_lock); } - + // Ersten Thread auf dieser CPU starten current_thread = pm_scheduler_pop(); @@ -270,7 +270,7 @@ __attribute__((noreturn)) void panic(char * message, ...) "PANIC: "); kaprintf(message, args); kprintf("\n"); - + // FIXME #undef CONFIG_DEBUG_LAST_SYSCALL #ifdef CONFIG_DEBUG_LAST_SYSCALL @@ -283,12 +283,12 @@ __attribute__((noreturn)) void panic(char * message, ...) } kprintf("\n"); } - #endif + #endif stack_backtrace(0, 0); - + kprintf("\033[0;37m\033[40m"); - + while(1) { cpu_halt(); -- 1.7.2.5 From hartmut at tyndur.org Mon Sep 5 14:05:37 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Mon, 5 Sep 2011 14:05:37 +0200 Subject: [tyndur-devel] =?utf-8?q?=5BPATCH_1/2=5D_kernel2=3A_Debugging_f?= =?utf-8?q?=C3=BCr_kernel2_=22aktiviert=22?= Message-ID: <1315224338-7313-1-git-send-email-hartmut@tyndur.org> + debug.c: debug_parse_cmdline aus kernel1 kopiert * init.c: #if 0 entfernt, damit es mitkompilliert wird * multiboot.h: mi_cmdline zu char* geändert Signed-off-by: Alexander Kluth --- src/kernel2/include/multiboot.h | 2 +- src/kernel2/src/debug.c | 36 +++++++++++++++++++++++++++++++++++- src/kernel2/src/init.c | 30 +++++++++++++++--------------- 3 files changed, 51 insertions(+), 17 deletions(-) diff --git a/src/kernel2/include/multiboot.h b/src/kernel2/include/multiboot.h index 687fee9..046df51 100644 --- a/src/kernel2/include/multiboot.h +++ b/src/kernel2/include/multiboot.h @@ -103,7 +103,7 @@ struct multiboot_info { uint8_t mi_boot_device_drive; /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_CMDLINE. */ - uint32_t mi_cmdline; + char* mi_cmdline; /* Valid if mi_flags sets MULTIBOOT_INFO_HAS_MODS. */ uint32_t mi_mods_count; diff --git a/src/kernel2/src/debug.c b/src/kernel2/src/debug.c index 45c8a11..28312db 100644 --- a/src/kernel2/src/debug.c +++ b/src/kernel2/src/debug.c @@ -59,7 +59,7 @@ bool debug_test_flag(uint32_t flag) /** * Gibt die Debug-Meldung aus, wenn das Flag gesetzt ist. - * + * * @param flag Flag-Nummer */ void debug_print(uint32_t flag, const char* message) @@ -69,3 +69,37 @@ void debug_print(uint32_t flag, const char* message) } } +///Setzt die richtigen Debug-Flags anhand der Commandline vom Bootloader +void debug_parse_cmdline(char* cmdline) +{ + char* pos = strstr(cmdline, "debug="); + debug_flags = 0; + + if(pos == NULL) return; + + //Debug= ueberspringen + pos += 6; + while((*pos != 0) && (*pos != ' ')) + { + switch(*pos) + { + case 'i': + debug_flags |= DEBUG_FLAG_INIT; + break; + + case 'p': + debug_flags |= DEBUG_FLAG_PEDANTIC; + break; + + case 's': + debug_flags |= DEBUG_FLAG_STACK_BACKTRACE; + break; + + case 'c': + debug_flags |= DEBUG_FLAG_SYSCALL; + break; + } + pos++; + } +} + diff --git a/src/kernel2/src/init.c b/src/kernel2/src/init.c index f754122..e025564 100644 --- a/src/kernel2/src/init.c +++ b/src/kernel2/src/init.c @@ -66,8 +66,10 @@ lock_t init_lock = 0; void smp_init(void); void gdt_init(void); void vm86_init(void); +void panic(char* message, ...); -/** + +/** * Kernel-Initialisierung erfolgt hier, * die Funktion init wird von header.asm aufgerufen (BSP = true) oder aus * smp_trampoline.asm @@ -93,13 +95,11 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) init_thread.process = &init_process; cpu_get(0)->thread = &init_thread; - #if 0 // Debugparameter verarbeiten, das ist aber nur moeglich, wenn eine // Kernelkommandozeile existiert. if ((multiboot_info.mi_flags & MULTIBOOT_INFO_HAS_CMDLINE) != 0) { debug_parse_cmdline(multiboot_info.mi_cmdline); } - #endif #if CONFIG_ARCH == ARCH_I386 // IVT fuer den VM86 sichern @@ -109,17 +109,17 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) debug_print(DEBUG_FLAG_INIT, "Initialisiere physikalische" "Speicherverwaltung"); pmm_init(&multiboot_info); - + // APIC initialisieren (Wird bei der SMP-Initialisierung genutzt apic_init(); - + // SMP muss _direkt nach_ der physikalischen Speicherverwaltung // initialisiert werden, da sonst notwendige Strukturen im Speicher // dazu ueberschrieben werden koennten. debug_print(DEBUG_FLAG_INIT, "Initialisiere Mehrprozessor-" "Unterstuetzung"); smp_init(); - + // GDT und IDT vorbereiten gdt_init(); im_init(); @@ -152,8 +152,8 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) unlock(&mm_prepare_lock); } else { // Warten, bis wir das Signal vom BSP haben, zum fortfahren - lock_wait(&mm_prepare_lock); - + lock_wait(&mm_prepare_lock); + // TODO: Was tun, wenn dieses identity-Mapping schief geht? // Dies ist naehmlich sher warscheinlich. uintptr_t sp; @@ -165,7 +165,7 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) mmc_map(init_context, (vaddr_t) PAGE_ALIGN_ROUND_DOWN(sp), (paddr_t) PAGE_ALIGN_ROUND_DOWN(sp), MM_FLAGS_KERNEL_DATA, 1); } - + // Warten, bis alle CPUs hier angekommen sind. // TODO: Timeout? @@ -197,7 +197,7 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) ); #endif - static volatile lock_t vmm_lock = LOCK_LOCKED; + static volatile lock_t vmm_lock = LOCK_LOCKED; // ACHTUNG: Hier besteht ein kleines Problem: Da in vmm_init der APIC // gemappt wird, kann nicht mehr darauf zugegriffen werden, bis Paging // aktiviert ist. Das geht sonst schief! Genau das geschieht aber, wenn @@ -247,7 +247,7 @@ void init(int multiboot_magic, struct multiboot_info *boot_info, bool bsp) // Warten, bis wir das Signal vom BSP haben, zum fortfahren lock_wait(&final_lock); } - + // Ersten Thread auf dieser CPU starten current_thread = pm_scheduler_pop(); @@ -270,7 +270,7 @@ __attribute__((noreturn)) void panic(char * message, ...) "PANIC: "); kaprintf(message, args); kprintf("\n"); - + // FIXME #undef CONFIG_DEBUG_LAST_SYSCALL #ifdef CONFIG_DEBUG_LAST_SYSCALL @@ -283,12 +283,12 @@ __attribute__((noreturn)) void panic(char * message, ...) } kprintf("\n"); } - #endif + #endif stack_backtrace(0, 0); - + kprintf("\033[0;37m\033[40m"); - + while(1) { cpu_halt(); -- 1.7.2.5 From hartmut at tyndur.org Mon Sep 5 14:05:38 2011 From: hartmut at tyndur.org (Alexander Kluth) Date: Mon, 5 Sep 2011 14:05:38 +0200 Subject: [tyndur-devel] =?utf-8?q?=5BPATCH_2/2=5D_kernel2=3A_Debugging_f?= =?utf-8?q?=C3=BCr_kernel2_aktiviert?= In-Reply-To: <1315224338-7313-1-git-send-email-hartmut@tyndur.org> References: <1315224338-7313-1-git-send-email-hartmut@tyndur.org> Message-ID: <1315224338-7313-2-git-send-email-hartmut@tyndur.org> + arch/i386/cpu.h: Prototyp für io_ports_check hinzugefügt + arch/i386/io.h: io_ports_check hinzugefügt + arch/i386/syscall.c: DEBUG_FLAG_SYSCALL wird nun benutzt ;-) Signed-off-by: Alexander Kluth --- src/kernel2/include/arch/i386/cpu.h | 2 ++ src/kernel2/src/arch/i386/io.c | 21 +++++++++++++++++++++ src/kernel2/src/arch/i386/syscall.c | 7 +++++++ 3 files changed, 30 insertions(+), 0 deletions(-) diff --git a/src/kernel2/include/arch/i386/cpu.h b/src/kernel2/include/arch/i386/cpu.h index 285e677..7e440f1 100644 --- a/src/kernel2/include/arch/i386/cpu.h +++ b/src/kernel2/include/arch/i386/cpu.h @@ -195,6 +195,8 @@ void cpu_prepare_current_task(void); */ void io_activate_bitmap(pm_process_t* task); +void io_ports_check(pm_process_t* task); + /** * Hält die CPU an. */ diff --git a/src/kernel2/src/arch/i386/io.c b/src/kernel2/src/arch/i386/io.c index 0dc6ca7..01d9492 100644 --- a/src/kernel2/src/arch/i386/io.c +++ b/src/kernel2/src/arch/i386/io.c @@ -212,3 +212,24 @@ void io_activate_bitmap(pm_process_t* task) memset(tss->io_bit_map, 0xff, CPU_IO_BITMAP_LENGTH / 8); } } + +void io_ports_check(pm_process_t* task) +{ + uint32_t i, j; + uint8_t* io_bitmap = task->io_bitmap; + uint8_t bit; + + if (io_bitmap == NULL) { + return; + } + + for (i = 0; i < CPU_IO_BITMAP_LENGTH / 8; i++) { + for (j = 0; j < 8; j++) { + bit = 1 << j; + if (((io_bitmap[i] & bit) == 0) && ((global_port_bitmap[i] & bit) == 0)) { + panic("IO-Port-Bitmaps sind beschaedigt (Port %d, PID %d)", i * 8 + j, task->pid); + } + } + } +} + diff --git a/src/kernel2/src/arch/i386/syscall.c b/src/kernel2/src/arch/i386/syscall.c index 7f4a45e..4c1bba4 100644 --- a/src/kernel2/src/arch/i386/syscall.c +++ b/src/kernel2/src/arch/i386/syscall.c @@ -6,6 +6,8 @@ #include "syscallno.h" #include "kprintf.h" #include "kernel.h" +#include "debug.h" +#include "tasks.h" #define DEBUG_SYSCALLS 1 @@ -73,6 +75,11 @@ void syscall_arch(machine_state_t* isf) void* handler = syscalls[number].handler; + if (debug_test_flag(DEBUG_FLAG_SYSCALL)) { + kprintf("[PID %d] Syscall:%d\n", current_process->pid, isf->eax); + io_ports_check(current_process); + } + // FIXME Das ist alles nur bedingt ueberzeugend... if (handler == syscall_fastrpc) { -- 1.7.2.5 From max at tyndur.org Wed Sep 14 00:10:40 2011 From: max at tyndur.org (Max Reitz) Date: Wed, 14 Sep 2011 00:10:40 +0200 Subject: [tyndur-devel] [PATCH] libm: lrint Message-ID: <1315951840-3919-1-git-send-email-max@tyndur.org> + lrint und Konsorten implementiert. Signed-off-by: Max Reitz --- src/modules/include/math.h | 7 ++++ src/modules/lib/stdlibc/math/lrint.c | 60 ++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 src/modules/lib/stdlibc/math/lrint.c diff --git a/src/modules/include/math.h b/src/modules/include/math.h index 8aa389c..44a4810 100644 --- a/src/modules/include/math.h +++ b/src/modules/include/math.h @@ -127,6 +127,13 @@ long double nearbyintl(long double x); double rint(double x); double pow(double x, double y); +long lrint(double x); +long lrintf(float x); +long lrintl(long double x); +long long llrint(double x); +long long llrintf(float x); +long long llrintl(long double x); + double fmod(double x, double y); float fmodf(float x, float y); long double fmodl(long double x, long double y); diff --git a/src/modules/lib/stdlibc/math/lrint.c b/src/modules/lib/stdlibc/math/lrint.c new file mode 100644 index 0000000..36a3023 --- /dev/null +++ b/src/modules/lib/stdlibc/math/lrint.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2011 The tyndur Project. All rights reserved. + * + * This code is derived from software contributed to the tyndur Project + * by Max Reitz. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +long lrint(double x) +{ + return (long)round(x); +} + +long lrintf(float x) +{ + return (long)roundf(x); +} + +long lrintl(long double x) +{ + return (long)roundl(x); +} + +long long llrint(double x) +{ + return (long long)round(x); +} + +long long llrintf(float x) +{ + return (long long)roundf(x); +} + +long long llrintl(long double x) +{ + return (long long)roundl(x); +} + -- 1.7.6.1 From max at tyndur.org Wed Sep 14 00:13:41 2011 From: max at tyndur.org (Max Reitz) Date: Wed, 14 Sep 2011 00:13:41 +0200 Subject: [tyndur-devel] [PATCH] lbuilds: Soft And Slow Message-ID: <1315952021-4206-1-git-send-email-max@tyndur.org> + lbuild für diesen Software-OpenGL-Rasterizer hinzugefügt; ein Beispiel wird mitgebaut (gears, benötigt SDL). Signed-off-by: Max Reitz --- .../soft-and-slow/master/patches/Makefile.patch | 29 +++++ lbuilds/soft-and-slow/master/patches/gears.patch | 123 ++++++++++++++++++++ lbuilds/soft-and-slow/master/patches/series | 2 + .../master/soft-and-slow-master.lbuild | 56 +++++++++ 4 files changed, 210 insertions(+), 0 deletions(-) create mode 100644 lbuilds/soft-and-slow/master/patches/Makefile.patch create mode 100644 lbuilds/soft-and-slow/master/patches/gears.patch create mode 100644 lbuilds/soft-and-slow/master/patches/series create mode 100644 lbuilds/soft-and-slow/master/soft-and-slow-master.lbuild diff --git a/lbuilds/soft-and-slow/master/patches/Makefile.patch b/lbuilds/soft-and-slow/master/patches/Makefile.patch new file mode 100644 index 0000000..93b98bb --- /dev/null +++ b/lbuilds/soft-and-slow/master/patches/Makefile.patch @@ -0,0 +1,29 @@ +Index: src/soft-and-slow-master/lib/Makefile +=================================================================== +--- src.orig/soft-and-slow-master/lib/Makefile 2011-09-13 20:41:00.000000000 +0200 ++++ src/soft-and-slow-master/lib/Makefile 2011-09-13 22:35:42.000000000 +0200 +@@ -1,12 +1,10 @@ + THREADING = 0 +-ASSEMBLY = 1 +-SHADERS = 1 ++ASSEMBLY = 0 ++SHADERS = 0 + +-AR = ar rcs +-CC = gcc + OCP = objcopy + +-CFLAGS = -O3 -march=native -g2 -std=c1x -Wall -Wextra -pedantic -I../include -D_GNU_SOURCE ++CFLAGS = -O3 -march=native -g2 -std=gnu99 -Wall -Wextra -pedantic -I../include -D_GNU_SOURCE -m32 + ifeq ($(THREADING), 1) + CFLAGS += -DTHREADING -pthread + endif +@@ -17,7 +15,7 @@ + CFLAGS += -DUSE_SHADERS + endif + +-OCP_FROM_TEXT = -I binary -O elf64-x86-64 -B i386 ++OCP_FROM_TEXT = -I binary -O elf32-i386 -B i386 + RM = rm -f + ASM = fasm + diff --git a/lbuilds/soft-and-slow/master/patches/gears.patch b/lbuilds/soft-and-slow/master/patches/gears.patch new file mode 100644 index 0000000..93a2539 --- /dev/null +++ b/lbuilds/soft-and-slow/master/patches/gears.patch @@ -0,0 +1,123 @@ +Index: src/soft-and-slow-master/test/gears/Makefile +=================================================================== +--- src.orig/soft-and-slow-master/test/gears/Makefile 2011-09-13 22:35:20.000000000 +0200 ++++ src/soft-and-slow-master/test/gears/Makefile 2011-09-13 22:41:11.000000000 +0200 +@@ -1,8 +1,6 @@ +-CC = gcc +-LINK = gcc + RM = rm -f +-CFLAGS = -rdynamic -O3 -Wall -Wextra -std=c1x -I../../include +-LDFLAGS = -rdynamic -L../../lib -lSDL -lSASGL -lm -lrt ++CFLAGS = -O3 -Wall -Wextra -std=gnu99 -I../../include -m32 ++LDFLAGS = -L../../lib -lSDL -lSASGL -lm -m32 + + .PHONY: all clean + +Index: src/soft-and-slow-master/test/gears/gears.c +=================================================================== +--- src.orig/soft-and-slow-master/test/gears/gears.c 2011-09-13 20:41:00.000000000 +0200 ++++ src/soft-and-slow-master/test/gears/gears.c 2011-09-13 23:56:08.000000000 +0200 +@@ -3,7 +3,6 @@ + * + * Command line options: + * -info print GL implementation information +- * -exit automatically exit after 30 seconds + * + * + * Brian Paul +@@ -17,6 +16,8 @@ + #include + #include + ++#include