(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b

Similar documents
/* sansu1.c */ #include <stdio.h> main() { int a, b, c; /* a, b, c */ a = 200; b = 1300; /* a 200 */ /* b 200 */ c = a + b; /* a b c */ }

¥ƥ­¥¹¥ȥ¨¥ǥ£¥¿¤λȤ¤˽

( )!?

文字コードとその実装

johokiso-char.pdf.pdf

( ) Shift JIS ( ) ASCII ASCII ( ) 8bit = 1 Byte JIS(Japan Industrial Standard) X 0201 (X ) 2 Byte JIS ISO-2022-JP, Shift JIS, EUC 1 Byte 2 By

273? C

Microsoft Word - C.....u.K...doc

10

解きながら学ぶC言語

C C UNIX C ( ) 4 1 HTML 1

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology

1 1.1 PC PC PC PC PC workstation PC hardsoft PC PC CPU 1 Gustavb, Wikimedia Commons.

joho07-1.ppt


I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

A9RF112.tmp.pdf

note.dvi

C言語によるアルゴリズムとデータ構造

ex12.dvi



SHOBI_Portal_Manual

I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

untitled

ESMPRO/DeliveryManager

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

I 2 tutimura/ I 2 p.1/??

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >=

X Window System X X &


C 2 / 21 1 y = x 1.1 lagrange.c 1 / Laglange / 2 #include <stdio.h> 3 #include <math.h> 4 int main() 5 { 6 float x[10], y[10]; 7 float xx, pn, p; 8 in

2 1. Ubuntu 1.1 OS OS OS ( OS ) OS ( OS ) VMware Player VMware Player jp/download/player/ URL VMware Plaeyr VMware

A

:30 12:00 I. I VI II. III. IV. a d V. VI

No ii

Networking Semester 802.3

debug ( ) 1) ( ) 2) ( ) assert, printf ( ) Japan Advanced Institute of Science and Technology

P05.ppt

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.

ohp.mgp

r07.dvi

ohp07.dvi

情報量・音声画像動画のA/D変換

橡J_ptvr_common.PDF

double float

u302.book

Microsoft PowerPoint - char-1605temp.ppt [互換モード]

アセンブラ入門(CASL II) 第3版

:30 12:00 I. I VI II. III. IV. a d V. VI

lexex.dvi

Java updated

GNU Emacs GNU Emacs


2 BASIC DATA DATA DATA DATA Data BASIC tbasic 1 File OS OS *2 (0, 1) OS 0,1 0,1 *2 USB OS

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

/

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

随筆 私本太平記

2


数学論文の書き方 - 第1回:入門編

UNIX

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

SOC Report

08+11Extra

内閣官房情報セキュリティセンター(NISC)


2 TEX, TEX Donald Knuth 2 3 ( ) TEX ( ) , WWW 4 TEX (.tex,.dvi,.ps,.pdf ) 3 TEX ( ) ( ) 5 (.tex Windows, Mac, Unix, MS-DOS TEX TEX ( ) & METAFON

chpg98-m.dvi

only my information

4 Mule(Emacs)

untitled

,,,,., C Java,,.,,.,., ,,.,, i

1 OS OS OS Macintosh

OS Windows Mac OS Windows Mac OS Windows XP Mac OS X OS Windows 95 Mac OS

slice00_install.dvi

新・明解Java入門

Microsoft Word - 中間試験 その1_解答例.doc

2) TA Hercules CAA 5 [6], [7] CAA BOSS [8] 2. C II C. ( 1 ) C. ( 2 ). ( 3 ) 100. ( 4 ) () HTML NFS Hercules ( )

Taro-ファイル処理(公開版).jtd

untitled

untitled

JP1/Integrated Management - Service Support 操作ガイド

</ul> (XXX ) 15 ( )15 35 (XXX ) 15 ( ) [4] HTML HTML HTML HTML 1. <!--- CONTENTS_TITLE_TABLE ---> <b><font size=+1>xxx </font></b> <sm

文字コード略歴 よこやままさふみ社内勉強会 2012/05/18 文字コード略歴 Powered by Rabbit 2.0.6

8 / 0 1 i++ i 1 i-- i C !!! C 2

貪欲アルゴリズム

‚æ2›ñ C„¾„ê‡Ìš|

IP IP DHCP..


unix.dvi

untitled

ex14.dvi

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

Transcription:

II 5 (1 2005 5 26 http://www.math.meiji.ac.jp/~mk/syori2-2005/ UNIX (Linux Linux 1 : 2005 http://www.math.meiji.ac.jp/~mk/syori2-2005/jouhousyori2-2005-00/node2. html ( (Linux 1 2 ( ( http://www.meiji.ac.jp/mind/tool/internet-license/ WWW (1 Windows [ ] [ 2 ] 1 Linux Linux Linux 1

(2 Linux Mozilla [ ] [ ] [ ] [ ] URL http://www.isc.meiji.ac.jp/proxy.pac 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh bash a308-00% chsh ee48099 Password: [/bin/csh]: /bin/tcsh a308-00% 3 3.1 3 4 5 (bit 3, 4 8, 16 6 7 8 2 emacs emacs.cshrc & 3 electric digital computer ( 4 (digital ( 5 0 1 6 16 0 9, A, B, C, D, E, F 7 (byte 8 2 8 0 255 2 256 16 2 ( 2 8 = 16 2 8 (word 1 16 bits, 32 bits, 64bits 2

Windows UNIX ( (, etc. 9 3.2 UNIX ( ls -l wc ( K, M, G, T, P,.. (Le Systè me international d Unité s, SI deca (da, hecto (h, kilo (k, mega (M, giga (G, tera (T, peta (P, exa (E, zeta (Z, yotta (Y K= 1024 = 2 10 10 3, M= K 2 = 100, G= K 3, T = K 4, P = K 5 ( CD-ROM, MO, DVD, USB, 3.3 X ( ( 6 X ( (1 Windows Linux (UNIX 10 (CD-R USB, SD (a C TEX (.tex ( (b C 11 (emacs C 9 file file 10 11 ( UNIX which which emacs emacs /usr/bin/emacs 3

(c ( ( (d % du -ks ~ du -ks ~/.snapshot.snapshot df -k ( Windows (2 CD-ROM ( 650MB : K, M 1000 (1000 2 = 100 4 4.1 (text file 12 1 1 4.2 (ASCII emacs 12 Windows.txt OS 4

ascii.txt 012 ABC abc 2 13 isc-xas06% od -tx1c ascii.txt 0000000 30 31 32 0a 41 42 43 20 61 62 63 0a 0 1 2 \n A B C a b c \n 0000014 (od -tx1 16 0, 1, 0x30, 0x31, A, B, 0x41, 0x42, a, b, 0x61, 0x62, \n ( 0x0a ( 0x20 ( ASCII 13 od -cx od -tx1c ( od 14 16 0x (C 5

4.3 ASCII print code table.c /* * print_code_table.c --- ASCII ( * : gcc -o print_code_table print_code_table.c * :./print_code_table * : gcc print_code_table.c ;./a.out #include <stdio.h> int main( { int code; /* 0x20 (==32 0x7e (==126 for (code = 0x20; code <= 0x7e; code++ { /* 4 if (code % 4 == 0 printf("\n"; /* 16, 10, printf("0x%02x (%3d: %c printf("\n"; return 0; ", code, code, code; (WWW WWW ( Mozilla & C a % b a b putchar( ; printf("%c", ; printf( 16 %x (%d 10 4.4 JIS ( 15 1 16 JIS 0x374b 0x37, 0x4b ASCII 7, K Solaris (UNIX EUC emacs 15 JIS 7000 JIS 6

kanji.txt od -x1 kanji.txt 0xb7, 0xcb 2 JIS 8 0x80 : 0x37 + 0x80 = 0xb7, 0x4b + 0x80 = 0xcb ( ASCII 0x7f 0x80 JIS EUC ASCII : nkf kanji.txt a308-00% nkf -j kanji.txt > kanji-jis.txt a308-00% nkf -s kanji.txt > kanji-ms.txt (nkf A JIS 16 ISO-2022-JP ( kterm JIS a308-00% cat kanji-jis.txt a308-001% od -tx1 kanji-jis.txt 0000000 1b 24 42 37 4b 45 44 1b 28 42 20 1b 24 42 4d 34 0000020 3b 4b 1b 28 42 0a 0000026 a308-00% JIS 0x37, 0x4b MS ( (Windows, Mac ( emacs 16 0x1b, 0x24, 0x42 ASCII 0x1b, 0x28, 0x42 7

a308-00% cat kanji-ms.txt jc S ( a308-00% od -tx1 kanji-ms.txt 0000000 8c 6a 93 63 20 97 53 8e 6a 0a 0000012 a308-00% 0x8c, 0x6a D JIS MS C 2005 6 2 emacs JIS ( a308-01% emacs kanji-jis.txt & a308-01% nkf -e kanji-jis.txt > kanji.txt a308-01% nkf -s kanji-jis.txt > kanji-ms.txt a308-01% od -tx1 kanji.txt a308-01% od -tx1 kanji-jis.txt a308-01% od -tx1 kanji-sjis.txt 1 print code table.c ASCII print kanji table.c Subject ( 1 E 4.5 WWW mycat.c cat ( mycat.c a308-00% gcc -o mycat mycat.c a308-00%./mycat mycat.c mycat.c print file( 8

EUC mydump.c print file void print_file(file * fp { int c, c2; /* c while ((c = getc(fp!= EOF { if (c >= 0x80 { /* 0x80 1 1 c2 = getc(fp; printf("0x%02x 0x%02x: %c%c\n", c, c2, c, c2; else if (c < 0x20 c == 0x7f /* 0x20 0x7f printf("0x%02x\n", c; else /* printf("0x%02x: %c\n", c, c; a308-00% cat ascii_and_kanji.txt I am. a308-00%./mydump ascii_and_kanji.txt 0x49: I 0x20: 0x61: a 0x6d: m 0x20: 0xb7 0xcb: 0xc5 0xc4: 0xcd 0xb4: 0xbb 0xcb: 0x2e:. 0x0a a308-00% 2 Subject ( 2 ( : 3 ( \n ( 0x0a Subject ( 3 9

5 3 (,,, 4 JIS, EUC, SJIS syori2@math.meiji.ac.jp II 3 6 15 ( ( A UNIX (emacs, less nkf (Network Kanji code conversion Filter UNIX nkf -e EUC nkf -j JIS nkf -s MS MIME nkf -v kanji.txt JIS kanji-jis.txt a308-00% nkf -j kanji.txt > kanji-jis.txt qkc (Quick KANJI code Converter Windows qkc -eu EUC, UNIX qkc -ms MS, MS-DOS (Windows? kanji.txt MS kanji-ms.txt a308-00% cp kanji.txt kanji-ms.txt a308-00% qkc -ms kanji-ms.txt B ( ( WWW 10

ISO-2022-JP RFC http://www.noge.com/koba/network/rfc/rfc1468.html JUNET ASCII, JIS X 0201-1976, JIS X 0208-1978, JIS X 0208-1983 4 ASCII ( JIS X 0201 ( ASCII JIS X 0208 JIS ( ( ( JIS JIS X201 ( 17 RFC C URL 1. http://www.ryukyu.ad.jp/~shin/jdoc/ :- 2. by http://www.horagai.com/ (,, 2003, http: //www.horagai.com/www/salon/works/denno.htm WWW 17 MS-DOS ( JIS 11

D JIS MS jis2sjis.c /* JIS c1, c2 MS s1, s2 void jis2sjis(int c1, int c2, int *s1, int *s2 { if (c1 & 1 { c1 = (c1 >> 1 + 0x71; c2 += 0x1f; if (c2 >= 0x7f c2++; else { c1 = (c1 >> 1 + 0x70; c2 += 0x7e; if (c1 > 0x9f c1 += 0x40; *s1 = c1; *s2 = c2; E print-katsura.c /* * print-katsura.c --- JIS EUC #include <stdio.h> int main( { int j1, j2, e1, e2; j1 = 0x37; j2 = 0x4b; e1 = j1 + 0x80; e2 = j2 + 0x80; printf("%c%c\n", e1, e2; return 0; F [1] F.1 ASCII 12

ANSI (American National Standards Institute 18 ASCII (7-Bit Amarican National Standard Code for Information Interchange, 1963 F.2 ISO 646 ASCII ASCII ISO (International Organization for Standardization 19 ISO 646 (ISO/IEC 646:1991 Information technology ISO 7-bit coded character set for information interchange (1973 0x23 (#, 0x24 ($, 0x40 (@, 0x5b ([, 0x5c (\, 0x5d (], 0x5e (ˆ, 0x60 (, 0x7b ({, 0x7c (, 0x7d (, 0x7e ( 12 F.3 ISO 2022 ( F.4 ISO 8859 ASCII 8 ( 8 (MSB ASCII ISO 8859 ISO 8859-1 (1987 F.5 JIS C 6220, JIS X 0201 1. 7 ASCII SI (Shift In, 0x0e, SO (Shift Out, 0x0f SO SI 2. 8 ISO 8859 (MSB F.6 JIS (JIS C 6226, JIS X 0208 1978 JIS C 6226 0x21 0x7e 94 94 2 = 8836 1 ( JIS C 6220 2 ( JIS C 6226 JIS C 6226-1978 18 http://www.ansi.org/ 19 http://www.iso.ch/ 13

JIS X 0208-1983 JIS X 0208-1990 JIS X 0208-1997 F.7 JIS X 0212-1990 F.8 JIS X 0213-2000 F.9 : TRON,, GT F.9.1 TRON TRON (http://www.tron.org/ 150 BTRON OS 3 (2001 17 F.9.2 20 F.9.3 GT F.10 ISO 10646 F.11 Unicode F.12 ISO 10646-1:1993 = Unicode 1.1 [1],, (2001. [2],, 094 (2000. 20 http://www.mojikyo.org/ 14