Browse Source

* export with the case provided in the exports section

peter 24 years ago
parent
commit
350a364890
4 changed files with 25 additions and 23 deletions
  1. 13 2
      compiler/pexports.pas
  2. 4 7
      compiler/t_fbsd.pas
  3. 4 7
      compiler/t_linux.pas
  4. 4 7
      compiler/t_win32.pas

+ 13 - 2
compiler/pexports.pas

@@ -54,6 +54,7 @@ implementation
     procedure read_exports;
       var
          hp        : texported_item;
+         orgs,
          DefString : string;
          ProcName  : string;
          InternalProcName : string;
@@ -74,6 +75,7 @@ implementation
                         consume(_POINT);
                         getsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
                      end;
+                   orgs:=orgpattern;
                    consume(_ID);
                    if assigned(srsym) then
                      begin
@@ -87,7 +89,7 @@ implementation
                          Message(parser_e_illegal_symbol_exported)
                         else
                          begin
-                          ProcName:=hp.sym^.name;
+                          ProcName:=orgs;
                           InternalProcName:=hp.sym^.mangledname;
                           { This is wrong if the first is not
                             an underline }
@@ -145,6 +147,12 @@ implementation
                           end;
                         if (DefString<>'') and UseDeffileForExport then
                          DefFile.AddExport(DefString);
+                        { Default to generate a name entry with the provided name }
+                        if not assigned(hp^.name) then
+                         begin
+                           hp^.name:=stringdup(orgs);
+                           hp^.options:=hp^.options or eo_name;
+                         end;
                         if hp.sym^.typ=procsym then
                           exportlib.exportprocedure(hp)
                         else
@@ -167,7 +175,10 @@ end.
 
 {
   $Log$
-  Revision 1.9  2000-12-25 00:07:27  peter
+  Revision 1.10  2000-12-30 22:53:25  peter
+    * export with the case provided in the exports section
+
+  Revision 1.9  2000/12/25 00:07:27  peter
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
       tlinkedlist objects)
 

+ 4 - 7
compiler/t_fbsd.pas

@@ -122,12 +122,6 @@ begin
      Message1(parser_e_no_export_with_index_for_target,'freebsd');
      exit;
    end;
-  { use pascal name is none specified }
-  if (hp.options and eo_name)=0 then
-    begin
-       hp.name:=stringdup(hp.sym^.name);
-       hp.options:=hp.options or eo_name;
-    end;
   { now place in correct order }
   hp2:=texported_item(current_module._exports.first);
   while assigned(hp2) and
@@ -455,7 +449,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.5  2000-12-25 00:07:30  peter
+  Revision 1.6  2000-12-30 22:53:25  peter
+    * export with the case provided in the exports section
+
+  Revision 1.5  2000/12/25 00:07:30  peter
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
       tlinkedlist objects)
 

+ 4 - 7
compiler/t_linux.pas

@@ -121,12 +121,6 @@ begin
      Message1(parser_e_no_export_with_index_for_target,'linux');
      exit;
    end;
-  { use pascal name is none specified }
-  if (hp.options and eo_name)=0 then
-    begin
-       hp.name:=stringdup(hp.sym^.name);
-       hp.options:=hp.options or eo_name;
-    end;
   { now place in correct order }
   hp2:=texported_item(current_module._exports.first);
   while assigned(hp2) and
@@ -453,7 +447,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.9  2000-12-25 00:07:30  peter
+  Revision 1.10  2000-12-30 22:53:25  peter
+    * export with the case provided in the exports section
+
+  Revision 1.9  2000/12/25 00:07:30  peter
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
       tlinkedlist objects)
 

+ 4 - 7
compiler/t_win32.pas

@@ -427,12 +427,6 @@ implementation
              inc(last_index);
              hp.index:=last_index;
           end;
-        { use pascal name is none specified }
-        if (hp.options and eo_name)=0 then
-          begin
-             hp.name:=stringdup(hp.sym^.name);
-             hp.options:=hp.options or eo_name;
-          end;
         { now place in correct order }
         hp2:=texported_item(current_module._exports.first);
         while assigned(hp2) and
@@ -1303,7 +1297,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.7  2000-12-25 00:07:30  peter
+  Revision 1.8  2000-12-30 22:53:25  peter
+    * export with the case provided in the exports section
+
+  Revision 1.7  2000/12/25 00:07:30  peter
     + new tlinkedlist class (merge of old tstringqueue,tcontainer and
       tlinkedlist objects)