rosapps: add notevil to new repo
Added: trunk/rosapps/notevil/
Added: trunk/rosapps/notevil/notevil.c
Added: trunk/rosapps/notevil/notevil.rbuild
Added: trunk/rosapps/notevil/notevil.rc
Added: trunk/rosapps/notevil/readme.txt
Added: trunk/rosapps/notevil/resource.h
Property changes on: trunk/rosapps/notevil
___________________________________________________________________
Name: svn:history
   + ------------------------------------------------------------------------
r20944 | hbirr | 2006-01-18 00:14:51 +0100 (Mi, 18 Jan 2006) | 2 lines
Removed my name from the hall of fame. Since it seems, that parts of ReactOS are implemented by ripping code from Windows, it isn't longer honourable to find my name inside the sources of ReactOS.
------------------------------------------------------------------------
r18720 | gvg | 2005-10-23 20:54:23 +0200 (So, 23 Okt 2005) | 2 lines
SVN maintenance
------------------------------------------------------------------------
r17609 | hpoussin | 2005-09-02 23:13:10 +0200 (Fr, 02 Sep 2005) | 2 lines
RmRemove warnings
------------------------------------------------------------------------
r16719 | mf | 2005-07-24 23:44:45 +0200 (So, 24 Jul 2005) | 1 line
set eol-style for XML files in rosapps
------------------------------------------------------------------------
r15923 | mbosma | 2005-06-15 19:51:54 +0200 (Mi, 15 Jun 2005) | 1 line
delete .cvsignore
------------------------------------------------------------------------
r15921 | mbosma | 2005-06-15 19:37:14 +0200 (Mi, 15 Jun 2005) | 1 line
remove old makefile
------------------------------------------------------------------------
r15920 | mbosma | 2005-06-15 19:19:52 +0200 (Mi, 15 Jun 2005) | 1 line
Created XML makefiles for rosapps. You need to checkout /rosapps in your /reactos folder to use it. This projects do not build: /lib/dflat32 and /welcome (I don't know if they did before). Winemine does not work. (but it builds) /test makefiles are not done yet.
------------------------------------------------------------------------
r15091 | sedwards | 2005-05-07 23:24:31 +0200 (Sa, 07 Mai 2005) | 1 line
remove trailing whitespace at end of lines
------------------------------------------------------------------------
r14515 | sedwards | 2005-04-05 21:17:21 +0200 (Di, 05 Apr 2005) | 1 line
__USE_W32API
------------------------------------------------------------------------
r13389 | ea | 2005-02-02 22:40:33 +0100 (Mi, 02 Feb 2005) | 1 line
Make Jim Tabor visible.
------------------------------------------------------------------------
r13381 | jimtabor | 2005-02-01 18:40:21 +0100 (Di, 01 Feb 2005) | 1 line
Added Jimtabor to list.
------------------------------------------------------------------------
r13088 | ea | 2005-01-16 23:53:36 +0100 (So, 16 Jan 2005) | 1 line
Alex Ionescu added.
------------------------------------------------------------------------
r11299 | gvg | 2004-10-17 00:30:19 +0200 (So, 17 Okt 2004) | 2 lines
Centralize definition of version resource
------------------------------------------------------------------------
r6284 | gvg | 2003-10-11 23:06:18 +0200 (Sa, 11 Okt 2003) | 5 lines
Added Mark Tempel, Art Yerkes, Martin Fuchs, Vizzini, Filip Navara,
Andrew Greenwood, Thomas Weidenmueller and Jonathan Wilson to list
of coders.
Split up STRINGTABLE resource.
------------------------------------------------------------------------
r5181 | royce | 2003-07-20 08:51:29 +0200 (So, 20 Jul 2003) | 2 lines
added myself to the "notevil" list
------------------------------------------------------------------------
r5004 | sedwards | 2003-07-06 06:48:53 +0200 (So, 06 Jul 2003) | 2 lines
update cvsingnore files
------------------------------------------------------------------------
r4860 | ea | 2003-06-07 11:43:16 +0200 (Sa, 07 Jun 2003) | 2 lines
fireball added
------------------------------------------------------------------------
r4823 | ea | 2003-06-02 14:30:05 +0200 (Mo, 02 Jun 2003) | 5 lines
Campbell and Dalsnes added to the coders directory.
By the way:
- who's fireball@mok ?
- how do I add Unicode strings to RC files?
------------------------------------------------------------------------
r4000 | robd | 2003-01-15 20:55:29 +0100 (Mi, 15 Jan 2003) | 2 lines
Mainly standardisation of makefiles, now support make install rules and use ros headers...
------------------------------------------------------------------------
r3930 | ea | 2003-01-04 16:21:18 +0100 (Sa, 04 Jan 2003) | 2 lines
Eugene Ingerman, Guido de Jong, Jurgen van Gael, Marty Dill, and Ge van Geldorp added to the list of ROS coders.
------------------------------------------------------------------------
r3454 | chorns | 2002-09-03 20:44:19 +0200 (Di, 03 Sep 2002) | 4 lines
Don't try to build modules that won't build.
Support latest MinGW releases.
Support building on linux.
------------------------------------------------------------------------
r3388 | robd | 2002-08-25 08:47:16 +0200 (So, 25 Aug 2002) | 2 lines
Fixes for building with __MINGW32_VERSION 2.1
------------------------------------------------------------------------
r3189 | robd | 2002-07-07 21:47:04 +0200 (So, 07 Jul 2002) | 2 lines
Added entry for new coder.
------------------------------------------------------------------------
r2689 | ea | 2002-03-09 17:04:50 +0100 (Sa, 09 Mrz 2002) | 3 lines
I added Steven Edwards and KJK::Hyperion to the rccp.
More to come as soon as I finish scanning the cvs-commit list.
------------------------------------------------------------------------
r2299 | ea | 2001-10-16 23:02:02 +0200 (Di, 16 Okt 2001) | 3 lines
Fixes to compile the whole set of ROS applications.
Hartmut Birr added to the ROS console parade.
------------------------------------------------------------------------
r2111 | ea | 2001-07-28 10:02:05 +0200 (Sa, 28 Jul 2001) | 2 lines
cmd, more, tee, y, notevil, sysutils linked to msvcrt.dll.
------------------------------------------------------------------------
r1629 | phreak | 2001-02-18 20:31:38 +0100 (So, 18 Feb 2001) | 2 lines
Switched to using waitable timers instead of Sleep(), gives more accurate time cycles, also added some small optimizations
------------------------------------------------------------------------
r1587 | phreak | 2001-01-31 04:03:20 +0100 (Mi, 31 Jan 2001) | 2 lines
Minor fix
------------------------------------------------------------------------
r1526 | phreak | 2001-01-16 21:58:58 +0100 (Di, 16 Jan 2001) | 2 lines
Fixed bug with screen buffers larger than console window ( i.e. scrollback buffers )
------------------------------------------------------------------------
r1355 | ea | 2000-09-13 01:21:20 +0200 (Mi, 13 Sep 2000) | 2 lines
Added Casper to the coders parade.
------------------------------------------------------------------------
r963 | ea | 2000-01-23 23:52:57 +0100 (So, 23 Jan 2000) | 2 lines
Coders directory updated.
------------------------------------------------------------------------
r679 | ekohl | 1999-10-04 00:10:15 +0200 (Mo, 04 Okt 1999) | 2 lines
Made notevil screen size aware.
------------------------------------------------------------------------
r468 | ea | 1999-05-15 09:23:34 +0200 (Sa, 15 Mai 1999) | 2 lines
*** empty log message ***

Added: trunk/rosapps/notevil/notevil.c
--- trunk/rosapps/notevil/notevil.c	2006-02-07 20:39:48 UTC (rev 101)
+++ trunk/rosapps/notevil/notevil.c	2006-02-07 20:40:25 UTC (rev 102)
@@ -0,0 +1,267 @@
+/* $Id$
+ *
+ * notevil.c
+ *
+ * --------------------------------------------------------------------
+ *
+ * This software 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.
+ *
+ * This software 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 this software; see the file COPYING.LIB. If
+ * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ * Cambridge, MA 02139, USA.
+ *
+ * --------------------------------------------------------------------
+ * ReactOS Coders Console Parade
+ *
+ * 19990411 EA
+ * 19990515 EA
+ */
+//#define UNICODE
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <tchar.h>
+#include "resource.h"
+
+LPCTSTR app_name = _TEXT("notevil");
+
+HANDLE	myself;
+HANDLE	ScreenBuffer;
+CONSOLE_SCREEN_BUFFER_INFO ScreenBufferInfo;
+HANDLE WaitableTimer;
+
+void
+WriteStringAt(
+	LPTSTR	lpString,
+	COORD	xy,
+	WORD	wColor
+	)
+{
+	DWORD	cWritten = 0;
+	WORD	wLen = lstrlen(lpString);
+
+	if (0 == wLen)
+		return;
+	// don't bother writing text when erasing
+	if( wColor )
+	  WriteConsoleOutputCharacter( ScreenBuffer,
+				       lpString,
+				       wLen,
+				       xy,
+				       & cWritten
+				       );
+	FillConsoleOutputAttribute(
+		ScreenBuffer,
+		wColor,
+		wLen,
+		xy,
+		& cWritten
+		);
+}
+
+
+#ifdef DISPLAY_COORD
+void
+WriteCoord(COORD c)
+{
+	COORD xy = {0,0};
+	TCHAR buf [40];
+
+	wsprintf(
+		buf,
+		_TEXT("x=%02d  y=%02d"),
+		c.X,
+		c.Y
+		);
+	WriteStringAt(
+		buf,
+		xy,
+		(BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE)
+		);
+}
+#endif /* def DISPLAY_COORD */
+
+
+INT
+GetNextString(
+	LPTSTR	Buffer,
+	INT	BufferSize,
+	DWORD	*Index
+	)
+{
+	if (RES_LAST_INDEX == *Index)
+	{
+		*Index = RES_FIRST_INDEX;
+	}
+	else
+	{
+		++*Index;
+	}
+	LoadString(
+		myself,
+		*Index,
+		Buffer,
+		BufferSize
+		);
+	return 0;
+}
+
+
+VOID
+DisplayTitle(VOID)
+{
+	LPTSTR szTitle = _TEXT("ReactOS Coders Console Parade");
+	COORD  xy;
+
+	xy.X = (ScreenBufferInfo.dwSize.X - lstrlen(szTitle)) / 2;
+	xy.Y = ScreenBufferInfo.dwSize.Y / 2;
+
+	WriteStringAt(
+		szTitle,
+		xy,
+		(FOREGROUND_GREEN | FOREGROUND_INTENSITY)
+		);
+}
+
+
+#define RES_DELAY_CHANGE 12
+#define RES_BUFFER_SIZE  1024
+void
+MainLoop(void)
+{
+	TCHAR	NameString [RES_BUFFER_SIZE];
+	DWORD	NameIndex = 1;
+	INT	NameLength = 0;
+	COORD	xy;
+	INT	n = RES_DELAY_CHANGE;
+	INT	dir_y = 1;
+	INT	dir_x = 1;
+	WORD	wColor = 1;
+
+	xy.X = ScreenBufferInfo.dwSize.X / 2;
+	xy.Y = ScreenBufferInfo.dwSize.Y / 2;
+
+	for ( ; 1; ++n )
+	{
+		if (n == RES_DELAY_CHANGE)
+		{
+			n = GetNextString(
+				NameString,
+				RES_BUFFER_SIZE,
+				& NameIndex
+				);
+			NameLength = lstrlen(NameString);
+			wColor++;
+			if ((wColor & 0x000F) == 0)
+				wColor = 1;
+		}
+		if (xy.X == 0)
+		{
+			if (dir_x == -1)
+				dir_x = 1;
+		}
+		else if (xy.X >= ScreenBufferInfo.dwSize.X - NameLength - 1)
+		{
+			if (dir_x == 1)
+				dir_x = -1;
+		}
+		xy.X += dir_x;
+
+		if (xy.Y == 0)
+		{
+			if (dir_y == -1)
+				dir_y = 1;
+		}
+		else if (xy.Y >= ScreenBufferInfo.dwSize.Y - 1)
+		{
+			if (dir_y == 1)
+				dir_y = -1;
+		}
+		xy.Y += dir_y;
+#ifdef DISPLAY_COORD
+		WriteCoord(xy);
+#endif /* def DISPLAY_COORD */
+		DisplayTitle();
+		WriteStringAt(
+			NameString,
+			xy,
+			wColor
+			);
+		WaitForSingleObject( WaitableTimer, INFINITE );
+		WriteStringAt(
+			NameString,
+			xy,
+			0
+			);
+	}
+}
+
+
+int
+main(
+	int	argc,
+	char	*argv []
+	)
+{
+        LARGE_INTEGER lint;
+	DWORD Written;
+	COORD Coord = { 0, 0 };
+
+	myself = GetModuleHandle(NULL);
+
+	GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE),
+	                            &ScreenBufferInfo);
+	ScreenBufferInfo.dwSize.X = ScreenBufferInfo.srWindow.Right - ScreenBufferInfo.srWindow.Left + 1;
+	ScreenBufferInfo.dwSize.Y = ScreenBufferInfo.srWindow.Bottom - ScreenBufferInfo.srWindow.Top + 1;
+	ScreenBuffer = CreateConsoleScreenBuffer(
+			GENERIC_WRITE,
+			0,
+			NULL,
+			CONSOLE_TEXTMODE_BUFFER,
+			NULL
+			);
+	if (INVALID_HANDLE_VALUE == ScreenBuffer)
+	{
+		_ftprintf(
+			stderr,
+			_TEXT("%s: could not create a new screen buffer\n"),
+			app_name
+			);
+		return EXIT_FAILURE;
+	}
+	// Fill buffer with black background
+	FillConsoleOutputAttribute( ScreenBuffer,
+				    0,
+				    ScreenBufferInfo.dwSize.X * ScreenBufferInfo.dwSize.Y,
+				    Coord,
+				    &Written );
+
+	WaitableTimer = CreateWaitableTimer( NULL, FALSE, NULL );
+	if( WaitableTimer == INVALID_HANDLE_VALUE )
+	  {
+	    printf( "CreateWaitabletimer() failed\n" );
+	    return 1;
+	  }
+	lint.QuadPart = -2000000;
+	if( SetWaitableTimer( WaitableTimer, &lint, 200, NULL, NULL, FALSE ) == FALSE )
+	  {
+	    printf( "SetWaitableTimer() failed: 0x%lx\n", GetLastError() );
+	    return 2;
+	  }
+	SetConsoleActiveScreenBuffer(ScreenBuffer);
+	MainLoop();
+	CloseHandle(ScreenBuffer);
+	return EXIT_SUCCESS;
+}
+
+
+/* EOF */
Property changes on: trunk/rosapps/notevil/notevil.c
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/rosapps/notevil/notevil.rbuild
--- trunk/rosapps/notevil/notevil.rbuild	2006-02-07 20:39:48 UTC (rev 101)
+++ trunk/rosapps/notevil/notevil.rbuild	2006-02-07 20:40:25 UTC (rev 102)
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<rbuild xmlns:xi="http://www.w3.org/2001/XInclude">
+  <module name="notevil" type="win32cui" installbase="system32" installname="notevil.exe">
+	<include base="notevil">.</include>
+	<define name="__USE_W32API" />
+	<define name="_WIN32_IE">0x0501</define>
+	<define name="_WIN32_WINNT">0x0501</define>
+	<library>kernel32</library>
+	<library>user32</library>
+	<file>notevil.c</file>
+	<file>notevil.rc</file>
+  </module>
+</rbuild>
Property changes on: trunk/rosapps/notevil/notevil.rbuild
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/rosapps/notevil/notevil.rc
--- trunk/rosapps/notevil/notevil.rc	2006-02-07 20:39:48 UTC (rev 101)
+++ trunk/rosapps/notevil/notevil.rc	2006-02-07 20:40:25 UTC (rev 102)
@@ -0,0 +1,74 @@
+/* $Id: notevil.rc 20944 2006-01-17 23:14:51Z hbirr $ */
+
+#define REACTOS_STR_FILE_DESCRIPTION	"ReactOS Coders Console Parade\0"
+#define REACTOS_STR_INTERNAL_NAME	"notevil\0"
+#define REACTOS_STR_ORIGINAL_FILENAME	"notevil.exe\0"
+#include <reactos/version.rc>
+
+/*
+ * String table
+ *
+ * Order is the same as in the status report published weekly in
+ * the "ros-kernel" mailing list by Rex Jolliff. (obsolete)
+ *
+ * 20050116.EA: new coders are added scanning the ros-svn mailing
+ * list, in no particular order. Current order is kept for historical
+ * reason.
+ *
+ */
+STRINGTABLE MOVEABLE
+BEGIN
+  1, "Boudewijn Dekker (Ariadne)" 
+  2, "Robert Bergkvist (FragDance Galore)"
+  3, "Arindam Das"
+  4, "Boudewijn Dekker"
+  5, "Jason Eager"
+  6, "Jason Filby"
+  7, "Rex Jolliff"
+  8, "Eric Kohl"
+  9, "Hans Kremer"
+ 10, "Frederik Leemans"
+ 11, "Jean Michault"
+ 12, "Jim Noeth"
+ 13, "Brian Palmer"
+ 14, "Matt Pyne"
+ 15, "Jason Weiler"
+END
+
+STRINGTABLE MOVEABLE
+BEGIN
+ 16, "David Welch"
+ 17, "Emanuele Aliberti"
+ 18, "Phillip Susi"
+ 19, "Paolo Pantaleo"
+ 20, "Hernan Ochoa"
+ 21, "Casper Hornstrup"
+ 22, "Steven Edwards"
+ 23, "KJK::Hyperion"
+ 24, "Robert Dickenson"
+ 25, "Eugene Ingerman"
+ 26, "Guido de Jong"
+ 27, "Jurgen van Gael"
+ 28, "Marty Dill"
+ 29, "Ge van Geldorp"
+ 30, "Richard Campbell"
+END
+
+STRINGTABLE MOVEABLE
+BEGIN
+ 31, "Gunnar Andre' Dalsnes"
+ 32, "Aleksey Bragin"
+ 33, "Royce Mitchell III"
+ 34, "Mark Tempel"
+ 35, "Art Yerkes"
+ 36, "Martin Fuchs"
+ 37, "Vizzini"
+ 38, "Filip Navara"
+ 39, "Andrew Greenwood"
+ 40, "Thomas Weidenmueller"
+ 41, "Jonathan Wilson"
+ 42, "Alex Ionescu"
+ 43, "Jim Tabor"
+END
+
+/* EOF */

Added: trunk/rosapps/notevil/readme.txt
--- trunk/rosapps/notevil/readme.txt	2006-02-07 20:39:48 UTC (rev 101)
+++ trunk/rosapps/notevil/readme.txt	2006-02-07 20:40:25 UTC (rev 102)
@@ -0,0 +1,21 @@
+$Id: readme.txt 468 1999-05-15 07:23:34Z ea $
+
+ReactOS Coders Console Parade
+-----------------------------
+
+The name "notevil" is from the well known Easter egg
+of the "3D Text (OpenGL)" screen saver, which
+displays the NT programmers' names if one writes
+"not evil" in the text box.
+
+To add a new name, add a new string in the
+resource script notevil.rc (string index numbers must be
+unique) and edit resource.h to update minimum and 
+maximum indices.
+
+Eventually run make.
+
+Written to test Win32 console functions implementation.
+
+___________
+19990411 EA
Property changes on: trunk/rosapps/notevil/readme.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/rosapps/notevil/resource.h
--- trunk/rosapps/notevil/resource.h	2006-02-07 20:39:48 UTC (rev 101)
+++ trunk/rosapps/notevil/resource.h	2006-02-07 20:40:25 UTC (rev 102)
@@ -0,0 +1,2 @@
+#define RES_FIRST_INDEX 1
+#define RES_LAST_INDEX  44
Property changes on: trunk/rosapps/notevil/resource.h
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native