Browse Source

* renamed in_main to in_global which is more logical

peter 27 years ago
parent
commit
4d8b7aca79
3 changed files with 18 additions and 11 deletions
  1. 6 3
      compiler/files.pas
  2. 6 5
      compiler/parser.pas
  3. 6 3
      compiler/switches.pas

+ 6 - 3
compiler/files.pas

@@ -93,7 +93,7 @@ unit files;
           sources_avail,            { if all sources are reachable }
           is_unit,
           in_implementation,        { processing the implementation part? }
-          in_main       : boolean;  { global, after uses else false }
+          in_global     : boolean;  { allow global settings }
 
           map           : punitmap; { mapping of all used units }
           unitcount     : word;     { local unit counter }
@@ -560,7 +560,7 @@ unit files;
          sources_avail:=true;
          compiled:=false;
          in_implementation:=false;
-         in_main:=false;
+         in_global:=true;
          is_unit:=_is_unit;
          uses_imports:=false;
          imports:=new(plinkedlist,init);
@@ -642,7 +642,10 @@ unit files;
 end.
 {
   $Log$
-  Revision 1.36  1998-08-17 10:10:07  peter
+  Revision 1.37  1998-08-18 20:52:19  peter
+    * renamed in_main to in_global which is more logical
+
+  Revision 1.36  1998/08/17 10:10:07  peter
     - removed OLDPPU
 
   Revision 1.35  1998/08/17 09:17:44  peter

+ 6 - 5
compiler/parser.pas

@@ -132,7 +132,7 @@ unit parser;
          oldaktoutputformat : tasm;
          oldaktoptprocessor : tprocessors;
          oldaktasmmode      : tasmmode;
-        
+
 
       begin
          inc(compile_level);
@@ -223,7 +223,7 @@ unit parser;
          current_scanner:=new(pscannerfile,Init(filename));
          token:=current_scanner^.yylex;
          { global switches are read, so further changes aren't allowed }
-         current_module^.in_main:=true;
+         current_module^.in_global:=false;
 
        { init code generator for a new module }
          codegen_newmodule;
@@ -259,11 +259,9 @@ unit parser;
            end
          else
            proc_program(token=_LIBRARY);
-        
 
          if status.errorcount>0 then
            Message1(unit_f_errors_in_unit,tostr(status.errorcount));
-        
 
          { clear memory }
 {$ifdef Splitheap}
@@ -372,7 +370,10 @@ unit parser;
 end.
 {
   $Log$
-  Revision 1.37  1998-08-17 09:17:49  peter
+  Revision 1.38  1998-08-18 20:52:20  peter
+    * renamed in_main to in_global which is more logical
+
+  Revision 1.37  1998/08/17 09:17:49  peter
     * static/shared linking updates
 
   Revision 1.36  1998/08/14 21:56:36  peter

+ 6 - 3
compiler/switches.pas

@@ -95,7 +95,7 @@ begin
                     Message(scan_n_stack_check_global_under_linux);
                  end;
       modulesw : begin
-                   if current_module^.in_main then
+                   if current_module^.in_global then
                     begin
                       if state='+' then
                        aktmoduleswitches:=aktmoduleswitches+[tmoduleswitch(setsw)]
@@ -106,7 +106,7 @@ begin
                     Message(scan_w_switch_is_global);
                  end;
       globalsw : begin
-                   if current_module^.in_main and (current_module=main_module) then
+                   if current_module^.in_global and (current_module=main_module) then
                     begin
                       if state='+' then
                        aktglobalswitches:=aktglobalswitches+[tglobalswitch(setsw)]
@@ -153,7 +153,10 @@ end;
 end.
 {
   $Log$
-  Revision 1.10  1998-08-14 18:14:57  peter
+  Revision 1.11  1998-08-18 20:52:21  peter
+    * renamed in_main to in_global which is more logical
+
+  Revision 1.10  1998/08/14 18:14:57  peter
     * forgot to check the target for linux for $S switch message
 
   Revision 1.9  1998/08/10 15:47:08  peter