diff jfbterm-0.3.12/INSTALL jfbterm-0.3.12-han-2/INSTALL
0a1,2
> This package has been patched with Hangul input support. 
> Please read INSTALL.ko for more details.
Only in jfbterm-0.3.12-han-2: INSTALL.ko
diff jfbterm-0.3.12/Makefile.am jfbterm-0.3.12-han-2/Makefile.am
18c18,22
< 		vterm.c vtermlow.c vterm.h
---
> 		vterm.c vtermlow.c vterm.h \
> 		automata.c automata.h \
> 		comp.c comp.h \
> 		hanja.c hanja.h \
> 		johabcode.c johabcode.h
20c24
< JFBTERM_CONFIG_FILE = jfbterm.conf.sample
---
> JFBTERM_CONFIG_FILE = jfbterm.conf
26c30,32
< 
---
> 	$(INSTALL_DATA) -d $(srcdir)/keyboard /usr/etc/hfbterm
> 	cp -r $(srcdir)/keyboard /usr/etc/hfbterm
> 	cp -r $(srcdir)/fonts /usr/etc/hfbterm
diff jfbterm-0.3.12/Makefile.in jfbterm-0.3.12-han-2/Makefile.in
68c68
< jfbterm_SOURCES =  		main.c main.h 		mytypes.h sequence.h 		fbcommon.c fbcommon.h 		fbdpsp.c fbdpsp.h 		font.c font.h 		picofont.c picofont.h 		getcap.c getcap.h 		message.c message.h 		pcf.c pcf.h 		pen.c pen.h 		term.c term.h 		util.c util.h 		csv.c csv.h 		vterm.c vtermlow.c vterm.h
---
> jfbterm_SOURCES =  		main.c main.h 		mytypes.h sequence.h 		fbcommon.c fbcommon.h 		fbdpsp.c fbdpsp.h 		font.c font.h 		picofont.c picofont.h 		getcap.c getcap.h 		message.c message.h 		pcf.c pcf.h 		pen.c pen.h 		term.c term.h 		util.c util.h 		csv.c csv.h 		vterm.c vtermlow.c vterm.h		automata.c automata.h		comp.c comp.h		hanja.c hanja.h		johabcode2.c johabcode.h
71c71
< JFBTERM_CONFIG_FILE = jfbterm.conf.sample
---
> JFBTERM_CONFIG_FILE = jfbterm.conf
86c86,87
< message.o pcf.o pen.o term.o util.o csv.o vterm.o vtermlow.o
---
> message.o pcf.o pen.o term.o util.o csv.o vterm.o vtermlow.o automata.o \
> comp.o hanja.o johabcode2.o
106c107
< .deps/vtermlow.P
---
> .deps/vtermlow.P .deps/automata.P .deps/comp.P .deps/hanja.P .deps/johabcode2.P
398a400,402
> 	$(INSTALL_DATA) -d $(srcdir)/keyboard /usr/etc/hfbterm
> 	cp -r $(srcdir)/keyboard /usr/etc/hfbterm
> 	cp -r $(srcdir)/fonts /usr/etc/hfbterm
Only in jfbterm-0.3.12-han-2: automata.c
Only in jfbterm-0.3.12-han-2: automata.h
Only in jfbterm-0.3.12-han-2: comp.c
Only in jfbterm-0.3.12-han-2: comp.h
Only in jfbterm-0.3.12-han-2: fonts
diff jfbterm-0.3.12/getcap.c jfbterm-0.3.12-han-2/getcap.c
33a34,39
> /*
>  * JFBTERM Hangul Patch (HFBTERM?)
>  * This code has been patched for Hangul input by :
>  * Young Chol Song (ntskystars@yahoo.com) 
>  */
> 
242,243c248,262
< 	
< 	if (*n == '+') {
---
> /* JFBTERM HANGUL PATCH */
> 	if (!strcmp(n, "keyboard")) {
> 		hangul_automata(-1, NULL, NULL);
> 		if(v[0] == '3') {
> 			print_warn("(**) Setting Keyboard to Sebulsik.\n");
> 			hangul_set_keyboard(3);	
> 		}
> 		if(v[0] == '2') {
> 			print_warn("(**) Setting Keyboard to Dubulsik.\n");
> 			hangul_set_keyboard(2);
> 		}
> 		hangul_automata(-1, NULL, NULL);
> 	}
> /* UP TO HERE */
> 	else if (*n == '+') {
Only in jfbterm-0.3.12-han-2: hanja.c
Only in jfbterm-0.3.12-han-2: hanja.h
Only in jfbterm-0.3.12-han-2: jfbterm.conf
Only in jfbterm-0.3.12: jfbterm.conf.sample
Only in jfbterm-0.3.12-han-2: johabcode.h
Only in jfbterm-0.3.12-han-2: johabcode2.c
Only in jfbterm-0.3.12-han-2: keyboard
diff jfbterm-0.3.12/pcf.c jfbterm-0.3.12-han-2/pcf.c
27a28,33
> /*
>  * JFBTERM Hangul Patch (HFBTERM?)
>  * This code has been patched for Hangul input by :
>  * Young Chol Song (ntskystars@yahoo.com)
>  */
> 
599c605,608
< 	memset(q->dglyph, 0xff, q->bytec);
---
> /* JFBTERM HANGUL PATCH 
> 	caused some problems in text browsers that didn't support Hangul well */
> 	memset(q->dglyph, 0x00, q->bytec); // default character
> /* UP TO HERE */
diff jfbterm-0.3.12/term.c jfbterm-0.3.12-han-2/term.c
26a27,32
> /*
>  * JFBTERM Hangul Patch (HFBTERM?)
>  * This code has been patched for Hangul input by :
>  * Young Chol Song (ntskystars@yahoo.com)
>  *
>  */
51a58
> #include <automata.h>
147a155,167
> /* JFBTERM HANGUL PATCH
> 	Get shift state - for detecting SHIFT+SPACE */
> int GetShiftState(void) {
> 	int na = 6, ns = 0; 	// ioctl TIOCLINUX func #6
> 	if(ioctl(fileno(stdin), TIOCLINUX, &na) == 0)
> 		ns = na;
> 	return ns;
> }
> 
> int show_fig; 	// shows what state hangul_automata is in
> /* UP TO HERE */
> 	
> 
155a176,181
> /* JFBTERM HANGUL PATCH 
> 		variables needed later in function */
> 	static u_char constr[BUF_SIZE+1];
> 	static int hconstr_tag;
> 	memset(constr, ' ', 2); // prevent garbage output
> /* UP TO HERE */
216c242
< 			ret = read(0, buf, BUF_SIZE);
---
> 			ret = read(0, buf, BUF_SIZE);/*BUF_SIZE);*/
226c252,305
< 				write(p->ptyfd, buf, ret);
---
> /* JFBTERM HANGUL PATCH **FIXME**
> 	Code for Hanterm automata attachment */
> 
> int c, i, ano_flag; // show_fig declared above
> for(i = 0; i < ret; i++) {
> 	c = buf[i];
> 	if(c == 27) { // simuate hanterm ESC behaviour
> 		if(get_hangul_state() && ret == 1) // if just ESC
> 			hangul_automata(-1, constr, constr);
> 		if(strncmp("  ", constr, 2) != 0) { // flush leftover char
> 			hangul_automata(-2, constr, constr);
> 			write(p->ptyfd, constr, 2);
> 		}
> 		write(p->ptyfd, buf, ret); // write ESC sequence
> 		i += ret; // no more chars to process, so get out
> 	}
> 	else { // normal key process
> 		if(c == ' ' && GetShiftState()) { // if Shift+Space
> 			hangul_automata(-1, buf, constr); // change input lang
> 			if(strncmp("  ", constr, 2) != 0) // flush leftover char
> 				write(p->ptyfd, buf, 2);
> 		}
> 		else { // normal character process
> 			memset(constr, ' ', 2); // erase garbage from last constr
> 			show_fig = hangul_automata(c, buf, constr);
> 			if(show_fig == 1) // english(?)
> 				write(p->ptyfd, buf, 1);
> 			if(show_fig == 2 || show_fig == 3) {
> 				/* **FIXME** (again?!) - needs to be modified
> 				 * needed to properly view char patterns
> 				 * like 'sksk'
> 				 */
> 				if(strncmp("  ", constr, 2) == 0) {
> 					constr[0] = buf[2];
> 					constr[1] = buf[3];
> 					ano_flag = 1; // needs to show constructed
> 				}
> 				write(p->ptyfd, buf, show_fig);
> 				if((strncmp(buf, constr, 2) != 0 || ano_flag == 1) &&
> 									show_fig == 2) {
> 					hconstr_tag = 2;
> 					ano_flag = 0;
> 				}
> 			}
> 			if(show_fig == 0) { // put composing chars on screen
> 				tvterm_emulate(&(p->vterm), constr, 2);
> 				p->vterm.pen.x -= 2;
> 				tvterm_refresh(&(p->vterm));
> 			}
> 		}
> 	}
> }
> 
> /* UP TO HERE */
233a313,322
> 				/* JFBTERM HANGUL PATCH **FIXME**
> 					when hconstruct_tag == 2 */
> 				if(hconstr_tag == 2) {
> 					tvterm_emulate(&(p->vterm), constr, 2);
> 					p->vterm.pen.x -= 2;
> 					tvterm_refresh(&(p->vterm));
> 					hconstr_tag = 0;
> 				}
> 				memset(constr, ' ', 2); // cleanup leftovers from show_fig == 3
> 				/* UP TO HERE */
Only in jfbterm-0.3.12-han-2: termcap.jfbterm
