
让 㠫  ⥪ 



 ⮬ 㬥    讥 ᠭ ⮣,  ᯮ짮    ⥪  譨 ਫ  ஢  - ⠪  ᫨   ᮡࠥ ᯮ짮   ᨭ⠪᪨   ᢮ ஥,     祬.  ⠪...

⥪   ᯮ짮   ਠ - אַ ஢   ஥ (᫨   몥 C++)   ᯮ짮 ⤥쭮 ᪮஢ DLL.  ⮤ ࠢࠢ  ᮢ襭   窨 ७ 䥩ᮢ - ன  뢠 .
 

  ᭮ :CColorData  CColorer. , CColorData, ᯮ  樨  প HRC-. ⮬  砫   맢


  PColorData cd = new CColorData("libpath\\hrc\\colorer.hrc", "path\\to\\logfile");
  if (!cd->isok()){
    // fatal load error...
  };


 ࠬ -   ᭮ 䠩 , ன (  NULL) -   䠩   樨.  맮 ᮧ  ,  ஬ ।⥫쭮 ᪮ ࢨ ।  䠩 colorer.hrc. ,     ⮬ 맮  .    室 ᮧ ᪮쪮 ஢ ⮣  -  ᮬ  짮 ६  ᪮쪮 ஢.

   ᮧ ᮡ⢥ ᠬ  - CColorer.

  PColorer cc = new CColorer();

, ( ᠬ  室) ⮡   ࠧࠥ 䠩 ⢮ ᢮  ⮣  ( 筮 ࠢ, ᫨  । ন ६ ।஢ ᪮쪨 䠩). ᫥ ᮧ ⮣ ꥪ  ।   ଠ.

  // 롨ࠥ ⨯  hrc-
  type = cd->seltype(fname, GetLine(0, 0, 0, 0), 0);
  // 㦠 ࠭ ⨯ - 㥬  奬
  cd->loadtype(type);
  //  맮   ଠ
  //  ⮤    饭 ଠ樨
  //  ᨭ,  ᣥ஢ ᨭ⠪᪨ ॣ...
  cc->SetServices(GetLine, 0, clrAddRegion, 0, 0, hlines);
  // 뢠    ⨯
  cc->SetColoringSrc(type);
 ᨭ

 ᫥ ⮢  ⮢   ⥪.  ᪠  ᫮  প 梥⮢ ॣ.   ।⠢  ⮤    ॣ.    ⮤ clrAddRegion. clr* -   㭪権  ᮧ, ࠡ⪥,  ⮢  㠫쭮 ⮡ࠦ ᨭ⠪᪨ ॣ.  㭪樨 易  㣨 ᮬ - CAssign.  ஢ ,   祣    .   ᯮ  ࠡ⪨ hrd 䠩. ଠ hrd 뢠 ᨭ⠪᪨ ॣ  ⭮ 梥⮢ ଠ樥, ।祭  ⮡ࠦ - 襩   ।⢥ 梥 -  ⠪  ⠬  ଠ   , ஢થ ᨭ⠪  㣨 ⥩.

⠪,   clr* ⮤ - clrAddRegion ᯮ   ᨢ ᯨ᪮ ॣ.  뢠 ஬   ࠡ. 筮,   ।⠢ ᢮ ᮡ⢥ ⮤  ࠡ⪥ ॣ    ஥ -   쭮 ᫮, ⠪   ਤ ᮧ ⥫쭮 ⮤  ࠧ ᮧ ॣ -    쭮 ᫮ ४ᨢ .
ᮣ襭  ॣ

 뢠  ⨯: 1, 0, -1.

襩   ॣ  ⨯ type == 0.   ⨯ 1 ,   ॣ - 砫  -    ⥪  ॣ  ⨯ -1  㭠᫥ ᢮⢠ ⮣ ॣ. 룫廊  -   ᫮  ⮬ ⮣,  ॣ    - - ⮣ 室 ४ᨢ ⮤  ࠧ ⠪ ॣ (clrAssignRegions  ).

      饬 砥 ॣ   אַ ᮮ⢥⢨ ॠ 梥⠬.
⮢  ࠧ

 砫 ᨭ   ᮧ ᨢ ॣ - SLineHL.

  // totallines - 室 ⢮ .
  //  設⢥ 砥 -  ᫮   ࠭ 
  PLineHL lines = clrCreateRegions(totallines);
  // ⠭ 砫 ப  ࠧ
  clrSetFirstLine(lines, 0);

᫥ ⮣  ⮢  ࠧ.    ⮤ ࠧ: QuickParse  FullParse.   ᯮ짮  ६ ࠧ ᥣ ⥪ -       訡  롮 砫쭮 奬.  ந室, ᫨  稭 ࠧ  ப,  ਭ  奬 孥 ஢ -  . FullParse ᯮ ஢, ஥ ࠭,  ࠧ࠭ ⥪ 㤥 ४⥭.  蠥  ஡  ,   ⭮  砫.

᫥ 맮    ⮤  ᨢ lines ᮤন  ଠ  ᨭ⠪᪨ ॣ ⮩  ⥪.  ⮣, ⮡ ⮡ࠧ ॣ,   맢 ⮤ clrAssignRegions.  ᮧ ४   ⮡ࠦ,  殮   梥⠬ ।⢮  CAssign.

  //  ᥣ ⥪
  cc->QuickParse(0, totallines);
  // dText - 梥 ⥪  㬮砭
  PAssignData adback = adata->getcdata(cd->getregion("dText"));
  // ⠢ ॣ  ⮡ࠦ
  clrAssignRegions(lines, adata, adback);

 ⮣   ᦠ  ॣ.   室  ᮫쭮 梥⮢ 뢮. 易   ⥬,   ᮧ 㯮冷祭 ॣ -     ४뢠  뢠. 맮 ⮤ clrCompactRegions ࠭,   ॣ  㯮冷祭  浪 ⠭    ४뢠.
⪠

  㤠  ଠ ᫥ 砭 ࠡ.

  clrDestroyRegions(lines);
  delete adata;
  delete cc;
  delete cd;
⪨  ⠫樨

 饬-,  ⥫ , ⮡  ࠭  ᠭ 襩 ணࠬ  ਤন  ४権. ,   ⠨ ⢥.

  ࠭  ⠭ 襩 ணࠬ   ।,   짮⥫ 㦥 ⠭  -  뢠     ॥,    짮⥫     ன. 筮,    ਡ⨢    ணࠬ -    ⥣ HRC  ⮫쪮  訬 ਫ. 㣨 ᫮, ᫨ 짮⥫ ⠭ ᪮쪮 ணࠬ, ᯮ ⥪ ,    ᥬ ணࠬ ࠡ   HRC-.   । 짮⥫ ⠭   ६ ⠫樨  ⮬᪨ ய  ॥  室   .   ४ ⠭   - ࠧ塞 ⠫,  ਬ c:\program files\colorer.

᫨   ᯮ짮 -    ( ਬ ᢮ ᮡ⢥ HRD ன),   ⠫஢  ⤥쭮  ⥪ -   襣 ਫ.    ஢  㦠 hrc- ⮤ CColorData.getversion() -  뤠 ।०  ᮢ ᨩ.

 ⮪  ᯮ짮 梥⮢ 奬 hrd.  hrd 䠩  ।  ⮫쪮 梥⮢ ਡ ⥪,   ࠧ ਡ ଫ ।    (ᬮ regions.hrc). ,  ⮤ CColorData->getregion("rname")   㧭 祭 ॣ, 易   "rname".

 ⮣ hrd ଠ  ࠭稢  祭 梥⮢.   ᯮ짮 ⭠ ᮫ 梥⮢, rgb ன,   ⠭ ⥫ ਡ - ⠪  bold, italic.  砥 墠⪨  ⮢,   ᯮ짮 ᨬ ப ࠬ஢ (stext, sback)  ॠ ᮡ⢥ ଠ ࠭ ⮡ࠦ ॣ.
७  ⥪

᭮ 祭  - 梥⪠ ᨭ⠪ 室  ணࠬ  ।⠢ 짮⥫  ।஢   ॠ쭮 ६. , ⥫쭮  ⮬,  ᮤন ⢮  ⥩  㤮,   ,  ࠧࠡ稪 ᤥ  ணࠬ  魮 ( ᫥ ⥩  ᠭ  ⫠ ணࠬ).
 ,   ᯮ짮 ⥪ ॣ ࠦ   襩 ணࠬ  ॠ樨 ⥩ ᪠/   ᯮ짮.. ( ᫥ 梥⪨ 室   ணࠬ).
,   ⨯  䠩 colorer.hrc  ᮡ⢥  description   name.   ᯮ짮  name  㭨 䨪  ࠭ ⥫쭮 ଠ樨 ।  ⮬  ( ਬ ,  樨...)
   SLineHL, 饩 ॣ ᮤন 뫪  奬, ன  ॣ ਭ.  祣   ਣ?  .   ᯮ짮 getschemename  祭  奬. , ,   奬, 뢠   type  ⠪  ,    ⨯.      ᥣ 㧭  奬  ⥪饬   -  ᫨  ⨯  ⠪  ,  ᮯ⠢ ⥪饬  ᢮⢠  쭮 ⨯ 䠩,  ⥪饣 . ( ਬ jscript   html 䠩).
㣠 ᭠  -  㭪権 訡. ,   SAssignData ᮤন  type. ᠭ  ⨯     䠩 hrd.html.  ⨫ 祭, 騥 ࠦ 㭪樨  訡?    ᯮ짮   襩 ணࠬ - ࠧ  ⥪,   ॣ  ᮮ⢥騬 ⨯.   ᤥ ᯨ᪨ ᨭ⠪᪨ 訡,  室  । 㭪樨  ஬ -   ...
㣠 ᭠  ࠬ ⨯ - 䮣᪠ ஢ઠ ⥪. ,  㯮 ஢ 䮣  C- -   뫮  ਣ쭮   .  ⨬  ࠬ஬ type   㧭, ॡ  ॣ ᨭ⠪᪮ ஢ન.
  ᫥  ⨯ ॣ -   ॣ.  ॣ ( ⨯ > 0xFF)      筮 ࠡ (  ய᪠ ).  ⮫쪮  祭 ⮣ ⨯  - dpOpenStruct  dpCloseSrtuct.     祭  ᤥ প ᢥ⪨  権   宦/뤥. ,  ⥯   뤥   C/C++ ᪮, ⠪  ᫮  XML !
,      .

-㠫 html ।. 뢠   -   ਬ ଫ  ᮤন. (by me/cail)
 ᢥ ᥣ c/c++  -    ஢    ⥬   梥 䮭...(by dmitry kurmyshov/duil)
   ᯨ᪨ 㭪権 -   ᫮ -   ᪠ 㭪  ⠪  (by vim  ᠬ :))

colorer makes madness real
孨᪠ ଠ

 ஢  win32, unix  dos ⥬:
Win32:
 ms visual studio 6.0
 bcc 5.0/5.5
 cygwin (b20) gcc (egcs-2.91.57)

Unix:
 Red Hat Linux 5.2
 FreeBSD 2.5.5

DOS:
 bcc rtm16/rtm32

᪮쪮 

  homepage: http://www.uic.nnov.ru/~ruiv/
colorer page: http://www.uic.nnov.ru/~ruiv/far/
PlugRinG site: http://www.uic.nnov.ru/~ruiv/plugring/
articles
Colorer freecraze : http://www.uic.nnov.ru/~ruiv/plugring/articles/colorer_src.html
HRC script inside : http://www.uic.nnov.ru/~ruiv/plugring/articles/colorer_hrcdoc.html

cail lomecb
