diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-08-22 21:11:20 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-08-22 21:11:20 +0000 |
commit | 74bb5f5a9b29d6fcf2b7710d35913935d98ea5a4 (patch) | |
tree | a725818af428263323e6c908222da55f46990b8c /users | |
parent | old (diff) | |
download | gentoo-74bb5f5a9b29d6fcf2b7710d35913935d98ea5a4.tar.gz gentoo-74bb5f5a9b29d6fcf2b7710d35913935d98ea5a4.tar.bz2 gentoo-74bb5f5a9b29d6fcf2b7710d35913935d98ea5a4.zip |
old
Diffstat (limited to 'users')
-rw-r--r-- | users/warpzero/SL/source/parse.pl | 66 | ||||
-rw-r--r-- | users/warpzero/SL/source/sl-bc-main.pl | 216 | ||||
-rw-r--r-- | users/warpzero/SL/source/slbc-en.h | 142 | ||||
-rw-r--r-- | users/warpzero/SL/source/slbc-n.h | 173 | ||||
-rw-r--r-- | users/warpzero/SL/source/slbc-prms.h | 132 | ||||
-rw-r--r-- | users/warpzero/SL/source/slbc-structs.h | 47 | ||||
-rw-r--r-- | users/warpzero/SL/source/submit.pl | 114 | ||||
-rw-r--r-- | users/warpzero/SL/source/test.sl | 16 | ||||
-rw-r--r-- | users/warpzero/SL/source/test.slc | 0 |
9 files changed, 0 insertions, 906 deletions
diff --git a/users/warpzero/SL/source/parse.pl b/users/warpzero/SL/source/parse.pl deleted file mode 100644 index ee4cdc9bc0..0000000000 --- a/users/warpzero/SL/source/parse.pl +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -w -use strict; - -my $CC = $ENV{'CC'} | "gcc"; -my $input = qx|$CC -E slbc-prms.h|; - -$input =~ s/[,\n]/ /g; -$input =~ s/({|})/ $1 /g; -$input =~ s/\s+/ /g; - -$input =~ s/^.+?bc_information.+?{([^\;]+);.+/{$1/; -my @table; -my $depth = 0; -my $zero = -1; -my $one = -1; -my $two = 0; - -for (split/\s/, $input) { - s/^"([^"]+)"$/$1/; - - - if(/{/) { - if( $depth == 1 ) { - $zero++; - $one = -1; - $two = 0; - } - elsif( $depth == 2 ) { - $one++; - $two = 0; - } - $depth++; - next; - } - elsif(/}/) { - if( $depth == 0) { - exit; - } - elsif( $depth == 1 ) { - $zero--; - $one = -1; - $two = 0; - } - elsif( $depth == 2 ) { - $one--; - $two = 0; - } - $depth--; - next; - } - else { - print "\$table[$zero][$one][$two] = $_\n"; - $table[$zero][$one][$two] = $_; - $two++; - } -} - -use Data::Dumper; - -#my @table_section = $table[0]; -#print $table_section[0]->[0]->[0] . "\n"; - -#open(FILE, "slbc-n.h"); -#my %hash; -#while(<FILE>){$hash{$1}=$2 if /^#define\s+(\S+)\s+(\S+)/} -print Dumper(\@table); diff --git a/users/warpzero/SL/source/sl-bc-main.pl b/users/warpzero/SL/source/sl-bc-main.pl deleted file mode 100644 index 3657aa75d9..0000000000 --- a/users/warpzero/SL/source/sl-bc-main.pl +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/perl -w -# sl-bc-main.pl - here we define the number for each bytecode -# -# Copyright (C) 2003 Joshua Charles Campbell -# 103 Mary Ave. -# Missoula MT 59801 -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -use strict; -use Getopt::Long qw(:config auto_abbrev bundling); -my $debug = ''; -my @input_files_path = (); -my $output_file_path = ''; - -GetOptions ('debug!' => \$debug, "input-file=s" => \@input_files_path, "output-file=s" => \$output_file_path ); -if ( $debug ) { print "Debuging mode is now ON\n"; } -unless ( @input_files_path ) { print STDERR "No input files\n"; die; } -unless ( $output_file_path ) { print STDERR "No output file\n"; die; } - -open(INPUT_FILE, $input_files_path[0]) or die "Couldn't open file for input $input_files_path[0]: $!"; - -my @input_data_raw = <INPUT_FILE>; - -map { s/^#.*//; s/^(.+?)\s+#.+/$1/ } @input_data_raw; # killing comments - -print @input_data_raw if ($debug); - -#my @input_data = (); -#push @input_data, split foreach @input_data_raw; -my @input_data = split /\s+/, join (" ", @input_data_raw); - -if ($debug) { - print ((scalar @input_data) . " words read from input starting with\n"); - print $input_data[0] . "\n"; - print $input_data[1] . "\n"; -} -#$preped_header = `$ENV{'CC'} -E slbc-en.h`; - -#-- BEGIN HEADERFILE LOADING ---------------------------- -#this is vladimir's code here... it modded to make sense and to use $debug - -sub get_3d_header_table { - - my ($headerfile, $tablename) = @_; - - my $CC = $ENV{'CC'} | "gcc"; - my $english_to_bc_raw = qx|$CC -E $headerfile|; - - $english_to_bc_raw =~ s/[,\n]/ /g; - $english_to_bc_raw =~ s/({|})/ $1 /g; - $english_to_bc_raw =~ s/\s+/ /g; - - $english_to_bc_raw =~ s/^.+?$tablename.+?{([^\;]+);.+/{$1/; - my @refined_table; - my $depth = 0; - my $section = -1; - my $operation = -1; - my $code = 0; - - for (split/\s/, $english_to_bc_raw) { - - s/^"([^"]+)"$/$1/; - if(/{/) { - if( $depth == 1 ) { - $section++; - $operation = -1; - $code = 0; - } - elsif( $depth == 2 ) { - $operation++; - $code = 0; - } - $depth++; - next; - } - elsif(/}/) { - if( $depth == 0) { - exit; - } - elsif( $depth == 1 ) { - $section--; - $operation = -1; - $code = 0; - } - elsif( $depth == 2 ) { - $operation--; - $code = 0; - } - $depth--; - next; - } - else { - if ($debug) {print "\$tablename[$section][$operation][$code] = $_\n";} - $refined_table[$section][$operation][$code] = $_; - $code++; - } - } - return @refined_table; -} - -my @english_to_bc = get_3d_header_table ( "slbc-en.h", "english_to_bc" ); -my @op_parameters = get_3d_header_table ( "slbc-prms.h", "bc_information"); - -# we also need a C #define hash from slbc-n.h -- and we got it! - -open(SLBC_N, "slbc-n.h"); -my %slbc_n; -while(<SLBC_N>){$slbc_n{$1} = hex $2 if /^#define\s+(\S+)\s+(\S+)/} -close(SLBC_N); - -my %slbc_nts; #tasty hash because our headerfiles aren't as sane as we thought -# map the section opcodes to their tables -my $section_table = $english_to_bc[0]; -for my $sti ( 0..$#english_to_bc ) { - $slbc_nts{ hex ($section_table->[$sti][0]) } = $sti; - print hex ( $section_table->[$sti][0] ) . "\n" if $debug; -} - -#--------------------- end vladimir section here -------------- - -# right about here we have to start going through the code, Left to Right -# and make sure it is sane, and code it into SL bytecode which we will do later - -sub check_bc_section { # only checking one section of the bytecode here - my ($text_operation, $section) = @_; # perl subs are stupid, $section we are lookin in -# my @english_to_bc_section; -# for ( 0 .. $#{$english_to_bc[$section]} ) { -# $english_to_bc_section[$_][0] = $english_to_bc[$section][$_][0]; -# $english_to_bc_section[$_][1] = $english_to_bc[$section][$_][1]; -# } - my $english_to_bc_section = $english_to_bc[$section]; # get a section -# print $section; -# print $english_to_bc_section; - for my $current_index (0..$#{$english_to_bc_section}) { # check the entire section - my $current_operation = $english_to_bc_section->[$current_index][1]; # get the operation we are trying to match to - print $text_operation . ' ' . $current_operation . "\n" if $debug; # debugging - return hex $english_to_bc_section->[$current_index][0] if $text_operation =~ /^$current_operation$/i; # match it and return if we did - } - return -1; # -1 means no match in this section -} - -sub get_known_bc { # look for a valid, known bytecode OR misuse of a reserved word (return -2) OR return -1 for not found - my ($text_operation, $current_section) = @_; # $text_operation is straight from the input file -- what we are trying to match - my $match; -# $match = check_bc_section($text_operation, $slbc_n{'SLBC_0_0_SECTIONCODE_CONTROL'}); # section 0x0C and 0x0B are valid anywhere -# return $match if $match >= 0; # means we found a match - $match = check_bc_section($text_operation, $slbc_nts{$slbc_n{'SLBC_0_0_SECTIONCODE_GLOBAL'}}); - return $match if $match >= 0; - print "NOT IN GLOBAL\n" if $debug; - $match = check_bc_section($text_operation, $current_section); - return $match if $match >= 0; - print "NOT IN LOCAL\n" if $debug; - for (my $other_section = 0; $other_section < @english_to_bc; $other_section++) { - return -2 if check_bc_section($text_operation, $other_section) >= 0; # the text is a reserved word but NOT an operation in the valid sections we just checked - } - return -1; -} - -print get_known_bc($input_data[1], 0) . "\n" if $debug; # read the second word, assume section 0 (root) for now - -# the main lexical analysis loop -- oh god, i am about to orgasm -# ok first things first we need to figure out what the fuck is going on -# besides reserved words (operations and statements) we have two types -# of words -- variable names and symbols which are in some cases -# interchangable (ie. a variable of type symbol can often be used in -# place of a specific symbol name) -# for our purposes symbols should take precedence -- but that shouldnt matter -# because both have to be declared -# for now, this code only needs basic knowledge of how declaring variables works -# and how sections work - - -my @user_variables; my $user_variables_count = 0; -my @user_symbols; my $user_symbols_count = 0; -my @bytecode_tree_root; # uh oh... time for a fucking tree in perl... perldoc perlref time -my @bytecode_stack = (); - -# the official structure for the tree is ( bytecode, length, pointer 0, ..., pointer length) - -# kick it off with the root node -@bytecode_tree_root = ( $slbc_nts{$slbc_n{'SLBC_0_0_SECTIONCODE_ROOT'}}, 0); # we start with the root having nothing in it -push @bytecode_stack, \@bytecode_tree_root; # yes we is pusing a reference to the root node onto the stack... - -my $known_bc; -for my $current_word_index (0..$#input_data) { - print $current_word_index . " " . $input_data[$current_word_index] if $debug; - # first figure out wtf it is IN CONTEXT - $known_bc = get_known_bc($input_data[$current_word_index], $bytecode_stack[$#bytecode_stack]->[0]); - if ( $known_bc == -2 ) { - print ( STDERR "Invalid use of reserved word \"" . $input_data[$current_word_index] . "\"!\n" ); - die; - } elsif ( $known_bc >= 0 ) { - # rec'nized valid operation - if ($known_bc == check_bc_section($input_data[$current_word_index], $slbc_nts{$slbc_n{'SLBC_0_0_SECTIONCODE_CONTROL'}}) ) { - if ($known_bc == $slbc_n{'SLBC_0_0_CONTROL_END'} ){ - } - } - - # i need to write an opcode arglist table for operations that support them - } elsif ($known_bc == -1) { - # not a reserved word - - } -} diff --git a/users/warpzero/SL/source/slbc-en.h b/users/warpzero/SL/source/slbc-en.h deleted file mode 100644 index d011031164..0000000000 --- a/users/warpzero/SL/source/slbc-en.h +++ /dev/null @@ -1,142 +0,0 @@ -/* slbc-en.h the table for english to bytecode conversion - -Copyright (C) 2003 Joshua Charles Campbell - 103 Mary Ave. - Missoula MT 59801 - - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -#include "slbc-n.h" - -static const struct text_to_bc_table english_to_reserved_symbol[9] = { - { SLBC_0_0_TYPEPRIM_CHAR, "character" }, - { SLBC_0_0_TYPEPRIM_OBJECT, "object" }, - { SLBC_0_0_TYPEPRIM_STRUCT, "struct" }, - { SLBC_0_0_TYPEPRIM_FLOAT, "float" }, - { SLBC_0_0_TYPEPRIM_BIT, "bit" }, - { SLBC_0_0_TYPEPRIM_SYMBOL, "symbol" }, -/* { SLBC_0_0_TYPEPRIM_INPUT, "input" }, - { SLBC_0_0_TYPEPRIM_OUTPUT, "output" }, -*/ { SLBC_0_0_TYPEPRIM_AUTODEF, "autodefine" }, -}; - -static const struct text_to_bc_table english_to_bc[12][32] = { - { /* root section ( SLBC_0_0_SECTIONCODE_ROOT ) */ - { SLBC_0_0_SECTIONCODE_ROOT, "root" }, - { SLBC_0_0_SECTIONCODE_FLOW, "flow" }, - { SLBC_0_0_SECTIONCODE_MANIFEST,"manifest" }, - { SLBC_0_0_SECTIONCODE_XFORM, "transform" }, - { SLBC_0_0_SECTIONCODE_LOGICOP, "logicop" }, - { SLBC_0_0_SECTIONCODE_HEADER, "header" }, - { SLBC_0_0_SECTIONCODE_BODY, "body" }, - { SLBC_0_0_SECTIONCODE_OBJECT, "object" }, - { SLBC_0_0_SECTIONCODE_LOGIC, "logic" }, - { SLBC_0_0_SECTIONCODE_DIM, "define" }, - { SLBC_0_0_SECTIONCODE_CONTROL, "control" }, - { SLBC_0_0_SECTIONCODE_GLOBAL, "global" } - }, { /* flow section */ - { SLBC_0_0_FLOWCODE_CAUSES, "causes" }, - { SLBC_0_0_FLOWCODE_WRITES, "writes" }, - { SLBC_0_0_FLOWCODE_UPDATES, "updates" }, - { SLBC_0_0_FLOWCODE_SYNCS, "syncs" } - }, { /* manifest section */ - { SLBC_0_0_MANIFESTCODE_AS, "as" }, - { SLBC_0_0_MANIFESTCODE_EXPOSES,"exposes" }, - { SLBC_0_0_MANIFESTCODE_EXTENDS,"extends" } - }, { /* xform section */ - { SLBC_0_0_XFORMOPCODE_ADD, "add" }, - { SLBC_0_0_XFORMOPCODE_SUBTRACT,"subtract" }, - { SLBC_0_0_XFORMOPCODE_MULTIPLY,"multiply" }, - { SLBC_0_0_XFORMOPCODE_DIVIDE, "divide" }, - { SLBC_0_0_XFORMOPCODE_RAISE, "raise" }, - { SLBC_0_0_XFORMOPCODE_ROOT, "root" }, - { SLBC_0_0_XFORMOPCODE_INVERT, "invert" }, - /* { SLBC_0_0_XFORMOPCODE_CAP, "capitalize" }, - { SLBC_0_0_XFORMOPCODE_DECAP, "decapitalize" }, */ - { SLBC_0_0_XFORMOPCODE_RENCODE, "rencode" }, - { SLBC_0_0_XFORMOPCODE_CLEAN, "clean" }, - /* { SLBC_0_0_XFORMOPCODE_SETCODE, "setcode" }, */ - { SLBC_0_0_XFORMOPCODE_NOT, "not" }, - { SLBC_0_0_XFORMOPCODE_XOR, "xor" }, - { SLBC_0_0_XFORMOPCODE_AND, "and" }, - { SLBC_0_0_XFORMOPCODE_OR, "or" }, - { SLBC_0_0_XFORMOPCODE_LENGTH, "length" }, - { SLBC_0_0_XFORMOPCODE_SUB, "sub" }, - { SLBC_0_0_XFORMOPCODE_ROTATEL, "rotateleft" }, - { SLBC_0_0_XFORMOPCODE_ROTATER, "rotateright" }, - { SLBC_0_0_XFORMOPCODE_CRACK, "crackopen" }, - { SLBC_0_0_XFORMOPCODE_EXPOSES, "exposes" }, - { SLBC_0_0_XFORMOPCODE_SUBTYPE, "distill" }, - /* { SLBC_0_0_XFORMOPCODE_MEMBERS,"members" }, */ - { SLBC_0_0_XFORMOPCODE_SIZE, "size" }, - { SLBC_0_0_XFORMOPCODE_HSIZE, "definitionsize"}, - { SLBC_0_0_XFORMOPCODE_SYMBOLIZE,"symbolize" }, - { SLBC_0_0_XFORMOPCODE_MELT, "melt" }, - { SLBC_0_0_XFORMOPCODE_CAST, "crystalize" }, - { SLBC_0_0_XFORMOPCODE_SHOVE, "shove" } - /* { SLBC_0_0_XFORMOPCODE_FLOAT, "float" }, - { SLBC_0_0_XFORMOPCODE_SINK, "sink" }, */ - }, { /* logic section */ - { SLBC_0_0_LOGICOPCODE_AND, "and" }, - { SLBC_0_0_LOGICOPCODE_OR, "or" }, - { SLBC_0_0_LOGICOPCODE_XOR, "xor" }, - { SLBC_0_0_LOGICOPCODE_NOT, "not" }, - { SLBC_0_0_LOGICOPCODE_EQUALS, "equals" }, - { SLBC_0_0_LOGICOPCODE_LESSER, "lesser" }, - { SLBC_0_0_LOGICOPCODE_GREATER, "greater" }, - { SLBC_0_0_LOGICOPCODE_ISA, "isa" }, - { SLBC_0_0_LOGICOPCODE_HASA, "hasa" }, - { SLBC_0_0_LOGICOPCODE_COMPAT, "compatible" }, - { SLBC_0_0_LOGICOPCODE_CONTENTS,"contents" }, - { SLBC_0_0_LOGICOPCODE_SUBEXP, "begin" }, - }, { /* header section */ - { SLBC_0_0_HEADERCODE_CONSTANT, "constant" }, - { SLBC_0_0_HEADERCODE_INCLUDE, "include" }, - { SLBC_0_0_HEADERCODE_INPUT_DIM,"input" }, - { SLBC_0_0_HEADERCODE_OUTPUT_DIM,"output" }, - { SLBC_0_0_HEADERCODE_SCOPE_DIM,"dim" }, - }, { /* body section -- defaults to sectioncode */ - }, { /* object section -- defaults to sectioncode*/ - }, { /* logic section */ - { SLBC_0_0_LOGICCODE_FLAG, "flag" }, - { SLBC_0_0_LOGICCODE_RESULT, "result" }, - { SLBC_0_0_LOGICCODE_FOREACH, "foreach" }, - { SLBC_0_0_LOGICCODE_FOR, "for" }, - }, { /* dim section */ - { SLBC_0_0_DIMCODE_SIZE, "size" }, - { SLBC_0_0_DIMCODE_BENDIAN, "bigendian" }, - { SLBC_0_0_DIMCODE_LENDIAN, "littleendian" }, - { SLBC_0_0_DIMCODE_SIGNED, "signed" }, - { SLBC_0_0_DIMCODE_ENCODING, "encoding" }, - { SLBC_0_0_DIMCODE_ARRAY_SIZE, "arraysize" }, - { SLBC_0_0_DIMCODE_ARRAY_UNSIZE,"arrayunsize" }, - { SLBC_0_0_DIMCODE_DIM, "dim" }, - { SLBC_0_0_DIMCODE_STATIC, "static" }, - { SLBC_0_0_DIMCODE_VALUE, "value" }, - { SLBC_0_0_DIMCODE_ARRAY_DYNSIZE,"dynamic" }, - { SLBC_0_0_DIMCODE_ARRAY_DIM, "array" }, - { SLBC_0_0_DIMCODE_INPUT, "input" }, - { SLBC_0_0_DIMCODE_OUTPUT, "output" }, - { SLBC_0_0_DIMCODE_PRIMITIVE, "primitive" }, - }, { /* control */ - { SLBC_0_0_CONTROL_END, "end" }, - { SLBC_0_0_CONTROL_VALUE, "value" }, - { SLBC_0_0_CONTROL_ERROR, "error" }, - { SLBC_0_0_CONTROL_SUBSECTION, "subsection" }, - { SLBC_0_0_CONTROL_REMETASIZE, "remetasize" }, - }, { /* global */ - { SLBC_0_0_GLOBALCODE_CONTROL, "control" }, - } -}; diff --git a/users/warpzero/SL/source/slbc-n.h b/users/warpzero/SL/source/slbc-n.h deleted file mode 100644 index 532a93f3bd..0000000000 --- a/users/warpzero/SL/source/slbc-n.h +++ /dev/null @@ -1,173 +0,0 @@ -/* slbc-n.h - here we define the number for each bytecode - -Copyright (C) 2003 Joshua Charles Campbell - 103 Mary Ave. - Missoula MT 59801 - - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -/* this should actualy be in slbc-m.h */ - -#include "slbc-structs.h" - -#define SLBC_0_0_VERSION 0 /* crazy, the version is 0 when it is 0 */ -#define SLBC_0_0_BC_BIT_LENGTH 8 /* eight bit bytes, suprisingly enough */ -#define SLBC_ANY_HEADER_VERSION_LENGTH 16 /* two bytes */ -#define SLBC_ANY_HEADER_ENDIAN_LENGTH 8 -#define SLBC_ANY_HEADER_ECHECK_LENGTH 32 -#define SLBC_0_0_HEADER_DEFAULT_SIZE 8 /* metasize... a byte in which to store the -number of bits of the 'actual' size, up to 255 obviously */ -#define SLBC_0_0_SYM_LENGTH 32 -#define SLBC_0_0_LOCAL_NAME_LENGTH 16 - -/* we define the section types */ -#define SLBC_0_0_SECTIONCODE_ROOT 0x00 -#define SLBC_0_0_SECTIONCODE_FLOW 0x01 -#define SLBC_0_0_SECTIONCODE_MANIFEST 0x02 -#define SLBC_0_0_SECTIONCODE_XFORM 0x04 -#define SLBC_0_0_SECTIONCODE_LOGICOP 0x05 -#define SLBC_0_0_SECTIONCODE_HEADER 0x06 -#define SLBC_0_0_SECTIONCODE_BODY 0x07 -#define SLBC_0_0_SECTIONCODE_OBJECT 0x08 -#define SLBC_0_0_SECTIONCODE_LOGIC 0x09 -#define SLBC_0_0_SECTIONCODE_DIM 0x0A -#define SLBC_0_0_SECTIONCODE_CONTROL 0x0B -#define SLBC_0_0_SECTIONCODE_GLOBAL 0x0C - -/* code that is valid anywhere */ -#define SLBC_0_0_GLOBALCODE_CONTROL 0xFF /* creates a control section anywhere */ - -/* we define the primitive symbolic types */ -#define SLBC_0_0_TYPEPRIM_CHAR 0x00000000 -#define SLBC_0_0_TYPEPRIM_OBJECT 0x00000001 -#define SLBC_0_0_TYPEPRIM_STRUCT 0x00000002 -#define SLBC_0_0_TYPEPRIM_INT 0x00000003 -#define SLBC_0_0_TYPEPRIM_FLOAT 0x00000004 -#define SLBC_0_0_TYPEPRIM_BIT 0x00000005 -#define SLBC_0_0_TYPEPRIM_SYMBOL 0x00000006 -/*#define SLBC_0_0_TYPEPRIM_INPUT 0x00000007 /* you should never declare an 'input' */ -/*#define SLBC_0_0_TYPEPRIM_OUTPUT 0x00000008 /* or 'output' */ -#define SLBC_0_0_TYPEPRIM_AUTODEF 0x00000009 /* or 'autodefined' -- autodefined is just a -wrapper for saying that the value contains its bytecode definition */ -/* decide whether the symbol is system-defined or user-defined throught the top bit - so 0x00000005 is the primitive 'bit' while 0x80000005 is user defined */ -#define SLBC_0_0_TYPEMASK_PRIM_BIT 0x80000000 - -/* we define the primitive object manifest rules */ -#define SLBC_0_0_MANIFESTCODE_AS 0x00 -#define SLBC_0_0_MANIFESTCODE_EXPOSES 0x01 -#define SLBC_0_0_MANIFESTCODE_EXTENDS 0x02 - -/* the flow rules */ -#define SLBC_0_0_FLOWCODE_CAUSES 0x00 -#define SLBC_0_0_FLOWCODE_WRITES 0x01 -#define SLBC_0_0_FLOWCODE_UPDATES 0x02 -#define SLBC_0_0_FLOWCODE_SYNCS 0x03 - -/* the declaration options */ -#define SLBC_0_0_DIMCODE_SIZE 0x00 -#define SLBC_0_0_DIMCODE_BENDIAN 0x01 -#define SLBC_0_0_DIMCODE_SIGNED 0x02 -#define SLBC_0_0_DIMCODE_ENCODING 0x03 -#define SLBC_0_0_DIMCODE_ARRAY_SIZE 0x04 /* upper index limit defaults to 0 */ -#define SLBC_0_0_DIMCODE_ARRAY_UNSIZE 0x05 /* lower index limit defaults to 1 */ -#define SLBC_0_0_DIMCODE_DIM 0x06 /* subdim */ -#define SLBC_0_0_DIMCODE_STATIC 0x07 -#define SLBC_0_0_DIMCODE_VALUE 0x08 /* set the value */ -#define SLBC_0_0_DIMCODE_ARRAY_DYNSIZE 0x09 -#define SLBC_0_0_DIMCODE_ARRAY_DIM 0x0A -#define SLBC_0_0_DIMCODE_LENDIAN 0x0B -#define SLBC_0_0_DIMCODE_INPUT 0x0C /* these got moved here from */ -#define SLBC_0_0_DIMCODE_OUTPUT 0x0D /* typeprim */ -/*#define SLBC_0_0_DIMCODE_STRUCT 0x0E*/ -#define SLBC_0_0_DIMCODE_PRIMITIVE 0x0F - -/* the logic rules */ -#define SLBC_0_0_LOGICCODE_FLAG 0x00 -#define SLBC_0_0_LOGICCODE_RESULT 0x01 -#define SLBC_0_0_LOGICCODE_FOREACH 0x02 -#define SLBC_0_0_LOGICCODE_FOR 0x03 - -/* the logic operators */ -#define SLBC_0_0_LOGICOPCODE_AND 0x00 -#define SLBC_0_0_LOGICOPCODE_OR 0x01 -#define SLBC_0_0_LOGICOPCODE_XOR 0x02 -#define SLBC_0_0_LOGICOPCODE_NOT 0x03 -#define SLBC_0_0_LOGICOPCODE_EQUALS 0x04 -#define SLBC_0_0_LOGICOPCODE_LESSER 0x05 -#define SLBC_0_0_LOGICOPCODE_GREATER 0x06 -#define SLBC_0_0_LOGICOPCODE_ISA 0x07 -#define SLBC_0_0_LOGICOPCODE_HASA 0x08 -#define SLBC_0_0_LOGICOPCODE_COMPAT 0x09 /* determine compatability */ -#define SLBC_0_0_LOGICOPCODE_CONTENTS 0x0A /* compare contents */ -#define SLBC_0_0_LOGICOPCODE_SUBEXP 0x0B /* subexpression */ -/* the xform instructions */ -/* generic format is instruction number_of_in_args in_args num_of_out_args -out_args */ -#define SLBC_0_0_XFORMOPCODE_ADD 0x00 /* int and float stuff */ -#define SLBC_0_0_XFORMOPCODE_SUBTRACT 0x01 -#define SLBC_0_0_XFORMOPCODE_MULTIPLY 0x02 -#define SLBC_0_0_XFORMOPCODE_DIVIDE 0x03 -#define SLBC_0_0_XFORMOPCODE_RAISE 0x04 -#define SLBC_0_0_XFORMOPCODE_ROOT 0x05 -#define SLBC_0_0_XFORMOPCODE_INVERT 0x06 -/* #define SLBC_0_0_XFORMOPCODE_CAP 0x07 /* char stuff */ -/* #define SLBC_0_0_XFORMOPCODE_DECAP 0x08 */ -#define SLBC_0_0_XFORMOPCODE_RENCODE 0x09 -#define SLBC_0_0_XFORMOPCODE_CLEAN 0x0A -/* #define SLBC_0_0_XFORMOPCODE_SETCODE 0x0B */ -#define SLBC_0_0_XFORMOPCODE_NOT 0x0C /* bit ops */ -#define SLBC_0_0_XFORMOPCODE_XOR 0x0D -#define SLBC_0_0_XFORMOPCODE_AND 0x0E -#define SLBC_0_0_XFORMOPCODE_OR 0x0F -#define SLBC_0_0_XFORMOPCODE_LENGTH 0x10 /* array ops */ -#define SLBC_0_0_XFORMOPCODE_SUB 0x11 -#define SLBC_0_0_XFORMOPCODE_ROTATEL 0x12 -#define SLBC_0_0_XFORMOPCODE_ROTATER 0x13 -#define SLBC_0_0_XFORMOPCODE_CRACK 0x14 /* symbol ops crack open */ -#define SLBC_0_0_XFORMOPCODE_EXPOSES 0x15 /* Distill External Struct */ -#define SLBC_0_0_XFORMOPCODE_SUBTYPE 0x16 /* Get SubType array */ -/* #define SLBC_0_0_XFORMOPCODE_MEMBERS 0x17 /* Number of SubTypes */ -#define SLBC_0_0_XFORMOPCODE_SIZE 0x18 -#define SLBC_0_0_XFORMOPCODE_HSIZE 0x19 -#define SLBC_0_0_XFORMOPCODE_SYMBOLIZE 0x1A /* conversion ops */ -#define SLBC_0_0_XFORMOPCODE_MELT 0x1B -#define SLBC_0_0_XFORMOPCODE_CAST 0x1C -/* #define SLBC_0_0_XFORMOPCODE_CRYSTALIZE 0x1D /* wtf? */ -#define SLBC_0_0_XFORMOPCODE_SHOVE 0x1E -#define SLBC_0_0_XFORMOPCODE_FLOAT 0x1F -#define SLBC_0_0_XFORMOPCODE_SINK 0x20 - -/* header operations */ -#define SLBC_0_0_HEADERCODE_CONSTANT 0x00 -#define SLBC_0_0_HEADERCODE_INCLUDE 0x01 -#define SLBC_0_0_HEADERCODE_INPUT_DIM 0x02 -#define SLBC_0_0_HEADERCODE_OUTPUT_DIM 0x03 -#define SLBC_0_0_HEADERCODE_SCOPE_DIM 0x04 /* xform internal variable */ - -/* special codes */ -#define SLBC_0_0_CONTROL_END 0x00 /* illegal in bytecode files */ -#define SLBC_0_0_CONTROL_VALUE 0x01 /* illegal in text, use only in bytecode */ -#define SLBC_0_0_CONTROL_ERROR 0x02 /* set error handling behavior */ -#define SLBC_0_0_CONTROL_SUBSECTION 0x03 /* improperly create a section */ -#define SLBC_0_0_CONTROL_REMETASIZE 0x04 /* illegal in text, use only in bytecode */ - - -/* the slbc 0.0 file format is as follows */ -/* header format is: -version, echeck, sectioncode, sectionsize, section - -/* sectioncode length ( subsectioncode length ( ) ) ) */ - diff --git a/users/warpzero/SL/source/slbc-prms.h b/users/warpzero/SL/source/slbc-prms.h deleted file mode 100644 index f4e413b99e..0000000000 --- a/users/warpzero/SL/source/slbc-prms.h +++ /dev/null @@ -1,132 +0,0 @@ -/* slbc-parms.h the table for more information about each bytecode - -Copyright (C) 2003 Joshua Charles Campbell - 103 Mary Ave. - Missoula MT 59801 - - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -#include "slbc-n.h" - -static const struct bc_info_table bc_information[12][32] = { - { /* root section ( SLBC_0_0_SECTIONCODE_ROOT ) */ - /* opcode, in|out|def|hb|use|section */ - { SLBC_0_0_SECTIONCODE_ROOT, 0, 0, 0, 0, 0, SLBC_0_0_SECTIONCODE_ROOT }, - { SLBC_0_0_SECTIONCODE_FLOW, -1, -1, 0, 2, 3, SLBC_0_0_SECTIONCODE_FLOW }, - { SLBC_0_0_SECTIONCODE_MANIFEST,-1, -1, 0, 0, 0, SLBC_0_0_SECTIONCODE_MANIFEST}, - { SLBC_0_0_SECTIONCODE_XFORM, -1, -1, 3, 0, 0, SLBC_0_0_SECTIONCODE_XFORM}, - { SLBC_0_0_SECTIONCODE_LOGICOP, 1, 1, 2, 0, 2, SLBC_0_0_SECTIONCODE_LOGICOP}, - { SLBC_0_0_SECTIONCODE_HEADER, 0, 0, 0, 0, 0, SLBC_0_0_SECTIONCODE_HEADER}, - { SLBC_0_0_SECTIONCODE_BODY, 0, 0, 0, 0, 0, SLBC_0_0_SECTIONCODE_BODY}, - { SLBC_0_0_SECTIONCODE_OBJECT, 0, 0, 1, 0, 3, SLBC_0_0_SECTIONCODE_OBJECT}, - { SLBC_0_0_SECTIONCODE_LOGIC, -1, 0, 3, 2, 3, SLBC_0_0_SECTIONCODE_LOGIC}, - { SLBC_0_0_SECTIONCODE_DIM, 1, 0, 1, 0, 2, SLBC_0_0_SECTIONCODE_DIM}, - { SLBC_0_0_SECTIONCODE_CONTROL, 0, 0, 0, 0, 0, SLBC_0_0_SECTIONCODE_CONTROL}, - { SLBC_0_0_SECTIONCODE_GLOBAL, 0, 0, 0, 0, 0, SLBC_0_0_SECTIONCODE_GLOBAL} - }, { /* flow section */ - { SLBC_0_0_FLOWCODE_CAUSES, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_FLOWCODE_WRITES, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_FLOWCODE_UPDATES, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_FLOWCODE_SYNCS, 1, 1, 0, 0, 1, -1} - }, { /* manifest section */ - { SLBC_0_0_MANIFESTCODE_AS, 1, 1, 1, 0, 3, SLBC_0_0_SECTIONCODE_DIM}, - { SLBC_0_0_MANIFESTCODE_EXPOSES, 1, 1, 1, 0, 3, -1}, - { SLBC_0_0_MANIFESTCODE_EXTENDS, 1, 0, 0, 0, 1, -1} - }, { /* xform section */ - /* opcode, in|out|def|hb|use|section */ - { SLBC_0_0_XFORMOPCODE_ADD, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_SUBTRACT, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_MULTIPLY, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_DIVIDE, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_RAISE, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_ROOT, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_INVERT, 2, 1, 0, 0, 1, -1}, - /* { SLBC_0_0_XFORMOPCODE_CAP, }, - { SLBC_0_0_XFORMOPCODE_DECAP, }, */ - { SLBC_0_0_XFORMOPCODE_RENCODE, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_CLEAN, 2, 1, 0, 0, 1, -1}, - /* { SLBC_0_0_XFORMOPCODE_SETCODE, "setcode" }, */ - { SLBC_0_0_XFORMOPCODE_NOT, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_XOR, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_AND, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_OR, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_LENGTH, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_SUB, 3, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_ROTATEL, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_ROTATER, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_CRACK, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_EXPOSES, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_SUBTYPE, 1, 1, 0, 0, 1, -1}, - /* { SLBC_0_0_XFORMOPCODE_MEMBERS,"members" }, */ - { SLBC_0_0_XFORMOPCODE_SIZE, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_HSIZE, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_SYMBOLIZE,1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_MELT, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_CAST, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_XFORMOPCODE_SHOVE, 2, 1, 0, 0, 1, -1} - /* { SLBC_0_0_XFORMOPCODE_FLOAT, "float" }, - { SLBC_0_0_XFORMOPCODE_SINK, "sink" }, */ - }, { /* logic section */ - { SLBC_0_0_LOGICOPCODE_AND, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_OR, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_XOR, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_NOT, 1, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_EQUALS, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_LESSER, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_GREATER, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_ISA, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_HASA, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_COMPAT, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_CONTENTS, 2, 1, 0, 0, 1, -1}, - { SLBC_0_0_LOGICOPCODE_SUBEXP, 1, 1, 0, 0, 1, SLBC_0_0_SECTIONCODE_LOGICOP}, - }, { /* header section */ - { SLBC_0_0_HEADERCODE_CONSTANT, 1, 0, 1, 0, 3, SLBC_0_0_SECTIONCODE_DIM}, - { SLBC_0_0_HEADERCODE_INCLUDE, 1, 0, 0, 0, 1, -1}, - { SLBC_0_0_HEADERCODE_INPUT_DIM,-1, 0, 1, 0, 1, -1}, - { SLBC_0_0_HEADERCODE_OUTPUT_DIM,-1, 0, 0, 0, 1, -1}, - { SLBC_0_0_HEADERCODE_SCOPE_DIM, 1, 0, 1, 0, 3, SLBC_0_0_SECTIONCODE_DIM}, - }, { /* body section -- defaults to sectioncode */ - }, { /* object section -- defaults to sectioncode*/ - }, { /* logic section */ - { SLBC_0_0_LOGICCODE_FLAG, 0, 0, 1, 0, 3, SLBC_0_0_SECTIONCODE_LOGICOP}, - { SLBC_0_0_LOGICCODE_RESULT, -1, 0, 1, 0, 3, -1}, - { SLBC_0_0_LOGICCODE_FOREACH, 1, 0, 1, 0, 3, -1}, - { SLBC_0_0_LOGICCODE_FOR, 3, 0, 1, 0, 3, -1}, - }, { /* dim section */ - { SLBC_0_0_DIMCODE_SIZE, 1, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_BENDIAN, 0, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_LENDIAN, 0, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_SIGNED, 1, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_ENCODING, 1, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_ARRAY_SIZE, 1, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_ARRAY_UNSIZE, 1, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_DIM, 1, 0, 0, 0, 1, SLBC_0_0_SECTIONCODE_DIM}, - { SLBC_0_0_DIMCODE_STATIC, 0, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_VALUE, 1, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_ARRAY_DYNSIZE,0, 0, 0, 0, 0, -1}, - { SLBC_0_0_DIMCODE_ARRAY_DIM, 0, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_INPUT, 0, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_OUTPUT, 0, 0, 0, 0, 1, -1}, - { SLBC_0_0_DIMCODE_PRIMITIVE, 1, 0, 0, 0, 0, -1}, - }, { /* control */ - { SLBC_0_0_CONTROL_END, 0, 0, 0, 0, 1, -2}, - { SLBC_0_0_CONTROL_VALUE, 1, 0, 1, 0, 0, -1}, - { SLBC_0_0_CONTROL_ERROR, 0, 0, 0, 0, 0, -1}, /*disabled en temporum */ - { SLBC_0_0_CONTROL_SUBSECTION, 0, 0, 0, 0, 0, SLBC_0_0_SECTIONCODE_ROOT}, - { SLBC_0_0_CONTROL_REMETASIZE, 0, 0, 0, 0, 0, 0}, - }, { /* global */ - { SLBC_0_0_GLOBALCODE_CONTROL, 0, 0, 0, 0, 1, SLBC_0_0_SECTIONCODE_CONTROL}, - } -}; diff --git a/users/warpzero/SL/source/slbc-structs.h b/users/warpzero/SL/source/slbc-structs.h deleted file mode 100644 index 4ade8c12fd..0000000000 --- a/users/warpzero/SL/source/slbc-structs.h +++ /dev/null @@ -1,47 +0,0 @@ -/* slbc-structs.h C structs used in the other headerfiles - -Copyright (C) 2003 Joshua Charles Campbell - 103 Mary Ave. - Missoula MT 59801 - - This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program 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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -/* -static struct keyword_match { - int kw_matched; - unsigned long int kw_sectioncode; - unsigned long int kw_bytecode; -}; -*/ -struct text_to_bc_table { - unsigned long int bytecode; - char en_text[]; -}; - -struct bc_info_table { - unsigned long int bytecode; - signed short int in_args; /* -1 means automagic */ - signed short int out_args; - signed short int definitive; /* can this operation define something 0=no - 1=yes 2=defined arguments 3=both*/ - signed short int header_vs_body; /* has header for args, body for stuff - 0=no 1=yes 2=args header (each in_ or out_ args !=0 gets an implied - header) 3=autodetect args header */ - signed short int useability; /* 1=allow direct use 0=disallow 2=inderect - named 3=named use */ - signed short int section_change; /* section changes to, -1 for none -2 - for parent (end) -3 for any */ - /* unsigned long int arg_symbol_list[] */ -}; diff --git a/users/warpzero/SL/source/submit.pl b/users/warpzero/SL/source/submit.pl deleted file mode 100644 index e344be3201..0000000000 --- a/users/warpzero/SL/source/submit.pl +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/perl -w -# Submission script for the CFLAGS/cpuinfo collection project -# Submits data to the web form on http://slinky.surrey.sfu.ca/~robbat2/cflagcollect/ -# Requires your email address as a parameter -# Assumes that you don't mind your system info being public -use LWP; -use LWP::UserAgent; - -# A little helper func I found on the net. -sub URLEncode { - my $theURL = $_[0]; - $theURL =~ s/([\W])/"%" . uc(sprintf("%2.2x",ord($1)))/eg; - return $theURL; -} - -# check for valid email address -$argc = @ARGV; -if($argc == 0 or !($ARGV[0] =~ /\@/)) { -$s = "That isn't a valid email address!\nPlease run this program as '$0 emailaddress'\nEG: '$0 foo\@bar.com'\n"; -die $s; -} -# This is ALL of the data we collect from the system -print "This may take up to 30 seconds depending on your CPU speed and RAM.\n"; -print "Collecting data "; -$email = $ARGV[0]; -print "."; -$machinename = `uname -n`; -print "."; -$cflags = `emerge info 2>&1|grep CFLAGS|cut -d= -f2-|xargs`; -print "."; -$cxxflags = `emerge info 2>&1|grep CXXFLAGS|cut -d= -f2-|xargs`; -print "."; -$chost = `emerge info 2>&1|grep CHOST|cut -d= -f2-|xargs`; -print "."; -$gccver = `gcc -v 2>&1`; -print "."; -$binver = `ld -v`; -print "."; -$cpuinfo = `cat /proc/cpuinfo`; -print "Done!\n"; - -print "Processing data "; -%data = ( -'email'=>$email, -'machinename'=>$machinename, -'public'=>'on', -'cflags'=>$cflags, -'chost',$chost, -'cxxflags'=>$cxxflags, -'gccver'=>$gccver, -'binver'=>$binver, -'cpuinfo'=>$cpuinfo -); -print "."; -@alldata = sort(keys(%data)); -print "."; -$str = 'submit=submit'; -print "."; -foreach $key(@alldata) { - print "."; - $str .= "&".$key."=".URLEncode("$data{$key}"); -} -print "Done!\n"; -print "Sending data "; - -# Create a user agent object -$ua = LWP::UserAgent->new; -print "."; -$ua->agent("CflagsSubmitted/0.2"); -print "."; -# -## Create a request -#$target = 'http://slinky.surrey.sfu.ca/~robbat2/cflagcollect/'; -$target = 'http://gentoo.slinky.surrey.sfu.ca/cflagcollect/'; -$file = 'submit.php'; -my $req = HTTP::Request->new(POST => $target . $file .'?'.$str); -print "."; -$req->content_type('application/x-www-form-urlencoded'); -print "."; -$req->content($str); -print "."; - -# Pass request to the user agent and get a response back -my $res = $ua->request($req); -print "Done!\n"; - -# Check the outcome of the response -if ($res->is_success) { - #print $res->content; - if($res->content =~ /Done/) { - print "Data sent successfully\n"; - } else { - print "Error on the server side!\n"; - print $res->content; - } -} else { - print "Error sending data on this side!\n"; -} - -#print "Content-type: text/html\n\n"; -#use HTTP::Request::Common qw(POST); -#use LWP::UserAgent; -# -#$ua2 = LWP::UserAgent->new(); -#$ua2->agent("CflagsSubmitted/0.1 "); -#my $req = POST 'http://slinky.surrey.sfu.ca/~robbat2/cflagcollect/', -#[ first_name => $firstname, email => $email]; -# -#$content = $ua2->request($req)->as_string; -# -#print "content = $content"; - - - diff --git a/users/warpzero/SL/source/test.sl b/users/warpzero/SL/source/test.sl deleted file mode 100644 index e2548449d2..0000000000 --- a/users/warpzero/SL/source/test.sl +++ /dev/null @@ -1,16 +0,0 @@ -# this is some test SL code to make sure my fucking parser works (which it -# doesn't) - -object test_object - test_int as integer size 32 - test_char as character encoding utf_8 - test_math as flow some_math - - test_set exposes test_math.input - - test_math.output.integer_value writes test_int - test_math.output.char_value writes test_char -end test_object - -flow some_math -end some_math diff --git a/users/warpzero/SL/source/test.slc b/users/warpzero/SL/source/test.slc deleted file mode 100644 index e69de29bb2..0000000000 --- a/users/warpzero/SL/source/test.slc +++ /dev/null |