(c)  騭, ᪢

ZXNet : 500:95/462.53
E-mail: bestview@mtu-net.ru
WWW   : http://www.ivr.da.ru

                 ணࠬ  ᪠  
                 

(".  " 8-11/2005)
ࠢ .




    । 襬  ᢮ ணࠬ  ᪠  
᫥⥫쭮⥩ ⮢  䠩. 㬠, ⠪ ணࠬ
ਣ .  ⪠ ଠ  :

 -     ⢫    㪠
   䠩, ⠪    ⢥ 䠩,  
   ᮤঠ  㪠 ⥪⮢ 䠩-ᯨ᪥;
 - ଠ  ⮬,    ,   ࠭
   ⮢  ⥪⮢ ini-䠩 (,   ᮤঠ
   ਨ),    ;
 -   ࠧ ᪮쪮  "᪮ ᫥⥫쭮,
    ᫥⥫쭮".  ⢮ ,  
   ᫥⥫쭮⥩ ࠭祭  ࠧ஬ ᢮ 
   ( । 640 );
 -  ᪮   ᫥⥫쭮  
           㤮 
   짮⥫ :   ப ᨬ,  
   祭 ⮢  筮  ⭠筮 ,
      䠩;
 -   ᪮ ᫥⥫쭮,    ப
   ᨬ,  㪠, ⮡ ࠢ ந室 
    ॣ 㪢 ( ⨭᪨, ⠪  ᪨);
 -  ᫥⥫쭮  ᯮ짮 ⠭
   ᨬ "?";
 -   ࠡ⠭ 䠩 ணࠬ 뢮 ⢮
   ந   ࠧ   䠩 ᫥
   ࠡ⪨   室 .   ࠬ 뢮
    㬬୮   ࠡ⠭ 䠩;
 -  㪠, ⮡ ணࠬ  﫠 ࠡ뢠
   䠩,  뢮 ଠ 筮 ⠪ ,  ᫨  
   﫨.  , ᫨   㧭, ᪮쪮 ࠧ
   - ᫥⥫쭮 砥  䠩, 
   㧭, ᪮쪮  ࠧ 䠩  १
   ࠡ⪨,   ᠬ 䠩;
 - ⥬ ॡ :  8086, MS-DOS 3.3.

    室 ⥪  ᯮ塞 䠩 ணࠬ  ᪠
 ᠩ ୠ    web-࠭.


ଠ ini-䠩


     ⥪⮢ 䠩,   ப ண  
ॢ 1024 ᨬ (। ⠭⮩ MAX_STR_LEN 
⥪ ணࠬ).
    ন 䠩 ᫥饥:

᪮ ᫥⥫쭮 1
  ᫥⥫쭮 1
᪮ ᫥⥫쭮 2
  ᫥⥫쭮 2
................................
᪮ ᫥⥫쭮 n
  ᫥⥫쭮 n

    ᪮ ᫥⥫쭮 稭 ᥣ  砫
ப,  । 饩 ᫥⥫쭮 易⥫쭮
  ஡.  㦨 襭 㤮⠥ 䠩
(ࠧ ,  ᫥⥫쭮   ).
     ᪮, ⠪   ᫥⥫쭮 
    ᪮쪨 ⥩. ᫨ ⥩ ᪮쪮,
  १  ( ஡ ᫥ ⮩):

_1,_2,...,_n

     ᫥⥫쭮  ᯮ   ᪮쪨
᫥   㣮 ப ini-䠩, ਬ, ⠪:

_1,_2,
_3,_4,_5,
........................
_31,_32

    ,  ᫨  ᪮쪨 ப ᯮ 
饩 ᫥⥫쭮,   砫    ப
(  ⮫쪮  ࢮ ப)   ஡.

          ᫥:

1. ப, ࠭祭  묨 窠 (ASCII-
   39),  묨 窠 (ASCII- 34),  묨
   窠 (ASCII- 96).

   ਬ: 'abcd', "- ப", ``.

       ப   ᮤঠ ᨬ, 묨 
   ࠭祭. ᫨    ப, ᮤঠ  
   ᨬ-࠭⥫,  ਤ ࠧ    ⠪,
   ⮡   ᮤঠ    ࠧ
   ᨬ-࠭⥫ (, ᮮ⢥⢥,  
   ࠭祭 쨬).
       ப   ᮤঠ ᨬ  ᫥騬 :
   26 ( ணࠬ    ini-䠩), 13
    10 (ᯮ  祭  ப ini-䠩), 0
   ( ணࠬ 㫥 ⮬   ⠭
    ini-䠩 ப).
       ᫨ ப ᮤন ᨬ   9 (⠡樨), 
    ⥭ ini-䠩  ⠪ ᨬ 㤥 ⮬᪨
     ᮮ⢥饥 ᫮ ஡ (..  ⮫쪮
   ஡, ᪮쪮 ॡ  ⨦  ப 䠩
   襩 樨, ⭮ 8, ,  樨 㬥
    0).  ࠧ,   ᯮ짮 
   ।஢ ini-䠩 ⥪⮢ ।,  
   ࠭ 䠩 ⨬ ᫥⥫쭮 ஡,
    ,   ,  ⠡樨.
       ᫨ ப ᮤন ᨬ  ன  
   ⠡,  ஢ ini-䠩  ᮢ  ஢
   ࠡ뢠 䠩.
       ᫨ ப ਭ ᪮ ᫥⥫쭮, 
   ।⢥ । 뢠饩 窮  ⠢
   ᨬ "~" (ASCII- 126).   ⮩ ப 
   ࠢ  㤥 뢠 ॣ 㪢 ( ⨭᪨,
   ⠪  ᪨).
       ⮡ ணࠬ  ࠢ ᪨ 㪢  
   ॣ,  易⥫쭮   ஢ ini-䠩,
   ⮬   ᪨ 㪢 ࠧ  ࠧ ஢.
   ணࠬ ন  ஢: ୠ⨢
   ஢ DOS (CP866), Windows-1251  KOI8-R.
       ஢ ini-䠩 㪠뢠   ᠬ,  ࢮ 
   ப.  ப     ᫥ 
   (ॣ 㪢  ):

   charset=CP866
   charset=Windows-1251
   charset=KOI8-R

        䠪,  ஢ 㪠뢠  ࢮ ப
   ini-䠩,  ,  ࢠ ப ।祭 ⮫쪮
    ⮣. ᫨   㪠뢠   ஢,  
       ப,  ப-਩,  ப 
   ᠭ ᫥⥫쭮.
       ᫨ ஢  㪠 (  ࢠ ப 
   ᮢ      襯ਢ),  ணࠬ
   ⠥,  ini-䠩  ୠ⨢ ஢ DOS (CP866).
       ᫨  ini-䠩  ᯮ ࠢ  
   ॣ 㪢 ( ᯮ,  ப,   
   ᯮ,  ᮤঠ ᨬ  ன  
   ⠡),  ஢   㪠뢠,   
     ࠢ쭮 ࠡ ணࠬ.

2. 祭    筮 ᫠  0  255.

   ਬ: 0, 23, 114.

3. 祭    ⭠筮 ᫠, ᠭ
    0xN  0xNN,  N - ⭠筠  (ॣ
   㪢   ᫠  ).

   ਬ: 0x1, 0XaB, 0x38.

4. 뫪   䠩,  ண   ⠭ 祭
   ⮢  ᫥⥫쭮. 뫪 뢠 ⠪:
   ᨬ "f"  "F"  ࠧ   -  䠩 (, 
      ), ࠭祭 묨 窠. ᫨
     䠩  㪠, ⠥,  䠩 室  ⮬
    ⠫,   ini-䠩.

   ਬ: f"test.wrk", F"d:\data\1.bin".

5.   ᪮쪮 ⠭ ᨬ "?".

   ਬ: ?, ?????.

       ᫨  ⠭ ᨬ   ᪮
   ᫥⥫쭮,     㤥 ᮮ⢥⢮
      ࠡ뢠 䠩. ᫨    
   饩 ᫥⥫쭮,   ᮮ⢥饩 ᪮
   ᫥⥫쭮     襥  ᫮;
      ࠡ뢠 䠩 ⠪ 饩
   ᫥⥫쭮,  ࢮ "?" 뢠 ,
    ᮮ⢥⢮ ࢮ "?"  ᪮
   ᫥⥫쭮,  ⠪ .
       ,  ᨬ "?",   ப ᨬ (.
   .1),   ⭮襭  ⠭筮 ᨬ "?".

     ᫥⥫쭮 (.. 㫥 )  
    ப (ਬ, ""),   뫪 
 䠩 㫥 . ⮩   ⮫쪮 
᫥⥫쭮,   ᪮.

     ,     ᫥⥫쭮   
ࠧ묨 ᯮᮡ.  ,   -ࠧ 
᫥⥫쭮 "abcdef".

) "abcdef"
) 97,98,99,100,101,102
) 0x61,'',
   "b",99,
   `d`,F"n.bin"   ( 䠩 n.bin -  101, 102)

     ini-䠩  ᮤঠ ப-ਨ
(稭騥  ᨬ ";")   ப.  ணࠬ
⠥ ini-䠩,  ப ;  㦠  
㤮⢠ 짮⥫  ᬮ 䠩. ਬ, 
ப-  㪠뢠 祭 
ini-䠩,  묨 ப   來 ⤥
  㣠  "᪮ ᫥⥫쭮, 
᫥⥫쭮".

    ,     ந室 ⠪. 砫 ⥪
  ࠡ뢠 䠩 -    . ணࠬ
ॡࠥ  ᪮ ᫥⥫쭮   ⮬ 浪,
 ஬  ᫥  ini-䠩,     
ᮢ  ᮤন ࠡ뢠 䠩, 稭  ⥪饩
樨.  ᮢ ணࠬ  ᮢ訩 ⮪ 
ᮮ⢥  ᫥⥫쭮,  ⥪饩
樥  ࠡ뢠 䠩 ⠭   ᫥
񭭮 ⪠. ᫨  ᮢ  뫮, ⥪ 
 ᬥ頥      䠩. ⥬ ॡ
 .
     ࠧ, ᫨  , ᪠,   䠩 
3  4,   ⠫ -  0,  ini-䠩  
᫥騬:

3
 4
?
 0

  ⠪:

?
 0
3
 4

⠪  ⮣     0.
     ਬ.     䠩  5  8, 
᫨ ᫥ 5 ᫥ 6,    .  ini-䠩
㤥 ⠪:

5,6
 5,6
5
 8


  ணࠬ


     ᪥ ணࠬ  㪠   ப
᭠砫,  室,  "/ro" ( 祪, ॣ
㪢  )  祭 ० "read only" ("⮫쪮
⥭"),  ஬ 㤥 ᪠ . ᫥ ⮣ 
㪠  㬥.  -  ini-䠩 (, 
   ), ᮤঠ饣 ଠ  ⮬,   
. ᫨  ।⠥   ଠ 
 (  㤮, 祬 ᮧ ini-䠩), 
  ini-䠩 㪠 "con" ( 祪, ॣ 㪢
 ).  ⮬ 砥 ᫥ ᪠ ணࠬ  ⢥ 
襥 ਣ襭  ଠ  筮 ⠪ 
,   ᮧ ini-䠩 (. ਢ  ਬ
ᥠ ࠡ  ணࠬ),  ⥬  "Ctrl-Z"  "Enter",
⮡ ᮮ ணࠬ,   ଠ .
    ன 㬥 -  䠩 (,    
),  ஬  ࠧ  㤥 ந   .
᫨   ࠡ ࠧ ᪮쪮 䠩,  
ᮧ ⥪⮢ 䠩  ᯨ᪮  䠩 (  ப
㪠뢠   䠩, ,     )
  ⢥ ண 㬥  ᪥ ணࠬ 
ᨬ "@"  ࠧ   -  䠩-ᯨ᪠ (,  
  ). ,  ᫨  䠩-ᯨ᪥ ᮤন 
ࠡ뢠 䠩  㪠    ,  
䠩 ⠥ 室騬  ⮬  ⠫,  ஬
室 䠩-ᯨ᮪.
     ⮬᪮ ᮧ 䠩-ᯨ᪠   㦭
䠩     [1].  ᬮ७  ᯮᮡ
ᮧ ⠪ ᯨ᪠:    DIR, 뢮 ன
७ࠢ  䠩,    䠩  Dos
Navigator,  ஬  㤮 ।⢠  ᮧ
ᯨ᪠ 䠩,   ⬥祭 짮⥫, ⠪ 
 ⮬᪨   .

    ᪮쪮 ਬ஢  ப:

mreplace.exe test.ini work.bin
mreplace.exe /RO c:\dos\1.ini e:\progra~1\n.txt
mreplace.exe c:\work\convert.ini @list.txt
mreplace.exe /ro CON @c:\work\list.txt

    ,  ணࠬ  ন   䠩,
⮬ 㪠뢠 ⪨ .
    ணࠬ  ࠡ⪥  䠩 ⠥ ଠ 
⮣ 䠩, ந     뢠 १ 
६ 䠩 ("$$$$$$$$.tmp" -  ᮧ  ⥪饬 
 ᪠ ணࠬ ⠫).   ࠡ뢠
䠩 ⠭    ᮤন ନ஢  ६
䠩, ந室 ஢ ଠ樨  ६ 䠩 
室 (᫨ ந諠   ). (ਬ砭: 
᪮७ ࠡ ணࠬ,  稨 ᢮ ,
१ ࠭  ,   ६ 䠩 뢠
⮫쪮  㬥⨢    १, ᫨ 
.) ⢥⢥,  ⥪饬 ᪥   筮
᢮   ࠭ ६ 䠩.  १
ந  ࠧ ࠡ⠭ 䠩   -
᫥⥫쭮,  ᪠  ࠡ뢠묨 䠩 ⠪ 
 筮 ᢮ .
      ࠡ ணࠬ 뢮  
ࠡ뢠 䠩  ,  ᫥ 砭 ࠡ⪨ 䠩
뢮 冷    ⢮ ந  ⮬ 䠩
  ࠧ   䠩 ᫥ ࠡ⪨  
室  (. ਢ  ਬ ᥠ ࠡ 
ணࠬ). ᫨  䠩 ᯥ譮 ࠡ⠭, ணࠬ
뢮 "All OK!", 饥 ⢮ ࠡ⠭ 䠩, 饥
⢮   ࠧ    䠩 ᫥  
ࠡ⪨,  ⥬ 蠥 ᢮ ࠡ.
    , ᫨ ⢮ ࠡ뢠 䠩 ⮫쪮
,  뢮 ணࠬ १  㬥
  ࠭,   ᯮ짮 ७ࠢ
뢮  ⥪⮢ 䠩. ਬ, ᫨   ७ࠢ
뢮 ணࠬ  䠩 "n.txt",     
 ப " > n.txt" ( 祪).

     ਢ ਬ ᥠ ࠡ  ணࠬ.

Ŀ
 C:\WORK>MREPLACE.EXE con @list.txt                                     
                                                                        
 Ŀ           
 Multi-Replace 1.0     (c) Ivan Roshin, Moscow, 25 Feb 2005           
 E-mail: bestview@mtu-net.ru      WWW: http://www.ivr.da.ru           
            
                                                                        
 Type sequences for search and replace, and press "Ctrl-Z" and "Enter". 
                                                                        
 '&'                                                                    
  '&amp;'                                                               
 '"'                                                                    
  '&quot;'                                                              
 '>'                                                                    
  '&gt;'                                                                
 '<'                                                                    
  '&lt;'                                                                
 ^Z                                                                     
 OK!                                                                    
                                                                        
 Processing: 1.txt       (386)   +1758                                  
 Processing: 2.txt       (37)    +175                                   
 Processing: 3.txt       (75)    +350                                   
 Processing: 4.txt       (34)    +166                                   
                                                                        
 All OK!  Total: 4 files  (532)  +2449                                  


     ᪠  ० "read only".  ⮬ ०
ணࠬ  ந    (  ࠡ뢠
䠩  ),  뢮 ଠ 筮 ⠪ , 
᫨   﫨.  祣   ᯮ짮?
ਬ, ⮡ 㧭, ᪮쪮  ࠧ 䠩 
१ ࠡ⪨,   ᠬ 䠩.  ⮡ 㧭,
᪮쪮 ࠧ 砥  ᫥⥫쭮 ⮢
 ஬ 䠩 (䠩): 筮 㪠 
᫥⥫쭮  ⢥ ᪮ (
᫥⥫쭮   祭),  뢮 ணࠬ
⢮ ந  㤥 ॡ㥬 १⮬.
, ᫨  ⢥ ᪮ ᫥⥫쭮 㪠
⠭ ᨬ "?",  饥 ⢮  
ࠡ⠭ 䠩 㤥 ࠢ 㬬୮   䠩.
 ᫨  ࠡ⪥ ⥪⮢ 䠩  ⢥ ᪮
᫥⥫쭮 㪠 "13,10" ( 祪),  饥
⢮  㤥 ࠢ  ப   䠩
(筮,  ᫮,  ப   䠩 稢
 ன ⮢ 13,10; ⠪ ,  ᫨ ᫥
ப 䠩  稢 㪠 ன ⮢,  
 㤥 ⥭, ⮬ १    ᮫⭮
).

    ணࠬ 頥 樮 ⥬  室: 0 -
ᯥ譮 襭,  㫥 祭 ᢨ⥫ 
訡 (ᮮ饭  訡 뢮  ࠭). ஡
ଠ   室  訡 ਢ  ⠡.

ͻ
     뢮 ᮮ饭                  ਩                 
室                                                                   
Ķ
       Syntax: mreplace.exe   ணࠬ 饭  㬥⮢       
  1    {options} ini-file      ࠢ  ⢮.             
       work-file (or                                                     
       @filelist)                                                        
Ķ
       Error in " 䠩":   㪠 䠩-ᯨ᪥,  ப x,      
       filename too long        䠩 (, 饣   
  2    (line x)!                 䠩)  ᨬ쭮    
                              ⨬ (128 ᨬ - ।    
                              ⠭⮩ MAX_FN_LEN  ⥪ ணࠬ). 
Ķ
  3    Error: can't delete    訡  㤠 ६ 䠩.      
       temp file!                                                        
Ķ
       Error: sequence for     ᫥ ᪮ ᫥⥫쭮,  
  4    replace not found!     㪠  ini-䠩,             
                                ᫥⥫쭮.          
Ķ
       Error: empty            ini-䠩  ।       
  5    ini-file!              "᪮ ᫥⥫쭮,     
                              ᫥⥫쭮".                       
Ķ
       Error: line x too       ப x ini-䠩             
  6    long!                  ᨬ쭮 ⨬ (1024 ᨬ -     
                              । ⠭⮩ MAX_STR_LEN        
                               ⥪ ணࠬ).                       
Ķ
       Syntax error in line    ini-䠩 㦥 ᨭ⠪᪠      
  7    x, position y!         訡  ᬮ७ ப x,          
                              樨 y.                                 
Ķ
       Error: filename too     ini-䠩,  ப x, 㪠        
       long (line x)!         筮 䠩 (, 饥      
  8                              䠩),  ண       
                              (,   䠩)  ᨬ쭮     
                              ⨬ (128 ᨬ - ।    
                              ⠭⮩ MAX_FN_LEN  ⥪ ணࠬ). 
Ķ
       Error: too many "?"     ini-䠩                
       in sequence for        ᫥⥫쭮, ⢮             
  9    replace (line x)!      ⠭ ᨬ "?"  ன      
                              , 祬  ᮮ⢥饩              
                              ᪮ ᫥⥫쭮.  㦥 
                               ᬮ७ ப x ini-䠩.       
Ķ
  10   Error: can't get       訡  । ⥪饣 ⠫.  
       current directory!                                                
Ķ
  11   Error: can't set       訡  室  ⠫ x.           
       directory "x"!                                                    
Ķ
       Can't open file "   訡  ⨨ 㪠 䠩    
       䠩" for read! (  ⥭ ( ). , ⠪      
       "for write!")          䠩   㪠   䠩    
  12                           ⪮. ᫨ 訡  ⨨ 
                              䠩   - ,   ⨬   
                              䠩      ⮣     
                              䠩 ⠭ ਡ "Read only"       
                              ("⮫쪮 ⥭").                         
Ķ
  13   Close error!           訡  ⨨ 䠩.                 
Ķ
  14   Read error!            訡  ⥭  䠩.                
Ķ
       Write error!           訡    䠩.             
  15                          , ਬ,  ⪥       
                              ᢮   ᪥.                 
Ķ
       Out of memory!          墠⠥    (ணࠬ       
                              ᯮ ⮫쪮 ""  -     
                              640 ). ,  ᢮    
                                १ ணࠬ            
                              ࠩ஢,    .     
                              , ᫨  ini-䠩  ᪮쪮  
                              "᪮ ᫥⥫쭮,     
                              ᫥⥫쭮",  ࠧ     
                              䠩  ᪮쪮 䠩,         
  16                           㤥 襥 ⢮        
                              ᫥⥫쭮⥩,  ⮬  ।    
                              ᪠ ணࠬ    .       
                              ,   ⠪ ࠧ         
                              ,  ⥩訩 ਬ: ᫨    
                               室 ini-䠩          
                              ᫥⥫쭮⥩,          
                               1  2,  㣠 - 2  1, ,    
                              ᫨ ࠧ  䠩    ਬ  
                               䠩 񤭮, १      
                              㤥 ᮢᥬ 㣨.                       
ͼ
                                   . 1

    ᫨     筮 । ࠧ
᪮쪮 ஢ ணࠬ, 㡥 砫,  
    ,  ࠡ뢠    
䠩.  ,  ணࠬ   ࠡ ᮧ
६ 䠩  䨪஢   ⮬ ⠫, 
 ⥪騬   ᪥, ⮬ , ⮡  ᪥
ࠧ ஢ ணࠬ ⥪騥 ⠫ ᮢ.
      ।饬   ⭮  , 
᪮쪮 ஢ ணࠬ 饭  ० "read only",
 ஬     ந.

    ᫨   室 ᫥⥫쭮 ਬ
᪮쪮 ini-䠩  ஬ ࠡ뢠 䠩
(䠩),  㤮     ࠧ
ᮮ⢥騥 ,  ᮧ  䠩 (bat-䠩).
ਬ,   䠩, ᯨ᮪  ᮤন  ⥪⮢
䠩 "list.txt",  ᫥⥫쭮 믮 ,
ᠭ  䠩 "1.ini" - "6.ini".  bat-䠩 㤥
⠪:

mreplace.exe 1.ini @list.txt
@if errorlevel 1 goto end
mreplace.exe 2.ini @list.txt
@if errorlevel 1 goto end
mreplace.exe 3.ini @list.txt
@if errorlevel 1 goto end
mreplace.exe 4.ini @list.txt
@if errorlevel 1 goto end
mreplace.exe 5.ini @list.txt
@if errorlevel 1 goto end
mreplace.exe 6.ini @list.txt
@if errorlevel 1 goto end
:end

    ᫨ 䠩 "mreplace.exe" ᯮ   ⥪饬 ⠫
     ⠫, ᫥  ६ 㦥
"path" (⠭  䠩 "autoexec.bat"),  । 
䠩 "mreplace.exe"  㪠뢠    .
     :  bat-䠩 ᫥   맮
ணࠬ "mreplace.exe" ⮨  "@if errorlevel 1 goto
end" (ᨬ "@"   砫 㦥   ⮣, ⮡  
뢮  ࠭  믮 bat-䠩).  
஢,   室 㫠 ணࠬ "mreplace.exe",
 ᫨     ࠢ 1 (   믮
ணࠬ 뫠 - 訡),  ந室 室  
"end".    ⪠ 室   bat-䠩, 
室   믮 bat-䠩 蠥.
    ᫨  bat-䠩  ᮤঠ  室  訡, 
   ᫥ :    맮
ணࠬ "mreplace.exe" ந室 訡 (᪠,
㦨 ᨭ⠪᪠ 訡  ᮮ⢥饬
ini-䠩), ᮮ饭  訡 뢮  ࠭,  
᫥ 맮 ணࠬ "mreplace.exe"  ࠭ ⮦ -
뢮, ⮬ ᮮ饭  訡   ᤢ
 ࠩ ࠭.  ᫥ 砭 믮 bat-䠩
짮⥫  㢨 ⮣ ᮮ饭  㤥 㬠, 
 訡  뫮.


ਬ ᯮ짮 ணࠬ


     ⮬ ࠧ  ᪠,   ᯮ짮 ணࠬ
 襭  ࠪ᪨ .

     뢠 㦭 ⠪ ࠡ ⥪⮢ 䠩, ⮡
 ப   稢 ன ⮢ 13,10 (
ਭ  DOS  Windows) ᨬ  ⮣,  稢
ப  室 䠩: ன ⮢ 13,10,   ⮬
13,   ⮬ 10.  ini-䠩  ⮣:

13,10
 13,10
13
 13,10
10
 13,10

    ணࠬ  ᯮ짮  ४஢ ⥪⮢
䠩   ஢  . 砫 ᪠,  
ᯮ짮  ⮣ 訬 ⢮ ࠧ
४஢ ⠡ (xlt-䠩), 室  
⠢ 䠩  Dos Navigator Open Source
(www.dnosp.ru).
    xlt-䠩 -   䠩, 騩   ⮢;
    - ,   
४஢,  ன  - ,    .
 ।⢥ ᫥  ८ࠧ xlt-䠩
 ini-䠩   ணࠬ: ࢮ    ⠢
 ᮮ⢥⢨ ᪮ ᫥⥫쭮,  ஬  -
.  ਢ 室 ⥪ ⮩ ணࠬ,
믮饩  ८ࠧ.

/* =============================
     File: "xlt2ini.c"
     Compiler: Turbo C 2.01
 ============================= */

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[])
{
 FILE *f_xlt, *f_ini;
 int a,b;

 printf ("\nXLT->INI convertor (for Multi-Replace)\n\
(c) Ivan Roshin, Moscow, 21 Mar 2005\n");

 if (argc!=3)
 {
  printf ("\nSyntax: xlt2ini xlt-file ini-file\n\n"); exit (1);
 }

 if ((f_xlt=fopen(argv[1],"rb"))==NULL)
 {
  printf ("\nCan't open xlt-file!\n\n"); exit (1);
 }
 if ((f_ini=fopen(argv[2],"wt"))==NULL)
 {
  printf ("\nCan't open ini-file!\n\n"); exit (1);
 }

 while (a=fgetc(f_xlt), (b=fgetc(f_xlt))!=EOF)
 {
  fprintf (f_ini,"%i\n %i\n",a,b);
 }

 fcloseall();
 exit (0);
}

    ᯮ塞 䠩 ⮩ ணࠬ   ᪠  ᠩ
ୠ    web-࠭.
     ᪥ ⮩ ணࠬ  㪠   ப
 xlt-䠩 (,    )   ନ㥬
ini-䠩 (筮). ,   ணࠬ ᫥
   訡  ࠡ  䠩 (஢ 
ᯥ譮  䠩);  室  
 㣨 ஢ન ᠬ⥫쭮.

     ᪠  ⮬,   ४஢ ⥪ 
஢ Windows-1251  UTF-8 (  ࠭  ᨬ
 ᯮ짮 ᪮쪮 ⮢).  ⮣ 
ਬ ᫥騩 ini-䠩 ( ᪮쪮 ⮫殢  ᠭ
    ):

  0x80             0xA0             0xC0        0xE0
   0xD0,0x82        0xC2,0xA0        0xD0,0x90   0xD0,0xB0
  0x81             0xA1             0xC1        0xE1
   0xD0,0x83        0xD0,0x8E        0xD0,0x91   0xD0,0xB1
  0x82             0xA2             0xC2        0xE2
   0xE2,0x80,0x9A   0xD1,0x9E        0xD0,0x92   0xD0,0xB2
  0x83             0xA3             0xC3        0xE3
   0xD1,0x93        0xD0,0x88        0xD0,0x93   0xD0,0xB3
  0x84             0xA4             0xC4        0xE4
   0xE2,0x80,0x9E   0xC2,0xA4        0xD0,0x94   0xD0,0xB4
  0x85             0xA5             0xC5        0xE5
   0xE2,0x80,0xA6   0xD2,0x90        0xD0,0x95   0xD0,0xB5
  0x86             0xA6             0xC6        0xE6
   0xE2,0x80,0xA0   0xC2,0xA6        0xD0,0x96   0xD0,0xB6
  0x87             0xA7             0xC7        0xE7
   0xE2,0x80,0xA1   0xC2,0xA7        0xD0,0x97   0xD0,0xB7
  0x88             0xA8             0xC8        0xE8
   0xC2,0x88        0xD0,0x81        0xD0,0x98   0xD0,0xB8
  0x89             0xA9             0xC9        0xE9
   0xE2,0x80,0xB0   0xC2,0xA9        0xD0,0x99   0xD0,0xB9
  0x8A             0xAA             0xCA        0xEA
   0xD0,0x89        0xD0,0x84        0xD0,0x9A   0xD0,0xBA
  0x8B             0xAB             0xCB        0xEB
   0xE2,0x80,0xB9   0xC2,0xAB        0xD0,0x9B   0xD0,0xBB
  0x8C             0xAC             0xCC        0xEC
   0xD0,0x8A        0xC2,0xAC        0xD0,0x9C   0xD0,0xBC
  0x8D             0xAD             0xCD        0xED
   0xD0,0x8C        0xC2,0xAD        0xD0,0x9D   0xD0,0xBD
  0x8E             0xAE             0xCE        0xEE
   0xD0,0x8B        0xC2,0xAE        0xD0,0x9E   0xD0,0xBE
  0x8F             0xAF             0xCF        0xEF
   0xD0,0x8F        0xD0,0x87        0xD0,0x9F   0xD0,0xBF
  0x90             0xB0             0xD0        0xF0
   0xD1,0x92        0xC2,0xB0        0xD0,0xA0   0xD1,0x80
  0x91             0xB1             0xD1        0xF1
   0xE2,0x80,0x98   0xC2,0xB1        0xD0,0xA1   0xD1,0x81
  0x92             0xB2             0xD2        0xF2
   0xE2,0x80,0x99   0xD0,0x86        0xD0,0xA2   0xD1,0x82
  0x93             0xB3             0xD3        0xF3
   0xE2,0x80,0x9C   0xD1,0x96        0xD0,0xA3   0xD1,0x83
  0x94             0xB4             0xD4        0xF4
   0xE2,0x80,0x9D   0xD2,0x91        0xD0,0xA4   0xD1,0x84
  0x95             0xB5             0xD5        0xF5
   0xE2,0x80,0xA2   0xC2,0xB5        0xD0,0xA5   0xD1,0x85
  0x96             0xB6             0xD6        0xF6
   0xE2,0x80,0x93   0xC2,0xB6        0xD0,0xA6   0xD1,0x86
  0x97             0xB7             0xD7        0xF7
   0xE2,0x80,0x94   0xC2,0xB7        0xD0,0xA7   0xD1,0x87
  0x98             0xB8             0xD8        0xF8
   0xC2,0x98        0xD1,0x91        0xD0,0xA8   0xD1,0x88
  0x99             0xB9             0xD9        0xF9
   0xE2,0x84,0xA2   0xE2,0x84,0x96   0xD0,0xA9   0xD1,0x89
  0x9A             0xBA             0xDA        0xFA
   0xD1,0x99        0xD1,0x94        0xD0,0xAA   0xD1,0x8A
  0x9B             0xBB             0xDB        0xFB
   0xE2,0x80,0xBA   0xC2,0xBB        0xD0,0xAB   0xD1,0x8B
  0x9C             0xBC             0xDC        0xFC
   0xD1,0x9A        0xD1,0x98        0xD0,0xAC   0xD1,0x8C
  0x9D             0xBD             0xDD        0xFD
   0xD1,0x9C        0xD0,0x85        0xD0,0xAD   0xD1,0x8D
  0x9E             0xBE             0xDE        0xFE
   0xD1,0x9B        0xD1,0x95        0xD0,0xAE   0xD1,0x8E
  0x9F             0xBF             0xDF        0xFF
   0xD1,0x9F        0xD1,0x97        0xD0,0xAF   0xD1,0x8F

    ⮡  ini-䠩  ⭮ ४஢ (
UTF-8  Windows-1251),    襯ਢ񭭮 ini-䠩
ᮮ⢥騥   ᪮  騥
᫥⥫쭮 (   ⠬ ப 1  2, 3  4
 ..).     .   ⮬,  䠩  ஢
UTF-8  ᮤঠ ᨬ,    ஢
Windows-1251.  ᨬ ⠭ ४஢묨, 
 ⥭ 祭 ⥪  ⭮ ९ 
 ᯥ譮 ४஢묨 ᨬ. ⮡ ⮣  稫,
   ४஢   ⠪ ᨬ 
᫥⥫쭮 "[?]",      筮
⥪.  ⮣   ini-䠩  ⭮
४஢   ᫥騥 ப:

  0xC0,?    0xE0,??    0xF0,???    0xF8,????    0xFC,?????
   '[?]'     '[?]'      '[?]'       '[?]'        '[?]'
  0xC1,?    0xE1,??    0xF1,???    0xF9,????    0xFD,?????
   '[?]'     '[?]'      '[?]'       '[?]'        '[?]'
  ......    .......    ........    .........  
  0xDF,?    0xEF,??    0xF7,???    0xFB,????  
   '[?]'     '[?]'      '[?]'       '[?]'     

     ⮢ ini-䠩  ४஢  Windows-1251
 UTF-8     ᪠  ᠩ ୠ   
web-࠭;   䠩 - ᮮ⢥⢥ "1251_u8.ini"
 "u8_1251.ini".
     ४஢  Windows-1251  UTF-8 
   , ᪠,  ⠪ 樨:
 ।஢ ⥪⮢ 䠩  ஢ UTF-8, 
ᯮ㥬 । ⠪ ஢ " ",  
ࠡ  䠩  ஢ Windows-1251.  
४஢  ⥪⮢ 䠩  Windows-1251 ।
।஢  ४஢ ⭮  UTF-8 ᫥
।஢. 筮, ᫥ ४஢  Windows-1251
 ஢,    祭 䠩 ᫥⥫쭮⥩
"[?]",   室 䠩 ᮮ⢥ ᨬ,
騥  ஢ Windows-1251; ᫨ ,  ᠭ
ᯮᮡ ।஢ ਬ, ⠪  ਢ  
ଠ樨   ᨬ.

        ਬ ணࠬ, 
 祢 - ᯮ짮   ॢ ਮ᪨
塞 ⥪⮢. ⨬,     ⥪ 
᪮ 몥,   ⮢  ॢ  ᪨ 
(  몠    ਬ).  ⮬  , 
᫥ 믮 ॢ 室 ⥪ 㤥 ६  ६
,      㤥   ॢ.
 ⮬ 砥   㤭  ᯥ祭
ᮮ⢥⢨ 室 ⥪  ॢ. ਬ,  ᫨
-   室 ⥪,   ॢ񭭮 ⥪
뫨   -    -  ⥪ 㦥
⠭ ᮮ⢥⢮  ,    ⮣
  .
       襭 ⮩ ஡    ணࠬ?
  ਬ.  ॢ ⥪ ᮤন  䠩
"1_rus.txt",  ॢ  ନ஢  䠩 "1_eng.txt".
 ini-䠩 "1.ini",   ண  ࠧ  㤥
⢫ ॢ.  ⮣   ᭮ 室
⥪, ᪮஢   䠩 "1_rus.txt",  ᫥ 
   ॢ (,  ॢ 㤮, 
室 ⥪ ᯮ 冷  ॢ). ,  
稨  楢    ini-䠩   ,
஬ ࢮ;  ⠪   ॢ ⠪ ,  
  .
     ਢ ਬ ini-䠩   ⠤ 
⮢ (⥪, ᯮ짮  ⮬ ਬ,    
web-࠭).

    5.12.2004. 뫮   - "⮬᪮
⠢ ࠧ஢ 䠩  HTML-㬥".
ᠭ  ⮩  ணࠬ ⠪ 㯭
 ࠧ "ணࠬ".
    5 Dec 2004. A new article has been uploaded -
"Automatic Setting File Sizes in HTML Documents."
The program described in the article is also available
in the section "Programs."
      ࠢ  "७ 䠩
TR-DOS".
    The article "Extensions of TR-DOS Files" has been
supplemented and corrected.

    ⥬ ନ  室   ᪮
᫥⥫쭮,   ॢ -  .
 ⮣    ப  窨   
,  騥  ᠬ ப (. ࠧ "ଠ
ini-䠩", .1)   १   "13,10" - 
 ப.   ப, ⭮饩  饩
᫥⥫쭮, । 뢠騬 窠  ⠢
஡.   來 ⤥   㣠 
" - ॢ" ⮩ ப.
     襯ਢ񭭮 ਬ  ᫥饥:


'    5.12.2004. 뫮   - "⮬᪮',13,10,
'⠢ ࠧ஢ 䠩  HTML-㬥".',13,10,
'ᠭ  ⮩  ணࠬ ⠪ 㯭',13,10,
' ࠧ "ணࠬ".'
 '    5 Dec 2004. A new article has been uploaded -',13,10,
 '"Automatic Setting File Sizes in HTML Documents."',13,10,
 'The program described in the article is also available',13,10,
 'in the section "Programs."'

'      ࠢ  "७ 䠩',13,10,
'TR-DOS".'
 '    The article "Extensions of TR-DOS Files" has been',13,10,
 'supplemented and corrected.'


     ⮬ ⮢ ini-䠩 祭. ⮡ ᯮ짮
  祭 䠩  ॢ ("1_eng.txt"), 室
믮 ᫥騥  (襬   bat-䠩 "1.bat"):

copy /y 1_rus.txt 1_eng.txt
mreplace.exe 1.ini 1_eng.txt

    ⢮ ⠪ ᯮᮡ ॢ  ⮬,   
室 ⥪   ,   ந
.   ⮢ ॢ 񭭮 ⥪,
 ᭠砫 ନ஢ ॢ ⥪   ०
ini-䠩  ᬮ १.  ⠭ ॢ묨
 ࠧ   (  ini-䠩  ⢥ ᪮
᫥⥫쭮⥩ ਢ  ᨨ  楢;
 묨   ᮢ,  ,  믮  㤥)
   (    ᠭ  ini-䠩).
    ᫥ ⮣  ⮫쪮   ini-䠩 
" - ॢ"   楢 室 ⥪,
  ini-䠩 ,   室 ⥪,  
ॢ,  ⠪   ini-䠩 , 㤠 
室 ⥪,    ॢ.
    ⥬ ᪠  ࠧ 襮ᠭ 䠩 "1.bat" 
砥 㦥   ॢ񭭮 ⥪, ᮮ⢥
室 ⥪.   ࠧ ஢ ॢ ⥪,
 ⠫    ॢ 楢 (  -
訡  ।஢ ini-䠩?).
    ,  ᫨  ᪮쪨 ॢ ⥪  
,  㤮      ॢ  ⤥
ini-䠩  ਬ  䠩  ॢ   
⥪⮢,   ᢮   ⥪ ini-䠩 ( 
   㦥  㦭 뢠).


FAQ


      ࠡ  ணࠬ    
ࠧ .   ⠬,    
 ,    ᠬ ᠫ  ணࠬ. :-)  ⮬ ࠧ
  ⢥    .

    .  筮 ,  ࠡ뢠 䠩 ᮤন
᪮ ᫥⥫쭮,  ணࠬ 祬- 祣  
  ( ᮮ饭  訡 ⠪  ).
祬?
    ⢥.    稭:
    - ணࠬ 饭  ० "read only";
    - ୮ 㪠  ini-䠩  ࠡ뢠 䠩
      (᫨ 䠩  㪠  ,  ணࠬ
      ⢨⥫쭮   뤠  ᮮ饭 
      訡);
    -  ,  ᠬ  ⫠ 楫 ஢
       ini-䠩 -  ᫥⥫쭮⥩,  ⮬
      뫨 ᪮஢;
    - ,  ࠡ ணࠬ - 訡 -⠪
      뫠,  ᮮ饭     㢨. ਬ, ᫨
      ணࠬ 뫠 饭  bat-䠩  쭥襩
      ஢ન   襭,   믮 ᫥
       bat-䠩 ⥪ ᮮ饭  訡   
      ࠩ ࠭.
    ᬮ ⠪ ᫥騥   ⢥  .

    .  㦭   䠩 
᫥⥫쭮, ᮤঠ騥 ᪨ 㪢 (
᫥⥫쭮   ini-䠩   ப), 
ணࠬ 祬-    (   ६ 㣨
᫥⥫쭮  ᯥ譮). 祬?
    ⢥. ॥ ᥣ,  ᮢ ஢ ini-䠩 
ࠡ뢠 䠩. , ,  ᫨  㪠뢠
"con"   ini-䠩  ⥬   ᮤন 
,   㤥  ୠ⨢ ஢ DOS (CP866).

    . 祬-  ந室  ᫥⥫쭮⥩,
ᮤঠ ᪨ 㪢, ᫨  㪠뢠,    ᪥
  뢠 ॣ 㪢. 祬?  㦥 ஢ਫ, 
஢ ini-䠩  ࠡ뢠 䠩 ᮢ.
    ⢥. ॥ ᥣ,  ࢮ ப ini-䠩  㪠
 ஢,  㪠 ୠ ஢. : 
㪠뢠 ஢ , ⮫쪮 ᫨  ୠ⨢
஢ DOS (CP866).

    .  㦭   䠩  ᫥⥫쭮
"x???",  "???" -  ,  "y???",  "???" -  
,  ᮮ⢥⢮ "???"  塞
᫥⥫쭮.  ᮧ ᫥騩 ini-䠩:

'x???'
 'y???'

 ணࠬ  믮 . 祬?
    ⢥.   㦥 㯮  ࠧ "ଠ ini-䠩",
ᨬ "?"  ப   ⠭묨 ᨬ "?".
ࠢ ini-䠩   ⠪:

'x',???
 'y',???

    .  㦭  "News"  "",  "News
Archive" -  "娢 ⥩".  ᮧ  ⮣ ⠪
ini-䠩:

'News'
 ''
'News Archive'
 '娢 ⥩'

   ᯮ짮  ந室  "News Archive" 
"娢 ⥩",  ᫨  ᮮ⢥ 
᫥⥫쭮⥩   뫠 ᠭ  ini-䠩. 祬?
    ⢥. ⮬  ॡ ᪮ ᫥⥫쭮⥩
ந室   浪  ᫥  ini-䠩, 
 㤥 㦥 ᮢ. ⮬,  ⮫쪮 ணࠬ
砥  ࠡ뢠 䠩 "News", ࠧ ந室 
 "",   ஢ન ᮢ  ன ᪮
᫥⥫쭮  ⠪   室. ࠢ ini-䠩
  ⠪:

'News Archive'
 '娢 ⥩'
'News'
 ''

    .     ⥪⮢ 䠩
᫥⥫쭮,  ன  ᪮쪮 ஡ , 
ணࠬ  믮  . 祬?
    ⢥. ॥ ᥣ, 稭  ᫥饬.  ⥪⮢ 䠩
᫥⥫쭮 ஡  ᥣ 뢠 ।⠢ 
஡ (ASCII- 32).  ⮣ ⠪  ᯮ짮
⠡ (ASCII- 9)  -  ஡ 
⠡権 (   ⢠ ஡   
ᯮ ⭮⥫쭮 砫 ப 䠩).  ⠪ 
ணࠬ ᥣ ᬠਢ ࠡ뢠 䠩  
  믮  ⠡権  ⭮ ᫮ ஡
( ⫨稥  ⥭ ini-䠩,  ⠪ ८ࠧ
믮),  ᪮ ᫥⥫쭮  ⠪ 砥 
㤥   .
     ⠪ 室  : ८ࠧ 䠩,
    ⠡樨  ⭮ ᫮ ஡ (
 ᤥ, ᪠,   Dos Navigator, ᯮ
஥ ।),  ⮬ 㦥 믮 .

    .    ⥪⮢ 䠩  ஢ UTF-8 (,
 ⭮, ᨬ   ।⠢ ᪮쪨
⠬),   ⮬ 䠩     ப 
㣨.    ᤥ   ᠭ ணࠬ?
    ⢥. ,  (ini-䠩, 筮, ⮦   
஢ UTF-8).   ⮬  ᯮ짮  
 ॣ 㪢  ᯮ짮  祭 ந쭮
ᨬ ⥪ ⠭ ᨬ "?" (  ᮮ⢥
⮫쪮  ,  ᨬ ⥪   ᪮쪮
⮢).
    ᭮,   ᮧ ணࠬ  ࠡ⪨
⥪⮢  ஢ UTF-8   ।ᬠਢ. 
     ⮣,  ஢ UTF-8
ࠧࠡ⠭ 祭 㤠筮: -,  128 Unicode-ᨬ
(ᮮ⢥騥 ⠭ ASCII)    筮 ⠪
,   ஢ ASCII,   ⠬ 0-127,  -,
祭 ࢮ   ᨬ   
  ஬, 쥬  ..  
⮢ ᨬ.

    .    - 宦 ணࠬ,  
প ॣ ࠦ?     ࠡ⪨
⥪⮢ 䠩.
    ⢥. ஡ ᯮ짮 ணࠬ "sed".
  ᨨ  ࠧ 樮 ⥬.
ଠ  ⮩ ணࠬ  , ਬ,  ᠩ
http://sed.sourceforge.net. 筮   ७
ᨥ "sed"   "super-sed" ("ssed"); ᪠ 
ᯮ塞 䠩 ( Windows),  ⠪ 室 ⥪ 
㬥   ࠭
http://sed.sourceforge.net/grabbag/ssed/.
    , ࠧ 㪠  ਭ樯쭮 ࠧ稥  
ணࠬ  "sed":     믮  
室,   "sed"  믮  , ࠡ뢠饩
⥪騩 ࠣ ⥪, ந室  室  ⮬
ࠣ.

    .  ᫨   ந    
ᯮ짮 ॣ ࠦ  ⮫쪮  ⥪⮢
䠩,    ?
    ⢥.  ஡ ᯮ짮 Perl (www.perl.com).
  ਬ ਢ Perl-ணࠬ,   筮
䠩 "test.bin"  0x00-0x1F   0x2E  뢮
⢮ 믮 .

#!/usr/bin/perl -w

use strict;

my $c; # ন ࠡ뢠 䠩.
my $n; # ⢮ 믮 .

open (F,'<','test.bin') || die ("Can't open file! $!");
binmode (F);
sysread (F,$c,(-s F)) || die ("Read error! $!");
close (F) || die ("Close error! $!");

$n=($c=~s/[\x00-\x1F]/\x2E/g); # ।⢥ .

open (F,'>','test.bin') || die ("Can't open file! $!");
binmode (F);
syswrite (F,$c) || die ("Write error! $!");
close (F) || die ("Close error! $!");

print ('믮 : ',$n+0);





1. .騭. "  HTML-㬥 ଠ樨  
   ஢". ".  " 10/2003.

2. ./HI-TECH. "  ஢". ". 
   " 1-4/2004.
