¸®´ª½º ÇÁ·Î±×·¡¸Ó¸¦ À§ÇÑ °¡À̵å
8. ¹®ÀÚ´ÜÀ§ ±×·¡ÇȽº (Character Cell Graphics)
ÀÌÀåÀº ȼÒ(pixel)¸¦ ±âº»À¸·Î ÇÏÁö¾Ê´Â, ¹®ÀÚ¸¦ ±âº»À¸·Î Çϴ ȸé ÀԷ°ú Ãâ·ÂÀ» ´Ù·é´Ù.
¿ì¸®°¡ ¹®ÀÚ(character)¸¦ ¸»ÇÒ ¶§, ¹®ÀÚ´Â ¹®ÀÚÁýÇÕ(charset)¿¡ µû¶ó º¯ÈµÇ´Â ȼÒ(pixel)ÀÇ
Á¶ÇÕÀ» ÀǹÌÇÑ´Ù. ÅؽºÆ®(text)°¡ ȼÒ(pixel) ±×·¡ÇȺ¸´Ù ¸Å¿ì »¡¸® 󸮵DZ⠶§¹®¿¡
±×·¡ÇÈ Ä«µå(graphic card)´Â ÀÌ¹Ì ÇÑ°³ÀÌ»óÀÇ ¹®ÀÚÁýÇÕ(charset)À» Á¦°øÇÏ°í, ±âº»ÀûÀ¸·Î
ÅؽºÆ®(charset) ¸ðµå¿¡¼ µ¿ÀÛÇÑ´Ù. °£´Ü(¹«µò)ÇÏ°í Áö°Ü¿î ÅؽºÆ® Ç¥½ÃÇÏ´Â °Í ÀÌ»óÀ¸·Î
´Ü¸»±â¸¦ ´Ù·ê ¼ö ÀÖ´Ù. ¸®´ª½º ´Ü¸»±â(terminal), ƯÈ÷ ÄܼÖ(console)ÀÌ Á¦°øÇϴ Ưº°ÇÑ
Ư¡µéÀ» ¾î¶»°Ô »ç¿ëÇÒ °ÍÀΰ¡¿¡ ´ëÇØ ¼³¸íÇÏ°íÀÚ ÇÑ´Ù.
- printf, sprintf, fprintf, scanf, sscanf, fscaf
ÀÌ·¯ÇÑ ÇÔ¼öµéÀ» °¡Áö°í (Ç¥ÁØÃâ·Â standard output), (Ç¥ÁØ¿¡·¯ standard error), ¶Ç´Â
FILE *stream (files, ¿¹¸¦ µé¸é)¿Í °°Àº ´Ù¸§ ½ºÆ®¸²(stream)¿¡ ÇüÅ°¡ ÁöÁ¤µÈ(formatted)
¹®ÀÚ¿À» Ãâ·ÂÇÒ ¼ö ÀÖ´Ù. Scanf(...)´Â ºñ½ÁÇÑ ¹æ¹ýÀ¸·Î ÇüÅ°¡ ÁöÁ¤µÈ(formatted)
ÀÔ·ÂÀ» Á¦°øÇÑ´Ù.
- termcap
´Ü¸»±â ´É·Â µ¥ÀÌŸº£À̽º (The TERMinal CAPabilites database)´Â /etc/termcap À̶ó´Â
ASCII ÆÄÀÏ¿¡ µé¾îÀÖ´Â ´Ü¸»±â Ư¡ °³Ã¼(terminal description entries)µéÀÇ ÁýÇÕÀÌ´Ù.
¿©±â¼ Ư¼ö¹®ÀÚµéÀ» ¾î¶»°Ô Ç¥½ÃÇϴ°¡, ¾î¶»°Ô µ¿ÀÛ(delete,insert characters or line)µéÀ»
¼öÇàÇϴ°¡ ±×¸®°í ´Ü¸»±â¸¦ ¾î¶»°Ô ÃʱâÈ Çϴ°¡¿¡ ´ëÇÑ Á¤º¸¸¦ ãÀ» ¼ö ÀÖ´Ù.
ÀÌ µ¥ÀÌŸº£À̽º´Â, ¿¹¸¦µé¸é, vi ¿¡µðÅÍ¿¡ ÀÇÇØ »ç¿ëµÈ´Ù. ´Ü¸»±â ´É·Â(terminal capabilities)
(termcap(3x))À» »ç¿ëÇÏ°í ÀÐÀ» ¼ö ÀÖ´Â view ¶óÀ̺귯¸® ÇÔ¼öµéÀÌ ÀÖ´Ù.
ÀÌ µ¥ÀÌŸº£À̽º¸¦ °¡Áö°í, ÇÁ·Î±×·¥Àº °°Àº Äڵ带 °¡Áø ´Ü¸»±â¿¡¼ ´Ù¾çÇÑ ÀÛ¾÷À» ÇÒ ¼ö ÀÖ´Ù.
termcap µ¥ÀÌŸº£À̽º¿Í ¶óÀ̺귯¸® ÇÔ¼öµéÀÇ »ç¿ëÀº ´Ü¸»±â¿¡ ´ëÇØ ¿ÀÁ÷ ÇÏÀ§ ¼öÁØÀÇ Á¢±Ù
(low level access)À» Á¦°øÇÑ´Ù. ¼Ó¼º(attributes)°ú »ö»ó(colors)°ú ¸Å°³º¯¼öȵÈ(parameterized)
Ãâ·ÂÀ» ¹Ù²Ù´Â °ÍÀº ÇÁ·Î±×·¡¸Ó¿¡ ÀÇÇØ ¼öÇàµÇ¾î¾ß¸¸ ÇÑ´Ù.
- terminfo database
´Ü¸»±â Á¤º¸ µ¥ÀÌŸº£À̽º(the TERMinal INFOrmation database)´Â termcap database¸¦ ±âÃÊ·Î ÇÏ°í
´Ü¸»±â ´É·Â(terminal capabilities)À» ¼³¸íÇÏ°í ÀÖÁö¸¸, termcapº¸´Ù´Â ´õ³ôÀº
¼öÁØ(higher level)ÀÌ´Ù. terminfo¸¦ »ç¿ëÇÏ¿©, ÇÁ·Î±×·¥Àº È¸é ¼Ó¼º(screen attributes),
Æã¼ÇÅ°(function keys)¿Í °°Àº Ưº°ÇÑ Å°ÀÇ »ç¿ë°ú ±×¿ÜÀÇ °ÍµéÀ» ½±°Ô ¹Ù²Ü ¼ö ÀÖ´Ù.
µ¥ÀÌŸº£À̽º´Â /usr/lib/terminfo/[A-z,0-9]*¿¡¼ ãÀ» ¼ö ÀÖ´Ù.
¸ðµç ÆÄÀÏÀº ÇÑ ´Ü¸»±â¸¦ ¼³¸íÇÑ´Ù.
- curses
Terminfo´Â ÇÁ·Î±×·¥¾È¿¡¼ ´Ü¸»±â(terminal)¸¦ ´Ù·ç±â(handling) À§ÇÑ ÁÁÀº ±âÃÊÀÌ´Ù.
(BSD-)CURSES ¶óÀ̺귯¸®´Â ´Ü¸»±â¿¡ ´ëÇØ »óÀ§ ¼öÁØÀÇ Á¢±Ù(high level access)À» °¡´ÉÇÏ°Ô Çϸç,
terminfo database¸¦ ±âÃÊ·Î ÇÑ´Ù. curses´Â ȸé»óÀÇ À©µµ¿ì¸¦ ¿°í Á¶Á¾ÇÒ ¼ö ÀÖµµ·Ï Çϸç,
ÀԷ°ú Ãâ·Â ÇÔ¼öµéÀÇ ¿Ïº®ÇÑ ÁýÇÕÀ» Á¦°øÇÏ°í 150°³ ÀÌ»óÀÇ ´Ü¸»±â¿¡ ´ëÇØ ´Ü¸»±âÀÇ µ¶¸³ÀûÀÎ
¹æ½ÄÀÇ ºñµð¿À ¼Ó¼ºÀ» º¯°æ½Ãų ¼ö ÀÖ´Ù. curses ¶óÀ̺귯¸®´Â /usr/lib/libcurses.a¿¡¼
ãÀ» ¼ö ÀÖ´Ù. ÀÌ°ÍÀº cursesÀÇ BSD ¹öÀüÀÌ´Ù.
- ncurses
Ncurses´Â ÇÑ´Ü°è Çâ»óµÈ °ÍÀÌ´Ù. 1.8.6 ¹öÀü¿¡¼´Â SYSVR4¿¡¼ Á¤ÀÇµÈ AT&T curses¿Í ȣȯ
µÇ¾î¾ß¸¸ ÇÏ°í »ö»ó Á¶Á¾(color manipulation), Ãâ·ÂÀ» À§ÇÑ Æ¯º°ÇÑ ÃÖÀûÈ(special optimization
for output), ´Ü¸»±â ÁöÁ¤ ÃÖÀûÈ(terminal specific optimizations) µî°ú °°Àº È®ÀåÀ» °¡Á®¾ß¸¸
ÇÑ´Ù. ÀÌ°ÍÀº SUN-OS, HP, Linux¿Í °°Àº ¸¹Àº ½Ã½ºÅ۵鿡¼ Å×½ºÆ® µÇ¾î ¿Ô´Ù. ´Ù¸¥ °ÍµéÀ» ´ë½ÅÇؼ
ncurses¸¦ »ç¿ëÇÒ °ÍÀ» ÃßõÇÑ´Ù. SYSV À¯´Ð½º ½Ã½ºÅÛ(SUNÀÇ Solaris°°Àº) »ó¿¡¼´Â nurses¿Í °°Àº
±â´ÉÀ» °®´Â curses ¶óÀ̺귯¸®°¡ Á¸ÀçÇØ¾ß ÇÑ´Ù. (½ÇÁ¦·Î solaris curses´Â ¸¶¿ì½º Áö¿ø°ú
º¸´Ù ¸¹Àº ±â´ÉÀ» °¡Áö°í ÀÖ´Ù.)
´ÙÀ½ÀÇ Àå¿¡¼ ´Ü¸»±â¸¦ ´Ù·ç±â À§ÇØ ´Ù¸¥ ÆÐÅ°ÁöµéÀ» ¾î¶»°Ô »ç¿ëÇϴ°¡¿¡ ´ëÇØ ¼³¸íÇÏ°Ú´Ù.
¸®´ª½º´Â termcapÀÇ GNU-¹öÀüÀ» °¡Áö°í ÀÖ°í ¿ì¸®´Â curses ´ë½Å¿¡ nurses¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
ÀÌÀü:7.2 »ç¿îµå Ä«µå ÇÁ·Î±×·¡¹Ö
´ÙÀ½:8.1 libc¾ÈÀÇ I/O ÇÔ¼ö
Copyright (c) 1996,1997 by Euibeom.Hwang & SangEun.Oh All Rights Reserved
Email To:Webmaster ,
Another address
LAST UPDATE Dec 1,1997
Created Dec 1,1997