Browse Source

* generate .rst from ppufilename instead of modulename

peter 24 years ago
parent
commit
8f2aaed119
2 changed files with 13 additions and 8 deletions
  1. 7 5
      compiler/cresstr.pas
  2. 6 3
      compiler/pmodules.pas

+ 7 - 5
compiler/cresstr.pas

@@ -50,7 +50,7 @@ Type
     destructor  Destroy;override;
     destructor  Destroy;override;
     function  Register(Const name : string;p : pchar;len : longint) : longint;
     function  Register(Const name : string;p : pchar;len : longint) : longint;
     procedure CreateResourceStringList;
     procedure CreateResourceStringList;
-    Procedure WriteResourceFile(FileName : String);
+    Procedure WriteResourceFile(const FileName : String);
   end;
   end;
 
 
 var
 var
@@ -212,7 +212,7 @@ begin
 end;
 end;
 
 
 
 
-Procedure TResourceStrings.WriteResourceFile(Filename : String);
+Procedure TResourceStrings.WriteResourceFile(const FileName : String);
 Type
 Type
   TMode = (quoted,unquoted);
   TMode = (quoted,unquoted);
 Var
 Var
@@ -231,8 +231,7 @@ Var
 begin
 begin
   If List.Empty then
   If List.Empty then
     exit;
     exit;
-  FileName:=current_module.outputpath^+FixFileName(ForceExtension(FileName,'.rst'));
-  message1 (general_i_writingresourcefile,filename);
+  message1 (general_i_writingresourcefile,SplitFileName(filename));
   Assign(F,Filename);
   Assign(F,Filename);
   {$i-}
   {$i-}
   Rewrite(f);
   Rewrite(f);
@@ -293,7 +292,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.8  2000-12-25 00:07:25  peter
+  Revision 1.9  2001-02-24 10:44:55  peter
+    * generate .rst from ppufilename instead of modulename
+
+  Revision 1.8  2000/12/25 00:07:25  peter
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
       tlinkedlist objects)
       tlinkedlist objects)
 
 

+ 6 - 3
compiler/pmodules.pas

@@ -1248,7 +1248,7 @@ implementation
             current_module.flags:=current_module.flags or uf_has_resources;
             current_module.flags:=current_module.flags or uf_has_resources;
             { only write if no errors found }
             { only write if no errors found }
             if (Errorcount=0) then
             if (Errorcount=0) then
-             ResourceStrings.WriteResourceFile(current_module.ModuleName^);
+             ResourceStrings.WriteResourceFile(ForceExtension(current_module.ppufilename^,'.rst'));
           end;
           end;
 
 
          { avoid self recursive destructor call !! PM }
          { avoid self recursive destructor call !! PM }
@@ -1524,7 +1524,7 @@ implementation
             ResourceStrings.CreateResourceStringList;
             ResourceStrings.CreateResourceStringList;
             { only write if no errors found }
             { only write if no errors found }
             if (Errorcount=0) then
             if (Errorcount=0) then
-             ResourceStrings.WriteResourceFile(current_module.ModuleName^);
+             ResourceStrings.WriteResourceFile(ForceExtension(current_module.ppufilename^,'.rst'));
           end;
           end;
 
 
          codegen_doneprocedure;
          codegen_doneprocedure;
@@ -1627,7 +1627,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.22  2001-02-21 19:37:19  peter
+  Revision 1.23  2001-02-24 10:44:56  peter
+    * generate .rst from ppufilename instead of modulename
+
+  Revision 1.22  2001/02/21 19:37:19  peter
     * moved deref to be done after loading of implementation units. prederef
     * moved deref to be done after loading of implementation units. prederef
       is still done directly after loading of symbols and definitions.
       is still done directly after loading of symbols and definitions.