(c)  騭, ᪢

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

                ணࠬ - ⠫ ᪮
                

(".  " 8/2004)




     뢠 ᪠   ᪥  ,  ன
ᠭ 㦭 䠩.  襬 砥  ⮣ 室
ᬠਢ ⠫  ⠫  ᪥,  
  䠩   㡥   ⢨.
    த    ᪥ ।ᬮ७   
ᢥ  ᮤন.   ᫨ ⠬ ᠭ ,  ,
  ࠢ ਤ ॡ ᪥  ᪠ 㦭, 
  ᬠਢ  ⠫.      ᥣ 㤮
뢠  䠩  : 䠩   祭
,  ⮬   祭 ६ - 䠩  
㤠, -  䠩   ...
     । 襬   ணࠬ, 
 ᮧ 䠩  ଠ樥  ᮤন   
᪥ (ᮧ 䠩    뢠 "䠩-ᯨ᮪").
᫥⢨   ⮣ 䠩-ᯨ᪠   ᬮ
㧭,   ᪥ 室 㦭 䠩.
    ணࠬ ⠪   㦥 騩
䠩-ᯨ᮪ (ਬ,     ᪥ - 
 ଠ  ).  ᮧ  ᪮쪮
䠩-ᯨ᪮: ਬ,   㤥 ଠ  ᮤন
 ᪥,   㣮 -  ⨤ ᪥.
     ᮧ 䠩-ᯨ᪥   ࠡ⠭ ᪥
࠭  짮⥫ ਩  ᯨ᮪ 
室  ⮩ ᪥ 䠩 -  ⠪  ,  
ᬮ ⠫ ᪥    "dir". 
ଠ ࠭   筮 ⥪.  ࠧ, 
 ࠡ  䠩-ᯨ᪮ (ந ᬮ, ,
।஢,  ଠ樨), ᯮ 㦥 騥 
 ணࠬ  ࠡ  ⥪⮢묨 䠩.
    , ,  뢠 ணࠬ  ࠡ
 ⮫쪮  ᪥⠬,    㣨 ᬥ묨 ⥫ﬨ
ଠ樨 - ਬ,  -᪠.


 ணࠬ


/* =============================
     File: "disk_cat.c"
     Compiler: Turbo C 2.0
 ============================= */

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

void main (int argc, char *argv[])
{
 FILE *f_tmp, *f_dst;
 int i,c,key;
 char *dir_str= "dir /s ?:\\ >disk_cat.tmp"; /*  dir_str[7] 㤥  ᪠. */
 char *view_str="more disk_cat.tmp";
 char comment[68]={65};

 printf ("\nDisk_Cat by Ivan Roshin, 20.09.2003.");

 if (argc<3) {printf ("\nSyntax: disk_cat.exe drive destiny-file\n"); exit(0);}

 /* ஢塞 ࠢ쭮  ᪠:    㪢 a-z  A-Z. */
 if ((((argv[1][0]<'a')||(argv[1][0]>'z'))&&
      ((argv[1][0]<'A')||(argv[1][0]>'Z')))||(argv[1][1]!=0))
 {printf ("\nIncorrect drive!\n"); exit(0);}
 /* ⠢塞  ᪠  ப   DIR. */
 dir_str[7]=argv[1][0];

 f_dst=fopen(argv[2],"ab");
 if (f_dst==NULL) {printf ("\nCan't open destiny file!\n"); exit(0);}

m1: /*  横. */
 printf ("\n\nInsert new disk and press ENTER, or press ESC for exit.\n");
 do {
  key=getch();
  if (key==27) goto m2; /*  ESC - 室. */
 } while (key!=13);     /*  ,   㤥  ENTER. */

 /* ⠥ ⠫  ६ 䠩. */
 printf ("Reading catalog... ");
 if (system(dir_str)!=0) {printf ("\nError with command 'DIR'!\n"); exit (0);}

 printf ("\nPress V for view catalog or press ENTER for continue.");
 do {
  key=getch();
 } while ((key!='v')&&(key!='V')&&(key!=13));

 if ((key=='v')||(key=='V'))
 { /* ᬮ ⠫. */
  if (system(view_str)!=0)
  {printf ("\nError with command 'MORE'!\n"); exit (0);}
 }

 printf ("\nEnter comment: ");
 cgets (comment); /* ਩ 㤥 稭  comment+2. */

 /* 塞 ਩  ନ㥬 ⥪⮢ 䠩. */
 if (fputs("\r\n ",f_dst)==EOF)    /*  । ਥ. */
 {printf ("Can't write to destiny file!\n"); exit(0);}
 if (fputs(comment+2,f_dst)==EOF)       /*  ਩. */
 {printf ("Can't write to destiny file!\n"); exit(0);}
 if (fputs("\r\n",f_dst)==EOF)          /* ॢ ப. */
 {printf ("Can't write to destiny file!\n"); exit(0);}

 /* 塞 ⠭ ⠫,  ᥩ  ६ 䠩,
     ନ㥬 ⥪⮢ 䠩. */
 f_tmp=fopen("disk_cat.tmp","rb");
 if (f_tmp==NULL) {printf ("Can't open temp file!\n"); exit(0);}
 while ((c=fgetc(f_tmp))!=EOF)
 {
  if (fputc(c,f_dst)==EOF)
  {printf ("Can't write to destiny file!\n"); exit(0);}
 }

 if ferror(f_tmp) {printf ("Can't read from temp file!\n"); exit(0);}
 if (fclose(f_tmp)==EOF) {printf ("Can't close temp file!\n"); exit(0);}
 if (unlink("disk_cat.tmp")!=0) {printf ("Can't delete temp file!\n"); exit(0);}

 goto m1; /*  砫  横. */

m2: /* 襭 ࠡ. */
 if (fclose(f_dst)==EOF) printf ("Can't close destiny file!\n");
}


㪮⢮ 짮⥫


      ᪠  ⮬,  ࠡ  ணࠬ,  
 ⮬,  ࠡ⠥ ᠬ ணࠬ.
     ᪥ ணࠬ  㪠   ப
᪮,    㤥 ࠡ (.. 㪢 "a"-"z" 
"A"-"Z")   ᮧ 䠩-ᯨ᪠ ( ᮧ  ⥪饬
⠫). ᫨ 䠩-ᯨ᮪  ⠪  㦥 , 
ଠ 㤥 ᠭ  .
     ਢ ਬ  ப  , 
ࠡ⠥  ᪮ "a",  䠩-ᯨ᮪ - "catalog.txt".

disk_cat.exe a catalog.txt

    ᫥ ᪠ ணࠬ  㢨 ᫥騥 ப:

Disk_Cat by Ivan Roshin, 20.09.2003.

Insert new disk and press ENTER, or press ESC for exit.

    ⢥⢥,  ࠡ⪨ । ᪥ ⠢
   "Enter",   襭 ࠡ  ணࠬ
 "Esc".
    ᫥  "Enter" ணࠬ  ⥭ ⠫
᪥.  ⮣ 뢠 ⠭⭠  "dir" 
ࠬ஬ "/s" (⮡ 뢮 ᯨ᮪ 䠩  ⮫쪮 
୥ ⠫,     ⠫). 뢮 ⮩
 ७ࠢ  ६ 䠩.
     ணࠬ ।:

Press V for view catalog or press ENTER for continue.

      : ᫨  ᬮ ⮫쪮 
⠭ ⠫ -  "V",  ⨢ 砥 -
"Enter".
     ᬮ ⠫ ணࠬ 뢠  "more",
।   ⢥ ࠬ  ६ 䠩, 㤠
। ⨬  ७ࠢ 뢮  "dir". ᫨ ⠫
,  㤥 ⮡ࠦ ࠭筮 ( 室 
᫥饩 ࠭ 筮   ).
    騩 ⠯ -    ᪥, ⠫ ன
 ⠭.  ࠭  ਣ襭:

Enter comment:

       ࠭祭 64 ᨬ (
᫥⢨,  ।஢ 䠩-ᯨ᪠  ⥪⮢
।,   ᤥ ਩  ).
    ਩  ᮤঠ  ᪥ (᫨ ᪥ 
 ஭㬥஢)  ⪮ ᠭ ᮤন ᪥. 
 祣  ,   "Enter".
     ਩ 뢠  ନ㥬
䠩-ᯨ᮪, । ᥢ᪨ ᨬ "",
  ᫥⢨  ᬮ ⮣ 䠩 
室   ਨ.   ਥ  䠩-ᯨ᮪
 ᮤন ६ 䠩  ⠫ ᪥.
    ᫥ ⮣ ணࠬ    砫 
横, .. ।  ⠢ । ᪥  
"Enter",   "Esc"  室.  , ࠡ 
ணࠬ  ,  祭 . :-)
     쭥襬,   㧭,   ᪥ 室
㦭 䠩,  ⮣ 筮 ᪠  ⮣ 䠩 
䠩-ᯨ᪥  ᬮ ᮮ⢥騩 ਩. ᫨ 
 ᪥ ஭㬥஢   ਨ  㪠뢠 
᪥,  ᫥ ⮣    ᪥  ⨬
஬.
    ᫨ ᫥ ᮧ 䠩-ᯨ᪠  諮 
ᮤন - ᪥ (㤠, , २
䠩  ..),  ଠ   ᪥  䠩-ᯨ᪥
室 .   ᤥ ⠪:   ᠭ
ணࠬ    䠩-ᯨ᪠  ଠ  
᪥,  ⮬  ⥪⮢ । 㤠  䠩-ᯨ᪠
 ଠ , ᫨ , ७  ଠ 
 ன (᫨, ਬ,    ᪥ ஭㬥஢
  , ⮡  䠩-ᯨ᪥ ଠ   諠 
浪).
     㦥 ࠡ⠫   ᠭ ணࠬ ᢮ ᪥
 ⨫ ⭮ 祭  ᪥ 䠩.    ⮣
. :-)
