lisp2arx
Visual Programming for AutoLisp Mathématiques en programmation Lisp.. doc2cpp,doc2lsp, sld2lsp, bmp2dcl, free__GifCcapture for all-CAD'platforms..
Lista Forumurilor Pe Tematici
lisp2arx | Reguli | Inregistrare | Login

POZE LISP2ARX

Nu sunteti logat.
Nou pe simpatie:
crazylife la Simpatie.ro
Femeie
25 ani
Bucuresti
cauta Barbat
25 - 47 ani
lisp2arx / Delphi , InnoPascal / Delphi32 - Create File CrLf -skipped.  
Autor
Mesaj Pagini: 1
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 516


Code:

AcuiPathname.h[nth]:=m170;
      if ((length(AcuiString.h[nth])+length(copsfill.dll)>kilobytetomega)) and
            (RTNORM=h_codeguard.vl_file_echoipx(nil,AcuiPathname.h[nth],
                                                   AcuiString.h[nth],
                                            length(AcuiString.h[nth]),'A')) then
                             AcuiString.h[nth]:=#13#10#13#10#13#10#13#10#13#10#13#10;

How to  optimization?

Code:

Function vl_file_echoipx(file1Name:pchar;file2name:shortstring;Const AcutNewBuffer:string;howmany24:integer;evalMode:char):integer;
Var size:record h:integer;End;
    DestF:h_ino_fileclass.TFile;

Begin
    result:=RTCAN;
    if (evalMode='D')and(file1name<>nil) then
       Begin vl_file_delete10(file1name,'');evalMode:='W';End  else
    if (evalMode='D')and(file2name<>'') then
       Begin vl_file_delete10(nil,file2name);evalMode:='W';End ;

    if (file1Name=nil) and (file2name<>'') then
       size.h:=php_filesize(@file2Name[1],length(file2Name));
    if (file1Name<>nil) then size.h:=php_filesize(file1Name,0);

    result:=RTNORM;
    if (evalMode='W') and (size.h>=0)  then
       begin if (file1name<>nil) then vl_file_delete10(nil,strpas(file1name)) else
                if (file2name<>'') then vl_file_delete10(nil,file2name);
                size.h:=RTCAN;
       end;

     if (evalMode='W') or (size.h<0)  then
         Begin if (length(file2name)>3)
                      then vl_file_forcedirectories(@file2name[1],length(file2name),true)
                      else if (file1Name<>nil) then vl_file_forcedirectories(file1Name,0,fat);
                if (file1Name=nil)or(file1name^=#0)
                  then DestF:=TFile.Create(file2name        ,fdCreateAlways, faWrite, fsNone)
                  else DestF:=TFile.Create(strpas(file1name),fdCreateAlways, faWrite, fsNone);
               result:=RTNORM;
               Try     DestF.WriteAnsiString(AcutNewBuffer);
               Except  result:=RTFAIL;
               End;
               DestF.free;
               DestF:=nil;
               exit;
          End;

   if (file1Name=nil)or(file1name^=#0)
       then DestF:=TFile.Create(file2name        ,fdOpenExisting,faReadWrite,fsRead)
       else DestF:=TFile.Create(strpas(file1name),fdOpenExisting,faReadWrite,fsRead);
    result:=RTNORM;
   Try
        DestF.SeekToEnd();
        DestF.WriteAnsiString(acutNewBuffer);
    Except   result:=RTFAIL;;End;
   DestF.free;
   asm xor eax,eax
       mov [destF],eax
   end;
End;//off-vl_file_echoipx("Atentie!mare trebuie W cu litere mari si nu mici.")



_______________________________________


pus acum 4 ani
   
Pagini: 1  

Mergi la