aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/plugins/SDK/StrUtils.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-11 17:34:54 +0000
commit1ab628e8ad6c85c8f1b562f10480253ee3e622b7 (patch)
treed21621f68850ecd7762137e1c4387fa15731a811 /Lua/plugins/SDK/StrUtils.pas
parent6ec275387c320d3d9a8f5b6fe185687643565b8c (diff)
downloadusdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.gz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.tar.xz
usdx-1ab628e8ad6c85c8f1b562f10480253ee3e622b7.zip
merged trunk into lua branch
plugin loading is disabled atm because of a bug reading the files (lua may be the reason). Reading the files in usdx and passing the contents to lua may solve this git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2019 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Lua/plugins/SDK/StrUtils.pas79
1 files changed, 0 insertions, 79 deletions
diff --git a/Lua/plugins/SDK/StrUtils.pas b/Lua/plugins/SDK/StrUtils.pas
deleted file mode 100644
index 069c89c3..00000000
--- a/Lua/plugins/SDK/StrUtils.pas
+++ /dev/null
@@ -1,79 +0,0 @@
-unit StrUtils;
-
-interface
-
-{$IFDEF FPC}
- {$MODE Delphi}
-{$ENDIF}
-
-uses ModiSDK;
-
-//function StrToAChar(Str: String): AChar;
-function CreateStr(Str: PChar): PChar;
-procedure FreeStr(Str: PChar);
-
-implementation
-
-{$IFDEF FPC}
- {$ASMMODE Intel}
-{$ENDIF}
-
-{function StrToAChar(Str: String): AChar;
-var
- L, I: Integer;
-begin
- L := Length(Str);
- For I := 0 to L-1 do
- AChar[I] := Str[I+1];
-
- For I := L to 254 do
- AChar[I] := #0;
-end; }
-
-function StrCopy(Dest, Source: PChar): PChar; assembler;
-asm
- PUSH EDI
- PUSH ESI
- MOV ESI,EAX
- MOV EDI,EDX
- MOV ECX,0FFFFFFFFH
- XOR AL,AL
- REPNE SCASB
- NOT ECX
- MOV EDI,ESI
- MOV ESI,EDX
- MOV EDX,ECX
- MOV EAX,EDI
- SHR ECX,2
- REP MOVSD
- MOV ECX,EDX
- AND ECX,3
- REP MOVSB
- POP ESI
- POP EDI
-end;
-
-function StrLen(Str: PChar): Cardinal; assembler;
-asm
- MOV EDX,EDI
- MOV EDI,EAX
- MOV ECX,0FFFFFFFFH
- XOR AL,AL
- REPNE SCASB
- MOV EAX,0FFFFFFFEH
- SUB EAX,ECX
- MOV EDI,EDX
-end;
-
-function CreateStr(Str: PChar): PChar;
-begin
- GetMem(Result, StrLen(Str) + 1);
- StrCopy(Result, Str);
-end;
-
-procedure FreeStr(Str: PChar);
-begin
- FreeMem(Str);
-end;
-
-end.