Explorar el Código

Merged revisions 1321,1827 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r1321 | florian | 2005-10-08 10:17:35 +0200 (Sa, 08 Okt 2005) | 1 line

* patch from yury to warn about wrong warning of unsupported apptype
........
r1827 | florian | 2005-11-26 22:54:15 +0100 (Sa, 26 Nov 2005) | 2 lines

* apptype causes only a note on system not supporting apptype

........

git-svn-id: branches/fixes_2_0@1828 -

florian hace 20 años
padre
commit
deb7cc201c
Se han modificado 4 ficheros con 321 adiciones y 304 borrados
  1. 2 0
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 288 284
      compiler/msgtxt.inc
  4. 28 18
      compiler/scandir.pas

+ 2 - 0
compiler/msg/errore.msg

@@ -320,6 +320,8 @@ scan_c_switching_to_utf8=02071_C_UTF-8 signature found, using UTF-8 encoding
 % so it interprets it as an UTF-8 file
 scan_e_compile_time_typeerror=02072_E_Compile time expression: Wanted $1 but got $2 at $3
 % Type check of a compile time expression failed.
+scan_n_app_type_not_support=02073_N_APPTYPE is not supported by the target OS
+% The \var{\{\$APPTYPE\}} directive is supported by certain operating systems only.
 % \end{description}
 #
 # Parser

+ 3 - 2
compiler/msgidx.inc

@@ -88,6 +88,7 @@ const
   scan_e_utf8_malformed=02070;
   scan_c_switching_to_utf8=02071;
   scan_e_compile_time_typeerror=02072;
+  scan_n_app_type_not_support=02073;
   parser_e_syntax_error=03000;
   parser_e_dont_nest_interrupt=03004;
   parser_w_proc_directive_ignored=03005;
@@ -661,9 +662,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 39103;
+  MsgTxtSize = 39153;
 
   MsgIdxMax : array[1..20] of longint=(
-    19,73,216,59,59,47,100,20,135,60,
+    19,74,216,59,59,47,100,20,135,60,
     40,1,1,1,1,1,1,1,1,1
   );

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 288 - 284
compiler/msgtxt.inc


+ 28 - 18
compiler/scandir.pas

@@ -243,26 +243,36 @@ implementation
       var
          hs : string;
       begin
-        if not (target_info.system in [system_i386_win32,system_i386_os2,
+        if not (target_info.system in system_all_windows + [system_i386_os2,
                                        system_i386_emx, system_powerpc_macos]) then
-          Message(scan_w_app_type_not_support);
-        if not current_module.in_global then
-          Message(scan_w_switch_is_global)
+          begin
+            if m_delphi in aktmodeswitches then
+              Message(scan_n_app_type_not_support)
+            else
+              Message(scan_w_app_type_not_support);
+          end
         else
           begin
-             current_scanner.skipspace;
-             hs:=current_scanner.readid;
-             if hs='GUI' then
-               apptype:=app_gui
-             else if hs='CONSOLE' then
-               apptype:=app_cui
-             else if (hs='FS') and (target_info.system in [system_i386_os2,
-                                                         system_i386_emx]) then
-               apptype:=app_fs
-             else if (hs='TOOL') and (target_info.system in [system_powerpc_macos]) then
-               apptype:=app_tool
-             else
-               Message1(scan_w_unsupported_app_type,hs);
+            if not current_module.in_global then
+              Message(scan_w_switch_is_global)
+            else
+              begin
+                 current_scanner.skipspace;
+                 hs:=current_scanner.readid;
+                 if hs='GUI' then
+                   apptype:=app_gui
+                 else if hs='CONSOLE' then
+                   apptype:=app_cui
+                 else if (hs='NATIVE') and (target_info.system in system_windows) then
+                   apptype:=app_native
+                 else if (hs='FS') and (target_info.system in [system_i386_os2,
+                                                             system_i386_emx]) then
+                   apptype:=app_fs
+                 else if (hs='TOOL') and (target_info.system in [system_powerpc_macos]) then
+                   apptype:=app_tool
+                 else
+                   Message1(scan_w_unsupported_app_type,hs);
+              end;
           end;
       end;
 
@@ -876,7 +886,7 @@ implementation
             Message(scan_w_only_one_resourcefile_supported)
           else
             current_module.resourcefiles.insert(FixFileName(s));
-          end 
+          end
         else
           Message(scan_e_resourcefiles_not_supported);
       end;

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio