Author: cfinck
Date: Sat Nov 3 03:56:14 2007
New Revision: 30084
URL:
http://svn.reactos.org/svn/reactos?rev=30084&view=rev
Log:
- Make "notevil" use the new autogenerated contributors header
- Fix indentation in "notevil"
- Small changes in the "contributors.rbuild"
Modified:
branches/rbuild/reactos/contributors.rbuild
branches/rbuild/rosapps/notevil/notevil.c
branches/rbuild/rosapps/notevil/notevil.rc
Modified: branches/rbuild/reactos/contributors.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/rbuild/reactos/contributors.rbu…
==============================================================================
--- branches/rbuild/reactos/contributors.rbuild (original)
+++ branches/rbuild/reactos/contributors.rbuild Sat Nov 3 03:56:14 2007
@@ -7,7 +7,7 @@
<contributor firstname="Andrew" lastname="Munger"
mail="waxdragon(a)gmail.com" alias="amunger" />
<contributor firstname="Arindam" lastname="Das" />
<contributor firstname="Art" lastname="Yerkes"
mail="ayerkes(a)speakeasy.net" alias="arty" />
- <contributor firstname="Ariadne" alias="ariadne" />
+ <contributor firstname="Boudewijn" lastname="Dekker"
alias="ariadne" />
<contributor firstname="Brandon" lastname="Turner"
mail="turnerb7(a)msu.edu" alias="turner" />
<contributor firstname="Brian" lastname="Palmer"
mail="brianp(a)sginet.com" alias="bpalmer" />
<contributor firstname="Casper S." lastname="Hornstrup"
mail="chorns(a)users.sourceforge.net" alias="chorns" />
@@ -20,7 +20,7 @@
<contributor firstname="Eugene" lastname="Ingerman"
mail="geneing(a)myrealbox.com" />
<contributor firstname="Filip" lastname="Navara"
mail="xnavara(a)volny.cz" alias="navaraf" />
<contributor firstname="Frederik" lastname="Leemans" />
- <contributor firstname="Ge" lastname="van Geldorp"
mail="ge(a)gse.nl" alias="gvg" />
+ <contributor firstname="Gé" lastname="van Geldorp"
mail="ge(a)gse.nl" alias="gvg" />
<contributor firstname="Ged" lastname="Murphy"
mail="gedmurphy(a)reactos.org" alias="gedmurphy" />
<contributor firstname="Gregor" lastname="Brunmar"
alias="gbrunmar" />
<contributor firstname="Guido" lastname="de Jong" />
Modified: branches/rbuild/rosapps/notevil/notevil.c
URL:
http://svn.reactos.org/svn/reactos/branches/rbuild/rosapps/notevil/notevil.…
==============================================================================
--- branches/rbuild/rosapps/notevil/notevil.c (original)
+++ branches/rbuild/rosapps/notevil/notevil.c Sat Nov 3 03:56:14 2007
@@ -31,41 +31,39 @@
#include <stdlib.h>
#include <tchar.h>
#include "resource.h"
+#include "autocontributors.h"
LPCTSTR app_name = _TEXT("notevil");
-HANDLE myself;
-HANDLE ScreenBuffer;
-CONSOLE_SCREEN_BUFFER_INFO ScreenBufferInfo;
-HANDLE WaitableTimer;
+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
- );
+ 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);
}
@@ -73,194 +71,195 @@
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)
- );
+ 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;
+ 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)
- );
+ 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;
+ const char** pstr;
+ CHAR NameString [64];
+ 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;
+
+ pstr = szAutoContributors;
+
+ for ( ; 1; ++n )
+ {
+ if (n == RES_DELAY_CHANGE)
+ {
+ n = 0;
+
+ // Get the current name and make an OEM (console) string out of it
+ CharToOem(*pstr, NameString);
+ NameLength = lstrlen(NameString);
+
+ // Next color
+ wColor++;
+ if ((wColor & 0x000F) == 0)
+ wColor = 1;
+
+ // Next name
+ pstr++;
+ if(!*pstr)
+ pstr = szAutoContributors;
+ }
+
+ 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);
+ WriteCoord(xy);
#endif /* def DISPLAY_COORD */
- DisplayTitle();
- WriteStringAt(
- NameString,
- xy,
- wColor
- );
- WaitForSingleObject( WaitableTimer, INFINITE );
- WriteStringAt(
- NameString,
- xy,
- 0
- );
- }
+ 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;
+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;
}
Modified: branches/rbuild/rosapps/notevil/notevil.rc
URL:
http://svn.reactos.org/svn/reactos/branches/rbuild/rosapps/notevil/notevil.…
==============================================================================
--- branches/rbuild/rosapps/notevil/notevil.rc (original)
+++ branches/rbuild/rosapps/notevil/notevil.rc Sat Nov 3 03:56:14 2007
@@ -4,86 +4,3 @@
#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.
- *
- * 2006-03-05, frik85: add new coders (in no particular order)
- *
- */
-
-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"
- 44, "Magnus Olsen"
- 45, "Herve Poussineau"
-END
-
-STRINGTABLE MOVEABLE
-BEGIN
- 46, "Christoph von Wittich"
- 47, "Brandon Turner"
- 48, "Ged Murphy"
- 49, "Klemens R. Friedl"
- 50, "Maarten Bosma"
- 51, "Saveliy Tretiakov"
-END
-
-/* EOF */