The file include only the command Echo and a little modify in other file.

See you on chat :-)

-- 
Enrico Speranza
Vytek
http://www.cicap.org/lazio
Fax: 06233239517
Tel: 06452216763

"Gli scienziati provano a eliminare le loro teorie false, essi tentano
di far sì che muoiano al posto loro. Il credente - che sia animale o
umano - termina la sua vita con le sue credenze erronee." Karl Popper

"il progresso sta in una continua critica di quanto apprendemmo. Una
sola scienza è incrollabile e incrollata, quella rivelata da Dio, la
scienza dell'aldilà" San Giuseppe Moscati
Index: Kernel/Core/Shell/Commands/BuiltIn/Echo.cs
===================================================================
--- Kernel/Core/Shell/Commands/BuiltIn/Echo.cs  (revision 0)
+++ Kernel/Core/Shell/Commands/BuiltIn/Echo.cs  (revision 0)
@@ -0,0 +1,62 @@
+/*  (C) 2008 The SharpOS Project Team (http://www.sharpos.org)
+ *
+ *  Authors:
+ *     Enrico Speranza <[EMAIL PROTECTED]>
+ *
+ * Licensed under the terms of the GNU GPL v3,
+ *  with Classpath Linking Exception for Libraries
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SharpOS.AOT.Attributes;
+using SharpOS.Kernel.Foundation;
+using SharpOS.Kernel.ADC;
+
+namespace SharpOS.Kernel.Shell.Commands.BuiltIn
+{
+       /// <summary>
+       /// Echo command, internal Kernel.
+       /// </summary>
+       public unsafe static class Echo
+       {
+               public const string name = "echo";
+               public const string shortDescription = "Echo what is passed.";
+               public const string lblExecute = "COMMANDS.echo.Execute";
+               public const string lblGetHelp = "COMMANDS.echo.GetHelp";
+
+               [Label (lblExecute)]
+               public static void Execute (CommandExecutionContext* context)
+               {
+                       CString8* tempStr;
+                       tempStr = CString8.Copy(context->parameters);
+                       TextMode.WriteLine (tempStr);
+                       CStrin8.DISPOSE(tempStr);
+                       return;
+               }
+
+               [Label (lblGetHelp)]
+               public static void GetHelp (CommandExecutionContext* context)
+               {
+                       TextMode.WriteLine ("Syntax: ");
+                       TextMode.WriteLine ("    echo");
+                       TextMode.WriteLine ("");
+                       TextMode.WriteLine ("Print on output what is passed.");
+               }
+               
+               public static CommandTableEntry* CREATE ()
+               {
+                       CommandTableEntry* entry = (CommandTableEntry*) 
SharpOS.Kernel.ADC.MemoryManager.Allocate ((uint) sizeof (CommandTableEntry));
+
+                       entry->name = (CString8*) SharpOS.Kernel.Stubs.CString 
(name);
+                       entry->shortDescription = (CString8*) 
SharpOS.Kernel.Stubs.CString (shortDescription);
+                       entry->func_Execute = (void*) 
SharpOS.Kernel.Stubs.GetLabelAddress (lblExecute);
+                       entry->func_GetHelp = (void*) 
SharpOS.Kernel.Stubs.GetLabelAddress (lblGetHelp);
+                       entry->nextEntry = null;
+
+                       return entry;
+               }
+       }
+}
Index: Kernel/Core/Shell/Commands/CommandTableHeader.cs
===================================================================
--- Kernel/Core/Shell/Commands/CommandTableHeader.cs    (revision 707)
+++ Kernel/Core/Shell/Commands/CommandTableHeader.cs    (working copy)
@@ -262,6 +262,7 @@
             header->AddEntry(BuiltIn.Cls.CREATE());
             header->AddEntry(BuiltIn.Commands.CREATE());
             header->AddEntry(BuiltIn.CpuId.CREATE());
+            header->AddEntry(BuiltIn.Echo.CREATE());
             header->AddEntry(BuiltIn.Egg.CREATE());
             header->AddEntry(BuiltIn.Halt.CREATE());
             header->AddEntry(BuiltIn.Keymap.CREATE());
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers

Reply via email to