Browse Source

* Def file syntax for win32 with index corrected
* direct output of .edata leads to same indexes
(index 5 leads to next export being 6 unless otherwise
specified like for enums)

pierre 26 years ago
parent
commit
00a8ec4695
2 changed files with 25 additions and 19 deletions
  1. 8 2
      compiler/pexports.pas
  2. 17 17
      compiler/t_win32.pas

+ 8 - 2
compiler/pexports.pas

@@ -89,7 +89,7 @@ unit pexports;
                              val(pattern,hp^.index,code);
                              val(pattern,hp^.index,code);
                              consume(_INTCONST);
                              consume(_INTCONST);
                              if target_os.id=os_i386_win32 then
                              if target_os.id=os_i386_win32 then
-                               DefString:=ProcName+' @'+tostr(hp^.index)+'='+InternalProcName
+                               DefString:=ProcName+'='+InternalProcName+' @ '+tostr(hp^.index)
                              else
                              else
                                DefString:=ProcName+'='+InternalProcName; {Index ignored!}
                                DefString:=ProcName+'='+InternalProcName; {Index ignored!}
                           end;
                           end;
@@ -136,7 +136,13 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.14  1999-11-20 01:19:10  pierre
+  Revision 1.15  1999-11-22 22:20:43  pierre
+    * Def file syntax for win32 with index corrected
+    * direct output of .edata leads to same indexes
+      (index 5 leads to next export being 6 unless otherwise
+      specified like for enums)
+
+  Revision 1.14  1999/11/20 01:19:10  pierre
     * DLL index used for win32 target with DEF file
     * DLL index used for win32 target with DEF file
     + DLL initialization/finalization support
     + DLL initialization/finalization support
 
 

+ 17 - 17
compiler/t_win32.pas

@@ -400,24 +400,18 @@ unit t_win32;
                  message1(parser_e_export_invalid_index,tostr(hp^.index));
                  message1(parser_e_export_invalid_index,tostr(hp^.index));
                  exit;
                  exit;
                end;
                end;
-             hp2:=pexported_item(current_module^._exports^.first);
-             while assigned(hp2) do
+             if (hp^.index<=last_index) then
                begin
                begin
-                  if (hp^.index=hp2^.index) then
-                    if ((hp2^.options and eo_index)<>0) then
-                      begin
-                        message1(parser_e_export_ordinal_double,tostr(hp^.index));
-                        exit;
-                      end
-                    else
-                      begin
-                         inc(last_index);
-                         hp2^.index:=last_index;
-                      end;
-                  hp2:=pexported_item(hp2^.next);
+                 message1(parser_e_export_ordinal_double,tostr(hp^.index));
+                 { disregard index value }
+                 inc(last_index);
+                 hp^.index:=last_index;
+                 exit;
+               end
+             else
+               begin
+                 last_index:=hp^.index;
                end;
                end;
-             if hp^.index=last_index+1 then
-               inc(last_index);
           end
           end
         else
         else
           begin
           begin
@@ -1056,7 +1050,13 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.8  1999-11-16 23:39:04  peter
+  Revision 1.9  1999-11-22 22:20:43  pierre
+    * Def file syntax for win32 with index corrected
+    * direct output of .edata leads to same indexes
+      (index 5 leads to next export being 6 unless otherwise
+      specified like for enums)
+
+  Revision 1.8  1999/11/16 23:39:04  peter
     * use outputexedir for link.res location
     * use outputexedir for link.res location
 
 
   Revision 1.7  1999/11/15 15:01:56  pierre
   Revision 1.7  1999/11/15 15:01:56  pierre