898ed63c4ce6 — pouya@nohup.io 2 years ago
remove leftover files
2 files changed, 0 insertions(+), 153 deletions(-)

R sky/cmd/test_cmd.c => 
R sky/cmd/test_lex.c => 
R sky/cmd/test_cmd.c =>  +0 -92
@@ 1,92 0,0 @@ 
-#include <u.h>
-#include <libc.h>
-#include <thread.h>
-#include <bio.h>
-
-#include "lex.h"
-
-#include "dat.h"
-#include "fns.h"
-
-enum
-{
-	STACK = 256*1024,
-};
-
-double
-runeatof(Rune *s)
-{
-	char cs[Ltoksize+1], *c;
-	int i;
-
-	for(i=0, c=cs; i<Ltoksize && *s; i++)
-		*c++ = *s++;
-	*c = '\0';
-
-	return atof(cs);
-}
-
-int
-add(Tok *argv, int argc)
-{
-	int i;
-	double a, sum;
-
-	print("add ");
-	for(i=0, sum=0; i<argc; i++, argv++){
-		print("%S", argv->str);
-		a = runeatof(argv->str);
-		print("(%f) ", a);
-		sum += a;
-	}
-	print("=> %f\n", sum);
-	return 0;
-}
-
-int
-mult(Tok *argv, int argc)
-{
-	int i;
-	double a, prod;
-
-	print("mult ");
-	for(i=0, prod=1; i<argc; i++, argv++){
-		print("%S", argv->str);
-		a = runeatof(argv->str);
-		print("(%f) ", a);
-		prod *= a;
-	}
-	print("=> %f\n", prod);
-	return 0;
-}
-
-void
-threadmain(int argc, char *argv[])
-{
-	Cmdctxt *ctxt;
-	Cmd c;
-
-	if((ctxt = mkcmdctxt(0)) == nil)
-		sysfatal("out of memory!");
-
-	runestrcpy(c.str, L"add");
-	c.argc = 2;
-	c.argtyp[0] =  c.argtyp[1] = c.argtyp[2] = Tdecimal;
-	c.fun = &add;
-	cmdreg(ctxt, &c);
-
-	c.argc = 3;
-	cmdreg(ctxt, &c);
-
-	runestrcpy(c.str, L"mult");
-	c.argc = 2;
-	c.fun = &mult;
-	cmdreg(ctxt, &c);
-
-	c.argc = 3;
-	cmdreg(ctxt, &c);
-
-	proccreate(&cmdproc, ctxt, STACK);
-
-	for(;;);
-}

          
R sky/cmd/test_lex.c =>  +0 -61
@@ 1,61 0,0 @@ 
-#include <u.h>
-#include <libc.h>
-#include <thread.h>
-#include <bio.h>
-
-#include "lex.h"
-
-#include "dat.h"
-#include "fns.h"
-
-enum
-{
-	STACK = 64*1024,
-};
-
-void
-parseproc(void *arg)
-{
-	Lexer l;
-	Tok t;
-
-	linit(&l, 0, lexstart());
-
-	while(t = lnexttok(&l), t.typ != Teof){
-		print("next: %d > ", t.typ);
-		switch(t.typ){
-		case Teof:
-			print("Teof: ");
-			break;
-		case Terror:
-			print("Terror: ");
-			break;
-		case Tcmd:
-			print("Tcmd: ");
-			break;
-		case Teos:
-			print("Teos: ");
-			break;
-		case Tidentifier:
-			print("Tidentifier: ");
-			break;
-		case Tdecimal:
-			print("Tdecimal: ");
-			break;
-		case Tstr:
-			print("Tstr: ");
-			break;
-		}
-		print("%S\n", t.str);
-	}
-
-	exits(0);
-}
-
-void
-threadmain(int argc, char *argv[])
-{
-	proccreate(&parseproc, nil, STACK);
-
-	for(;;);
-}