
     ----------------------------------------------------------------
     bioskey
     ----------------------------------------------------------------

     祭        䥩 .

     ⠪         int bioskey (int cmd)

     ⨯         bios.h

     砭           㭪  믮  ࠧ  樨  
                       ன, ᯮ  ⮬ 뢠 016
                       BIOS.  ࠬ cmd  । -
                       .

     頥      祭,  頥  㭪樥,    
     祭          믮塞    ⢨,   ,     ᢮
                       ।, । ࠬ஬ cmd:

                       
                       cmd      ⢨, 믮塞 㭪樥
                       _______________________________________________

                       0    頥  ᫥  ,  
                            . ᫨  訥 8  ⫨ 
                            ,     । ᨬ    
                            ASCII.  ᫨  訥 8  - ,  
                             8  । ७ -
                              ,  ਢ  孨᪮
                            ᠭ IBM PC.

                       1    ந  ஢ઠ      ᨬ
                             ⥭.   ᫨  頥  祭
                            ࠢ 0,  뢠  祣.    ⨢
                            砥  頥  祭  ᫥饣
                            ᨬ.     ᨬ  ࠭  
                            饭    ᫥饬 맮 bioskey
                             祭 cmd ࠢ 0.

                       2    砥 ⥪騩   shift  -  .
                            頥 稭 砥  
                            ᪮ 樨 OR  ᫥  -
                            祭:

                       0x80 ⠭ ० Insert (⠢)
                       0x40 ⠭ ० Caps (ய 㪢)
                       0x20 ⠭  ० NumLock ( -
                            ୮  ᯮ  )
                       0x10 ⠭ ० Scroll Lock (ᯮ
                            ਪ묨 ணࠬ)
                       0x08   Alt
                       0x04   Ctrl
                       0x02    Shift
                       0x01  ࠢ  Shift

     ७ᨬ      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬ .

     ਬ
                       #include<stdio.h>
                       #include<bios.h>
                       #include<ctype.h>

                       #define   RIGHT 0x0001
                       #define   LEFT  0x0002
                       #define   CTRL  0x0004
                       #define   ALT   0x0008

                       main ()
                       {
                         int key;int modifiers;

                         /* 㭪      1 頥 0   㤥
                             .   c 
                            饩 ஢ન   */

                         while (bioskey (1) == 0);

                         /*  㭪  ᯮ 
                            祭 祭 ⮩ . */

                         key =  bioskey (0);

                         printf("뫠  : " );

                         /* ᯮ 㭪 2  ।
                            뫠    shift. */

                         modifiers = bioskey (2);

                         if (modifiers) {
                           printf ("[");
                           if (modifiers & RIGHT) printf ("RIGHT");
                           if (modifiers & LEFT)      printf ("LEFT");
                           if (modifiers & CTRL)      printf ("CTRL");
                           if (modifiers & ALT )      printf ("ALT");
                           printf ("]");
                         }
                         if (isalnum(key & 0xFF))
                            print ("'%c'\n",key);
                         else
                            printf ("%c02x\n",key);
                       }

                        믮 ணࠬ

                       뫠   :[LEFT] 'T'



     -----------------------------------------------------------------
     biosmemory
     -----------------------------------------------------------------

     祭        頥 ࠧ .

     ⠪         int biosmemory (void)

     ⨯         bios.h

     砭          㭪 頥 ࠧ , ᯮ
                       뢠 012 BIOS.    뢠  
                         ᯫ    饭   
                        ७.

     頥           1.
     祭

     ७ᨬ      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬ .



     ----------------------------------------------------------------
     biosprint
     ----------------------------------------------------------------

     祭        /뢮 ਭ.

     ⠪         int biosprint (int cmd,int byte,int port)

     ⨯         bios.h

     砭          㭪 믮  ࠧ  樨  
                       ਭ,   ।塞  祭  ࠬ
                       port:

                       0   ᮮ⢥ LPT1
                       1   ᮮ⢥ LPT2  ..

                       祭 ࠬ cmd   ᫥騬:

                       0    ᨬ  byte
                       1   樠  ਭ
                       2   ⥭  ਭ

                       祭 ࠬ byte    0  255

     頥      祭,  頥    権,
     祭          ।⠢ ᮡ   ਭ, 祭
                       ।⢮ ᪮ 樨 OR  ᮮ⢥-
                        :

                        0    001 ⠩-
                        3    008 訡 /뢮
                        4    010 㦥 ࠭
                        5    020 ⢨ 㬠
                        6    040 ⢥ত
                        7    080  

     ७ᨬ      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬ .



     -----------------------------------------------------------------
     biostime
     -----------------------------------------------------------------

     祭        頥 (⠭) ६ .

     ⠪         long biostime (int cmd, long newtime)

     ⨯         bios.h

     砭          㭪  ⠥    ⠭  ⠩
                       BIOS.    ⠩ ⠥ ⠪  㯫
                       㭮  ᪮ ਬ୮ 18.2 ⠪  -
                       㭤.

                       ᫨ cmd = 0,   頥 ⥪饥 祭
                       ⠩.
                       ᫨ cmd = 1,  ⠩ ⠭  ᮮ-
                       ⢨  祭 newtime

     頥       biostime ⠥ ⠩ BIOSa (cmd = 0),
     祭           頥  ⥪饥 祭.

     ७ᨬ      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬ .



     ----------------------------------------------------------------
     brk
     ----------------------------------------------------------------

     祭         뤥   ᥣ .

     ⠪         int brk (void *endds);

     ⨯         alloc.h

     砭         brk  ᯮ    ᪮ 
                       ⢠ ,  ⢮  ᥣ -
                         맮 ணࠬ.  ந-
                        ⠭ 祭 "࠭ ணࠬ",
                       ஥  ।⠢ ᮡ  ࢮ 祩
                        殬 ᥣ . ⢮ ⢮
                         㢥稢  ᮮ⢥⢨  㢥-
                        祭 "࠭ ணࠬ".

                       brk ⠭  祭  "࠭"   ࠢ
                       endds     ᮮ⢥⢨  ⨬  ࠧ
                       ⢮ .

                        㭪 頥 -1  -  -
                        । ,  ᫨ ⠪ -
                        ॡ 뤥 襣  ꥬ  ,
                       祬   稨.

     頥         ᯥ譮   襭   brk    頥
     祭          祭 0.
                        訡 㭪 頥 -1,  errno -
                        

                                 ENOMEM          墠⠥ .

     ७ᨬ     brk 㯭  UNIX  ⥬.

      ⠪      coreleft, sbrk



     -----------------------------------------------------------------
     bsearch
     -----------------------------------------------------------------

     祭         .

     ⠪         #include<stdlib.h>
                       void *bsearch(const void *key, const void
                                    *base, size_t nelem, size_t width,
                             int (*femp)(const void *, const void *));

     ⨯         stdlib.h

     砭         㭪 ।祭    ᪠  ᨢ  
                       nelem ⮢       頥  
                       ࢮ     ⠪ ᨢ -
                       .   砥,  ᫨ ᨢ  , 㭪
                       頥 0.

                        size_t,  ᠭ    typedef,  -
                          楫.

                       - nelem   ᫮ ⮢ ⠡

                       - width  ।  ᫮ ⮢  
                          ⠡.

                       㭪 ࠢ  *femp 뢠   -
                       㬥⠬ - elem1  elem2.    -
                       ⮢ 㪠뢠   ࠢ.
                       㭪 ࠢ  ࠢ      
                       頥 楫 ᫮, 饥  १-
                        ࠢ.

                           bsearch
                          ---------
                         ᫨  ᪠ fcmp          頥

                          祬 *elem                 楫 <0
                         ࠢ *elem                         0
                          祬 *elem                 楫 >0

                       筮 elem1  ᮮ⢥  㬥  key,  
                       elem2  㪠⥫   ᬠ-
                        ⠡.

     頥       㭪 頥   ࢮ  
     祭          ⠡, 㤮⢮饣    ᪠.  ᫨
                       ⠪   ,  bsearch  頥
                       0.

     ७ᨬ     㯭  UNIX - ⥬  ᮢ⨬  ANSI
                       .

      ⠪      lfind, lsearch, qsort

     ਬ
                       #include<stdio.h>
                       #include<stdlib.h>
                       #define NELEMS (arr)      (sizeof(arr)/sizeof
                       (arr[0]))
                       int numarray[]={123,145,512,627,800,993};
                       int numeric(int *p1,int *p2)
                       {
                         return(*p1 = *p2)
                       }
                       /*    1,  ᫨      ⠡, 0 - 
                                                   ⨢ 砥 */
                       int lookup(int key)
                       {
                         int *itemptr;
                         /* bsearch()  頥 㪠⥫ 
                               */
                         itemptr=(int*) bsearch (&key,numarray,
                               NELEMS(numarray), sizeof(int),numeric);
                         return(itemptr != NULL);
                       }
                       main()
                       {
                         printf(" 512  ⠡ ? ");
                         printf("%s\n",lookup(512) ? "":"");
                       }

                        믮 ணࠬ

                        512  ⠡?  



     ----------------------------------------------------------------
     cabs
     ----------------------------------------------------------------

     祭        ᫥  ᮫⭮ 祭  ᭮
                       㬥.

     ⠪         #include<math.h>
                       double cabs(struct complex znum);

     ⨯         stdlib.h

     砭         cabs - ,  騩 ᮫⭮ 祭
                       znum - ᭮ ᫠. znum  -
                       ன ⨯ complex,  ।  math.h
                       :

                       struct complex {
                       double x, y;
                       };

                        x - ॠ쭠  ᫠,  y - .

                       맮 cabs ⥭

                       sqrt ( znum.x*znum.x + znum.y*znum.y )

                       ᫨    math.h ( ᫨  -
                         ,    #undef cabs),   
                       㭪 cabs,   .

     頥      cabs 頥 ᮫⭮ 祭 znum,  ⨯
     祭          double.      ९   cabs  頥
                       HUGE_VAL  ⠭ errno 

                           ERANGE          

                       ࠡ⪠ 訡  cabs    -
                       ஢   㭪樨 matherr.

     ७ᨬ     㯭  樮 ⥬ UNIX.

      ⠪      abs, fabs, labs, matherr



     ----------------------------------------------------------------
     calloc
     ----------------------------------------------------------------

     祭        뤥 ᭮ .

     ⠪         #include<stdlib.h>
                       void *calloc(size_t nelem, size_t size);

     ⨯         stdlib.h  alloc.h

     砭          㭪 ᯥ稢  ।  
                       ⨯ "".   㯭  ᪮
                       ࠧ饭 ⥬ ᮧ   ࠧ-
                        ࠧ.    ,  ⠪,
                        ॢ  ᯨ᪨,  ⢥,  ᯮ
                       ࠧ饭    "".

                        ࠭⢮  殬 ᥣ  
                       設 ணࠬ ⥪    -
                        㯭  ᯮ짮, ஬ 256 
                       ।⢥ । 設 ⥪.    -
                         ᯮ     㢥祭
                       ⥪ , ஬ ⮣, 讥 ⢮ -
                        ᯮ  㦤 MS-DOS.

                               ࠭⢮ 
                       ணࠬ ⥪    䨧᪮  
                        "祩".

                       calloc ࠧ頥  ࠧ஬ nelem*size. 
                        ﬨ.

     頥      㭪  calloc  頥 㪠⥫  
     祭          ࠧ饭 . ᫨   ࠧ頥  
                       筮   size  nelem  ࠢ  0,
                       㭪 頥 NULL.

     ७ᨬ     㭪 calloc 㯭  UNIX-c⥬,  ᮢ-
                       ⨬  ANSI     ।  ୨  
                       .

      ⠪     farcalloc, free, malloc, realloc



     -----------------------------------------------------------------
     ceil
     -----------------------------------------------------------------

     祭        㣫 祭 㬥 ᢥ.

     ⠪         #include<math.h>
                       double ceil (double x)

     ⨯         math.h

     砭         ceil 室 襥 楫,   襥, 祬
                       .

     頥      㭪 ceil 頥   楫  (⨯
     祭          double)

     ७ᨬ     㯭  ⥬ UNIX  ᮢ⨬  ANSI
                       .

      ⠪      floor, fmod



     ----------------------------------------------------------------
     cgets
     ----------------------------------------------------------------

     祭        ⥭ ப  ᮫.

     ⠪         char *cgets(char *string)

     ⨯         conio.h

     砭         cgets  ⠥ ப ᨬ  ᮫  -
                        ப     ,   
                       㪠뢠 string.

                       cgets ⠥ ᨬ,    㦨 -
                       樨 CR/LF    㤥 ⠭  -
                       쭮  ⢮ ᨬ.   CR/LF
                       cgets   \0.

                       । 맮  cgets  string[0] 室 -
                       ⠭ ᨬ  ப.  ᫥  -
                         cgets    string[1]  ᮤন ᫮
                       ⢨⥫쭮 ⠭ ᨬ. ⠭
                       ᨬ 稭  string[2]  稢
                       㫥.  ࠧ, ப   
                         祬 string[0]+2 .

     頥      cgets  頥  &string[2]  -  㪠⥫  
     祭          ப ᨬ,  뫠 ⠭. 訡
                        뤠.

     ७ᨬ      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬      稨 ᮮ⢥
                       ᪨ ஢.

      ⠪      fgets, gettch, getche, gets

     ਬ
                       #include<stdio.h>
                       #include<conio.h>

                       main()
                       {
                         char buffer[82];
                         char *p;

                         buffer[0] = 80;
                         p = cgets(buffer);
                         printf("\ngets 稫 %d ᨬ"
                              " : %s\n",buffer[1],p);
                         printf("饭 㪠⥫ - %p,\n "
                              "buffer[2] - %p\n", p, &buffer[2]);
                         buffer[0] = 5;
                         p = cgets(buffer);
                         printf("gets 稫 %d ᨬ :"
                              "%s\n",buffer[1],p);

                         printf("饭 㪠⥫ -  %p, "
                              " buffer[2] - %p\n", p, &buffer[2]);
                       }


                        믮 ணࠬ

                       abcdfghijklm
                       cgets 稫 12 ᨬ :"abcdfghijklm"
                       饭 㪠⥫ - FEF6,
                        buffer[2] - FEF6

                       abcd
                       cgets 稫 4 ᨬ :"abcd"
                       饭 㪠⥫ - FEF6,
                        buffer[2] - FEF6



     ----------------------------------------------------------------
     chdir
     ----------------------------------------------------------------

     祭         ࠡ稩 ⠫.

     ⠪         int chdir (const char *path)

     ⨯         dir.h

     砭         chdir -   ⥪騩  ࠡ稩  ⠫  
                               ⠫,    path.  path -
                                 騩 ⠫.

                       ᪮ ⠪    㬥 path,
                       ਬ:

                       chdir("a:\\turboc")  chdir("a:/turboc")

     頥        ᯥ譮  襭,   chdir   頥
     祭          祭 0.    ⨢  砥  頥
                       祭 -1  errno ⠭ 

                             ENOENT     䠩  

     ७ᨬ     chdir 㯭  UNIX ⥬.

      ⠪      getcurdir, getcwd, mkdir, rmdir, system



     -----------------------------------------------------------------
     _chmod
     -----------------------------------------------------------------

     祭         ० 㯠  䠩.

     ⠪         int _chmod(const  char *path,int func[, int
                                  attrib]);

     ⨯         io.h

     砭         㭪  _chmod  頥    ⠭
                       ਡ 䠩  MS_DOS.  ᫨ func ࠢ 0, 
                       㭪 頥 ⥪騥 MS_DOS ਡ 䠩-
                       . ᫨ func ࠢ 1,  ਡ ⠭-
                         ᮮ⢥⢨  attrib. attrib  
                         ᫥ ᨬ ⠭ (।-
                         dos.h):

                           FA_RDONLY      ⮫쪮 ⥭
                           FA_HIDDEN       䠩
                           FA_SYSTEM      ⥬ 䠩

     頥        ᯥ譮 襭 _chmod 頥 ᫮-
     祭          , ᮮ⢥饥 ਡ 䠩;  ⨢
                       砥  頥 -1.   砥 訡 errno
                       ⠭    ᫥ 祭:

                       ENOENT      䠩  .
                       EACCES    饭.

     ७ᨬ     _chmod 㭨쭠  MSDOS.

      ⠪      chmod, create



     -----------------------------------------------------------------
     chmod
     -----------------------------------------------------------------

     祭         ० 㯠  䠩.

     ⠪         #include<sys\stat.h>
                       int chmod (const char *filename, int permis);

     ⨯         io.h

     砭         chmod ⠭ ० 㯠  䠩  -
                       ⢥⢨    ᪮,      permiss.
                       filename 㪠뢠  ப,    䠩.
                       permiss  ᮤঠ    ᨬ
                       ⠭ S_IWRITE   S_IREAD  (।  
                       sys\stat.h)
                 __________________________________________________

                 祭 permiss                  
                 __________________________________________________

                      S_IWRITE                  襭  
                      S_IREAD                   襭  ⥭
                      S_IREAD|S_IWRITE          襭  ⥭ 
                                                              
                 ___________________________________________________

     頥        ᯥ譮   ० 㯠  䠩
     祭          chmod   頥  0.      ⨢   砥
                       頥 -1.

                        砥 訡 ६ errno ⠭-
                           ᫥ 祭:

                       ENOENT      䠩  .
                       EACCES    饭.

     ७ᨬ     chmod 㯭  UNIX ⥬

      ⠪      access, _chmod, fstat,open, sopen, stat

     ਬ
                       #include<stdio.h>
                       #include<sys\stat.h>
                       #include<io.h>

                       void make_read_only(char *filename)
                       {
                         int stat;
                         stat = chmod(filename, S_IREAD);
                        if(stat)
                          printf ("  ⠭ %s  '⮫쪮"
                              " ⥭'\n", filename);
                        else
                          printf ("⠭ ०  %s"
                                " '⮫쪮 ⥭'\n", filename);
                       }

                       main ()
                       {
                         make_read_only("NOTEXIST.FIL");
                         make_read_only("MYFILE.FIL");
                       }


                        믮 ணࠬ

              ⠭ NOTEXIST.FIL  '⮫쪮 ⥭'
            ⠭ ०  MYFILE.FIL '⮫쪮 ⥭'



     -----------------------------------------------------------------
     chsize
     -----------------------------------------------------------------

     祭         ࠧ 䠩.

     ⠪         int chsize(int handle, long size);

     ⨯         io.h

     砭         chsize  ࠧ 䠩,  樨஢
                        handle,   ᨬ  㬥 size,  
                       ࠢ  ⢨⥫ ࠧ஬ 䠩. 
                         㪮祭  㤫.

                       ,  ஬  뫨 䠩,  -
                        .

                        ७  䠩  chsize  㫥
                       ᨬ (\0).  㪮稢 䠩  
                        થ  䠩 .

     頥       ᯥ譮  襭  chsize  頥 0.
     祭           訡 頥 -1  errno ⠭-
                           ᫥ 祭:

                       EACCESS   訡 㯠
                       EBADF     ४  䠩
                       ENOSPC    UNIX -  DOS

     ७ᨬ     쭠  MS-DOS.

      ⠪      close, _creat, creat, open



     -----------------------------------------------------------------
     circle
     -----------------------------------------------------------------

     祭        稢 .

     ⠪         #include<graphics.h>
                       void far circle(int x, int y, int radius);

     ⨯         graphics.h

     砭         circle    業஬  (x,y)    ࠤ-
                       ᮬ,   radius.

                       砭:   稢 㣨,  㦭,
                         ᥪ   ।  ⨯  
                       ᯮ ࠬ thickness   linestyle.

     頥      .
     祭

     ७ᨬc      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬     稨  ᮮ⢥
                       ᪨ ஢.

      ⠪      circle, ellipse, fillellipse, getarccoords,
                       sector

     ਬ             arc



     -----------------------------------------------------------------
     _clear87
     -----------------------------------------------------------------

     祭        頥 ᫮  饩 窨.

     ⠪         unsigned int _clear87(void);

     ⨯         float.h

     砭         _clear87 頥 ᫮  饩 窨,
                       ஥    ꥤ  ᫮  
                       8087/80287  㣨 ᫮, 㦥 -
                       稪 ᮡ ᫮ 8087/80287.

     頥       頥  ᫮ 祭 ᮤঠ
     祭          ଠ  ஬ . ( ⠭,
                       ᠭ  float.h,    ஡  ᠭ
                       ⮢, 頥 ⮩ 㭪樥).

      ⠪      _control187, _fpreset, _stattus87

     ਬ             _control87



     -----------------------------------------------------------------
     cleardevice
     -----------------------------------------------------------------

     祭        頥 ᪨ ࠭.

     ⠪         #include<graphics.h>
                       void far cleardevice(void);

     ⨯         graphics.h

     砭         cleardevice 㭨⮦  ᮤন ᪮
                       ࠭   ⠭ ⥪  
                        "HOME" (0,0).

     頥      .
     祭

     ७ᨬc      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬      稨 ᮮ⢥
                       ᪨ ஢.

      ⠪      clearviewport



     -----------------------------------------------------------------
     clearerr
     -----------------------------------------------------------------

     祭        ⠭   訡.

     ⠪         #include<stdio.h>
                       void clearerr(FILE *stream);

     ⨯         stdio.h

     砭         clearerr ⠭  訡 ⮪
                       stream   䠩  0.  ⮫쪮  -
                        ⠭, 樨 ⥭ 䠩 -
                        祭 ⮣    , 
                        㤥 맢 clearerr  rewind.

                          䠩      
                       樨    ᮮ⢥騩 䠩.

     頥      .
     祭

     ७ᨬ     㭪 cleaerr 㯭a  ⥬ ⨯ UNIX 
                       ᮢ⨬  ANSI .

      ⠪      eof, feof, ferror, perror, rewind



     -----------------------------------------------------------------
     clock
     -----------------------------------------------------------------

     祭        । ୮ ६.

     ⠪         #include<time.h>
                       clock_t clock(void)

     ⨯         time.h

     砭         clock     ᯮ짮  ।
                       ࢠ ६  ࠧ묨 ᮡﬨ.

                        । ࢠ ६    ᥪ㭤,
                       祭,  頥 㭪樥 clock, -
                        ࠧ  祭 -६ CLK
                       _TCK.

     頥      㭪 clock  頥  ୮  ६,
     祭          稭   믮 ணࠬ. 㭪
                       clock 頥 祭 -1, ᫨ ୮
                       ६  㯭      ८ࠧ-
                        ( ⨯ clock_t).

     ७ᨬ     㭪 clock ᮢ⨬  ANSI .

     ਬ
                       #include<time.h>
                       #include<time.h>

                       void main()
                       {
                         clock_t start, end;

                         start = clock();

                       /*           */

                         end = clock();
                         printf(" ६ - %f\n", (end-start)/
                                                            CLK_TCK);

                       }



     -----------------------------------------------------------------
     _close
     -----------------------------------------------------------------

     祭        뢠 䠩.

     ⠪         int _close(int handle);

     ⨯         io.h

     砭         _close 뢠 䠩  ਯ஬  㪠
                        ࠬ handle.  handle - ਯ 䠩,
                       祭  १ 맮 㭪権: _creat,
                       creat,  creatnew,  creattemp, dup, dup2, _open,
                       open.

                       砭. 㭪  _close  뢠 ᨬ
                       Ctrl-Z   䠩.  ᫨  e室 㪠-
                        ࠭⥫ 䠩 trl-Z,   -
                         ᨬ । ⨥ 䠩.

     頥       ᯥ譮   襭  _close 頥 0,
     祭           ⨢ 砥 (-1).

                       ᫨ handle  ᮮ⢥ ਯ -
                       ⮣ 䠩,  _close 頥 祭 -1, -
                       ६ errno ᢠ 祭:

                            EBADF - ७ ਯ 䠩

     ७ᨬ     _close 㭨쭠  MS-DOS.

      ⠪      close, _crtat, open, read, write



     -----------------------------------------------------------------
     close
     -----------------------------------------------------------------

     祭        뢠 䠩.

     ⠪         int close(int handle);

     ⨯         io.h

     砭         close 뢠 䠩  ਯ஬ 㪠 
                       ࠬ handle.  handle -  ਯ  䠩,
                       祭  १ 맮 㭪権: _creat,
                       creat,  creatnew,  creattemp, dup, dup2, _open,
                       open.

                       砭. 㭪  close   뢠 ᨬ
                       Ctrl-Z   䠩.  ᫨  e室 㪠-
                        ࠭⥫ 䠩 trl-Z,   -
                         ᨬ । ⨥ 䠩.

     頥       ᯥ譮    襭  close 頥 0,
     祭           ⨢ 砥 (-1).

                       ᫨ handle  ᮮ⢥ ਯ -
                       ⮣ 䠩, close 頥 祭 -1, -
                        errno ᢠ 祭:

                            EBADF - ७ ਯ 䠩

     ७ᨬ     close 㯭  ⥬ UNIX,

      ⠪      chize, _close, creat, creatnew, dup, fclose,
                       open, sopen



     -----------------------------------------------------------------
     closegraph
     -----------------------------------------------------------------

     祭          ᪮ ०.

     ⠪         #include<graphics.h>
                       void far closegraph(void);

     ⨯         graphics.h

     砭         closegraph ᢮   ,  뤥
                        ᪮ ⥬,   頥 ࠭  
                       ०,      ஬        ।  맮
                       initgraph.  (᢮     ⮢
                       ᪮ ⥬, ⠪  ࠩ, 
                        ७ , ⢫ १ 맮
                       _graphfreemem.)

     頥      .
     祭

     ७ᨬc      㭪 ࠡ⠥ ⮫쪮  IBM PC  ᮢ-
                       ⨬      稨 ᮮ⢥
                       ᪨ ஢.

      ⠪      initgraph, setgraphbufsize



     -----------------------------------------------------------------
     clreol
     -----------------------------------------------------------------

     祭        ࠥ  ⥪⮢   ப.

     ⠪         void clreol(void);

     ⨯         conio.h

     砭         clreol ࠥ  ᨬ   樨  
                         ப.  ⠥  .

     頥      .
     祭

     ⨬      㭪 ࠡ⠥ ⮫쪮   ᥬ⢠
                       IBM PC  ᮢ⨬   .

      ⠪      clrscr, delline, window



     -----------------------------------------------------------------
     clrscr
     -----------------------------------------------------------------

     祭        頥 ⥪⮢ .

     ⠪         void clrscr(void);

     ⨯         conio.h

     砭         clrscr 頥 ⥪饥 ⥪⮢     -
                           孨  㣮 ( -
                        1, 1).

     頥      .
     祭

     ⨬      㭪 ࠡ⠥ ⮫쪮   ᥬ⢠
                       IBM PC  ᮢ⨬   .

      ⠪      clreol, delline, window



     -----------------------------------------------------------------
     _control87
     -----------------------------------------------------------------

     祭        । ࠢ饥 ᫮ ᫥  -
                       饩 窮.

     ⠪         unsigned int _control87(unsigned int new,
                                                   unsigned int mask)

     ⨯         float.h

     砭         _control87      -
                         ࠢ饥  ᫮ ᫥  饩
                       窮.

                       ࠢ饥 ᫮  ⨯ unsigned int,  -
                           ᫮ । ᮮ⢥-
                       騥 ० 믮  ᫥   -
                       饩 窮.

                       _control87 ௮ᬠਢ   ࠬ mask
                        ᫨ -  ࠢ 0,  ᮮ⢥-
                       騩   ࠬ new ।  -
                        ᮮ⢥饣    ࠢ饬  ᫮
                       ᫥  饩 窮.

                        ।⠢ ⥩訩 ਬ ࠡ 㭪-
                       樨 _cntrol87:

                       室 ࠢ饥 ᫮  0100 0011 0110 0011

                                   mask            1000 0001 0100 1111
                                   new             1110 1001 0000 0101

                        ࠢ饥 ᫮     1100 0011 1010 0101

                       E᫨ 祭 mask ࠢ 0,  _control87 -
                       頥 ࠢ饥 ᫮ ᫥  饩
                       窮   .

     頥       頥  ᫮ 祭 ᮤঠ
     祭          ࠢ饥 ᫮ ᫥   饩  -
                       .  (  float.h   ஡ ᠭ
                       ⮢, 頥 ⮩ 㭪樥).

      ⠪      _c1ear87, _fpreset, signal, _status87

     ਬ
                       #unclude <math.h>
                       #unclude <float.h>
                       #unclude <stdio.h>

                       #define CW_NEW ( CW_DEFAULT | EM_ZERODIVIDE
                                                       | EM_OVERFLOW )
                       #define MASK_ALL (0xFFFF)

                       main()
                       {
                          float a, b, c;

                          _control87(CW_NEW | EM_INVALID, MASK_ALL);

                          a = 1.0;
                          b = 0.0;
                          c = a/b;


                          if(_status87() & SW_ZERODIVIDE)
                          {
                            fprintf(stderr, "   .\n");
                            _clear87();
                            return(1);
                           }
                       }



     -----------------------------------------------------------------
     coreleft
     -----------------------------------------------------------------

     祭        頥 ࠧ ᢮ .

     ⠪           ⭮  (tiny),    (small)  ।
                       (medium)  :

                            unsigned coreleft(void);

                        ⭮(compact),  让(large)  ஬-
                       (huge)  :

                            unsigned long coreleft(void);

     ⨯         alloc.h

     砭         coreleft  ࢠ頥  ࠧ ᢮ .
                         ࠧ 祭    ᨬ  
                       ᯮ㥬  .

     頥            coreleft  頥
     祭          ᫮  ᯮ짮    祩
                        ⥪,       - ᫮ ᯮ짮
                         ⥪  ᥣ⮬   256.

     ७ᨬ     coreleft 㭨쭠   MS-DOS.

      ⠪      allocmem, brk, farcoreleft, malloc



     -----------------------------------------------------------------
     cos
     -----------------------------------------------------------------

     祭        ᫥ ᨭ.

     ⠪         #include<math.h>
                       double cos(double x);

     ⨯         math.h

     砭         㭪 頥 ᨭ 室 ࠬ.
                        (ࠬ )   ࠤ.

     頥      cos 蠥 祭    -1  1.
     祭

                       ࠡ稪 訡    ⮩ 㭪樨  
                       ஢   㭪樨 matherr.

     ७ᨬ     㭪 㯭  ⥬ ⨯ UNIX 
                       ᮢ⨬  ANSI .

      ⠪      acos, asin, atan, atan2, cosh, matherr, sin,
                       sinh, tan, tanh



     -----------------------------------------------------------------
     cosh
     -----------------------------------------------------------------

     祭        ᫥ ࡮᪮ ᨭ.

     ⠪         #include<math.h>
                       double cosh(double x);

     ⨯         math.h

     砭         cosh   ࡮᪠ ᨭ ॠ-
                        㬥.

     頥      osh 頥 ࡮᪨ ᨭ 室-
     祭           㬥.

                        ९  浪 (overflow) cosh -
                       頥 祭 HUGE_VAL ᮮ饣 
                          ६   errno  ᢠ  祭
                       ERANGE.

                       ࠡ稪 訡  ⮩ 㭪樨    
                       ஢   㭪樨 matherr.

     ७ᨬ     㭪 㯭  ⥬ ⨯ UNIX  ᮢ-
                       ⨬  ANSI .

      ⠪      acos, asin, atan, atan2, cos, matherr, sin,
                       sinh, tan, tanh



     -----------------------------------------------------------------
     country
     -----------------------------------------------------------------

     祭        ।  ଠ ।⠢,  ਭ 
                       ࠭.

     ⠪         #include<dos.h>
                       struct country *country(int countrycode, struct
                                                   country *countryp);

     ⨯         dos.h

     砭         country ।,  ᨬ  ࠭ ଠ
                       ।⠢ ᯥ樠 , ⠪  -
                       ,  ६,  . 祭 ⠭-
                        ⮩ 㭪樥,   ᯮ㥬
                       ᨨ DOS.

                       ᫨ countryp  祭 (-1),  롨ࠥ-
                        ࠭ ᮮ⢥ 祭 countrycode,
                       ஥   㫥.  ⨢ -
                       砥    country,  㪠뢠 countryp,
                        ଠ樥, 饩 :

                       - ⥪饩 ࠭ (᫨ countrycode ࠢ 0) 

                       - ࠭,  countrycode.

                        country । ᫥騬 ࠧ:

                       struct country {
                         int co_date;      /* ଠ  */
                         char co_curr[5];  /*  ᨬ */
                         char co_thsep[2]; /* ࠧ⥫  */
                         char co_desep[2]; /*  ࠧ⥫*/
                         char co_dtsep[2]; /* ࠧ⥫  */
                         char co_tmsep[2]; /* ࠧ⥫ ६ */
                         char co_currstyle;/*    */
                         char co_digits;   /* ⢮ 
                                                      죠 */
                         char co_time;     /* ଠ ६ */
                         char co_case;     /* ॣ஢  */
                         char co_dasep[2]; /* ࠧ⥫  */
                         char co_fill[10]; /* ⥫ */

                         };

                       ଠ   co_date ᫥騩:

                          0     ଠ , , ;
                          1  ய -       , , ;
                          2   -       , , .

                                co_currstyle
                       ᫥騬 ࠧ

                          0 -  ᨬ  ।  ᫮
                              祭  ஡;
                          1 -  ᨬ ᫥  ᫮ -
                              祭  ஡;
                          2 - ਠ 0,   ஡;
                          3 - ਠ 1,   ஡.

     頥         ᯥ譮   믮   㭪   country
     祭          頥 㪠⥫ - countryp.  砥 訡-
                        country 頥 NULL.

     ७ᨬ     country 㯭  ⥬ DOS ᨨ 3.0 
                       .



     -----------------------------------------------------------------
     cprintf
     -----------------------------------------------------------------

     祭        ࠢ ଠ஢ 뢮  ᮫.

     ⠪         int cprintf(const char *format[,㬥,...]);

     ⨯         conio.h

     砭         cprintf  ᯮ짮 ६ ᫮
                       ࠬ஢. 㭪 믮  뢮 㬥⮢
                         ⥪饥  ⥪⮢  .  ଠ 뢮 
                        㬥     ப  ଠ,
                       ।塞 㪠⥫ format.  ᫮ -
                         ப ଠ⮢  ᮢ   -
                       ⢮ 㬥⮢.

                       砭ᯮ㥬 ଠ⮢ ਢ  -
                       ᠭ 㭪樨  printf.    ⫨稥    㭪権
                       fprintf    printf,    ᯮ짮 cprintf
                       ᨬ  ப (\n)  ਢ  
                       ⪨.  室   ப  㭪樨
                       cprintf 室 ᯮ짮   - "\r\n".

     頥      cprintf 頥 ⢮ 뢥 .
     祭

     ७ᨬ      㭪 ࠡ⠥ ⮫쪮   ᥬ⢠
                       IBM PC    ᮢ⨬   .

      ⠪      directvideo (६), fprintf, printf,
                       putch, sprintf, vprintf

     ਬ             printf



     -----------------------------------------------------------------
     cputs
     -----------------------------------------------------------------

     祭        뫠  ப  ࠭,  ⥪饥  ⥪⮢
                       .

     ⠪         int cputs(const char *string);

     ⨯         conio.h

     砭         cputs 뢮 ࠭祭 㫥 ப string
                        ⥪饥 ⥪⮢ .

                       ப 뢠  ।⢥    
                       ࠭ १ 맮 BIOS,  ᨬ  祭
                       ६ directvideo.

                        ⫨稥    㭪樨 puts,   ᯮ짮
                       cputs ᨬ  ப (\n)    ਢ  
                        ⪨.   室   ப
                        㭪樨 cputs 室 ᯮ짮   -
                       "\r\n".

     頥      cputs 頥 㪠⥫  ᫥
     祭          뢥 ᨬ.

     ७ᨬ      㭪 ࠡ⠥ ⮫쪮   ᥬ⢠
                       IBM PC    ᮢ⨬   .

      ⠪      directvideo (६), putch, puts



     -----------------------------------------------------------------
     _creat
     -----------------------------------------------------------------

     祭          䠩  ⠢ -
                       騩  १.

     ⠪         #include<dos.h>
                       int _creat(const char *path, int attrib);

     ⨯         io.h

     砭         _creat    맮  砥  attrib  -  ᫮
                       ਡ MS-DOS.   ਡ  
                       ⠭.  ᥣ 뢠  筮
                       ०.   ᯥ譮 ᮧ 䠩  㪠⥫
                       䠩 ⠭  砫 䠩.  -
                          ⥭, ⠪   .

                       ᫨ ⠪ 䠩 㦥 ,   ࠧ -
                       .  (  筮 㭨⮦ 䠩 
                       ᫥騬 ᮧ 䠩  ⥬  ᠬ -
                       .)

                       㬥 attrib    _creat     
                       ᫥ ⠭ (।  dos.h):

                          FA_RDONLY       쪮 ⥭
                          FA_HIDDEN        䠩
                          FA_SYSTEM       ⥬ 䠩

     頥      _creat  ᯥ譮 襭 頥 
     祭          ਯ 䠩 - 楫 ⥫쭮 ᫮,
                        ⨢ 砥 -1.

                        訡 errno ᢠ    ᫥-
                        祭:

                          ENOENT -    䠩  
                          EMFILE - ᫨誮   䠩
                          EACCES - 襭 ⠭ 㯠

     ७ᨬ     _creat 㭨쭠       MS-DOS.

      ⠪      _chmod, chsize, _close, close, creat, creatnew,
                       creattemp



     -----------------------------------------------------------------
     creat
     -----------------------------------------------------------------

     祭          䠩   ⠢  -
                       騩  १.

     ⠪         #include<sys\stat.h>
                       int creat(const char *path, int permiss);

     ⨯         io.h

     砭         creat ᮧ  䠩  ⮢   १-
                         騩  䠩,    ࠬ஬
                       path.  ࠬ permiss ਬ ⮫쪮  
                       ᮧ  䠩.

                       , ᮧ creat, ᥣ ᮧ  -
                         (०),   쭮 ६
                       _fmode (O_TEXT  O_BINARY).

                       ᫨ 䠩   ⠭ ਡ -
                       ,  creat ⠭  䠩 ࠢ 0
                       ,   ਡ 䠩. ᫨ 䠩 -
                        ਡ "⮫쪮  ⥭",     -
                       .

                        맮  creat  ஢  ⮫쪮    
                       (S_IWRITE ) ࠬ permiss.  ᫨  
                         ⠭    0 - 䠩 뢠 ⮫쪮
                        ⥭.  㣨 ਡ MS-DOS ⠭-
                         0.

                       permiss      ᫥ 祭
                       (।  sys\stat.h )

                       祭 permiss          襭 㯠
                       ----------------          --------------------
                       S_IWRITE                    
                       S_IREAD                     ⥭
                       S_IREAD | S_WRITE           ⥭  

                       砭:  DOS ࠧ襭    
                       ᮡ ࠧ襭  ⥭.

                        訡  errno  ਭ    ᫥
                       祭:

                          ENOENT -    䠩  
                          EMFILE - ᫨誮   䠩
                          EACCES - 襭 ⠭ 㯠

     頥      creat  ᯥ譮 襭 頥  
     祭          ਯ 䠩 - 楫 ⥫쭮 ᫮,
                        ⨢ 砥 -1.

                        訡 errno ᢠ    ᫥-
                        祭:

                          ENOENT -    䠩  
                          EMFILE - ᫨誮   䠩
                          EACCES - 襭 ⠭ 㯠

     ७ᨬ     creat 㯭  ⥬ ⨯ UNIX.

      ⠪      _chmod,  chsize,   close,   _creat,   creatnew,
                       creattemp, dup,  dup2,   _fmode   (६),
                       fopen, open, sopen, write



     -----------------------------------------------------------------
     creatnew
     -----------------------------------------------------------------

     祭          䠩.

     ⠪         #include<dos.h>
                       int creatnew(const char *path, int attrib);

     ⨯         io.h

     砭         creatnew 筠 _creat,   ᪫祭 -
                       ,      ᫨  䠩  㦥  ,  맮
                       creatnew 頥 訡,  ⠢ 䠩  
                       .

                       㬥 attrib   creatnew    
                       ᫥ ⠭ (।  dos.h):

                          FA_RDONLY       쪮 ⥭
                          FA_HIDDEN        䠩
                          FA_SYSTEM       ⥬ 䠩

     頥      creatnew    ᯥ譮  襭  頥
     祭           ਯ 䠩 - 楫  ⥫쭮
                       ᫮,   ⨢ 砥   -1.

                        訡 errno ᢠ    ᫥-
                        祭:

                          EEXIT  - 䠩 㦥 
                          ENOENT -    䠩  
                          EMFILE - ᫨誮   䠩
                          EACCES - 襭 ⠭ 㯠

     ७ᨬ     creatnew  㭨쭠    MS-DOS ᨨ 3.0  
                       ࠡ⠥   ࠭ .

      ⠪      close, _creat, creat, creattemp, dup, dup2,
                       _fmode (६), open
