git-svn-id: https://spexeah.com:8443/svn/Asuro@665 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/E1000.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/E1000.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/arp.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/arp.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/asuro.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/asuro.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/console.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/console.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/libpsystem.a
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/libpsystem.a
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/lists.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/lists.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/mouse.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/mouse.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/strings.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/strings.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/terminal.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/terminal.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/tracer.ppu
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/tracer.ppu
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -3,20 +3,20 @@ unit asuro; | |||||||
| interface | interface | ||||||
|   |   | ||||||
| const | const | ||||||
|      VERSION       = '1.0.1-663ia'; |      VERSION       = '1.0.1-664ia'; | ||||||
|      VERSION_MAJOR = '1'; |      VERSION_MAJOR = '1'; | ||||||
|      VERSION_MINOR = '0'; |      VERSION_MINOR = '0'; | ||||||
|      VERSION_SUB   = '1'; |      VERSION_SUB   = '1'; | ||||||
|      REVISION      = '663'; |      REVISION      = '664'; | ||||||
|      RELEASE       = 'ia'; |      RELEASE       = 'ia'; | ||||||
|      LINE_COUNT    = 26954; |      LINE_COUNT    = 26991; | ||||||
|      FILE_COUNT    = 83; |      FILE_COUNT    = 83; | ||||||
|      DRIVER_COUNT  = 28; |      DRIVER_COUNT  = 28; | ||||||
|      FPC_VERSION   = '2.6.4'; |      FPC_VERSION   = '2.6.4'; | ||||||
|      NASM_VERSION  = '2.10.09'; |      NASM_VERSION  = '2.10.09'; | ||||||
|      MAKE_VERSION  = '3.81'; |      MAKE_VERSION  = '3.81'; | ||||||
|      COMPILE_DATE  = '05/05/18'; |      COMPILE_DATE  = '05/05/18'; | ||||||
|      COMPILE_TIME  = '22:04:28'; |      COMPILE_TIME  = '22:33:57'; | ||||||
|   |   | ||||||
| implementation | implementation | ||||||
|   |   | ||||||
|   | |||||||
| @@ -5,7 +5,8 @@ interface | |||||||
| uses | uses | ||||||
|     console, |     console, | ||||||
|     lmemorymanager, |     lmemorymanager, | ||||||
|     util; |     util, | ||||||
|  |     strings; | ||||||
|  |  | ||||||
| type | type | ||||||
|     { Managed Linked List } |     { Managed Linked List } | ||||||
| @@ -33,6 +34,7 @@ function LL_Size(LinkedList : PLinkedListBase) : uint32; | |||||||
| function LL_Insert(LinkedList : PLinkedListBase; idx : uint32) : Void; | function LL_Insert(LinkedList : PLinkedListBase; idx : uint32) : Void; | ||||||
| function LL_Get(LinkedList : PLinkedListBase; idx : uint32) : Void; | function LL_Get(LinkedList : PLinkedListBase; idx : uint32) : Void; | ||||||
| procedure LL_Free(LinkedList : PLinkedListBase); | procedure LL_Free(LinkedList : PLinkedListBase); | ||||||
|  | function LL_FromString(str : pchar; delimter : char) : PLinkedListBase; | ||||||
| procedure LL_TEST(); | procedure LL_TEST(); | ||||||
|  |  | ||||||
| implementation | implementation | ||||||
| @@ -192,6 +194,39 @@ begin | |||||||
|     kfree(void(LinkedList)); |     kfree(void(LinkedList)); | ||||||
| end; | end; | ||||||
|  |  | ||||||
|  | {function LL_FromString(str : pchar; delimter : char) : PLinkedListBase; //todo implment function for freeing pointer lists | ||||||
|  | var | ||||||
|  |     list       : PLinkedListBase; | ||||||
|  |     i          : uint32 = 0;   | ||||||
|  |     out_str    : pchar; | ||||||
|  |     elm        : puint32; | ||||||
|  |     head       : pchar; | ||||||
|  |     base       : pchar; | ||||||
|  |     size       : uint32; | ||||||
|  |     null_delim : boolean; | ||||||
|  |  | ||||||
|  | begin | ||||||
|  |     list := LL_New(sizeof(uint32)); | ||||||
|  |     stringToLL:= list;  | ||||||
|  |  | ||||||
|  |     head:= str; | ||||||
|  |     base:= head; | ||||||
|  |     null_delim:= false; | ||||||
|  |     while not null_delim do begin | ||||||
|  |         i:=0; | ||||||
|  |         while (head[i] <> delimter) and (head[i] <> char(0)) do begin | ||||||
|  |             inc(i); | ||||||
|  |         end; | ||||||
|  |         if head[i] = char(0) then null_delim:= true; | ||||||
|  |         size:= (uint32(@head[i]) - uint32(base)) + 1; | ||||||
|  |         out_str:= stringNew(size); | ||||||
|  |         memset(uint32(out_str), 0, size); | ||||||
|  |         memcpy(uint32(base), uint32(out_str), size-1); | ||||||
|  |         elm:= puint32(LL_Add(list)); | ||||||
|  |         elm | ||||||
|  |     end; | ||||||
|  | end;} | ||||||
|  |  | ||||||
| procedure LL_Test(); | procedure LL_Test(); | ||||||
| var | var | ||||||
|     i : uint32; |     i : uint32; | ||||||
| @@ -238,4 +273,39 @@ begin | |||||||
|      LL_Free(LList);     |      LL_Free(LList);     | ||||||
| end; | end; | ||||||
|  |  | ||||||
|  | function LL_FromString(str : pchar; delimter : char) : PLinkedListBase; //todo implment function for freeing pointer lists | ||||||
|  | var | ||||||
|  |     list       : PLinkedListBase; | ||||||
|  |     i          : uint32 = 0;   | ||||||
|  |     out_str    : pchar; | ||||||
|  |     elm        : puint32; | ||||||
|  |     head       : pchar; | ||||||
|  |     tail       : pchar; | ||||||
|  |     size       : uint32; | ||||||
|  |     null_delim : boolean; | ||||||
|  |  | ||||||
|  | begin | ||||||
|  |     list := LL_New(sizeof(uint32)); | ||||||
|  |     LL_FromString:= list;  | ||||||
|  |  | ||||||
|  |     head:= str; | ||||||
|  |     tail:= head; | ||||||
|  |  | ||||||
|  |     null_delim:= false; | ||||||
|  |     while not null_delim do begin | ||||||
|  |         if (head^ = delimter) or (head^ = char(0)) then begin | ||||||
|  |             if head^ = char(0) then null_delim:= true; | ||||||
|  |             size:= uint32(head) - uint32(tail); | ||||||
|  |             if size > 0 then begin | ||||||
|  |                 elm:= puint32(LL_Add(list)); | ||||||
|  |                 out_str:= stringNew(size + 1); //maybe | ||||||
|  |                 memcpy(uint32(tail), uint32(out_str), size); | ||||||
|  |                 elm^:= uint32(out_str); | ||||||
|  |             end; | ||||||
|  |             tail:= head+1; | ||||||
|  |         end; | ||||||
|  |         inc(head); | ||||||
|  |     end; | ||||||
|  | end; | ||||||
|  |  | ||||||
| end. | end. | ||||||
| @@ -13,8 +13,7 @@ interface | |||||||
|  |  | ||||||
| uses | uses | ||||||
|     util,  |     util,  | ||||||
|     lmemorymanager, |     lmemorymanager; | ||||||
|     lists; |  | ||||||
|  |  | ||||||
| function stringToUpper(str : pchar) : pchar; | function stringToUpper(str : pchar) : pchar; | ||||||
| function stringToLower(str : pchar) : pchar; | function stringToLower(str : pchar) : pchar; | ||||||
| @@ -27,7 +26,6 @@ function stringContains(str : pchar; sub : pchar) : boolean; | |||||||
| function stringToInt(str : pchar) : uint32; | function stringToInt(str : pchar) : uint32; | ||||||
| function intToString(i : uint32) : pchar; | function intToString(i : uint32) : pchar; | ||||||
| function boolToString(b : boolean; ext : boolean) : pchar; | function boolToString(b : boolean; ext : boolean) : pchar; | ||||||
| function stringToLL(str : pchar; delimter : char) : PLinkedListBase; |  | ||||||
|  |  | ||||||
| implementation | implementation | ||||||
|  |  | ||||||
| @@ -178,40 +176,4 @@ begin | |||||||
|     end; |     end; | ||||||
| end; | end; | ||||||
|  |  | ||||||
| function stringToLL(str : pchar; delimter : char) : PLinkedListBase; //todo implment function for freeing pointer lists |  | ||||||
| var |  | ||||||
|     list       : PLinkedListBase; |  | ||||||
|     i          : uint32 = 0;   |  | ||||||
|     out_str    : pchar; |  | ||||||
|     elm        : puint32; |  | ||||||
|     head       : pchar; |  | ||||||
|     tail       : pchar; |  | ||||||
|     size       : uint32; |  | ||||||
|     null_delim : boolean; |  | ||||||
|  |  | ||||||
| begin |  | ||||||
|     list := LL_New(sizeof(uint32)); |  | ||||||
|     stringToLL:= list;  |  | ||||||
|  |  | ||||||
|     head:= str; |  | ||||||
|     tail:= head; |  | ||||||
|  |  | ||||||
|     null_delim:= false; |  | ||||||
|     while not null_delim do begin |  | ||||||
|         if (head^ = delimter) or (head^ = char(0)) then begin |  | ||||||
|             if head^ = char(0) then null_delim:= true; |  | ||||||
|             size:= uint32(head) - uint32(tail); |  | ||||||
|             if size > 0 then begin |  | ||||||
|                 elm:= puint32(LL_Add(list)); |  | ||||||
|                 out_str:= stringNew(size + 1); //maybe |  | ||||||
|                 memcpy(uint32(tail), uint32(out_str), size); |  | ||||||
|                 elm^:= uint32(out_str); |  | ||||||
|             end; |  | ||||||
|             tail:= head+1; |  | ||||||
|         end else begin |  | ||||||
|         end; |  | ||||||
|         inc(head); |  | ||||||
|     end; |  | ||||||
| end; |  | ||||||
|  |  | ||||||
| end. | end. | ||||||
| @@ -92,6 +92,7 @@ var | |||||||
|    atmp            : puint32; |    atmp            : puint32; | ||||||
|    test            : puint8; |    test            : puint8; | ||||||
|    fb              : puint16; |    fb              : puint16; | ||||||
|  |    l               : PLinkedListBase; | ||||||
|     |     | ||||||
| begin | begin | ||||||
|      { Store Multiboot info } |      { Store Multiboot info } | ||||||
| @@ -211,6 +212,10 @@ begin | |||||||
|  |  | ||||||
|      tracer.push_trace('kmain.END'); |      tracer.push_trace('kmain.END'); | ||||||
|  |  | ||||||
|  |      l:= LL_FromString('/./hhhhhhh/', '/'); | ||||||
|  |      writestringln(pchar(puint32(LL_Get(l, 0)^))); | ||||||
|  |      writestringln(pchar(puint32(LL_Get(l, 1)^))); | ||||||
|  |  | ||||||
|      while true do begin |      while true do begin | ||||||
|         console.redrawWindows; |         console.redrawWindows; | ||||||
|      end; |      end; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 kieron
					kieron