summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--myecho/myecho.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/myecho/myecho.c b/myecho/myecho.c
index c4657a2..906744b 100644
--- a/myecho/myecho.c
+++ b/myecho/myecho.c
@@ -16,23 +16,23 @@ Abstract:
myecho.exe [-fg color] [-bg color] "string to echo"
color can be: blue, red, green, yellow, cyan, violet, pink, black, white
- brightblue, brightred, brightgreen, brightyellow,
+ brightblue, brightred, brightgreen, brightyellow,
brightviolet, brightpink, brightblack, gray, grey, or
brightwhite
Author:
- Scott Gasch ([email protected]) 22 Aug 2002
+ Scott Gasch ([email protected]) 22 Aug 2002
Revision History:
--*/
-#include <stdlib.h>
+#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
-WORD
+WORD
MakeColor(BOOL fBg, char *sz)
/*++
@@ -55,7 +55,7 @@ Return value:
//
// bright
- //
+ //
if (strstr(sz, "bright"))
{
w = FOREGROUND_INTENSITY;
@@ -63,7 +63,7 @@ Return value:
//
// colors
- //
+ //
if (strstr(sz, "blue"))
{
w |= FOREGROUND_BLUE;
@@ -111,7 +111,7 @@ Return value:
}
-int __cdecl
+int __cdecl
main(int argc, char *argv[])
/*++
@@ -130,7 +130,7 @@ Return value:
--*/
{
- CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
+ CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
HANDLE hStdOut;
WORD wAttr;
int x;
@@ -138,7 +138,7 @@ Return value:
//
// open stdout
- //
+ //
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
if (INVALID_HANDLE_VALUE == hStdOut)
{
@@ -146,20 +146,20 @@ Return value:
GetLastError());
exit(1);
}
-
+
//
- // Save the current text colors.
- //
- if (0 == GetConsoleScreenBufferInfo(hStdOut, &csbiInfo))
+ // Save the current text colors.
+ //
+ if (0 == GetConsoleScreenBufferInfo(hStdOut, &csbiInfo))
{
- fprintf(stderr, "Failed to save current text attr, error=%u\n",
+ fprintf(stderr, "Failed to save current text attr, error=%u\n",
GetLastError());
exit(1);
}
//
// echo the string(s)
- //
+ //
x = 1;
while (x < argc)
{
@@ -199,6 +199,6 @@ Return value:
//
// restore the old text colors
- //
+ //
(void)SetConsoleTextAttribute(hStdOut, csbiInfo.wAttributes);
}